From 49787645282cf0b6321cfaf003b7f14063f6aaf6 Mon Sep 17 00:00:00 2001 From: ccloli Date: Wed, 13 Mar 2024 09:37:27 +0000 Subject: [PATCH] deploy: af105404c01196da1e235a5d352dca4ac5c44687 --- designer/395.async.js | 2 +- designer/395.async.js.map | 2 +- designer/p__index.async.js | 2 +- designer/p__index.async.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer/395.async.js b/designer/395.async.js index 3e70cf9..57a11b8 100644 --- a/designer/395.async.js +++ b/designer/395.async.js @@ -931,7 +931,7 @@ background-color: #fff; } } -`;class o5 extends i().Component{constructor(e){super(e),this.changeRelativeUrl=e=>{e!==this.state.relativeUrl&&this.setState({relativeUrl:e})},this.onInputChange=e=>{const t=e.target.value.startsWith("/")?e.target.value:`/${e.target.value}`;this.changeRelativeUrl(t)},this.onPressEnter=e=>{var t,n;const r=e.currentTarget.value;null===(n=(t=this.props).onInputEnter)||void 0===n||n.call(t,r,e)},this.state={relativeUrl:e.startRoute||"/"}}componentDidUpdate(e,t){this.props.startRoute&&e.startRoute!==this.props.startRoute&&this.props.startRoute!==t.relativeUrl&&this.setState({relativeUrl:this.props.startRoute})}render(){const{disabled:e,onBack:t,onForward:n,onRefresh:r}=this.props;return i().createElement(c.xu,{className:"navigator",bg:"white",px:"l",py:"m",borderBottom:"solid",borderBottomColor:"line.normal",css:s5},i().createElement(c.xu,null,i().createElement(Ve,{icon:i().createElement(H2,null),onClick:t,title:"返回"}),i().createElement(Ve,{icon:i().createElement(t5,null),onClick:n,title:"前进"}),i().createElement(Ve,{icon:i().createElement(i5,null),onClick:r,title:"刷新"})),i().createElement(u.Input,{className:"navigatorInput",size:"small",value:this.state.relativeUrl,onChange:this.onInputChange,onPressEnter:this.onPressEnter,disabled:e}),i().createElement(a5,null))}}const a5=w((()=>{const e=I();return i().createElement(c.ZA,{attached:!0},i().createElement(Fe,{size:"s",selected:"desktop"===e.simulator.name,onClick:()=>{e.setSimulator("desktop")}},i().createElement(RJ,null)),i().createElement(Fe,{size:"s",selected:"phone"===e.simulator.name,onClick:()=>{e.setSimulator("phone")}},i().createElement(LJ,null)))}));function l5({isPreview:e,configFormatter:t,filesFormatter:n,onViewChange:r,onMessage:i,onLoad:s,sandboxType:o,startRoute:a,injectScript:c}={}){const u=D(),p=I(),d=l(),f=null!=e?e:p.isPreview,h=()=>f===p.isPreview,m=h(),g=()=>({sandboxQuery:d,isPreview:f,isActive:h(),sandboxType:o}),y=R2({sandboxQuery:d,workspace:u,designer:p,onViewChange:e=>r&&r(e,g())});let _=Array.from(u.files.keys()).reduce(((e,n)=>{let r=u.getFile(n).code;return"/tango.config.json"===n&&(r=function(e,{isPreview:t,injectScript:n,formatter:r}={}){let i;try{i=JSON.parse(e)}catch(t){return S$.kg.error("Json parse failed!",t),e}const s=(0,W.NA)(i,"sandbox.evaluateJavaScript")||"";let o=s;n&&(o=`${o};${n}`);s!==o&&(0,W.sO)(i,"sandbox.evaluateJavaScript",o);const a=(0,W.NA)(i,"packages"),l=(0,W.NA)(i,"sandbox.externals")||{},c=(0,W.NA)(i,"sandbox.externalResources")||[],u=(0,W.NA)(i,"externalResources")||[];if(a){const e=(e,t)=>{const n=e.map((e=>e.replace(/{{(.*?)}}/g,((e,n)=>(null==t?void 0:t[n])||e))));c.push(...n)},n=(e,t)=>{t&&(l[e]=t)};Object.keys(a).forEach((r=>{const i=a[r];i.designerResources&&!t?(e(i.designerResources,{name:r,version:i.version}),n(r,i.library)):i.resources&&(e(i.resources,{name:r,version:i.version}),n(r,i.library))}))}(null==u?void 0:u.length)&&c.push(...u);(0,W.sO)(i,"sandbox.externals",l),(0,W.sO)(i,"sandbox.externalResources",[...new Set(c)]),(0,gK.mf)(r)&&(i=null==r?void 0:r(i));return JSON.stringify(i)}(r,{isPreview:f,injectScript:c,formatter:t})),e[n]={code:r},e}),{});_=function(e,t="/src/index.js"){if(e["/tango.config.json"]){const t=e["/tango.config.json"].code,n=JSON.parse(t);e["/sandbox.config.json"]={code:JSON.stringify(n.sandbox,null,2)}}e["/index.html"]||(e["/index.html"]={code:`\n \n \n \n \n \n \n Vite App\n \n \n
\n \n \n \n `,\n };\n }\n return files;\n}\nfunction mergeTangoConfigJson(code, { isPreview, injectScript, formatter } = {}) {\n let json;\n try {\n json = JSON.parse(code);\n }\n catch (err) {\n logger.error('Json parse failed!', err);\n return code;\n }\n const userJs = getValue(json, 'sandbox.evaluateJavaScript') || '';\n let mergedUserJs = userJs;\n if (injectScript) {\n mergedUserJs = `${mergedUserJs};${injectScript}`;\n }\n if (userJs !== mergedUserJs) {\n setValue(json, 'sandbox.evaluateJavaScript', mergedUserJs);\n }\n // 合并 packages 内的信息至 sandbox\n const packages = getValue(json, 'packages');\n const externals = getValue(json, 'sandbox.externals') || {};\n const externalResources = getValue(json, 'sandbox.externalResources') || [];\n const newExternalResources = getValue(json, 'externalResources') || [];\n if (packages) {\n // 追加 umd 资源,并替换 url 中的 token,如版本号等\n const pushExternalResources = (list, tokenMap) => {\n const result = list.map((item) => item.replace(/{{(.*?)}}/g, (matched, token) => {\n return (tokenMap === null || tokenMap === void 0 ? void 0 : tokenMap[token]) || matched;\n }));\n externalResources.push(...result);\n };\n // 追加 externals\n const pushExternals = (name, library) => {\n if (library) {\n externals[name] = library;\n }\n };\n Object.keys(packages).forEach((name) => {\n const item = packages[name];\n // 如果是设计态,且拥有设计器资源,则使用设计器资源,否则使用默认资源\n if (item.designerResources && !isPreview) {\n pushExternalResources(item.designerResources, {\n name,\n version: item.version,\n });\n pushExternals(name, item.library);\n }\n else if (item.resources) {\n pushExternalResources(item.resources, {\n name,\n version: item.version,\n });\n pushExternals(name, item.library);\n }\n });\n }\n if (newExternalResources === null || newExternalResources === void 0 ? void 0 : newExternalResources.length) {\n externalResources.push(...newExternalResources);\n }\n setValue(json, 'sandbox.externals', externals);\n setValue(json, 'sandbox.externalResources', [...new Set(externalResources)]);\n if (isFunction(formatter)) {\n json = formatter === null || formatter === void 0 ? void 0 : formatter(json);\n }\n return JSON.stringify(json);\n}\nfunction canAccessIFrame(iframe) {\n let html = null;\n try {\n // deal with older browsers\n const doc = iframe.contentDocument || iframe.contentWindow.document;\n html = doc.body.innerHTML;\n }\n catch (err) {\n // do nothing\n }\n return html !== null;\n}\n","import { extendTheme } from 'coral-system';\nexport default extendTheme({\n colors: {\n custom: {\n topNavBg: '#FFF',\n topNavColor: '#333',\n topNavBorderColor: 'rgb(229,230,235)',\n toolbarDividerColor: 'rgb(229,230,235)',\n toolbarButtonBg: 'rgb(242,243,245)',\n toolbarButtonBgHover: 'rgb(229,230,235)',\n toolbarButtonBgDisabled: 'rgb(247,248,250)',\n toolbarButtonBgActive: 'colors.brand',\n toolbarButtonTextColor: 'colors.text2',\n toolbarButtonTextColorHover: 'colors.text2',\n toolbarButtonTextColorDisabled: 'colors.text4',\n toolbarButtonTextColorActive: '#FFF',\n sidebarBg: '#fff',\n sidebarExpandBg: '#fff',\n sidebarItemActiveBg: '#f2f3f5',\n sidebarItemHoverBg: '#f2f3f5',\n viewportBg: '#f0f2f5',\n },\n },\n});\n","/**\n * 对数组进行去重,适用于简单数组,对象为根据引用进行去重\n * @param arr 输入数组\n * @returns 去重后的数组\n */\nexport function uniq(arr) {\n const set = new Set(arr);\n return Array.from(set);\n}\n/**\n * 对象数组转为对象\n * @example [{ a: 'a' }, { b: 'b' }] -> { a: 'a', b: 'b' }\n * @param arr\n * @param getKey\n * @param getValue\n * @returns\n */\nexport function array2object(arr, getKey, getValue) {\n return arr.reduce((prev, cur) => {\n if (cur) {\n const key = getKey(cur);\n prev[key] = getValue ? getValue(cur) : cur;\n }\n return prev;\n }, {});\n}\n/**\n * 树形嵌套数据的过滤\n * @param array 输入的数组\n * @param predict 断言函数,过滤出符合判断函数的数据\n * @param childrenProp 子属性的名字\n * @param onlyLeaf 是否子探测叶子结点,即存在子节点的父节点不执行断言函数\n */\nexport function filterTreeData(array, predict, childrenProp = 'children', onlyLeaf = false) {\n const reducer = (result, current) => {\n if (current[childrenProp]) {\n const newChildren = current[childrenProp].reduce(reducer, []);\n if (newChildren.length) {\n result.push(Object.assign(Object.assign({}, current), { [childrenProp]: newChildren }));\n if (!onlyLeaf)\n return result;\n }\n if (onlyLeaf)\n return result;\n }\n if (predict(current)) {\n result.push(current);\n }\n return result;\n };\n return array.reduce(reducer, []);\n}\nexport function mapTreeData(treeData, mapper, childrenProp = 'children') {\n return treeData.map((node) => {\n const newNode = mapper(node);\n if (node[childrenProp]) {\n newNode[childrenProp] = mapTreeData(node[childrenProp], mapper, childrenProp);\n }\n return newNode;\n });\n}\n","/**\n * condition 为 false 的时候打印 msg\n * @param condition\n * @param msg\n */\nexport function assert(condition, msg) {\n console.assert(condition, msg);\n}\nexport function isString(str) {\n return typeof str === 'string';\n}\nexport function isFunction(fn) {\n return typeof fn === 'function';\n}\nexport function isNumber(num) {\n return typeof num === 'number';\n}\nexport function isBoolean(obj) {\n return typeof obj === 'boolean';\n}\nexport function isObject(obj) {\n return typeof obj === 'object' && !Array.isArray(obj) && obj !== null;\n}\nexport function isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\nexport function isPromise(obj) {\n return obj && obj.then && isFunction(obj.then);\n}\n/**\n * 判断值是否是 null 或 undefined\n * @param val\n * @returns true if val is null or undefined\n */\nexport function isNil(val) {\n return val == null;\n}\n/**\n * 是否是状态变量的 path\n * @param key\n * @returns\n */\nexport function isStoreVariablePath(key) {\n return /^stores\\.[a-zA-Z0-9]+\\.\\w+$/.test(key);\n}\n/**\n * 是否是服务变量的 path\n * @param key\n * @returns\n */\nexport function isServiceVariablePath(key) {\n return /^services\\.[a-zA-Z0-9]+/.test(key);\n}\n","export const SLOT = {\n /**\n * DND 追踪标记\n */\n dnd: 'data-dnd',\n};\n","export const logger = {\n group(title, body) {\n console.groupCollapsed(title);\n console.log(body);\n console.groupEnd();\n },\n log(msg) {\n console.log('[Log]: %s', msg);\n },\n warn(msg) {\n warning(false, msg);\n },\n error(...args) {\n console.error('[Error]: ', ...args);\n },\n};\n/**\n * 如果条件为 false 则打印警告日志\n * @example warning(truthyValue, 'This should not log a warning');\n * @example warning(falsyValue, 'This should log a warning');\n * @see https://github.com/alexreardon/tiny-warning\n *\n * @param condition 打印警告日志的条件\n * @param message 警告日志\n */\nexport function warning(condition, message) {\n if (condition) {\n return;\n }\n console.warn(`Warning: ${message}`);\n}\n/**\n * 如果条件为 false 则抛出错误\n * @see https://github.com/alexreardon/tiny-invariant\n * @param condition 条件\n * @param message 错误消息\n */\nexport function invariant(condition, message) {\n if (condition) {\n return;\n }\n const text = typeof message === 'function' ? message() : message;\n throw new Error(`Invariant failed: ${text}`);\n}\n","import get from 'lodash.get';\nimport set from 'lodash.set';\n/**\n * 合并 target 和 source 对象,source 对象的优先级更高,如存在重名,覆盖 target 中的 key\n * @param target target object\n * @param source source object\n * @return new merged object, target will not be modified\n */\nexport function merge(target, source) {\n return Object.assign(Object.assign({}, (target || {})), (source || {}));\n}\n/**\n * 从目标上下文中根据 keyPath 获取对应的值\n * @param context the object to query\n * @param keyPath the path of the property to get\n * @returns\n */\nexport function getValue(context, keyPath) {\n keyPath = keyPath.replaceAll('?.', '.');\n return get(context, keyPath);\n}\n/**\n * Sets the value at path of object. If a portion of path doesn't exist, it's created. Arrays are created for missing index properties while objects are created for all other missing properties\n * @param context\n * @param keyPath\n * @param value\n * @returns\n */\nexport function setValue(context, keyPath, value) {\n return set(context, keyPath, value);\n}\n/**\n * 浅拷贝目标对象,并清除对象上的 undefined value\n * @param obj\n */\nexport function clone(obj, withUndefined = true) {\n if (!obj || typeof obj !== 'object') {\n return obj;\n }\n const target = {};\n for (const key in obj) {\n if (withUndefined) {\n target[key] = obj[key];\n }\n else if (obj[key] !== undefined) {\n target[key] = obj[key];\n }\n }\n return target;\n}\nexport function omit(obj, keys) {\n const target = clone(obj);\n for (const key of keys) {\n delete target[key];\n }\n return target;\n}\nexport function pick(obj, keys) {\n const target = {};\n for (const key of keys) {\n target[key] = obj[key];\n }\n return target;\n}\n","/**\n * 转为驼峰 (lowerCamelCase)\n * @example foo -> foo\n * @example foo-bar -> fooBar\n * @param str\n * @returns\n */\nexport function camelCase(str) {\n return str.replace(/\\W+(.)/g, (match, chr) => {\n return chr.toUpperCase();\n });\n}\n/**\n * 将输入字符串转换为大驼峰格式(PascalCase)\n * @example about -> About\n * @example not-found -> NotFound\n * @param str\n */\nexport function upperCamelCase(str) {\n const text = camelCase(str.toLowerCase());\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n/**\n * 生成随机 uuid\n * @param prefix 前缀字符串\n * @returns\n */\nexport function uuid(prefix = 't', fractionDigits = 4) {\n return `${prefix}${Math.random().toFixed(fractionDigits).replace('0.', '')}`;\n}\n/**\n * 是否是合法的 url 地址\n * @example www.163.com\n * @example //www.163.com\n * @example https://www.163.com\n * @example http://www.163.com\n * @param url\n * @returns\n */\nexport function isValidUrl(url) {\n // 创建一个正则表达式\n const pattern = /^(https:)?(\\/\\/)?[^\\s/$.?#].[^\\s]*$/i;\n // 使用正则表达式测试 URL 是否匹配\n return pattern.test(url);\n}\n/**\n * 检查给定的路径是否含有后缀名\n * @param str 输入路径\n * @returns 如果有后缀返回 true,反之返回 false\n */\nexport function hasFileExtension(str) {\n // 如果点号的索引大于斜杠的索引,则说明路径包含后缀名\n return str.lastIndexOf('.') > str.lastIndexOf('/');\n}\n/**\n * 解析 dnd 追踪字符串\n * @deprecated 使用 parseDndId 代替\n *\n * @example Button:123 -> [\"Button\", \"Button:123\"]\n * @param str 字符串\n */\nexport function parseDndTrackId(str) {\n if (!str) {\n return [];\n }\n const parts = str.split(':');\n return [parts[0], str];\n}\n/**\n * 解析 dnd id\n * @example Button:123 -> { component: \"Button\", id: \"Button:123\" }\n * @example LocalBlock:Button:123 -> { filename: LocalBlock, component: \"Button\", id: \"Button:123\" }\n * @param str\n */\nexport function parseDndId(str) {\n if (!str) {\n return {};\n }\n const parts = str.split(':');\n if (parts.length === 2) {\n return {\n component: parts[0],\n index: parts[1],\n id: str,\n };\n }\n else if (parts.length >= 3) {\n const filename = decodeURIComponent(parts[0]);\n return {\n module: filename,\n filename,\n component: parts[1],\n index: parts[2],\n id: str,\n };\n }\n return {\n id: str,\n };\n}\n/**\n * 给定字符串是否是合法的 JSON 字符串\n * @param str\n */\nexport function isJSONString(str) {\n if (!str) {\n return false;\n }\n let json;\n try {\n json = JSON.parse(str);\n return typeof json === 'object';\n }\n catch (err) {\n return false;\n }\n}\n/**\n * 给定代码是否是有效的函数代码\n * @param str\n */\nexport function isValidFunctionCode(str) {\n try {\n // eslint-disable-next-line no-eval\n const ret = eval(`typeof (${str})`);\n return ret === 'function';\n }\n catch (e) {\n return false;\n }\n}\n/**\n * 是否是有效的对象字符串\n *\n * @example { foo: 'foo' }\n * @example [{ foo: 'foo' }]\n * TODO: 考虑箭头函数的情况 () => {}\n *\n * @param str\n * @returns\n */\nexport function isValidObjectString(str) {\n const obj = code2object(str);\n if (obj && typeof obj === 'object') {\n return true;\n }\n return false;\n}\nconst templatePattern = /^{(.+)}$/s;\n/**\n * 判断给定字符串是否为变量字符串\n * @deprecated 使用 isWrappedByExpressionContainer 代替\n *\n * @example {[]}\n * @example {{}}\n * @example {this.foo}\n * @example {123}\n * @param str\n * @returns\n */\nexport function isVariableString(str) {\n // 先检查是否是简单的对象\n // FIXME: 这里有问题,如果代码中有引用,会被误判\n if (code2object(str)) {\n return false;\n }\n // 排除简单对象后,再用正则匹配\n return templatePattern.test(str);\n}\n/**\n * 给输入代码加上花括号\n * @example foo -> {foo}\n * @example \"hello\" => {\"hello\"}\n * @example () => {} => {() => {}}\n *\n * @deprecated 有问题,不要使用\n *\n * @param code 输入代码\n * @returns 加上花括号后的代码\n */\nexport function wrapCode(code) {\n if (isVariableString(code)) {\n return code;\n }\n return `{${code}}`;\n}\n/**\n * 是否为简单字符串,非变量字符串\n * @param str\n */\nexport function isPlainString(str) {\n const isString = typeof str === 'string';\n const isVarString = isString && isVariableString(str);\n return isString && !isVarString;\n}\n/**\n * 解析并获取变量字符串的内容\n * @param str\n * @returns\n */\nexport function getVariableContent(str) {\n const match = templatePattern.exec(str);\n if (match && match.length) {\n return match[1];\n }\n return str;\n}\n// 提供给代码执行环境的全局变量\nconst patchCode = `\nvar tango = {\n stores: {},\n services: {},\n config: {},\n refs: {},\n};\n`;\n/**\n * 将代码放到函数体中进行执行\n * @param code\n * @returns 函数执行的结果\n */\nexport function runCode(code) {\n let ret;\n try {\n // eslint-disable-next-line no-new-func\n ret = new Function(`${patchCode}\\n return ${code}`)();\n }\n catch (err) {\n // ignore error\n }\n return ret;\n}\n// eslint-disable-next-line no-useless-escape\nconst objectWrapperPattern = /^[{\\[].*[}\\]]$/s;\n/**\n * 将代码片段转成 js 对象\n * @param code 代码文本\n * @param isStrict 是否为严格模式(是否废弃)\n * @returns\n */\nexport function code2object(code, isStrict = true) {\n // 非严格模式直接执行\n // 严格模式下需检测 code 是一个对象\n if (!isStrict || (isStrict && objectWrapperPattern.test(code))) {\n const ret = runCode(code);\n return typeof ret === 'object' ? ret : undefined;\n }\n return code;\n}\nconst codeBlockPattern = /```(\\w*)([\\s\\S]*?)```/g;\n/**\n * 从 markdown 中解析出代码片段,仅返回第一个匹配的代码片段\n * @param markdown\n * @returns\n */\nexport function getCodeBlockFormMarkdown(markdown) {\n const match = codeBlockPattern.exec(markdown.trim());\n if (match && match.length) {\n return match[2];\n }\n}\nexport function url2serviceName(url) {\n if (url.startsWith('http')) {\n // 去除域名前缀\n url = url\n .replace(/https?:\\/\\//, '')\n .split('/')\n .slice(1)\n .join('/');\n }\n return (url\n // 去除 api + 模块名前缀\n // - 云音乐 api 规范为 /api/模块名/\n // - 后端公技基本使用 /模块名/api/\n // - 中台类服务似乎常用 /api/middle/模块名/\n // 目前的实现是去除了模块名,只干掉 /api/middle/ 和 /api/backend/ 这种常用前缀\n .replace(/^\\/[^/]+?\\/api\\/|^\\/api\\/middle\\/|^\\/api\\/backend\\/|^\\/api\\//, '')\n // 去除路由参数\n .replace(/\\/\\{.*?\\}/, '')\n // 忽略下划线与减号,将后面的字符转成大驼峰\n .replace(/[-/_]+\\w/g, (str) => str.replace(/[-/_]+/, '').toUpperCase())\n // 首字母转小写\n .replace(/^./, (str) => str.toLowerCase())\n // 方法名以数字开头,添加 api 前缀\n .replace(/^\\d/, (str) => `api${str}`));\n}\n/**\n * 解析状态变量的 path\n * @example stores.foo.bar => { storeName: 'foo', variableName: 'bar' }\n * @example stores.user.count => { storeName: 'user', variableName: 'count' }\n *\n * @param variablePath\n * @returns\n */\nexport function parseStoreVariablePath(variablePath) {\n const [, storeName, variableName] = variablePath.split('.');\n return {\n storeName,\n variableName,\n };\n}\n/**\n * 解析服务变量的 path\n * @param variablePath\n * @returns\n *\n * @example services.list => { moduleName: 'index', name: 'list' }\n * @example services.sub.list => { moduleName: 'sub', name: 'list' }\n * @example foo => undefined\n */\nexport function parseServiceVariablePath(variablePath) {\n const parts = variablePath.split('.');\n if (parts[0] !== 'services') {\n return {};\n }\n let moduleName = 'index';\n let name = '';\n switch (parts.length) {\n case 2: {\n name = parts[1];\n break;\n }\n case 3: {\n moduleName = parts[1];\n name = parts[2];\n break;\n }\n default:\n break;\n }\n return {\n moduleName,\n name,\n };\n}\n","/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"react\"), require(\"react-dom\")) : factory(root[\"react\"], root[\"react-dom\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function(__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less\":\n/*!***********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less ***!\n \\***********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-button {\\\\n padding: 5px 15px;\\\\n border-radius: 20px;\\\\n font-size: 14px;\\\\n background: var(--monaco-button-background);\\\\n color: var(--monaco-button-foreground);\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-button:hover {\\\\n opacity: 0.8;\\\\n}\\\\n.music-monaco-editor-button-primary {\\\\n background: var(--monaco-editorCursor-foreground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less\":\n/*!*************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less ***!\n \\*************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-list {\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-list-wrapper {\\\\n width: 180px;\\\\n font-size: 14px;\\\\n line-height: 28px;\\\\n height: 100%;\\\\n background: var(--monaco-editor-background);\\\\n color: var(--monaco-editor-foreground);\\\\n overflow: scroll;\\\\n flex-shrink: 0;\\\\n padding: 5px 0 0 10px;\\\\n box-sizing: border-box;\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-list-wrapper::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-list-title {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n height: 28px;\\\\n user-select: none;\\\\n cursor: pointer;\\\\n line-height: 28px;\\\\n}\\\\n.music-monaco-editor-list-title-icon {\\\\n visibility: hidden;\\\\n font-size: 16px;\\\\n color: var(--monaco-editor-foreground);\\\\n margin-right: 4px;\\\\n}\\\\n.music-monaco-editor-list-title-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-title-name {\\\\n white-space: nowrap;\\\\n overflow: hidden;\\\\n text-overflow: ellipsis;\\\\n}\\\\n.music-monaco-editor-list-title:hover .music-monaco-editor-list-title-icon {\\\\n visibility: visible;\\\\n}\\\\n.music-monaco-editor-list-split-icon {\\\\n visibility: hidden;\\\\n font-size: 16px;\\\\n color: var(--monaco-editor-foreground);\\\\n margin-right: 4px;\\\\n}\\\\n.music-monaco-editor-list-split-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item {\\\\n user-select: none;\\\\n}\\\\n.music-monaco-editor-list-file-item-new {\\\\n position: relative;\\\\n flex: 1;\\\\n outline: none;\\\\n border: 1px solid var(--monaco-editor-wordHighlightBorder);\\\\n}\\\\n.music-monaco-editor-list-file-item-new:focus {\\\\n cursor: text;\\\\n}\\\\n.music-monaco-editor-list-file-item-new-error {\\\\n border: 1px solid #F44747;\\\\n}\\\\n.music-monaco-editor-list-file-item-row {\\\\n height: 28px;\\\\n cursor: pointer;\\\\n user-select: none;\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-list-file-item-row:hover {\\\\n background-color: var(--monaco-list-hoverBackground);\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item-row:hover .music-monaco-editor-list-split-icon {\\\\n visibility: visible;\\\\n}\\\\n.music-monaco-editor-list-file-item-row-focused {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.music-monaco-editor-list-file-item-row-name {\\\\n white-space: nowrap;\\\\n overflow: hidden;\\\\n text-overflow: ellipsis;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less\":\n/*!**********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less ***!\n \\**********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-icons {\\\\n width: 14px;\\\\n height: 14px;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less\":\n/*!**********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less ***!\n \\**********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-modal {\\\\n position: absolute;\\\\n top: 0;\\\\n left: 0;\\\\n right: 0;\\\\n bottom: 0;\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n justify-content: center;\\\\n}\\\\n.music-monaco-editor-modal-mask {\\\\n position: absolute;\\\\n top: 0;\\\\n left: 0;\\\\n right: 0;\\\\n bottom: 0;\\\\n background: rgba(0, 0, 0, 0.2);\\\\n}\\\\n.music-monaco-editor-modal-content {\\\\n position: relative;\\\\n border-radius: 8px;\\\\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.15);\\\\n}\\\\n.music-monaco-editor-modal-content-confirm {\\\\n width: 400px;\\\\n background: var(--monaco-editor-background);\\\\n border-radius: 8px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n padding-bottom: 8px;\\\\n}\\\\n.music-monaco-editor-modal-content-title {\\\\n background: var(--monaco-activityBarBadge-background);\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n height: 30px;\\\\n border-radius: 8px 8px 0 0;\\\\n padding-left: 10px;\\\\n line-height: 30px;\\\\n}\\\\n.music-monaco-editor-modal-content-content {\\\\n font-size: 14px;\\\\n padding: 20px;\\\\n}\\\\n.music-monaco-editor-modal-content-footer {\\\\n padding: 0 10px;\\\\n display: flex;\\\\n flex-direction: row;\\\\n justify-content: flex-end;\\\\n}\\\\n.music-monaco-editor-modal-content-close {\\\\n position: absolute;\\\\n right: 10px;\\\\n top: 5px;\\\\n cursor: pointer;\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n}\\\\n.music-monaco-editor-modal-content-close:focus {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less\":\n/*!**************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less ***!\n \\**************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-opened-tab {\\\\n height: 35px;\\\\n box-sizing: border-box;\\\\n font-size: 14px;\\\\n overflow-x: scroll;\\\\n overflow-y: hidden;\\\\n width: 100%;\\\\n white-space: nowrap;\\\\n background-color: var(--monaco-editor-background);\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n justify-content: flex-start;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-opened-tab::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-opened-tab-wrapper {\\\\n box-sizing: border-box;\\\\n width: 100%;\\\\n padding-right: 30px;\\\\n overflow: hidden;\\\\n}\\\\n.music-monaco-editor-opened-tab-item {\\\\n cursor: pointer;\\\\n height: 35px;\\\\n box-sizing: border-box;\\\\n padding: 0 5px 0 10px;\\\\n display: flex;\\\\n align-items: center;\\\\n margin-right: 1px;\\\\n background-color: var(--monaco-editor-background);\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-prefix {\\\\n font-size: 12px;\\\\n opacity: 0.7;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-focused {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n color: var(--monaco-list-focusForeground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item:hover {\\\\n background-color: var(--monaco-list-hoverBackground);\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item-close {\\\\n position: relative;\\\\n padding: 5px 5px;\\\\n line-height: 10px;\\\\n}\\\\n.music-monaco-editor-opened-tab-item-close:hover {\\\\n background-color: var(--monaco-list-focusBackground);\\\\n}\\\\n.music-monaco-editor-opened-tab-item-editing {\\\\n position: absolute;\\\\n right: 10px;\\\\n top: 15px;\\\\n width: 7px;\\\\n height: 7px;\\\\n background-color: var(--monaco-list-hoverForeground, grey);\\\\n border-radius: 50%;\\\\n}\\\\n.music-monaco-editor-modal-rightclick .music-monaco-editor-modal-mask {\\\\n opacity: 0;\\\\n}\\\\n.music-monaco-editor-rightclick-panel {\\\\n position: fixed;\\\\n background: var(--monaco-editorWidget-background);\\\\n padding: 5px 0;\\\\n font-size: 12px;\\\\n line-height: 30px;\\\\n min-width: 150px;\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-rightclick-panel-item {\\\\n padding: 0 10px;\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-rightclick-panel-item:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n background: var(--monaco-list-focusBackground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less\":\n/*!*************************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less ***!\n \\*************************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-prettier-icon {\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-prettier-icon:hover {\\\\n color: var(--monaco-list-hoverForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less\":\n/*!***********************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less ***!\n \\***********************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-select {\\\\n width: 140px;\\\\n height: 19px;\\\\n position: relative;\\\\n display: inline-block;\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n user-select: none;\\\\n font-size: 12px;\\\\n line-height: 19px;\\\\n border: 1px solid var(--monaco-checkbox-border);\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-select-content {\\\\n padding-left: 10px;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-select-content-arrow {\\\\n position: absolute;\\\\n top: 1px;\\\\n right: 5px;\\\\n}\\\\n.music-monaco-editor-select-items {\\\\n font-size: 12px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n line-height: 19px;\\\\n box-sizing: border-box;\\\\n cursor: pointer;\\\\n border: 1px solid var(--monaco-checkbox-border);\\\\n position: absolute;\\\\n top: 19px;\\\\n left: 0;\\\\n right: 0;\\\\n max-height: 100px;\\\\n overflow-y: scroll;\\\\n overflow-x: hidden;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-select-items::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-select-item {\\\\n cursor: pointer;\\\\n padding-left: 10px;\\\\n}\\\\n.music-monaco-editor-select-item-selected {\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n opacity: 0.8;\\\\n}\\\\n.music-monaco-editor-select-item:hover {\\\\n background: var(--monaco-list-activeSelectionBackground);\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less\":\n/*!***********************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less ***!\n \\***********************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-highlight {\\\\n background: rgba(0, 0, 0, 0.08);\\\\n}\\\\n.music-monaco-editor {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: flex-start;\\\\n justify-content: flex-start;\\\\n width: 100%;\\\\n height: 100%;\\\\n position: relative;\\\\n color: var(--monaco-editor-foreground);\\\\n}\\\\n.music-monaco-editor-drag {\\\\n width: 5px;\\\\n background: var(--monaco-editor-background);\\\\n border-right: 1px solid var(--monaco-activityBar-border);\\\\n height: 100%;\\\\n cursor: col-resize;\\\\n flex-shrink: 0;\\\\n}\\\\n.music-monaco-editor-drag:hover {\\\\n background: var(--monaco-editorCursor-foreground);\\\\n}\\\\n.music-monaco-editor-area {\\\\n color: var(--monaco-editor-foreground);\\\\n background-color: var(--monaco-editor-background);\\\\n flex: 1;\\\\n min-width: 0;\\\\n height: 100%;\\\\n display: flex;\\\\n flex-direction: column;\\\\n align-items: flex-start;\\\\n justify-content: flex-start;\\\\n position: relative;\\\\n}\\\\n.music-monaco-editor-area-empty {\\\\n position: absolute;\\\\n left: 0;\\\\n right: 0;\\\\n top: 0;\\\\n bottom: 0;\\\\n background: var(--monaco-editor-background);\\\\n display: flex;\\\\n flex-direction: column;\\\\n align-items: center;\\\\n justify-content: center;\\\\n user-select: none;\\\\n}\\\\n.music-monaco-editor-area-empty-icon {\\\\n user-select: none;\\\\n width: 100px;\\\\n height: 100px;\\\\n margin-bottom: 20px;\\\\n}\\\\n.music-monaco-editor-setting {\\\\n width: 400px;\\\\n height: 200px;\\\\n background: var(--monaco-editor-background);\\\\n border-radius: 10px;\\\\n color: var(--monaco-list-activeSelectionForeground);\\\\n display: flex;\\\\n flex-direction: column;\\\\n /* 滚动槽 */\\\\n /* 滚动条滑块 */\\\\n}\\\\n.music-monaco-editor-setting-button {\\\\n cursor: pointer;\\\\n position: absolute;\\\\n left: 8px;\\\\n bottom: 5px;\\\\n}\\\\n.music-monaco-editor-setting-header {\\\\n position: relative;\\\\n height: 28px;\\\\n line-height: 28px;\\\\n width: 100%;\\\\n background: var(--monaco-activityBarBadge-background);\\\\n color: var(--monaco-activityBarBadge-foreground);\\\\n border-radius: 8px 8px 0 0;\\\\n box-sizing: border-box;\\\\n padding-left: 10px;\\\\n}\\\\n.music-monaco-editor-setting-header-close {\\\\n cursor: pointer;\\\\n line-height: 12px;\\\\n height: 12px;\\\\n top: 4px;\\\\n padding: 4px;\\\\n position: absolute;\\\\n right: 10px;\\\\n}\\\\n.music-monaco-editor-setting-content {\\\\n flex-grow: 1;\\\\n padding: 10px 10px 10px 30px;\\\\n overflow-y: scroll;\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar {\\\\n width: 6px;\\\\n height: 6px;\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar-track {\\\\n background: var(--monaco-editor-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-setting-content::-webkit-scrollbar-thumb {\\\\n border-radius: 3px;\\\\n background: var(--monaco-scrollbarSlider-background);\\\\n box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n -webkit-box-shadow: inset 0 0 5px var(--monaco-scrollbar-shadow);\\\\n}\\\\n.music-monaco-editor-prettier {\\\\n position: absolute;\\\\n right: 5px;\\\\n top: 5px;\\\\n cursor: pointer;\\\\n}\\\\n.music-monaco-editor-input-row {\\\\n display: flex;\\\\n flex-direction: row;\\\\n align-items: center;\\\\n margin-top: 10px;\\\\n}\\\\n.music-monaco-editor-input-name {\\\\n font-size: 12px;\\\\n line-height: 20px;\\\\n width: 100px;\\\\n text-align: left;\\\\n}\\\\n.music-monaco-editor-input-value {\\\\n font-size: 12px;\\\\n line-height: 20px;\\\\n}\\\\n.music-monaco-editor-loading {\\\\n display: flex;\\\\n align-items: center;\\\\n justify-content: center;\\\\n height: 100%;\\\\n width: 100%;\\\\n background: var(--monaco-editor-background);\\\\n}\\\\n.music-monaco-editor-loading-icon {\\\\n width: 60px;\\\\n height: 60px;\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less\":\n/*!************************************************************************************************************!*\\\n !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less ***!\n \\************************************************************************************************************/\n/***/ ((module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \\\"./node_modules/css-loader/dist/runtime/noSourceMaps.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \\\"./node_modules/css-loader/dist/runtime/api.js\\\");\\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\\n// Imports\\n\\n\\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\\n// Module\\n___CSS_LOADER_EXPORT___.push([module.id, \\\".music-monaco-editor-loading {\\\\n display: flex;\\\\n align-items: center;\\\\n justify-content: center;\\\\n height: 100%;\\\\n width: 100%;\\\\n background: var(--monaco-editor-background);\\\\n}\\\\n.music-monaco-editor-loading-icon {\\\\n width: 60px;\\\\n height: 60px;\\\\n}\\\\n.music-monaco-editor-highlight {\\\\n background: rgba(0, 0, 0, 0.08);\\\\n}\\\\n\\\", \\\"\\\"]);\\n// Exports\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/runtime/api.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/css-loader/dist/runtime/api.js ***!\n \\*****************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/*\\n MIT License http://www.opensource.org/licenses/mit-license.php\\n Author Tobias Koppers @sokra\\n*/\\nmodule.exports = function (cssWithMappingToString) {\\n var list = []; // return the list of modules as css string\\n\\n list.toString = function toString() {\\n return this.map(function (item) {\\n var content = \\\"\\\";\\n var needLayer = typeof item[5] !== \\\"undefined\\\";\\n\\n if (item[4]) {\\n content += \\\"@supports (\\\".concat(item[4], \\\") {\\\");\\n }\\n\\n if (item[2]) {\\n content += \\\"@media \\\".concat(item[2], \\\" {\\\");\\n }\\n\\n if (needLayer) {\\n content += \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\");\\n }\\n\\n content += cssWithMappingToString(item);\\n\\n if (needLayer) {\\n content += \\\"}\\\";\\n }\\n\\n if (item[2]) {\\n content += \\\"}\\\";\\n }\\n\\n if (item[4]) {\\n content += \\\"}\\\";\\n }\\n\\n return content;\\n }).join(\\\"\\\");\\n }; // import a list of modules into the list\\n\\n\\n list.i = function i(modules, media, dedupe, supports, layer) {\\n if (typeof modules === \\\"string\\\") {\\n modules = [[null, modules, undefined]];\\n }\\n\\n var alreadyImportedModules = {};\\n\\n if (dedupe) {\\n for (var k = 0; k < this.length; k++) {\\n var id = this[k][0];\\n\\n if (id != null) {\\n alreadyImportedModules[id] = true;\\n }\\n }\\n }\\n\\n for (var _k = 0; _k < modules.length; _k++) {\\n var item = [].concat(modules[_k]);\\n\\n if (dedupe && alreadyImportedModules[item[0]]) {\\n continue;\\n }\\n\\n if (typeof layer !== \\\"undefined\\\") {\\n if (typeof item[5] === \\\"undefined\\\") {\\n item[5] = layer;\\n } else {\\n item[1] = \\\"@layer\\\".concat(item[5].length > 0 ? \\\" \\\".concat(item[5]) : \\\"\\\", \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[5] = layer;\\n }\\n }\\n\\n if (media) {\\n if (!item[2]) {\\n item[2] = media;\\n } else {\\n item[1] = \\\"@media \\\".concat(item[2], \\\" {\\\").concat(item[1], \\\"}\\\");\\n item[2] = media;\\n }\\n }\\n\\n if (supports) {\\n if (!item[4]) {\\n item[4] = \\\"\\\".concat(supports);\\n } else {\\n item[1] = \\\"@supports (\\\".concat(item[4], \\\") {\\\").concat(item[1], \\\"}\\\");\\n item[4] = supports;\\n }\\n }\\n\\n list.push(item);\\n }\\n };\\n\\n return list;\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/css-loader/dist/runtime/api.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/css-loader/dist/runtime/noSourceMaps.js ***!\n \\**************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nmodule.exports = function (i) {\\n return i[1];\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/css-loader/dist/runtime/noSourceMaps.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/fast-plist/release/src/main.js\":\n/*!*****************************************************!*\\\n !*** ./node_modules/fast-plist/release/src/main.js ***!\n \\*****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"/*---------------------------------------------------------\\r\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\r\\n *--------------------------------------------------------*/\\r\\n\\r\\nfunction parseWithLocation(content, filename, locationKeyName) {\\r\\n return _parse(content, filename, locationKeyName);\\r\\n}\\r\\nexports.parseWithLocation = parseWithLocation;\\r\\n/**\\r\\n * A very fast plist parser\\r\\n */\\r\\nfunction parse(content) {\\r\\n return _parse(content, null, null);\\r\\n}\\r\\nexports.parse = parse;\\r\\nfunction _parse(content, filename, locationKeyName) {\\r\\n var len = content.length;\\r\\n var pos = 0;\\r\\n var line = 1;\\r\\n var char = 0;\\r\\n // Skip UTF8 BOM\\r\\n if (len > 0 && content.charCodeAt(0) === 65279 /* BOM */) {\\r\\n pos = 1;\\r\\n }\\r\\n function advancePosBy(by) {\\r\\n if (locationKeyName === null) {\\r\\n pos = pos + by;\\r\\n }\\r\\n else {\\r\\n while (by > 0) {\\r\\n var chCode = content.charCodeAt(pos);\\r\\n if (chCode === 10 /* LINE_FEED */) {\\r\\n pos++;\\r\\n line++;\\r\\n char = 0;\\r\\n }\\r\\n else {\\r\\n pos++;\\r\\n char++;\\r\\n }\\r\\n by--;\\r\\n }\\r\\n }\\r\\n }\\r\\n function advancePosTo(to) {\\r\\n if (locationKeyName === null) {\\r\\n pos = to;\\r\\n }\\r\\n else {\\r\\n advancePosBy(to - pos);\\r\\n }\\r\\n }\\r\\n function skipWhitespace() {\\r\\n while (pos < len) {\\r\\n var chCode = content.charCodeAt(pos);\\r\\n if (chCode !== 32 /* SPACE */ && chCode !== 9 /* TAB */ && chCode !== 13 /* CARRIAGE_RETURN */ && chCode !== 10 /* LINE_FEED */) {\\r\\n break;\\r\\n }\\r\\n advancePosBy(1);\\r\\n }\\r\\n }\\r\\n function advanceIfStartsWith(str) {\\r\\n if (content.substr(pos, str.length) === str) {\\r\\n advancePosBy(str.length);\\r\\n return true;\\r\\n }\\r\\n return false;\\r\\n }\\r\\n function advanceUntil(str) {\\r\\n var nextOccurence = content.indexOf(str, pos);\\r\\n if (nextOccurence !== -1) {\\r\\n advancePosTo(nextOccurence + str.length);\\r\\n }\\r\\n else {\\r\\n // EOF\\r\\n advancePosTo(len);\\r\\n }\\r\\n }\\r\\n function captureUntil(str) {\\r\\n var nextOccurence = content.indexOf(str, pos);\\r\\n if (nextOccurence !== -1) {\\r\\n var r = content.substring(pos, nextOccurence);\\r\\n advancePosTo(nextOccurence + str.length);\\r\\n return r;\\r\\n }\\r\\n else {\\r\\n // EOF\\r\\n var r = content.substr(pos);\\r\\n advancePosTo(len);\\r\\n return r;\\r\\n }\\r\\n }\\r\\n var state = 0 /* ROOT_STATE */;\\r\\n var cur = null;\\r\\n var stateStack = [];\\r\\n var objStack = [];\\r\\n var curKey = null;\\r\\n function pushState(newState, newCur) {\\r\\n stateStack.push(state);\\r\\n objStack.push(cur);\\r\\n state = newState;\\r\\n cur = newCur;\\r\\n }\\r\\n function popState() {\\r\\n state = stateStack.pop();\\r\\n cur = objStack.pop();\\r\\n }\\r\\n function fail(msg) {\\r\\n throw new Error('Near offset ' + pos + ': ' + msg + ' ~~~' + content.substr(pos, 50) + '~~~');\\r\\n }\\r\\n var dictState = {\\r\\n enterDict: function () {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n var newDict = {};\\r\\n if (locationKeyName !== null) {\\r\\n newDict[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n cur[curKey] = newDict;\\r\\n curKey = null;\\r\\n pushState(1 /* DICT_STATE */, newDict);\\r\\n },\\r\\n enterArray: function () {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n var newArr = [];\\r\\n cur[curKey] = newArr;\\r\\n curKey = null;\\r\\n pushState(2 /* ARR_STATE */, newArr);\\r\\n }\\r\\n };\\r\\n var arrState = {\\r\\n enterDict: function () {\\r\\n var newDict = {};\\r\\n if (locationKeyName !== null) {\\r\\n newDict[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n cur.push(newDict);\\r\\n pushState(1 /* DICT_STATE */, newDict);\\r\\n },\\r\\n enterArray: function () {\\r\\n var newArr = [];\\r\\n cur.push(newArr);\\r\\n pushState(2 /* ARR_STATE */, newArr);\\r\\n }\\r\\n };\\r\\n function enterDict() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n dictState.enterDict();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n arrState.enterDict();\\r\\n }\\r\\n else {\\r\\n cur = {};\\r\\n if (locationKeyName !== null) {\\r\\n cur[locationKeyName] = {\\r\\n filename: filename,\\r\\n line: line,\\r\\n char: char\\r\\n };\\r\\n }\\r\\n pushState(1 /* DICT_STATE */, cur);\\r\\n }\\r\\n }\\r\\n function leaveDict() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n popState();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function enterArray() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n dictState.enterArray();\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n arrState.enterArray();\\r\\n }\\r\\n else {\\r\\n cur = [];\\r\\n pushState(2 /* ARR_STATE */, cur);\\r\\n }\\r\\n }\\r\\n function leaveArray() {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n popState();\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function acceptKey(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey !== null) {\\r\\n fail('too many ');\\r\\n }\\r\\n curKey = val;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n fail('unexpected ');\\r\\n }\\r\\n else {\\r\\n fail('unexpected ');\\r\\n }\\r\\n }\\r\\n function acceptString(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptReal(val) {\\r\\n if (isNaN(val)) {\\r\\n fail('cannot parse float');\\r\\n }\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptInteger(val) {\\r\\n if (isNaN(val)) {\\r\\n fail('cannot parse integer');\\r\\n }\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptDate(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptData(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function acceptBool(val) {\\r\\n if (state === 1 /* DICT_STATE */) {\\r\\n if (curKey === null) {\\r\\n fail('missing ');\\r\\n }\\r\\n cur[curKey] = val;\\r\\n curKey = null;\\r\\n }\\r\\n else if (state === 2 /* ARR_STATE */) {\\r\\n cur.push(val);\\r\\n }\\r\\n else {\\r\\n cur = val;\\r\\n }\\r\\n }\\r\\n function escapeVal(str) {\\r\\n return str.replace(/&#([0-9]+);/g, function (_, m0) {\\r\\n return String.fromCodePoint(parseInt(m0, 10));\\r\\n }).replace(/&#x([0-9a-f]+);/g, function (_, m0) {\\r\\n return String.fromCodePoint(parseInt(m0, 16));\\r\\n }).replace(/&|<|>|"|'/g, function (_) {\\r\\n switch (_) {\\r\\n case '&': return '&';\\r\\n case '<': return '<';\\r\\n case '>': return '>';\\r\\n case '"': return '\\\"';\\r\\n case ''': return '\\\\'';\\r\\n }\\r\\n return _;\\r\\n });\\r\\n }\\r\\n function parseOpenTag() {\\r\\n var r = captureUntil('>');\\r\\n var isClosed = false;\\r\\n if (r.charCodeAt(r.length - 1) === 47 /* SLASH */) {\\r\\n isClosed = true;\\r\\n r = r.substring(0, r.length - 1);\\r\\n }\\r\\n return {\\r\\n name: r.trim(),\\r\\n isClosed: isClosed\\r\\n };\\r\\n }\\r\\n function parseTagValue(tag) {\\r\\n if (tag.isClosed) {\\r\\n return '';\\r\\n }\\r\\n var val = captureUntil('');\\r\\n return escapeVal(val);\\r\\n }\\r\\n while (pos < len) {\\r\\n skipWhitespace();\\r\\n if (pos >= len) {\\r\\n break;\\r\\n }\\r\\n var chCode = content.charCodeAt(pos);\\r\\n advancePosBy(1);\\r\\n if (chCode !== 60 /* LESS_THAN */) {\\r\\n fail('expected <');\\r\\n }\\r\\n if (pos >= len) {\\r\\n fail('unexpected end of input');\\r\\n }\\r\\n var peekChCode = content.charCodeAt(pos);\\r\\n if (peekChCode === 63 /* QUESTION_MARK */) {\\r\\n advancePosBy(1);\\r\\n advanceUntil('?>');\\r\\n continue;\\r\\n }\\r\\n if (peekChCode === 33 /* EXCLAMATION_MARK */) {\\r\\n advancePosBy(1);\\r\\n if (advanceIfStartsWith('--')) {\\r\\n advanceUntil('-->');\\r\\n continue;\\r\\n }\\r\\n advanceUntil('>');\\r\\n continue;\\r\\n }\\r\\n if (peekChCode === 47 /* SLASH */) {\\r\\n advancePosBy(1);\\r\\n skipWhitespace();\\r\\n if (advanceIfStartsWith('plist')) {\\r\\n advanceUntil('>');\\r\\n continue;\\r\\n }\\r\\n if (advanceIfStartsWith('dict')) {\\r\\n advanceUntil('>');\\r\\n leaveDict();\\r\\n continue;\\r\\n }\\r\\n if (advanceIfStartsWith('array')) {\\r\\n advanceUntil('>');\\r\\n leaveArray();\\r\\n continue;\\r\\n }\\r\\n fail('unexpected closed tag');\\r\\n }\\r\\n var tag = parseOpenTag();\\r\\n switch (tag.name) {\\r\\n case 'dict':\\r\\n enterDict();\\r\\n if (tag.isClosed) {\\r\\n leaveDict();\\r\\n }\\r\\n continue;\\r\\n case 'array':\\r\\n enterArray();\\r\\n if (tag.isClosed) {\\r\\n leaveArray();\\r\\n }\\r\\n continue;\\r\\n case 'key':\\r\\n acceptKey(parseTagValue(tag));\\r\\n continue;\\r\\n case 'string':\\r\\n acceptString(parseTagValue(tag));\\r\\n continue;\\r\\n case 'real':\\r\\n acceptReal(parseFloat(parseTagValue(tag)));\\r\\n continue;\\r\\n case 'integer':\\r\\n acceptInteger(parseInt(parseTagValue(tag), 10));\\r\\n continue;\\r\\n case 'date':\\r\\n acceptDate(new Date(parseTagValue(tag)));\\r\\n continue;\\r\\n case 'data':\\r\\n acceptData(parseTagValue(tag));\\r\\n continue;\\r\\n case 'true':\\r\\n parseTagValue(tag);\\r\\n acceptBool(true);\\r\\n continue;\\r\\n case 'false':\\r\\n parseTagValue(tag);\\r\\n acceptBool(false);\\r\\n continue;\\r\\n }\\r\\n if (/^plist/.test(tag.name)) {\\r\\n continue;\\r\\n }\\r\\n fail('unexpected opened tag ' + tag.name);\\r\\n }\\r\\n return cur;\\r\\n}\\r\\n//# sourceMappingURL=main.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/fast-plist/release/src/main.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-editor-textmate/dist/index.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/monaco-editor-textmate/dist/index.js ***!\n \\***********************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.wireTmGrammars = void 0;\\nconst monaco_textmate_1 = __webpack_require__(/*! monaco-textmate */ \\\"./node_modules/monaco-textmate/dist/main.js\\\");\\nconst tm_to_monaco_token_1 = __webpack_require__(/*! ./tm-to-monaco-token */ \\\"./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js\\\");\\nclass TokenizerState {\\n _ruleStack;\\n constructor(_ruleStack) {\\n this._ruleStack = _ruleStack;\\n }\\n get ruleStack() {\\n return this._ruleStack;\\n }\\n clone() {\\n return new TokenizerState(this._ruleStack);\\n }\\n equals(other) {\\n if (!other ||\\n !(other instanceof TokenizerState) ||\\n other !== this ||\\n other._ruleStack !== this._ruleStack) {\\n return false;\\n }\\n return true;\\n }\\n}\\n/**\\n * Wires up monaco-editor with monaco-textmate\\n *\\n * @param monaco monaco namespace this operation should apply to (usually the `monaco` global unless you have some other setup)\\n * @param registry TmGrammar `Registry` this wiring should rely on to provide the grammars\\n * @param languages `Map` of language ids (string) to TM names (string)\\n */\\nfunction wireTmGrammars(monaco, registry, languages, editor) {\\n return Promise.all(Array.from(languages.keys())\\n .map(async (languageId) => {\\n const grammar = await registry.loadGrammar(languages.get(languageId));\\n monaco.languages.setTokensProvider(languageId, {\\n getInitialState: () => new TokenizerState(monaco_textmate_1.INITIAL),\\n tokenize: (line, state) => {\\n const res = grammar.tokenizeLine(line, state.ruleStack);\\n return {\\n endState: new TokenizerState(res.ruleStack),\\n tokens: res.tokens.map(token => ({\\n ...token,\\n // TODO: At the moment, monaco-editor doesn't seem to accept array of scopes\\n scopes: editor ? (0, tm_to_monaco_token_1.TMToMonacoToken)(editor, token.scopes) : token.scopes[token.scopes.length - 1]\\n })),\\n };\\n }\\n });\\n }));\\n}\\nexports.wireTmGrammars = wireTmGrammars;\\n//# sourceMappingURL=index.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-editor-textmate/dist/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js\":\n/*!************************************************************************!*\\\n !*** ./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js ***!\n \\************************************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.TMToMonacoToken = void 0;\\n// as described in issue: https://github.com/NeekSandhu/monaco-textmate/issues/5\\nconst TMToMonacoToken = (editor, scopes) => {\\n let scopeName = \\\"\\\";\\n // get the scope name. Example: cpp , java, haskell\\n for (let i = scopes[0].length - 1; i >= 0; i -= 1) {\\n const char = scopes[0][i];\\n if (char === \\\".\\\") {\\n break;\\n }\\n scopeName = char + scopeName;\\n }\\n // iterate through all scopes from last to first\\n for (let i = scopes.length - 1; i >= 0; i -= 1) {\\n const scope = scopes[i];\\n /**\\n * Try all possible tokens from high specific token to low specific token\\n *\\n * Example:\\n * 0 meta.function.definition.parameters.cpp\\n * 1 meta.function.definition.parameters\\n *\\n * 2 meta.function.definition.cpp\\n * 3 meta.function.definition\\n *\\n * 4 meta.function.cpp\\n * 5 meta.function\\n *\\n * 6 meta.cpp\\n * 7 meta\\n */\\n for (let i = scope.length - 1; i >= 0; i -= 1) {\\n const char = scope[i];\\n if (char === \\\".\\\") {\\n const token = scope.slice(0, i);\\n if (editor['_themeService']._theme._tokenTheme._match(token + \\\".\\\" + scopeName)._foreground >\\n 1) {\\n return token + \\\".\\\" + scopeName;\\n }\\n if (editor[\\\"_themeService\\\"]._theme._tokenTheme._match(token)._foreground > 1) {\\n return token;\\n }\\n }\\n }\\n }\\n return \\\"\\\";\\n};\\nexports.TMToMonacoToken = TMToMonacoToken;\\n//# sourceMappingURL=tm-to-monaco-token.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-editor-textmate/dist/tm-to-monaco-token.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/debug.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/debug.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nexports.CAPTURE_METADATA = typeof process === 'undefined' ? false : !!process.env['VSCODE_TEXTMATE_DEBUG'];\\nexports.IN_DEBUG_MODE = typeof process === 'undefined' ? false : !!process.env['VSCODE_TEXTMATE_DEBUG'];\\n//# sourceMappingURL=debug.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/debug.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/grammar.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/grammar.js ***!\n \\******************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar utils_1 = __webpack_require__(/*! ./utils */ \\\"./node_modules/monaco-textmate/dist/utils.js\\\");\\nvar rule_1 = __webpack_require__(/*! ./rule */ \\\"./node_modules/monaco-textmate/dist/rule.js\\\");\\nvar matcher_1 = __webpack_require__(/*! ./matcher */ \\\"./node_modules/monaco-textmate/dist/matcher.js\\\");\\nvar debug_1 = __webpack_require__(/*! ./debug */ \\\"./node_modules/monaco-textmate/dist/debug.js\\\");\\nfunction createGrammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository) {\\n return new Grammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository);\\n}\\nexports.createGrammar = createGrammar;\\n/**\\n * Fill in `result` all external included scopes in `patterns`\\n */\\nfunction _extractIncludedScopesInPatterns(result, patterns) {\\n for (var i = 0, len = patterns.length; i < len; i++) {\\n if (Array.isArray(patterns[i].patterns)) {\\n _extractIncludedScopesInPatterns(result, patterns[i].patterns);\\n }\\n var include = patterns[i].include;\\n if (!include) {\\n continue;\\n }\\n if (include === '$base' || include === '$self') {\\n // Special includes that can be resolved locally in this grammar\\n continue;\\n }\\n if (include.charAt(0) === '#') {\\n // Local include from this grammar\\n continue;\\n }\\n var sharpIndex = include.indexOf('#');\\n if (sharpIndex >= 0) {\\n result[include.substring(0, sharpIndex)] = true;\\n }\\n else {\\n result[include] = true;\\n }\\n }\\n}\\n/**\\n * Fill in `result` all external included scopes in `repository`\\n */\\nfunction _extractIncludedScopesInRepository(result, repository) {\\n for (var name in repository) {\\n var rule = repository[name];\\n if (rule.patterns && Array.isArray(rule.patterns)) {\\n _extractIncludedScopesInPatterns(result, rule.patterns);\\n }\\n if (rule.repository) {\\n _extractIncludedScopesInRepository(result, rule.repository);\\n }\\n }\\n}\\n/**\\n * Collects the list of all external included scopes in `grammar`.\\n */\\nfunction collectIncludedScopes(result, grammar) {\\n if (grammar.patterns && Array.isArray(grammar.patterns)) {\\n _extractIncludedScopesInPatterns(result, grammar.patterns);\\n }\\n if (grammar.repository) {\\n _extractIncludedScopesInRepository(result, grammar.repository);\\n }\\n // remove references to own scope (avoid recursion)\\n delete result[grammar.scopeName];\\n}\\nexports.collectIncludedScopes = collectIncludedScopes;\\nfunction scopesAreMatching(thisScopeName, scopeName) {\\n if (!thisScopeName) {\\n return false;\\n }\\n if (thisScopeName === scopeName) {\\n return true;\\n }\\n var len = scopeName.length;\\n return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === '.';\\n}\\nfunction nameMatcher(identifers, scopes) {\\n if (scopes.length < identifers.length) {\\n return false;\\n }\\n var lastIndex = 0;\\n return identifers.every(function (identifier) {\\n for (var i = lastIndex; i < scopes.length; i++) {\\n if (scopesAreMatching(scopes[i], identifier)) {\\n lastIndex = i + 1;\\n return true;\\n }\\n }\\n return false;\\n });\\n}\\n;\\nfunction collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {\\n var matchers = matcher_1.createMatchers(selector, nameMatcher);\\n var ruleId = rule_1.RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);\\n for (var _i = 0, matchers_1 = matchers; _i < matchers_1.length; _i++) {\\n var matcher = matchers_1[_i];\\n result.push({\\n matcher: matcher.matcher,\\n ruleId: ruleId,\\n grammar: grammar,\\n priority: matcher.priority\\n });\\n }\\n}\\nvar ScopeMetadata = /** @class */ (function () {\\n function ScopeMetadata(scopeName, languageId, tokenType, themeData) {\\n this.scopeName = scopeName;\\n this.languageId = languageId;\\n this.tokenType = tokenType;\\n this.themeData = themeData;\\n }\\n return ScopeMetadata;\\n}());\\nexports.ScopeMetadata = ScopeMetadata;\\nvar ScopeMetadataProvider = /** @class */ (function () {\\n function ScopeMetadataProvider(initialLanguage, themeProvider, embeddedLanguages) {\\n this._initialLanguage = initialLanguage;\\n this._themeProvider = themeProvider;\\n this.onDidChangeTheme();\\n // embeddedLanguages handling\\n this._embeddedLanguages = Object.create(null);\\n if (embeddedLanguages) {\\n // If embeddedLanguages are configured, fill in `this._embeddedLanguages`\\n var scopes = Object.keys(embeddedLanguages);\\n for (var i = 0, len = scopes.length; i < len; i++) {\\n var scope = scopes[i];\\n var language = embeddedLanguages[scope];\\n if (typeof language !== 'number' || language === 0) {\\n console.warn('Invalid embedded language found at scope ' + scope + ': <<' + language + '>>');\\n // never hurts to be too careful\\n continue;\\n }\\n this._embeddedLanguages[scope] = language;\\n }\\n }\\n // create the regex\\n var escapedScopes = Object.keys(this._embeddedLanguages).map(function (scopeName) { return ScopeMetadataProvider._escapeRegExpCharacters(scopeName); });\\n if (escapedScopes.length === 0) {\\n // no scopes registered\\n this._embeddedLanguagesRegex = null;\\n }\\n else {\\n escapedScopes.sort();\\n escapedScopes.reverse();\\n this._embeddedLanguagesRegex = new RegExp(\\\"^((\\\" + escapedScopes.join(')|(') + \\\"))($|\\\\\\\\.)\\\", '');\\n }\\n }\\n ScopeMetadataProvider.prototype.onDidChangeTheme = function () {\\n this._cache = Object.create(null);\\n this._defaultMetaData = new ScopeMetadata('', this._initialLanguage, 0 /* Other */, [this._themeProvider.getDefaults()]);\\n };\\n ScopeMetadataProvider.prototype.getDefaultMetadata = function () {\\n return this._defaultMetaData;\\n };\\n /**\\n * Escapes regular expression characters in a given string\\n */\\n ScopeMetadataProvider._escapeRegExpCharacters = function (value) {\\n return value.replace(/[\\\\-\\\\\\\\\\\\{\\\\}\\\\*\\\\+\\\\?\\\\|\\\\^\\\\$\\\\.\\\\,\\\\[\\\\]\\\\(\\\\)\\\\#\\\\s]/g, '\\\\\\\\$&');\\n };\\n ScopeMetadataProvider.prototype.getMetadataForScope = function (scopeName) {\\n if (scopeName === null) {\\n return ScopeMetadataProvider._NULL_SCOPE_METADATA;\\n }\\n var value = this._cache[scopeName];\\n if (value) {\\n return value;\\n }\\n value = this._doGetMetadataForScope(scopeName);\\n this._cache[scopeName] = value;\\n return value;\\n };\\n ScopeMetadataProvider.prototype._doGetMetadataForScope = function (scopeName) {\\n var languageId = this._scopeToLanguage(scopeName);\\n var standardTokenType = this._toStandardTokenType(scopeName);\\n var themeData = this._themeProvider.themeMatch(scopeName);\\n return new ScopeMetadata(scopeName, languageId, standardTokenType, themeData);\\n };\\n /**\\n * Given a produced TM scope, return the language that token describes or null if unknown.\\n * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null\\n */\\n ScopeMetadataProvider.prototype._scopeToLanguage = function (scope) {\\n if (!scope) {\\n return 0;\\n }\\n if (!this._embeddedLanguagesRegex) {\\n // no scopes registered\\n return 0;\\n }\\n var m = scope.match(this._embeddedLanguagesRegex);\\n if (!m) {\\n // no scopes matched\\n return 0;\\n }\\n var language = this._embeddedLanguages[m[1]] || 0;\\n if (!language) {\\n return 0;\\n }\\n return language;\\n };\\n ScopeMetadataProvider.prototype._toStandardTokenType = function (tokenType) {\\n var m = tokenType.match(ScopeMetadataProvider.STANDARD_TOKEN_TYPE_REGEXP);\\n if (!m) {\\n return 0 /* Other */;\\n }\\n switch (m[1]) {\\n case 'comment':\\n return 1 /* Comment */;\\n case 'string':\\n return 2 /* String */;\\n case 'regex':\\n return 4 /* RegEx */;\\n case 'meta.embedded':\\n return 8 /* MetaEmbedded */;\\n }\\n throw new Error('Unexpected match for standard token type!');\\n };\\n ScopeMetadataProvider._NULL_SCOPE_METADATA = new ScopeMetadata('', 0, 0, null);\\n ScopeMetadataProvider.STANDARD_TOKEN_TYPE_REGEXP = /\\\\b(comment|string|regex|meta\\\\.embedded)\\\\b/;\\n return ScopeMetadataProvider;\\n}());\\nvar Grammar = /** @class */ (function () {\\n function Grammar(grammar, initialLanguage, embeddedLanguages, tokenTypes, grammarRepository) {\\n this._scopeMetadataProvider = new ScopeMetadataProvider(initialLanguage, grammarRepository, embeddedLanguages);\\n this._rootId = -1;\\n this._lastRuleId = 0;\\n this._ruleId2desc = [];\\n this._includedGrammars = {};\\n this._grammarRepository = grammarRepository;\\n this._grammar = initGrammar(grammar, null);\\n this._tokenTypeMatchers = [];\\n if (tokenTypes) {\\n for (var _i = 0, _a = Object.keys(tokenTypes); _i < _a.length; _i++) {\\n var selector = _a[_i];\\n var matchers = matcher_1.createMatchers(selector, nameMatcher);\\n for (var _b = 0, matchers_2 = matchers; _b < matchers_2.length; _b++) {\\n var matcher = matchers_2[_b];\\n this._tokenTypeMatchers.push({\\n matcher: matcher.matcher,\\n type: tokenTypes[selector]\\n });\\n }\\n }\\n }\\n }\\n Grammar.prototype.onDidChangeTheme = function () {\\n this._scopeMetadataProvider.onDidChangeTheme();\\n };\\n Grammar.prototype.getMetadataForScope = function (scope) {\\n return this._scopeMetadataProvider.getMetadataForScope(scope);\\n };\\n Grammar.prototype.getInjections = function () {\\n var _this = this;\\n if (!this._injections) {\\n this._injections = [];\\n // add injections from the current grammar\\n var rawInjections = this._grammar.injections;\\n if (rawInjections) {\\n for (var expression in rawInjections) {\\n collectInjections(this._injections, expression, rawInjections[expression], this, this._grammar);\\n }\\n }\\n // add injection grammars contributed for the current scope\\n if (this._grammarRepository) {\\n var injectionScopeNames = this._grammarRepository.injections(this._grammar.scopeName);\\n if (injectionScopeNames) {\\n injectionScopeNames.forEach(function (injectionScopeName) {\\n var injectionGrammar = _this.getExternalGrammar(injectionScopeName);\\n if (injectionGrammar) {\\n var selector = injectionGrammar.injectionSelector;\\n if (selector) {\\n collectInjections(_this._injections, selector, injectionGrammar, _this, injectionGrammar);\\n }\\n }\\n });\\n }\\n }\\n this._injections.sort(function (i1, i2) { return i1.priority - i2.priority; }); // sort by priority\\n }\\n if (this._injections.length === 0) {\\n return this._injections;\\n }\\n return this._injections;\\n };\\n Grammar.prototype.registerRule = function (factory) {\\n var id = (++this._lastRuleId);\\n var result = factory(id);\\n this._ruleId2desc[id] = result;\\n return result;\\n };\\n Grammar.prototype.getRule = function (patternId) {\\n return this._ruleId2desc[patternId];\\n };\\n Grammar.prototype.getExternalGrammar = function (scopeName, repository) {\\n if (this._includedGrammars[scopeName]) {\\n return this._includedGrammars[scopeName];\\n }\\n else if (this._grammarRepository) {\\n var rawIncludedGrammar = this._grammarRepository.lookup(scopeName);\\n if (rawIncludedGrammar) {\\n // console.log('LOADED GRAMMAR ' + pattern.include);\\n this._includedGrammars[scopeName] = initGrammar(rawIncludedGrammar, repository && repository.$base);\\n return this._includedGrammars[scopeName];\\n }\\n }\\n };\\n Grammar.prototype.tokenizeLine = function (lineText, prevState) {\\n var r = this._tokenize(lineText, prevState, false);\\n return {\\n tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),\\n ruleStack: r.ruleStack\\n };\\n };\\n Grammar.prototype.tokenizeLine2 = function (lineText, prevState) {\\n var r = this._tokenize(lineText, prevState, true);\\n return {\\n tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),\\n ruleStack: r.ruleStack\\n };\\n };\\n Grammar.prototype._tokenize = function (lineText, prevState, emitBinaryTokens) {\\n if (this._rootId === -1) {\\n this._rootId = rule_1.RuleFactory.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository);\\n }\\n var isFirstLine;\\n if (!prevState || prevState === StackElement.NULL) {\\n isFirstLine = true;\\n var rawDefaultMetadata = this._scopeMetadataProvider.getDefaultMetadata();\\n var defaultTheme = rawDefaultMetadata.themeData[0];\\n var defaultMetadata = StackElementMetadata.set(0, rawDefaultMetadata.languageId, rawDefaultMetadata.tokenType, defaultTheme.fontStyle, defaultTheme.foreground, defaultTheme.background);\\n var rootScopeName = this.getRule(this._rootId).getName(null, null);\\n var rawRootMetadata = this._scopeMetadataProvider.getMetadataForScope(rootScopeName);\\n var rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata);\\n var scopeList = new ScopeListElement(null, rootScopeName, rootMetadata);\\n prevState = new StackElement(null, this._rootId, -1, null, scopeList, scopeList);\\n }\\n else {\\n isFirstLine = false;\\n prevState.reset();\\n }\\n lineText = lineText + '\\\\n';\\n var onigLineText = rule_1.createOnigString(lineText);\\n var lineLength = rule_1.getString(onigLineText).length;\\n var lineTokens = new LineTokens(emitBinaryTokens, lineText, this._tokenTypeMatchers);\\n var nextState = _tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens);\\n return {\\n lineLength: lineLength,\\n lineTokens: lineTokens,\\n ruleStack: nextState\\n };\\n };\\n return Grammar;\\n}());\\nexports.Grammar = Grammar;\\nfunction initGrammar(grammar, base) {\\n grammar = utils_1.clone(grammar);\\n grammar.repository = grammar.repository || {};\\n grammar.repository.$self = {\\n $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,\\n patterns: grammar.patterns,\\n name: grammar.scopeName\\n };\\n grammar.repository.$base = base || grammar.repository.$self;\\n return grammar;\\n}\\nfunction handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {\\n if (captures.length === 0) {\\n return;\\n }\\n var len = Math.min(captures.length, captureIndices.length);\\n var localStack = [];\\n var maxEnd = captureIndices[0].end;\\n for (var i = 0; i < len; i++) {\\n var captureRule = captures[i];\\n if (captureRule === null) {\\n // Not interested\\n continue;\\n }\\n var captureIndex = captureIndices[i];\\n if (captureIndex.length === 0) {\\n // Nothing really captured\\n continue;\\n }\\n if (captureIndex.start > maxEnd) {\\n // Capture going beyond consumed string\\n break;\\n }\\n // pop captures while needed\\n while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {\\n // pop!\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\\n localStack.pop();\\n }\\n if (localStack.length > 0) {\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);\\n }\\n else {\\n lineTokens.produce(stack, captureIndex.start);\\n }\\n if (captureRule.retokenizeCapturedWithRuleId) {\\n // the capture requires additional matching\\n var scopeName = captureRule.getName(rule_1.getString(lineText), captureIndices);\\n var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);\\n var contentName = captureRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n var stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, null, nameScopesList, contentNameScopesList);\\n _tokenizeString(grammar, rule_1.createOnigString(rule_1.getString(lineText).substring(0, captureIndex.end)), (isFirstLine && captureIndex.start === 0), captureIndex.start, stackClone, lineTokens);\\n continue;\\n }\\n var captureRuleScopeName = captureRule.getName(rule_1.getString(lineText), captureIndices);\\n if (captureRuleScopeName !== null) {\\n // push\\n var base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;\\n var captureRuleScopesList = base.push(grammar, captureRuleScopeName);\\n localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));\\n }\\n }\\n while (localStack.length > 0) {\\n // pop!\\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\\n localStack.pop();\\n }\\n}\\nfunction debugCompiledRuleToString(ruleScanner) {\\n var r = [];\\n for (var i = 0, len = ruleScanner.rules.length; i < len; i++) {\\n r.push(' - ' + ruleScanner.rules[i] + ': ' + ruleScanner.debugRegExps[i]);\\n }\\n return r.join('\\\\n');\\n}\\nfunction matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n // The lower the better\\n var bestMatchRating = Number.MAX_VALUE;\\n var bestMatchCaptureIndices = null;\\n var bestMatchRuleId;\\n var bestMatchResultPriority = 0;\\n var scopes = stack.contentNameScopesList.generateScopes();\\n for (var i = 0, len = injections.length; i < len; i++) {\\n var injection = injections[i];\\n if (!injection.matcher(scopes)) {\\n // injection selector doesn't match stack\\n continue;\\n }\\n var ruleScanner = grammar.getRule(injection.ruleId).compile(grammar, null, isFirstLine, linePos === anchorPosition);\\n var matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for injections');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (!matchResult) {\\n continue;\\n }\\n var matchRating = matchResult.captureIndices[0].start;\\n if (matchRating >= bestMatchRating) {\\n // Injections are sorted by priority, so the previous injection had a better or equal priority\\n continue;\\n }\\n bestMatchRating = matchRating;\\n bestMatchCaptureIndices = matchResult.captureIndices;\\n bestMatchRuleId = ruleScanner.rules[matchResult.index];\\n bestMatchResultPriority = injection.priority;\\n if (bestMatchRating === linePos) {\\n // No more need to look at the rest of the injections.\\n break;\\n }\\n }\\n if (bestMatchCaptureIndices) {\\n return {\\n priorityMatch: bestMatchResultPriority === -1,\\n captureIndices: bestMatchCaptureIndices,\\n matchedRuleId: bestMatchRuleId\\n };\\n }\\n return null;\\n}\\nfunction matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n var rule = stack.getRule(grammar);\\n var ruleScanner = rule.compile(grammar, stack.endRule, isFirstLine, linePos === anchorPosition);\\n var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (r) {\\n return {\\n captureIndices: r.captureIndices,\\n matchedRuleId: ruleScanner.rules[r.index]\\n };\\n }\\n return null;\\n}\\nfunction matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\\n // Look for normal grammar rule\\n var matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n // Look for injected rules\\n var injections = grammar.getInjections();\\n if (injections.length === 0) {\\n // No injections whatsoever => early return\\n return matchResult;\\n }\\n var injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n if (!injectionResult) {\\n // No injections matched => early return\\n return matchResult;\\n }\\n if (!matchResult) {\\n // Only injections matched => early return\\n return injectionResult;\\n }\\n // Decide if `matchResult` or `injectionResult` should win\\n var matchResultScore = matchResult.captureIndices[0].start;\\n var injectionResultScore = injectionResult.captureIndices[0].start;\\n if (injectionResultScore < matchResultScore || (injectionResult.priorityMatch && injectionResultScore === matchResultScore)) {\\n // injection won!\\n return injectionResult;\\n }\\n return matchResult;\\n}\\n/**\\n * Walk the stack from bottom to top, and check each while condition in this order.\\n * If any fails, cut off the entire stack above the failed while condition. While conditions\\n * may also advance the linePosition.\\n */\\nfunction _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\\n var anchorPosition = -1;\\n var whileRules = [];\\n for (var node = stack; node; node = node.pop()) {\\n var nodeRule = node.getRule(grammar);\\n if (nodeRule instanceof rule_1.BeginWhileRule) {\\n whileRules.push({\\n rule: nodeRule,\\n stack: node\\n });\\n }\\n }\\n for (var whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {\\n var ruleScanner = whileRule.rule.compileWhile(grammar, whileRule.stack.endRule, isFirstLine, anchorPosition === linePos);\\n var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' scanning for while rule');\\n console.log(debugCompiledRuleToString(ruleScanner));\\n }\\n if (r) {\\n var matchedRuleId = ruleScanner.rules[r.index];\\n if (matchedRuleId !== -2) {\\n // we shouldn't end up here\\n stack = whileRule.stack.pop();\\n break;\\n }\\n if (r.captureIndices && r.captureIndices.length) {\\n lineTokens.produce(whileRule.stack, r.captureIndices[0].start);\\n handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);\\n lineTokens.produce(whileRule.stack, r.captureIndices[0].end);\\n anchorPosition = r.captureIndices[0].end;\\n if (r.captureIndices[0].end > linePos) {\\n linePos = r.captureIndices[0].end;\\n isFirstLine = false;\\n }\\n }\\n }\\n else {\\n stack = whileRule.stack.pop();\\n break;\\n }\\n }\\n return { stack: stack, linePos: linePos, anchorPosition: anchorPosition, isFirstLine: isFirstLine };\\n}\\nfunction _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\\n var lineLength = rule_1.getString(lineText).length;\\n var STOP = false;\\n var whileCheckResult = _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens);\\n stack = whileCheckResult.stack;\\n linePos = whileCheckResult.linePos;\\n isFirstLine = whileCheckResult.isFirstLine;\\n var anchorPosition = whileCheckResult.anchorPosition;\\n while (!STOP) {\\n scanNext(); // potentially modifies linePos && anchorPosition\\n }\\n function scanNext() {\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log('');\\n console.log('@@scanNext: |' + rule_1.getString(lineText).replace(/\\\\n$/, '\\\\\\\\n').substr(linePos) + '|');\\n }\\n var r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\\n if (!r) {\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' no more matches.');\\n }\\n // No match\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n var captureIndices = r.captureIndices;\\n var matchedRuleId = r.matchedRuleId;\\n var hasAdvanced = (captureIndices && captureIndices.length > 0) ? (captureIndices[0].end > linePos) : false;\\n if (matchedRuleId === -1) {\\n // We matched the `end` for this rule => pop it\\n var poppedRule = stack.getRule(grammar);\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' popping ' + poppedRule.debugName + ' - ' + poppedRule.debugEndRegExp);\\n }\\n lineTokens.produce(stack, captureIndices[0].start);\\n stack = stack.setContentNameScopesList(stack.nameScopesList);\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n // pop\\n var popped = stack;\\n stack = stack.pop();\\n if (!hasAdvanced && popped.getEnterPos() === linePos) {\\n // Grammar pushed & popped a rule without advancing\\n console.error('[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing');\\n // See https://github.com/Microsoft/vscode-textmate/issues/12\\n // Let's assume this was a mistake by the grammar author and the intent was to continue in this state\\n stack = popped;\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else {\\n // We matched a rule!\\n var _rule = grammar.getRule(matchedRuleId);\\n lineTokens.produce(stack, captureIndices[0].start);\\n var beforePush = stack;\\n // push it on the stack rule\\n var scopeName = _rule.getName(rule_1.getString(lineText), captureIndices);\\n var nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);\\n stack = stack.push(matchedRuleId, linePos, null, nameScopesList, nameScopesList);\\n if (_rule instanceof rule_1.BeginEndRule) {\\n var pushedRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' pushing ' + pushedRule.debugName + ' - ' + pushedRule.debugBeginRegExp);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n anchorPosition = captureIndices[0].end;\\n var contentName = pushedRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n stack = stack.setContentNameScopesList(contentNameScopesList);\\n if (pushedRule.endHasBackReferences) {\\n stack = stack.setEndRule(pushedRule.getEndWithResolvedBackReferences(rule_1.getString(lineText), captureIndices));\\n }\\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\\n // Grammar pushed the same rule without advancing\\n console.error('[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing');\\n stack = stack.pop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else if (_rule instanceof rule_1.BeginWhileRule) {\\n var pushedRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' pushing ' + pushedRule.debugName);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n anchorPosition = captureIndices[0].end;\\n var contentName = pushedRule.getContentName(rule_1.getString(lineText), captureIndices);\\n var contentNameScopesList = nameScopesList.push(grammar, contentName);\\n stack = stack.setContentNameScopesList(contentNameScopesList);\\n if (pushedRule.whileHasBackReferences) {\\n stack = stack.setEndRule(pushedRule.getWhileWithResolvedBackReferences(rule_1.getString(lineText), captureIndices));\\n }\\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\\n // Grammar pushed the same rule without advancing\\n console.error('[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing');\\n stack = stack.pop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n else {\\n var matchingRule = _rule;\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' matched ' + matchingRule.debugName + ' - ' + matchingRule.debugMatchRegExp);\\n }\\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures, captureIndices);\\n lineTokens.produce(stack, captureIndices[0].end);\\n // pop rule immediately since it is a MatchRule\\n stack = stack.pop();\\n if (!hasAdvanced) {\\n // Grammar is not advancing, nor is it pushing/popping\\n console.error('[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping');\\n stack = stack.safePop();\\n lineTokens.produce(stack, lineLength);\\n STOP = true;\\n return;\\n }\\n }\\n }\\n if (captureIndices[0].end > linePos) {\\n // Advance stream\\n linePos = captureIndices[0].end;\\n isFirstLine = false;\\n }\\n }\\n return stack;\\n}\\nvar StackElementMetadata = /** @class */ (function () {\\n function StackElementMetadata() {\\n }\\n StackElementMetadata.toBinaryStr = function (metadata) {\\n var r = metadata.toString(2);\\n while (r.length < 32) {\\n r = '0' + r;\\n }\\n return r;\\n };\\n StackElementMetadata.printMetadata = function (metadata) {\\n var languageId = StackElementMetadata.getLanguageId(metadata);\\n var tokenType = StackElementMetadata.getTokenType(metadata);\\n var fontStyle = StackElementMetadata.getFontStyle(metadata);\\n var foreground = StackElementMetadata.getForeground(metadata);\\n var background = StackElementMetadata.getBackground(metadata);\\n console.log({\\n languageId: languageId,\\n tokenType: tokenType,\\n fontStyle: fontStyle,\\n foreground: foreground,\\n background: background,\\n });\\n };\\n StackElementMetadata.getLanguageId = function (metadata) {\\n return (metadata & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\\n };\\n StackElementMetadata.getTokenType = function (metadata) {\\n return (metadata & 1792 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\\n };\\n StackElementMetadata.getFontStyle = function (metadata) {\\n return (metadata & 14336 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\\n };\\n StackElementMetadata.getForeground = function (metadata) {\\n return (metadata & 8372224 /* FOREGROUND_MASK */) >>> 14 /* FOREGROUND_OFFSET */;\\n };\\n StackElementMetadata.getBackground = function (metadata) {\\n return (metadata & 4286578688 /* BACKGROUND_MASK */) >>> 23 /* BACKGROUND_OFFSET */;\\n };\\n StackElementMetadata.set = function (metadata, languageId, tokenType, fontStyle, foreground, background) {\\n var _languageId = StackElementMetadata.getLanguageId(metadata);\\n var _tokenType = StackElementMetadata.getTokenType(metadata);\\n var _fontStyle = StackElementMetadata.getFontStyle(metadata);\\n var _foreground = StackElementMetadata.getForeground(metadata);\\n var _background = StackElementMetadata.getBackground(metadata);\\n if (languageId !== 0) {\\n _languageId = languageId;\\n }\\n if (tokenType !== 0 /* Other */) {\\n _tokenType = tokenType === 8 /* MetaEmbedded */ ? 0 /* Other */ : tokenType;\\n }\\n if (fontStyle !== -1 /* NotSet */) {\\n _fontStyle = fontStyle;\\n }\\n if (foreground !== 0) {\\n _foreground = foreground;\\n }\\n if (background !== 0) {\\n _background = background;\\n }\\n return ((_languageId << 0 /* LANGUAGEID_OFFSET */)\\n | (_tokenType << 8 /* TOKEN_TYPE_OFFSET */)\\n | (_fontStyle << 11 /* FONT_STYLE_OFFSET */)\\n | (_foreground << 14 /* FOREGROUND_OFFSET */)\\n | (_background << 23 /* BACKGROUND_OFFSET */)) >>> 0;\\n };\\n return StackElementMetadata;\\n}());\\nexports.StackElementMetadata = StackElementMetadata;\\nvar ScopeListElement = /** @class */ (function () {\\n function ScopeListElement(parent, scope, metadata) {\\n this.parent = parent;\\n this.scope = scope;\\n this.metadata = metadata;\\n }\\n ScopeListElement._equals = function (a, b) {\\n do {\\n if (a === b) {\\n return true;\\n }\\n if (a.scope !== b.scope || a.metadata !== b.metadata) {\\n return false;\\n }\\n // Go to previous pair\\n a = a.parent;\\n b = b.parent;\\n if (!a && !b) {\\n // End of list reached for both\\n return true;\\n }\\n if (!a || !b) {\\n // End of list reached only for one\\n return false;\\n }\\n } while (true);\\n };\\n ScopeListElement.prototype.equals = function (other) {\\n return ScopeListElement._equals(this, other);\\n };\\n ScopeListElement._matchesScope = function (scope, selector, selectorWithDot) {\\n return (selector === scope || scope.substring(0, selectorWithDot.length) === selectorWithDot);\\n };\\n ScopeListElement._matches = function (target, parentScopes) {\\n if (parentScopes === null) {\\n return true;\\n }\\n var len = parentScopes.length;\\n var index = 0;\\n var selector = parentScopes[index];\\n var selectorWithDot = selector + '.';\\n while (target) {\\n if (this._matchesScope(target.scope, selector, selectorWithDot)) {\\n index++;\\n if (index === len) {\\n return true;\\n }\\n selector = parentScopes[index];\\n selectorWithDot = selector + '.';\\n }\\n target = target.parent;\\n }\\n return false;\\n };\\n ScopeListElement.mergeMetadata = function (metadata, scopesList, source) {\\n if (source === null) {\\n return metadata;\\n }\\n var fontStyle = -1 /* NotSet */;\\n var foreground = 0;\\n var background = 0;\\n if (source.themeData !== null) {\\n // Find the first themeData that matches\\n for (var i = 0, len = source.themeData.length; i < len; i++) {\\n var themeData = source.themeData[i];\\n if (this._matches(scopesList, themeData.parentScopes)) {\\n fontStyle = themeData.fontStyle;\\n foreground = themeData.foreground;\\n background = themeData.background;\\n break;\\n }\\n }\\n }\\n return StackElementMetadata.set(metadata, source.languageId, source.tokenType, fontStyle, foreground, background);\\n };\\n ScopeListElement._push = function (target, grammar, scopes) {\\n for (var i = 0, len = scopes.length; i < len; i++) {\\n var scope = scopes[i];\\n var rawMetadata = grammar.getMetadataForScope(scope);\\n var metadata = ScopeListElement.mergeMetadata(target.metadata, target, rawMetadata);\\n target = new ScopeListElement(target, scope, metadata);\\n }\\n return target;\\n };\\n ScopeListElement.prototype.push = function (grammar, scope) {\\n if (scope === null) {\\n return this;\\n }\\n if (scope.indexOf(' ') >= 0) {\\n // there are multiple scopes to push\\n return ScopeListElement._push(this, grammar, scope.split(/ /g));\\n }\\n // there is a single scope to push\\n return ScopeListElement._push(this, grammar, [scope]);\\n };\\n ScopeListElement._generateScopes = function (scopesList) {\\n var result = [], resultLen = 0;\\n while (scopesList) {\\n result[resultLen++] = scopesList.scope;\\n scopesList = scopesList.parent;\\n }\\n result.reverse();\\n return result;\\n };\\n ScopeListElement.prototype.generateScopes = function () {\\n return ScopeListElement._generateScopes(this);\\n };\\n return ScopeListElement;\\n}());\\nexports.ScopeListElement = ScopeListElement;\\n/**\\n * Represents a \\\"pushed\\\" state on the stack (as a linked list element).\\n */\\nvar StackElement = /** @class */ (function () {\\n function StackElement(parent, ruleId, enterPos, endRule, nameScopesList, contentNameScopesList) {\\n this.parent = parent;\\n this.depth = (this.parent ? this.parent.depth + 1 : 1);\\n this.ruleId = ruleId;\\n this._enterPos = enterPos;\\n this.endRule = endRule;\\n this.nameScopesList = nameScopesList;\\n this.contentNameScopesList = contentNameScopesList;\\n }\\n /**\\n * A structural equals check. Does not take into account `scopes`.\\n */\\n StackElement._structuralEquals = function (a, b) {\\n do {\\n if (a === b) {\\n return true;\\n }\\n if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) {\\n return false;\\n }\\n // Go to previous pair\\n a = a.parent;\\n b = b.parent;\\n if (!a && !b) {\\n // End of list reached for both\\n return true;\\n }\\n if (!a || !b) {\\n // End of list reached only for one\\n return false;\\n }\\n } while (true);\\n };\\n StackElement._equals = function (a, b) {\\n if (a === b) {\\n return true;\\n }\\n if (!this._structuralEquals(a, b)) {\\n return false;\\n }\\n return a.contentNameScopesList.equals(b.contentNameScopesList);\\n };\\n StackElement.prototype.clone = function () {\\n return this;\\n };\\n StackElement.prototype.equals = function (other) {\\n if (other === null) {\\n return false;\\n }\\n return StackElement._equals(this, other);\\n };\\n StackElement._reset = function (el) {\\n while (el) {\\n el._enterPos = -1;\\n el = el.parent;\\n }\\n };\\n StackElement.prototype.reset = function () {\\n StackElement._reset(this);\\n };\\n StackElement.prototype.pop = function () {\\n return this.parent;\\n };\\n StackElement.prototype.safePop = function () {\\n if (this.parent) {\\n return this.parent;\\n }\\n return this;\\n };\\n StackElement.prototype.push = function (ruleId, enterPos, endRule, nameScopesList, contentNameScopesList) {\\n return new StackElement(this, ruleId, enterPos, endRule, nameScopesList, contentNameScopesList);\\n };\\n StackElement.prototype.getEnterPos = function () {\\n return this._enterPos;\\n };\\n StackElement.prototype.getRule = function (grammar) {\\n return grammar.getRule(this.ruleId);\\n };\\n StackElement.prototype._writeString = function (res, outIndex) {\\n if (this.parent) {\\n outIndex = this.parent._writeString(res, outIndex);\\n }\\n res[outIndex++] = \\\"(\\\" + this.ruleId + \\\", TODO-\\\" + this.nameScopesList + \\\", TODO-\\\" + this.contentNameScopesList + \\\")\\\";\\n return outIndex;\\n };\\n StackElement.prototype.toString = function () {\\n var r = [];\\n this._writeString(r, 0);\\n return '[' + r.join(',') + ']';\\n };\\n StackElement.prototype.setContentNameScopesList = function (contentNameScopesList) {\\n if (this.contentNameScopesList === contentNameScopesList) {\\n return this;\\n }\\n return this.parent.push(this.ruleId, this._enterPos, this.endRule, this.nameScopesList, contentNameScopesList);\\n };\\n StackElement.prototype.setEndRule = function (endRule) {\\n if (this.endRule === endRule) {\\n return this;\\n }\\n return new StackElement(this.parent, this.ruleId, this._enterPos, endRule, this.nameScopesList, this.contentNameScopesList);\\n };\\n StackElement.prototype.hasSameRuleAs = function (other) {\\n return this.ruleId === other.ruleId;\\n };\\n StackElement.NULL = new StackElement(null, 0, 0, null, null, null);\\n return StackElement;\\n}());\\nexports.StackElement = StackElement;\\nvar LocalStackElement = /** @class */ (function () {\\n function LocalStackElement(scopes, endPos) {\\n this.scopes = scopes;\\n this.endPos = endPos;\\n }\\n return LocalStackElement;\\n}());\\nexports.LocalStackElement = LocalStackElement;\\nvar LineTokens = /** @class */ (function () {\\n function LineTokens(emitBinaryTokens, lineText, tokenTypeOverrides) {\\n this._emitBinaryTokens = emitBinaryTokens;\\n this._tokenTypeOverrides = tokenTypeOverrides;\\n if (debug_1.IN_DEBUG_MODE) {\\n this._lineText = lineText;\\n }\\n if (this._emitBinaryTokens) {\\n this._binaryTokens = [];\\n }\\n else {\\n this._tokens = [];\\n }\\n this._lastTokenEndIndex = 0;\\n }\\n LineTokens.prototype.produce = function (stack, endIndex) {\\n this.produceFromScopes(stack.contentNameScopesList, endIndex);\\n };\\n LineTokens.prototype.produceFromScopes = function (scopesList, endIndex) {\\n if (this._lastTokenEndIndex >= endIndex) {\\n return;\\n }\\n if (this._emitBinaryTokens) {\\n var metadata = scopesList.metadata;\\n for (var _i = 0, _a = this._tokenTypeOverrides; _i < _a.length; _i++) {\\n var tokenType = _a[_i];\\n if (tokenType.matcher(scopesList.generateScopes())) {\\n metadata = StackElementMetadata.set(metadata, 0, toTemporaryType(tokenType.type), -1 /* NotSet */, 0, 0);\\n }\\n }\\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {\\n // no need to push a token with the same metadata\\n this._lastTokenEndIndex = endIndex;\\n return;\\n }\\n this._binaryTokens.push(this._lastTokenEndIndex);\\n this._binaryTokens.push(metadata);\\n this._lastTokenEndIndex = endIndex;\\n return;\\n }\\n var scopes = scopesList.generateScopes();\\n if (debug_1.IN_DEBUG_MODE) {\\n console.log(' token: |' + this._lineText.substring(this._lastTokenEndIndex, endIndex).replace(/\\\\n$/, '\\\\\\\\n') + '|');\\n for (var k = 0; k < scopes.length; k++) {\\n console.log(' * ' + scopes[k]);\\n }\\n }\\n this._tokens.push({\\n startIndex: this._lastTokenEndIndex,\\n endIndex: endIndex,\\n // value: lineText.substring(lastTokenEndIndex, endIndex),\\n scopes: scopes\\n });\\n this._lastTokenEndIndex = endIndex;\\n };\\n LineTokens.prototype.getResult = function (stack, lineLength) {\\n if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {\\n // pop produced token for newline\\n this._tokens.pop();\\n }\\n if (this._tokens.length === 0) {\\n this._lastTokenEndIndex = -1;\\n this.produce(stack, lineLength);\\n this._tokens[this._tokens.length - 1].startIndex = 0;\\n }\\n return this._tokens;\\n };\\n LineTokens.prototype.getBinaryResult = function (stack, lineLength) {\\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {\\n // pop produced token for newline\\n this._binaryTokens.pop();\\n this._binaryTokens.pop();\\n }\\n if (this._binaryTokens.length === 0) {\\n this._lastTokenEndIndex = -1;\\n this.produce(stack, lineLength);\\n this._binaryTokens[this._binaryTokens.length - 2] = 0;\\n }\\n var result = new Uint32Array(this._binaryTokens.length);\\n for (var i = 0, len = this._binaryTokens.length; i < len; i++) {\\n result[i] = this._binaryTokens[i];\\n }\\n return result;\\n };\\n return LineTokens;\\n}());\\nfunction toTemporaryType(standardType) {\\n switch (standardType) {\\n case 4 /* RegEx */:\\n return 4 /* RegEx */;\\n case 2 /* String */:\\n return 2 /* String */;\\n case 1 /* Comment */:\\n return 1 /* Comment */;\\n case 0 /* Other */:\\n default:\\n // `MetaEmbedded` is the same scope as `Other`\\n // but it overwrites existing token types in the stack.\\n return 8 /* MetaEmbedded */;\\n }\\n}\\n//# sourceMappingURL=grammar.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/grammar.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/grammarReader.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/grammarReader.js ***!\n \\************************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar plist = __webpack_require__(/*! fast-plist */ \\\"./node_modules/fast-plist/release/src/main.js\\\");\\nvar debug_1 = __webpack_require__(/*! ./debug */ \\\"./node_modules/monaco-textmate/dist/debug.js\\\");\\nvar json_1 = __webpack_require__(/*! ./json */ \\\"./node_modules/monaco-textmate/dist/json.js\\\");\\nfunction parseJSONGrammar(contents, filename) {\\n if (debug_1.CAPTURE_METADATA) {\\n return json_1.parse(contents, filename, true);\\n }\\n return JSON.parse(contents);\\n}\\nexports.parseJSONGrammar = parseJSONGrammar;\\nfunction parsePLISTGrammar(contents, filename) {\\n if (debug_1.CAPTURE_METADATA) {\\n return plist.parseWithLocation(contents, filename, '$vscodeTextmateLocation');\\n }\\n return plist.parse(contents);\\n}\\nexports.parsePLISTGrammar = parsePLISTGrammar;\\n//# sourceMappingURL=grammarReader.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/grammarReader.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/json.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/json.js ***!\n \\***************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction doFail(streamState, msg) {\\n // console.log('Near offset ' + streamState.pos + ': ' + msg + ' ~~~' + streamState.source.substr(streamState.pos, 50) + '~~~');\\n throw new Error('Near offset ' + streamState.pos + ': ' + msg + ' ~~~' + streamState.source.substr(streamState.pos, 50) + '~~~');\\n}\\nfunction parse(source, filename, withMetadata) {\\n var streamState = new JSONStreamState(source);\\n var token = new JSONToken();\\n var state = 0 /* ROOT_STATE */;\\n var cur = null;\\n var stateStack = [];\\n var objStack = [];\\n function pushState() {\\n stateStack.push(state);\\n objStack.push(cur);\\n }\\n function popState() {\\n state = stateStack.pop();\\n cur = objStack.pop();\\n }\\n function fail(msg) {\\n doFail(streamState, msg);\\n }\\n while (nextJSONToken(streamState, token)) {\\n if (state === 0 /* ROOT_STATE */) {\\n if (cur !== null) {\\n fail('too many constructs in root');\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n cur = {};\\n if (withMetadata) {\\n cur.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n pushState();\\n state = 1 /* DICT_STATE */;\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n cur = [];\\n pushState();\\n state = 4 /* ARR_STATE */;\\n continue;\\n }\\n fail('unexpected token in root');\\n }\\n if (state === 2 /* DICT_STATE_COMMA */) {\\n if (token.type === 5 /* RIGHT_CURLY_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 7 /* COMMA */) {\\n state = 3 /* DICT_STATE_NO_CLOSE */;\\n continue;\\n }\\n fail('expected , or }');\\n }\\n if (state === 1 /* DICT_STATE */ || state === 3 /* DICT_STATE_NO_CLOSE */) {\\n if (state === 1 /* DICT_STATE */ && token.type === 5 /* RIGHT_CURLY_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 1 /* STRING */) {\\n var keyValue = token.value;\\n if (!nextJSONToken(streamState, token) || token.type !== 6 /* COLON */) {\\n fail('expected colon');\\n }\\n if (!nextJSONToken(streamState, token)) {\\n fail('expected value');\\n }\\n state = 2 /* DICT_STATE_COMMA */;\\n if (token.type === 1 /* STRING */) {\\n cur[keyValue] = token.value;\\n continue;\\n }\\n if (token.type === 8 /* NULL */) {\\n cur[keyValue] = null;\\n continue;\\n }\\n if (token.type === 9 /* TRUE */) {\\n cur[keyValue] = true;\\n continue;\\n }\\n if (token.type === 10 /* FALSE */) {\\n cur[keyValue] = false;\\n continue;\\n }\\n if (token.type === 11 /* NUMBER */) {\\n cur[keyValue] = parseFloat(token.value);\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n var newArr = [];\\n cur[keyValue] = newArr;\\n pushState();\\n state = 4 /* ARR_STATE */;\\n cur = newArr;\\n continue;\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n var newDict = {};\\n if (withMetadata) {\\n newDict.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n cur[keyValue] = newDict;\\n pushState();\\n state = 1 /* DICT_STATE */;\\n cur = newDict;\\n continue;\\n }\\n }\\n fail('unexpected token in dict');\\n }\\n if (state === 5 /* ARR_STATE_COMMA */) {\\n if (token.type === 4 /* RIGHT_SQUARE_BRACKET */) {\\n popState();\\n continue;\\n }\\n if (token.type === 7 /* COMMA */) {\\n state = 6 /* ARR_STATE_NO_CLOSE */;\\n continue;\\n }\\n fail('expected , or ]');\\n }\\n if (state === 4 /* ARR_STATE */ || state === 6 /* ARR_STATE_NO_CLOSE */) {\\n if (state === 4 /* ARR_STATE */ && token.type === 4 /* RIGHT_SQUARE_BRACKET */) {\\n popState();\\n continue;\\n }\\n state = 5 /* ARR_STATE_COMMA */;\\n if (token.type === 1 /* STRING */) {\\n cur.push(token.value);\\n continue;\\n }\\n if (token.type === 8 /* NULL */) {\\n cur.push(null);\\n continue;\\n }\\n if (token.type === 9 /* TRUE */) {\\n cur.push(true);\\n continue;\\n }\\n if (token.type === 10 /* FALSE */) {\\n cur.push(false);\\n continue;\\n }\\n if (token.type === 11 /* NUMBER */) {\\n cur.push(parseFloat(token.value));\\n continue;\\n }\\n if (token.type === 2 /* LEFT_SQUARE_BRACKET */) {\\n var newArr = [];\\n cur.push(newArr);\\n pushState();\\n state = 4 /* ARR_STATE */;\\n cur = newArr;\\n continue;\\n }\\n if (token.type === 3 /* LEFT_CURLY_BRACKET */) {\\n var newDict = {};\\n if (withMetadata) {\\n newDict.$vscodeTextmateLocation = token.toLocation(filename);\\n }\\n cur.push(newDict);\\n pushState();\\n state = 1 /* DICT_STATE */;\\n cur = newDict;\\n continue;\\n }\\n fail('unexpected token in array');\\n }\\n fail('unknown state');\\n }\\n if (objStack.length !== 0) {\\n fail('unclosed constructs');\\n }\\n return cur;\\n}\\nexports.parse = parse;\\nvar JSONStreamState = /** @class */ (function () {\\n function JSONStreamState(source) {\\n this.source = source;\\n this.pos = 0;\\n this.len = source.length;\\n this.line = 1;\\n this.char = 0;\\n }\\n return JSONStreamState;\\n}());\\nvar JSONToken = /** @class */ (function () {\\n function JSONToken() {\\n this.value = null;\\n this.offset = -1;\\n this.len = -1;\\n this.line = -1;\\n this.char = -1;\\n }\\n JSONToken.prototype.toLocation = function (filename) {\\n return {\\n filename: filename,\\n line: this.line,\\n char: this.char\\n };\\n };\\n return JSONToken;\\n}());\\n/**\\n * precondition: the string is known to be valid JSON (https://www.ietf.org/rfc/rfc4627.txt)\\n */\\nfunction nextJSONToken(_state, _out) {\\n _out.value = null;\\n _out.type = 0 /* UNKNOWN */;\\n _out.offset = -1;\\n _out.len = -1;\\n _out.line = -1;\\n _out.char = -1;\\n var source = _state.source;\\n var pos = _state.pos;\\n var len = _state.len;\\n var line = _state.line;\\n var char = _state.char;\\n //------------------------ skip whitespace\\n var chCode;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n if (chCode === 32 /* SPACE */ || chCode === 9 /* HORIZONTAL_TAB */ || chCode === 13 /* CARRIAGE_RETURN */) {\\n // regular whitespace\\n pos++;\\n char++;\\n continue;\\n }\\n if (chCode === 10 /* LINE_FEED */) {\\n // newline\\n pos++;\\n line++;\\n char = 0;\\n continue;\\n }\\n // not whitespace\\n break;\\n } while (true);\\n _out.offset = pos;\\n _out.line = line;\\n _out.char = char;\\n if (chCode === 34 /* QUOTATION_MARK */) {\\n //------------------------ strings\\n _out.type = 1 /* STRING */;\\n pos++;\\n char++;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n pos++;\\n char++;\\n if (chCode === 92 /* BACKSLASH */) {\\n // skip next char\\n pos++;\\n char++;\\n continue;\\n }\\n if (chCode === 34 /* QUOTATION_MARK */) {\\n // end of the string\\n break;\\n }\\n } while (true);\\n _out.value = source.substring(_out.offset + 1, pos - 1).replace(/\\\\\\\\u([0-9A-Fa-f]{4})/g, function (_, m0) {\\n return String.fromCodePoint(parseInt(m0, 16));\\n }).replace(/\\\\\\\\(.)/g, function (_, m0) {\\n switch (m0) {\\n case '\\\"': return '\\\"';\\n case '\\\\\\\\': return '\\\\\\\\';\\n case '/': return '/';\\n case 'b': return '\\\\b';\\n case 'f': return '\\\\f';\\n case 'n': return '\\\\n';\\n case 'r': return '\\\\r';\\n case 't': return '\\\\t';\\n default: doFail(_state, 'invalid escape sequence');\\n }\\n });\\n }\\n else if (chCode === 91 /* LEFT_SQUARE_BRACKET */) {\\n _out.type = 2 /* LEFT_SQUARE_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 123 /* LEFT_CURLY_BRACKET */) {\\n _out.type = 3 /* LEFT_CURLY_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 93 /* RIGHT_SQUARE_BRACKET */) {\\n _out.type = 4 /* RIGHT_SQUARE_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 125 /* RIGHT_CURLY_BRACKET */) {\\n _out.type = 5 /* RIGHT_CURLY_BRACKET */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 58 /* COLON */) {\\n _out.type = 6 /* COLON */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 44 /* COMMA */) {\\n _out.type = 7 /* COMMA */;\\n pos++;\\n char++;\\n }\\n else if (chCode === 110 /* n */) {\\n //------------------------ null\\n _out.type = 8 /* NULL */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 117 /* u */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else if (chCode === 116 /* t */) {\\n //------------------------ true\\n _out.type = 9 /* TRUE */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 114 /* r */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 117 /* u */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 101 /* e */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else if (chCode === 102 /* f */) {\\n //------------------------ false\\n _out.type = 10 /* FALSE */;\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 97 /* a */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 108 /* l */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 115 /* s */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n chCode = source.charCodeAt(pos);\\n if (chCode !== 101 /* e */) {\\n return false; /* INVALID */\\n }\\n pos++;\\n char++;\\n }\\n else {\\n //------------------------ numbers\\n _out.type = 11 /* NUMBER */;\\n do {\\n if (pos >= len) {\\n return false; /*EOS*/\\n }\\n chCode = source.charCodeAt(pos);\\n if (chCode === 46 /* DOT */\\n || (chCode >= 48 /* D0 */ && chCode <= 57 /* D9 */)\\n || (chCode === 101 /* e */ || chCode === 69 /* E */)\\n || (chCode === 45 /* MINUS */ || chCode === 43 /* PLUS */)) {\\n // looks like a piece of a number\\n pos++;\\n char++;\\n continue;\\n }\\n // pos--; char--;\\n break;\\n } while (true);\\n }\\n _out.len = pos - _out.offset;\\n if (_out.value === null) {\\n _out.value = source.substr(_out.offset, _out.len);\\n }\\n _state.pos = pos;\\n _state.line = line;\\n _state.char = char;\\n // console.log('PRODUCING TOKEN: ', _out.value, JSONTokenType[_out.type]);\\n return true;\\n}\\n//# sourceMappingURL=json.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/json.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/main.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/main.js ***!\n \\***************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (this && this.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (_) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar registry_1 = __webpack_require__(/*! ./registry */ \\\"./node_modules/monaco-textmate/dist/registry.js\\\");\\nvar grammarReader_1 = __webpack_require__(/*! ./grammarReader */ \\\"./node_modules/monaco-textmate/dist/grammarReader.js\\\");\\nvar theme_1 = __webpack_require__(/*! ./theme */ \\\"./node_modules/monaco-textmate/dist/theme.js\\\");\\nvar grammar_1 = __webpack_require__(/*! ./grammar */ \\\"./node_modules/monaco-textmate/dist/grammar.js\\\");\\nvar DEFAULT_OPTIONS = {\\n getGrammarDefinition: function (scopeName) { return null; },\\n getInjections: function (scopeName) { return null; }\\n};\\n/**\\n * The registry that will hold all grammars.\\n */\\nvar Registry = /** @class */ (function () {\\n function Registry(locator) {\\n if (locator === void 0) { locator = DEFAULT_OPTIONS; }\\n this._locator = locator;\\n this._syncRegistry = new registry_1.SyncRegistry(theme_1.Theme.createFromRawTheme(locator.theme));\\n this.installationQueue = new Map();\\n }\\n /**\\n * Change the theme. Once called, no previous `ruleStack` should be used anymore.\\n */\\n Registry.prototype.setTheme = function (theme) {\\n this._syncRegistry.setTheme(theme_1.Theme.createFromRawTheme(theme));\\n };\\n /**\\n * Returns a lookup array for color ids.\\n */\\n Registry.prototype.getColorMap = function () {\\n return this._syncRegistry.getColorMap();\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n * Please do not use language id 0.\\n */\\n Registry.prototype.loadGrammarWithEmbeddedLanguages = function (initialScopeName, initialLanguage, embeddedLanguages) {\\n return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages: embeddedLanguages });\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n * Please do not use language id 0.\\n */\\n Registry.prototype.loadGrammarWithConfiguration = function (initialScopeName, initialLanguage, configuration) {\\n return __awaiter(this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, this._loadGrammar(initialScopeName)];\\n case 1:\\n _a.sent();\\n return [2 /*return*/, this.grammarForScopeName(initialScopeName, initialLanguage, configuration.embeddedLanguages, configuration.tokenTypes)];\\n }\\n });\\n });\\n };\\n /**\\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\\n */\\n Registry.prototype.loadGrammar = function (initialScopeName) {\\n return __awaiter(this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n return [2 /*return*/, this._loadGrammar(initialScopeName)];\\n });\\n });\\n };\\n Registry.prototype._loadGrammar = function (initialScopeName, dependentScope) {\\n if (dependentScope === void 0) { dependentScope = null; }\\n return __awaiter(this, void 0, void 0, function () {\\n var prom;\\n var _this = this;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n // already installed\\n if (this._syncRegistry.lookup(initialScopeName)) {\\n return [2 /*return*/, this.grammarForScopeName(initialScopeName)];\\n }\\n // installation in progress\\n if (this.installationQueue.has(initialScopeName)) {\\n return [2 /*return*/, this.installationQueue.get(initialScopeName)];\\n }\\n prom = new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {\\n var grammarDefinition, rawGrammar, injections, deps;\\n var _this = this;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, this._locator.getGrammarDefinition(initialScopeName, dependentScope)];\\n case 1:\\n grammarDefinition = _a.sent();\\n if (!grammarDefinition) {\\n throw new Error(\\\"A tmGrammar load was requested but registry host failed to provide grammar definition\\\");\\n }\\n if ((grammarDefinition.format !== 'json' && grammarDefinition.format !== 'plist') ||\\n (grammarDefinition.format === 'json' && typeof grammarDefinition.content !== 'object' && typeof grammarDefinition.content !== 'string') ||\\n (grammarDefinition.format === 'plist' && typeof grammarDefinition.content !== 'string')) {\\n throw new TypeError('Grammar definition must be an object, either `{ content: string | object, format: \\\"json\\\" }` OR `{ content: string, format: \\\"plist\\\" }`)');\\n }\\n rawGrammar = grammarDefinition.format === 'json'\\n ? typeof grammarDefinition.content === 'string'\\n ? grammarReader_1.parseJSONGrammar(grammarDefinition.content, 'c://fakepath/grammar.json')\\n : grammarDefinition.content\\n : grammarReader_1.parsePLISTGrammar(grammarDefinition.content, 'c://fakepath/grammar.plist');\\n injections = (typeof this._locator.getInjections === 'function') && this._locator.getInjections(initialScopeName);\\n rawGrammar.scopeName = initialScopeName;\\n deps = this._syncRegistry.addGrammar(rawGrammar, injections);\\n return [4 /*yield*/, Promise.all(deps.map(function (scopeNameD) { return __awaiter(_this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n try {\\n return [2 /*return*/, this._loadGrammar(scopeNameD, initialScopeName)];\\n }\\n catch (error) {\\n throw new Error(\\\"While trying to load tmGrammar with scopeId: '\\\" + initialScopeName + \\\"', it's dependency (scopeId: \\\" + scopeNameD + \\\") loading errored: \\\" + error.message);\\n }\\n return [2 /*return*/];\\n });\\n }); }))];\\n case 2:\\n _a.sent();\\n resolve(this.grammarForScopeName(initialScopeName));\\n return [2 /*return*/];\\n }\\n });\\n }); });\\n this.installationQueue.set(initialScopeName, prom);\\n return [4 /*yield*/, prom];\\n case 1:\\n _a.sent();\\n this.installationQueue.delete(initialScopeName);\\n return [2 /*return*/, prom];\\n }\\n });\\n });\\n };\\n /**\\n * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.\\n */\\n Registry.prototype.grammarForScopeName = function (scopeName, initialLanguage, embeddedLanguages, tokenTypes) {\\n if (initialLanguage === void 0) { initialLanguage = 0; }\\n if (embeddedLanguages === void 0) { embeddedLanguages = null; }\\n if (tokenTypes === void 0) { tokenTypes = null; }\\n return this._syncRegistry.grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes);\\n };\\n return Registry;\\n}());\\nexports.Registry = Registry;\\nexports.INITIAL = grammar_1.StackElement.NULL;\\n//# sourceMappingURL=main.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/main.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/matcher.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/matcher.js ***!\n \\******************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction createMatchers(selector, matchesName) {\\n var results = [];\\n var tokenizer = newTokenizer(selector);\\n var token = tokenizer.next();\\n while (token !== null) {\\n var priority = 0;\\n if (token.length === 2 && token.charAt(1) === ':') {\\n switch (token.charAt(0)) {\\n case 'R':\\n priority = 1;\\n break;\\n case 'L':\\n priority = -1;\\n break;\\n default:\\n console.log(\\\"Unknown priority \\\" + token + \\\" in scope selector\\\");\\n }\\n token = tokenizer.next();\\n }\\n var matcher = parseConjunction();\\n if (matcher) {\\n results.push({ matcher: matcher, priority: priority });\\n }\\n if (token !== ',') {\\n break;\\n }\\n token = tokenizer.next();\\n }\\n return results;\\n function parseOperand() {\\n if (token === '-') {\\n token = tokenizer.next();\\n var expressionToNegate = parseOperand();\\n return function (matcherInput) { return expressionToNegate && !expressionToNegate(matcherInput); };\\n }\\n if (token === '(') {\\n token = tokenizer.next();\\n var expressionInParents = parseInnerExpression();\\n if (token === ')') {\\n token = tokenizer.next();\\n }\\n return expressionInParents;\\n }\\n if (isIdentifier(token)) {\\n var identifiers = [];\\n do {\\n identifiers.push(token);\\n token = tokenizer.next();\\n } while (isIdentifier(token));\\n return function (matcherInput) { return matchesName(identifiers, matcherInput); };\\n }\\n return null;\\n }\\n function parseConjunction() {\\n var matchers = [];\\n var matcher = parseOperand();\\n while (matcher) {\\n matchers.push(matcher);\\n matcher = parseOperand();\\n }\\n return function (matcherInput) { return matchers.every(function (matcher) { return matcher(matcherInput); }); }; // and\\n }\\n function parseInnerExpression() {\\n var matchers = [];\\n var matcher = parseConjunction();\\n while (matcher) {\\n matchers.push(matcher);\\n if (token === '|' || token === ',') {\\n do {\\n token = tokenizer.next();\\n } while (token === '|' || token === ','); // ignore subsequent commas\\n }\\n else {\\n break;\\n }\\n matcher = parseConjunction();\\n }\\n return function (matcherInput) { return matchers.some(function (matcher) { return matcher(matcherInput); }); }; // or\\n }\\n}\\nexports.createMatchers = createMatchers;\\nfunction isIdentifier(token) {\\n return token && token.match(/[\\\\w\\\\.:]+/);\\n}\\nfunction newTokenizer(input) {\\n var regex = /([LR]:|[\\\\w\\\\.:][\\\\w\\\\.:\\\\-]*|[\\\\,\\\\|\\\\-\\\\(\\\\)])/g;\\n var match = regex.exec(input);\\n return {\\n next: function () {\\n if (!match) {\\n return null;\\n }\\n var res = match[0];\\n match = regex.exec(input);\\n return res;\\n }\\n };\\n}\\n//# sourceMappingURL=matcher.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/matcher.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/registry.js\":\n/*!*******************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/registry.js ***!\n \\*******************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar grammar_1 = __webpack_require__(/*! ./grammar */ \\\"./node_modules/monaco-textmate/dist/grammar.js\\\");\\nvar SyncRegistry = /** @class */ (function () {\\n function SyncRegistry(theme) {\\n this._theme = theme;\\n this._grammars = {};\\n this._rawGrammars = {};\\n this._injectionGrammars = {};\\n }\\n SyncRegistry.prototype.setTheme = function (theme) {\\n var _this = this;\\n this._theme = theme;\\n Object.keys(this._grammars).forEach(function (scopeName) {\\n var grammar = _this._grammars[scopeName];\\n grammar.onDidChangeTheme();\\n });\\n };\\n SyncRegistry.prototype.getColorMap = function () {\\n return this._theme.getColorMap();\\n };\\n /**\\n * Add `grammar` to registry and return a list of referenced scope names\\n */\\n SyncRegistry.prototype.addGrammar = function (grammar, injectionScopeNames) {\\n this._rawGrammars[grammar.scopeName] = grammar;\\n var includedScopes = {};\\n grammar_1.collectIncludedScopes(includedScopes, grammar);\\n if (injectionScopeNames) {\\n this._injectionGrammars[grammar.scopeName] = injectionScopeNames;\\n injectionScopeNames.forEach(function (scopeName) {\\n includedScopes[scopeName] = true;\\n });\\n }\\n return Object.keys(includedScopes);\\n };\\n /**\\n * Lookup a raw grammar.\\n */\\n SyncRegistry.prototype.lookup = function (scopeName) {\\n return this._rawGrammars[scopeName];\\n };\\n /**\\n * Returns the injections for the given grammar\\n */\\n SyncRegistry.prototype.injections = function (targetScope) {\\n return this._injectionGrammars[targetScope];\\n };\\n /**\\n * Get the default theme settings\\n */\\n SyncRegistry.prototype.getDefaults = function () {\\n return this._theme.getDefaults();\\n };\\n /**\\n * Match a scope in the theme.\\n */\\n SyncRegistry.prototype.themeMatch = function (scopeName) {\\n return this._theme.match(scopeName);\\n };\\n /**\\n * Lookup a grammar.\\n */\\n SyncRegistry.prototype.grammarForScopeName = function (scopeName, initialLanguage, embeddedLanguages, tokenTypes) {\\n if (!this._grammars[scopeName]) {\\n var rawGrammar = this._rawGrammars[scopeName];\\n if (!rawGrammar) {\\n return null;\\n }\\n this._grammars[scopeName] = grammar_1.createGrammar(rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, this);\\n }\\n return this._grammars[scopeName];\\n };\\n return SyncRegistry;\\n}());\\nexports.SyncRegistry = SyncRegistry;\\n//# sourceMappingURL=registry.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/registry.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/rule.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/rule.js ***!\n \\***************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nvar __extends = (this && this.__extends) || (function () {\\n var extendStatics = Object.setPrototypeOf ||\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\\n return function (d, b) {\\n extendStatics(d, b);\\n function __() { this.constructor = d; }\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n };\\n})();\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar path = __webpack_require__(/*! path */ \\\"./node_modules/path/path.js\\\");\\nvar utils_1 = __webpack_require__(/*! ./utils */ \\\"./node_modules/monaco-textmate/dist/utils.js\\\");\\nvar onigasm_1 = __webpack_require__(/*! onigasm */ \\\"./node_modules/onigasm/lib/index.js\\\");\\nvar HAS_BACK_REFERENCES = /\\\\\\\\(\\\\d+)/;\\nvar BACK_REFERENCING_END = /\\\\\\\\(\\\\d+)/g;\\nvar Rule = /** @class */ (function () {\\n function Rule($location, id, name, contentName) {\\n this.$location = $location;\\n this.id = id;\\n this._name = name || null;\\n this._nameIsCapturing = utils_1.RegexSource.hasCaptures(this._name);\\n this._contentName = contentName || null;\\n this._contentNameIsCapturing = utils_1.RegexSource.hasCaptures(this._contentName);\\n }\\n Object.defineProperty(Rule.prototype, \\\"debugName\\\", {\\n get: function () {\\n return this.constructor.name + \\\"#\\\" + this.id + \\\" @ \\\" + path.basename(this.$location.filename) + \\\":\\\" + this.$location.line;\\n },\\n enumerable: true,\\n configurable: true\\n });\\n Rule.prototype.getName = function (lineText, captureIndices) {\\n if (!this._nameIsCapturing) {\\n return this._name;\\n }\\n return utils_1.RegexSource.replaceCaptures(this._name, lineText, captureIndices);\\n };\\n Rule.prototype.getContentName = function (lineText, captureIndices) {\\n if (!this._contentNameIsCapturing) {\\n return this._contentName;\\n }\\n return utils_1.RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);\\n };\\n Rule.prototype.collectPatternsRecursive = function (grammar, out, isFirst) {\\n throw new Error('Implement me!');\\n };\\n Rule.prototype.compile = function (grammar, endRegexSource, allowA, allowG) {\\n throw new Error('Implement me!');\\n };\\n return Rule;\\n}());\\nexports.Rule = Rule;\\nvar CaptureRule = /** @class */ (function (_super) {\\n __extends(CaptureRule, _super);\\n function CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId) {\\n var _this = _super.call(this, $location, id, name, contentName) || this;\\n _this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;\\n return _this;\\n }\\n return CaptureRule;\\n}(Rule));\\nexports.CaptureRule = CaptureRule;\\nvar RegExpSource = /** @class */ (function () {\\n function RegExpSource(regExpSource, ruleId, handleAnchors) {\\n if (handleAnchors === void 0) { handleAnchors = true; }\\n if (handleAnchors) {\\n this._handleAnchors(regExpSource);\\n }\\n else {\\n this.source = regExpSource;\\n this.hasAnchor = false;\\n }\\n if (this.hasAnchor) {\\n this._anchorCache = this._buildAnchorCache();\\n }\\n this.ruleId = ruleId;\\n this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);\\n // console.log('input: ' + regExpSource + ' => ' + this.source + ', ' + this.hasAnchor);\\n }\\n RegExpSource.prototype.clone = function () {\\n return new RegExpSource(this.source, this.ruleId, true);\\n };\\n RegExpSource.prototype.setSource = function (newSource) {\\n if (this.source === newSource) {\\n return;\\n }\\n this.source = newSource;\\n if (this.hasAnchor) {\\n this._anchorCache = this._buildAnchorCache();\\n }\\n };\\n RegExpSource.prototype._handleAnchors = function (regExpSource) {\\n if (regExpSource) {\\n var pos = void 0, len = void 0, ch = void 0, nextCh = void 0, lastPushedPos = 0, output = [];\\n var hasAnchor = false;\\n for (pos = 0, len = regExpSource.length; pos < len; pos++) {\\n ch = regExpSource.charAt(pos);\\n if (ch === '\\\\\\\\') {\\n if (pos + 1 < len) {\\n nextCh = regExpSource.charAt(pos + 1);\\n if (nextCh === 'z') {\\n output.push(regExpSource.substring(lastPushedPos, pos));\\n output.push('$(?!\\\\\\\\n)(? maximumCaptureId) {\\n maximumCaptureId = numericCaptureId;\\n }\\n }\\n // Initialize result\\n for (i = 0; i <= maximumCaptureId; i++) {\\n r[i] = null;\\n }\\n // Fill out result\\n for (captureId in captures) {\\n if (captureId === '$vscodeTextmateLocation') {\\n continue;\\n }\\n numericCaptureId = parseInt(captureId, 10);\\n var retokenizeCapturedWithRuleId = 0;\\n if (captures[captureId].patterns) {\\n retokenizeCapturedWithRuleId = RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);\\n }\\n r[numericCaptureId] = RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);\\n }\\n }\\n return r;\\n };\\n RuleFactory._compilePatterns = function (patterns, helper, repository) {\\n var r = [], pattern, i, len, patternId, externalGrammar, rule, skipRule;\\n if (patterns) {\\n for (i = 0, len = patterns.length; i < len; i++) {\\n pattern = patterns[i];\\n patternId = -1;\\n if (pattern.include) {\\n if (pattern.include.charAt(0) === '#') {\\n // Local include found in `repository`\\n var localIncludedRule = repository[pattern.include.substr(1)];\\n if (localIncludedRule) {\\n patternId = RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);\\n }\\n else {\\n // console.warn('CANNOT find rule for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n else if (pattern.include === '$base' || pattern.include === '$self') {\\n // Special include also found in `repository`\\n patternId = RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);\\n }\\n else {\\n var externalGrammarName = null, externalGrammarInclude = null, sharpIndex = pattern.include.indexOf('#');\\n if (sharpIndex >= 0) {\\n externalGrammarName = pattern.include.substring(0, sharpIndex);\\n externalGrammarInclude = pattern.include.substring(sharpIndex + 1);\\n }\\n else {\\n externalGrammarName = pattern.include;\\n }\\n // External include\\n externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);\\n if (externalGrammar) {\\n if (externalGrammarInclude) {\\n var externalIncludedRule = externalGrammar.repository[externalGrammarInclude];\\n if (externalIncludedRule) {\\n patternId = RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);\\n }\\n else {\\n // console.warn('CANNOT find rule for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n else {\\n patternId = RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);\\n }\\n }\\n else {\\n // console.warn('CANNOT find grammar for scopeName: ' + pattern.include + ', I am: ', repository['$base'].name);\\n }\\n }\\n }\\n else {\\n patternId = RuleFactory.getCompiledRuleId(pattern, helper, repository);\\n }\\n if (patternId !== -1) {\\n rule = helper.getRule(patternId);\\n skipRule = false;\\n if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {\\n if (rule.hasMissingPatterns && rule.patterns.length === 0) {\\n skipRule = true;\\n }\\n }\\n if (skipRule) {\\n // console.log('REMOVING RULE ENTIRELY DUE TO EMPTY PATTERNS THAT ARE MISSING');\\n continue;\\n }\\n r.push(patternId);\\n }\\n }\\n }\\n return {\\n patterns: r,\\n hasMissingPatterns: ((patterns ? patterns.length : 0) !== r.length)\\n };\\n };\\n return RuleFactory;\\n}());\\nexports.RuleFactory = RuleFactory;\\n//# sourceMappingURL=rule.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/rule.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/theme.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/theme.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nvar ParsedThemeRule = /** @class */ (function () {\\n function ParsedThemeRule(scope, parentScopes, index, fontStyle, foreground, background) {\\n this.scope = scope;\\n this.parentScopes = parentScopes;\\n this.index = index;\\n this.fontStyle = fontStyle;\\n this.foreground = foreground;\\n this.background = background;\\n }\\n return ParsedThemeRule;\\n}());\\nexports.ParsedThemeRule = ParsedThemeRule;\\nfunction isValidHexColor(hex) {\\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\\n // #rrggbb\\n return true;\\n }\\n if (/^#[0-9a-f]{8}$/i.test(hex)) {\\n // #rrggbbaa\\n return true;\\n }\\n if (/^#[0-9a-f]{3}$/i.test(hex)) {\\n // #rgb\\n return true;\\n }\\n if (/^#[0-9a-f]{4}$/i.test(hex)) {\\n // #rgba\\n return true;\\n }\\n return false;\\n}\\n/**\\n * Parse a raw theme into rules.\\n */\\nfunction parseTheme(source) {\\n if (!source) {\\n return [];\\n }\\n if (!source.settings || !Array.isArray(source.settings)) {\\n return [];\\n }\\n var settings = source.settings;\\n var result = [], resultLen = 0;\\n for (var i = 0, len = settings.length; i < len; i++) {\\n var entry = settings[i];\\n if (!entry.settings) {\\n continue;\\n }\\n var scopes = void 0;\\n if (typeof entry.scope === 'string') {\\n var _scope = entry.scope;\\n // remove leading commas\\n _scope = _scope.replace(/^[,]+/, '');\\n // remove trailing commans\\n _scope = _scope.replace(/[,]+$/, '');\\n scopes = _scope.split(',');\\n }\\n else if (Array.isArray(entry.scope)) {\\n scopes = entry.scope;\\n }\\n else {\\n scopes = [''];\\n }\\n var fontStyle = -1 /* NotSet */;\\n if (typeof entry.settings.fontStyle === 'string') {\\n fontStyle = 0 /* None */;\\n var segments = entry.settings.fontStyle.split(' ');\\n for (var j = 0, lenJ = segments.length; j < lenJ; j++) {\\n var segment = segments[j];\\n switch (segment) {\\n case 'italic':\\n fontStyle = fontStyle | 1 /* Italic */;\\n break;\\n case 'bold':\\n fontStyle = fontStyle | 2 /* Bold */;\\n break;\\n case 'underline':\\n fontStyle = fontStyle | 4 /* Underline */;\\n break;\\n }\\n }\\n }\\n var foreground = null;\\n if (typeof entry.settings.foreground === 'string' && isValidHexColor(entry.settings.foreground)) {\\n foreground = entry.settings.foreground;\\n }\\n var background = null;\\n if (typeof entry.settings.background === 'string' && isValidHexColor(entry.settings.background)) {\\n background = entry.settings.background;\\n }\\n for (var j = 0, lenJ = scopes.length; j < lenJ; j++) {\\n var _scope = scopes[j].trim();\\n var segments = _scope.split(' ');\\n var scope = segments[segments.length - 1];\\n var parentScopes = null;\\n if (segments.length > 1) {\\n parentScopes = segments.slice(0, segments.length - 1);\\n parentScopes.reverse();\\n }\\n result[resultLen++] = new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background);\\n }\\n }\\n return result;\\n}\\nexports.parseTheme = parseTheme;\\n/**\\n * Resolve rules (i.e. inheritance).\\n */\\nfunction resolveParsedThemeRules(parsedThemeRules) {\\n // Sort rules lexicographically, and then by index if necessary\\n parsedThemeRules.sort(function (a, b) {\\n var r = strcmp(a.scope, b.scope);\\n if (r !== 0) {\\n return r;\\n }\\n r = strArrCmp(a.parentScopes, b.parentScopes);\\n if (r !== 0) {\\n return r;\\n }\\n return a.index - b.index;\\n });\\n // Determine defaults\\n var defaultFontStyle = 0 /* None */;\\n var defaultForeground = '#000000';\\n var defaultBackground = '#ffffff';\\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === '') {\\n var incomingDefaults = parsedThemeRules.shift();\\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\\n defaultFontStyle = incomingDefaults.fontStyle;\\n }\\n if (incomingDefaults.foreground !== null) {\\n defaultForeground = incomingDefaults.foreground;\\n }\\n if (incomingDefaults.background !== null) {\\n defaultBackground = incomingDefaults.background;\\n }\\n }\\n var colorMap = new ColorMap();\\n var defaults = new ThemeTrieElementRule(0, null, defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));\\n var root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* NotSet */, 0, 0), []);\\n for (var i = 0, len = parsedThemeRules.length; i < len; i++) {\\n var rule = parsedThemeRules[i];\\n root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\\n }\\n return new Theme(colorMap, defaults, root);\\n}\\nvar ColorMap = /** @class */ (function () {\\n function ColorMap() {\\n this._lastColorId = 0;\\n this._id2color = [];\\n this._color2id = Object.create(null);\\n }\\n ColorMap.prototype.getId = function (color) {\\n if (color === null) {\\n return 0;\\n }\\n color = color.toUpperCase();\\n var value = this._color2id[color];\\n if (value) {\\n return value;\\n }\\n value = ++this._lastColorId;\\n this._color2id[color] = value;\\n this._id2color[value] = color;\\n return value;\\n };\\n ColorMap.prototype.getColorMap = function () {\\n return this._id2color.slice(0);\\n };\\n return ColorMap;\\n}());\\nexports.ColorMap = ColorMap;\\nvar Theme = /** @class */ (function () {\\n function Theme(colorMap, defaults, root) {\\n this._colorMap = colorMap;\\n this._root = root;\\n this._defaults = defaults;\\n this._cache = {};\\n }\\n Theme.createFromRawTheme = function (source) {\\n return this.createFromParsedTheme(parseTheme(source));\\n };\\n Theme.createFromParsedTheme = function (source) {\\n return resolveParsedThemeRules(source);\\n };\\n Theme.prototype.getColorMap = function () {\\n return this._colorMap.getColorMap();\\n };\\n Theme.prototype.getDefaults = function () {\\n return this._defaults;\\n };\\n Theme.prototype.match = function (scopeName) {\\n if (!this._cache.hasOwnProperty(scopeName)) {\\n this._cache[scopeName] = this._root.match(scopeName);\\n }\\n return this._cache[scopeName];\\n };\\n return Theme;\\n}());\\nexports.Theme = Theme;\\nfunction strcmp(a, b) {\\n if (a < b) {\\n return -1;\\n }\\n if (a > b) {\\n return 1;\\n }\\n return 0;\\n}\\nexports.strcmp = strcmp;\\nfunction strArrCmp(a, b) {\\n if (a === null && b === null) {\\n return 0;\\n }\\n if (!a) {\\n return -1;\\n }\\n if (!b) {\\n return 1;\\n }\\n var len1 = a.length;\\n var len2 = b.length;\\n if (len1 === len2) {\\n for (var i = 0; i < len1; i++) {\\n var res = strcmp(a[i], b[i]);\\n if (res !== 0) {\\n return res;\\n }\\n }\\n return 0;\\n }\\n return len1 - len2;\\n}\\nexports.strArrCmp = strArrCmp;\\nvar ThemeTrieElementRule = /** @class */ (function () {\\n function ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background) {\\n this.scopeDepth = scopeDepth;\\n this.parentScopes = parentScopes;\\n this.fontStyle = fontStyle;\\n this.foreground = foreground;\\n this.background = background;\\n }\\n ThemeTrieElementRule.prototype.clone = function () {\\n return new ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);\\n };\\n ThemeTrieElementRule.cloneArr = function (arr) {\\n var r = [];\\n for (var i = 0, len = arr.length; i < len; i++) {\\n r[i] = arr[i].clone();\\n }\\n return r;\\n };\\n ThemeTrieElementRule.prototype.acceptOverwrite = function (scopeDepth, fontStyle, foreground, background) {\\n if (this.scopeDepth > scopeDepth) {\\n console.log('how did this happen?');\\n }\\n else {\\n this.scopeDepth = scopeDepth;\\n }\\n // console.log('TODO -> my depth: ' + this.scopeDepth + ', overwriting depth: ' + scopeDepth);\\n if (fontStyle !== -1 /* NotSet */) {\\n this.fontStyle = fontStyle;\\n }\\n if (foreground !== 0) {\\n this.foreground = foreground;\\n }\\n if (background !== 0) {\\n this.background = background;\\n }\\n };\\n return ThemeTrieElementRule;\\n}());\\nexports.ThemeTrieElementRule = ThemeTrieElementRule;\\nvar ThemeTrieElement = /** @class */ (function () {\\n function ThemeTrieElement(mainRule, rulesWithParentScopes, children) {\\n if (rulesWithParentScopes === void 0) { rulesWithParentScopes = []; }\\n if (children === void 0) { children = {}; }\\n this._mainRule = mainRule;\\n this._rulesWithParentScopes = rulesWithParentScopes;\\n this._children = children;\\n }\\n ThemeTrieElement._sortBySpecificity = function (arr) {\\n if (arr.length === 1) {\\n return arr;\\n }\\n arr.sort(this._cmpBySpecificity);\\n return arr;\\n };\\n ThemeTrieElement._cmpBySpecificity = function (a, b) {\\n if (a.scopeDepth === b.scopeDepth) {\\n var aParentScopes = a.parentScopes;\\n var bParentScopes = b.parentScopes;\\n var aParentScopesLen = aParentScopes === null ? 0 : aParentScopes.length;\\n var bParentScopesLen = bParentScopes === null ? 0 : bParentScopes.length;\\n if (aParentScopesLen === bParentScopesLen) {\\n for (var i = 0; i < aParentScopesLen; i++) {\\n var aLen = aParentScopes[i].length;\\n var bLen = bParentScopes[i].length;\\n if (aLen !== bLen) {\\n return bLen - aLen;\\n }\\n }\\n }\\n return bParentScopesLen - aParentScopesLen;\\n }\\n return b.scopeDepth - a.scopeDepth;\\n };\\n ThemeTrieElement.prototype.match = function (scope) {\\n if (scope === '') {\\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\\n }\\n var dotIndex = scope.indexOf('.');\\n var head;\\n var tail;\\n if (dotIndex === -1) {\\n head = scope;\\n tail = '';\\n }\\n else {\\n head = scope.substring(0, dotIndex);\\n tail = scope.substring(dotIndex + 1);\\n }\\n if (this._children.hasOwnProperty(head)) {\\n return this._children[head].match(tail);\\n }\\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\\n };\\n ThemeTrieElement.prototype.insert = function (scopeDepth, scope, parentScopes, fontStyle, foreground, background) {\\n if (scope === '') {\\n this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);\\n return;\\n }\\n var dotIndex = scope.indexOf('.');\\n var head;\\n var tail;\\n if (dotIndex === -1) {\\n head = scope;\\n tail = '';\\n }\\n else {\\n head = scope.substring(0, dotIndex);\\n tail = scope.substring(dotIndex + 1);\\n }\\n var child;\\n if (this._children.hasOwnProperty(head)) {\\n child = this._children[head];\\n }\\n else {\\n child = new ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));\\n this._children[head] = child;\\n }\\n child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);\\n };\\n ThemeTrieElement.prototype._doInsertHere = function (scopeDepth, parentScopes, fontStyle, foreground, background) {\\n if (parentScopes === null) {\\n // Merge into the main rule\\n this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\\n return;\\n }\\n // Try to merge into existing rule\\n for (var i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {\\n var rule = this._rulesWithParentScopes[i];\\n if (strArrCmp(rule.parentScopes, parentScopes) === 0) {\\n // bingo! => we get to merge this into an existing one\\n rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\\n return;\\n }\\n }\\n // Must add a new rule\\n // Inherit from main rule\\n if (fontStyle === -1 /* NotSet */) {\\n fontStyle = this._mainRule.fontStyle;\\n }\\n if (foreground === 0) {\\n foreground = this._mainRule.foreground;\\n }\\n if (background === 0) {\\n background = this._mainRule.background;\\n }\\n this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));\\n };\\n return ThemeTrieElement;\\n}());\\nexports.ThemeTrieElement = ThemeTrieElement;\\n//# sourceMappingURL=theme.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/theme.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/monaco-textmate/dist/utils.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/monaco-textmate/dist/utils.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\n/*---------------------------------------------------------\\n * Copyright (C) Microsoft Corporation. All rights reserved.\\n *--------------------------------------------------------*/\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nfunction clone(something) {\\n return doClone(something);\\n}\\nexports.clone = clone;\\nfunction doClone(something) {\\n if (Array.isArray(something)) {\\n return cloneArray(something);\\n }\\n if (typeof something === 'object') {\\n return cloneObj(something);\\n }\\n return something;\\n}\\nfunction cloneArray(arr) {\\n var r = [];\\n for (var i = 0, len = arr.length; i < len; i++) {\\n r[i] = doClone(arr[i]);\\n }\\n return r;\\n}\\nfunction cloneObj(obj) {\\n var r = {};\\n for (var key in obj) {\\n r[key] = doClone(obj[key]);\\n }\\n return r;\\n}\\nfunction mergeObjects(target) {\\n var sources = [];\\n for (var _i = 1; _i < arguments.length; _i++) {\\n sources[_i - 1] = arguments[_i];\\n }\\n sources.forEach(function (source) {\\n for (var key in source) {\\n target[key] = source[key];\\n }\\n });\\n return target;\\n}\\nexports.mergeObjects = mergeObjects;\\nvar CAPTURING_REGEX_SOURCE = /\\\\$(\\\\d+)|\\\\${(\\\\d+):\\\\/(downcase|upcase)}/;\\nvar RegexSource = /** @class */ (function () {\\n function RegexSource() {\\n }\\n RegexSource.hasCaptures = function (regexSource) {\\n return CAPTURING_REGEX_SOURCE.test(regexSource);\\n };\\n RegexSource.replaceCaptures = function (regexSource, captureSource, captureIndices) {\\n return regexSource.replace(CAPTURING_REGEX_SOURCE, function (match, index, commandIndex, command) {\\n var capture = captureIndices[parseInt(index || commandIndex, 10)];\\n if (capture) {\\n var result = captureSource.substring(capture.start, capture.end);\\n // Remove leading dots that would make the selector invalid\\n while (result[0] === '.') {\\n result = result.substring(1);\\n }\\n switch (command) {\\n case 'downcase':\\n return result.toLowerCase();\\n case 'upcase':\\n return result.toUpperCase();\\n default:\\n return result;\\n }\\n }\\n else {\\n return match;\\n }\\n });\\n };\\n return RegexSource;\\n}());\\nexports.RegexSource = RegexSource;\\n//# sourceMappingURL=utils.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/monaco-textmate/dist/utils.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/object-assign/index.js\":\n/*!*********************************************!*\\\n !*** ./node_modules/object-assign/index.js ***!\n \\*********************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"/*\\nobject-assign\\n(c) Sindre Sorhus\\n@license MIT\\n*/\\n\\n\\n/* eslint-disable no-unused-vars */\\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\\n\\nfunction toObject(val) {\\n\\tif (val === null || val === undefined) {\\n\\t\\tthrow new TypeError('Object.assign cannot be called with null or undefined');\\n\\t}\\n\\n\\treturn Object(val);\\n}\\n\\nfunction shouldUseNative() {\\n\\ttry {\\n\\t\\tif (!Object.assign) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Detect buggy property enumeration order in older V8 versions.\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\\n\\t\\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\\n\\t\\ttest1[5] = 'de';\\n\\t\\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test2 = {};\\n\\t\\tfor (var i = 0; i < 10; i++) {\\n\\t\\t\\ttest2['_' + String.fromCharCode(i)] = i;\\n\\t\\t}\\n\\t\\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\\n\\t\\t\\treturn test2[n];\\n\\t\\t});\\n\\t\\tif (order2.join('') !== '0123456789') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\\n\\t\\tvar test3 = {};\\n\\t\\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\\n\\t\\t\\ttest3[letter] = letter;\\n\\t\\t});\\n\\t\\tif (Object.keys(Object.assign({}, test3)).join('') !==\\n\\t\\t\\t\\t'abcdefghijklmnopqrst') {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t} catch (err) {\\n\\t\\t// We don't expect any of the above to throw, but better to be safe.\\n\\t\\treturn false;\\n\\t}\\n}\\n\\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\\n\\tvar from;\\n\\tvar to = toObject(target);\\n\\tvar symbols;\\n\\n\\tfor (var s = 1; s < arguments.length; s++) {\\n\\t\\tfrom = Object(arguments[s]);\\n\\n\\t\\tfor (var key in from) {\\n\\t\\t\\tif (hasOwnProperty.call(from, key)) {\\n\\t\\t\\t\\tto[key] = from[key];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (getOwnPropertySymbols) {\\n\\t\\t\\tsymbols = getOwnPropertySymbols(from);\\n\\t\\t\\tfor (var i = 0; i < symbols.length; i++) {\\n\\t\\t\\t\\tif (propIsEnumerable.call(from, symbols[i])) {\\n\\t\\t\\t\\t\\tto[symbols[i]] = from[symbols[i]];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn to;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/object-assign/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigRegExp.js\":\n/*!************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigRegExp.js ***!\n \\************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst OnigScanner_1 = __webpack_require__(/*! ./OnigScanner */ \\\"./node_modules/onigasm/lib/OnigScanner.js\\\");\\nclass OnigRegExp {\\n /**\\n * Create a new regex with the given pattern\\n * @param source A string pattern\\n */\\n constructor(source) {\\n this.source = source;\\n try {\\n this.scanner = new OnigScanner_1.default([this.source]);\\n }\\n catch (error) {\\n // doesn't make much sense, but this to pass atom/node-oniguruam tests\\n }\\n }\\n /**\\n * Synchronously search the string for a match starting at the given position\\n * @param string The string to search\\n * @param startPosition The optional position to start the search at, defaults to `0`\\n */\\n searchSync(string, startPosition) {\\n let match;\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n match = this.scanner.findNextMatchSync(string, startPosition);\\n return this.captureIndicesForMatch(string, match);\\n }\\n /**\\n * Search the string for a match starting at the given position\\n * @param string The string to search\\n * @param startPosition The optional position to start the search at, defaults to `0`\\n * @param callback The `(error, match)` function to call when done, match will be null if no matches were found. match will be an array of objects for each matched group on a successful search\\n */\\n search(string, startPosition, callback) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n if (typeof startPosition === 'function') {\\n callback = startPosition;\\n startPosition = 0;\\n }\\n try {\\n const ret = this.searchSync(string, startPosition);\\n callback(null, ret);\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n /**\\n * Synchronously test if this regular expression matches the given string\\n * @param string The string to test against\\n */\\n testSync(string) {\\n if ((typeof this.source === 'boolean' || typeof string === 'boolean')) {\\n return this.source === string;\\n }\\n return this.searchSync(string) != null;\\n }\\n /**\\n * Test if this regular expression matches the given string\\n * @param string The string to test against\\n * @param callback The (error, matches) function to call when done, matches will be true if at least one match is found, false otherwise\\n */\\n test(string, callback) {\\n if (typeof callback !== 'function') {\\n callback = () => { };\\n }\\n try {\\n callback(null, this.testSync(string));\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n captureIndicesForMatch(string, match) {\\n if (match != null) {\\n const { captureIndices } = match;\\n let capture;\\n string = this.scanner.convertToString(string);\\n for (let i = 0; i < captureIndices.length; i++) {\\n capture = captureIndices[i];\\n capture.match = string.slice(capture.start, capture.end);\\n }\\n return captureIndices;\\n }\\n else {\\n return null;\\n }\\n }\\n}\\nexports[\\\"default\\\"] = OnigRegExp;\\n//# sourceMappingURL=OnigRegExp.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigRegExp.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigScanner.js\":\n/*!*************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigScanner.js ***!\n \\*************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst LRUCache = __webpack_require__(/*! lru-cache */ \\\"./node_modules/onigasm/node_modules/lru-cache/index.js\\\");\\nconst onigasmH_1 = __webpack_require__(/*! ./onigasmH */ \\\"./node_modules/onigasm/lib/onigasmH.js\\\");\\nconst OnigString_1 = __webpack_require__(/*! ./OnigString */ \\\"./node_modules/onigasm/lib/OnigString.js\\\");\\n/**\\n * Allocates space on the heap and copies the string bytes on to it\\n * @param str\\n * @returns pointer to the first byte's address on heap\\n */\\nfunction mallocAndWriteString(str) {\\n const ptr = onigasmH_1.onigasmH._malloc(str.utf8Bytes.length);\\n onigasmH_1.onigasmH.HEAPU8.set(str.utf8Bytes, ptr);\\n return ptr;\\n}\\nfunction convertUTF8BytesFromPtrToString(ptr) {\\n const chars = [];\\n let i = 0;\\n while (onigasmH_1.onigasmH.HEAPU8[ptr] !== 0x00) {\\n chars[i++] = onigasmH_1.onigasmH.HEAPU8[ptr++];\\n }\\n return chars.join();\\n}\\nconst cache = new LRUCache({\\n dispose: (scanner, info) => {\\n const regexTPtrsPtr = onigasmH_1.onigasmH._malloc(info.regexTPtrs.length);\\n onigasmH_1.onigasmH.HEAPU8.set(info.regexTPtrs, regexTPtrsPtr);\\n const status = onigasmH_1.onigasmH._disposeCompiledPatterns(regexTPtrsPtr, scanner.patterns.length);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n onigasmH_1.onigasmH._free(regexTPtrsPtr);\\n },\\n max: 1000,\\n});\\nclass OnigScanner {\\n /**\\n * Create a new scanner with the given patterns\\n * @param patterns An array of string patterns\\n */\\n constructor(patterns) {\\n if (onigasmH_1.onigasmH === null) {\\n throw new Error(`Onigasm has not been initialized, call loadWASM from 'onigasm' exports before using any other API`);\\n }\\n for (let i = 0; i < patterns.length; i++) {\\n const pattern = patterns[i];\\n if (typeof pattern !== 'string') {\\n throw new TypeError(`First parameter to OnigScanner constructor must be array of (pattern) strings`);\\n }\\n }\\n this.sources = patterns.slice();\\n }\\n get patterns() {\\n return this.sources.slice();\\n }\\n /**\\n * Find the next match from a given position\\n * @param string The string to search\\n * @param startPosition The optional position to start at, defaults to 0\\n * @param callback The (error, match) function to call when done, match will null when there is no match\\n */\\n findNextMatch(string, startPosition, callback) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n if (typeof startPosition === 'function') {\\n callback = startPosition;\\n startPosition = 0;\\n }\\n try {\\n const match = this.findNextMatchSync(string, startPosition);\\n callback(null, match);\\n }\\n catch (error) {\\n callback(error);\\n }\\n }\\n /**\\n * Find the next match from a given position\\n * @param string The string to search\\n * @param startPosition The optional position to start at, defaults to 0\\n */\\n findNextMatchSync(string, startPosition) {\\n if (startPosition == null) {\\n startPosition = 0;\\n }\\n startPosition = this.convertToNumber(startPosition);\\n let onigNativeInfo = cache.get(this);\\n let status = 0;\\n if (!onigNativeInfo) {\\n const regexTAddrRecieverPtr = onigasmH_1.onigasmH._malloc(4);\\n const regexTPtrs = [];\\n for (let i = 0; i < this.sources.length; i++) {\\n const pattern = this.sources[i];\\n const patternStrPtr = mallocAndWriteString(new OnigString_1.default(pattern));\\n status = onigasmH_1.onigasmH._compilePattern(patternStrPtr, regexTAddrRecieverPtr);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n const regexTAddress = onigasmH_1.onigasmH.HEAP32[regexTAddrRecieverPtr / 4];\\n regexTPtrs.push(regexTAddress);\\n onigasmH_1.onigasmH._free(patternStrPtr);\\n }\\n onigNativeInfo = {\\n regexTPtrs: new Uint8Array(Uint32Array.from(regexTPtrs).buffer),\\n };\\n onigasmH_1.onigasmH._free(regexTAddrRecieverPtr);\\n cache.set(this, onigNativeInfo);\\n }\\n const onigString = string instanceof OnigString_1.default ? string : new OnigString_1.default(this.convertToString(string));\\n const strPtr = mallocAndWriteString(onigString);\\n const resultInfoReceiverPtr = onigasmH_1.onigasmH._malloc(8);\\n const regexTPtrsPtr = onigasmH_1.onigasmH._malloc(onigNativeInfo.regexTPtrs.length);\\n onigasmH_1.onigasmH.HEAPU8.set(onigNativeInfo.regexTPtrs, regexTPtrsPtr);\\n status = onigasmH_1.onigasmH._findBestMatch(\\n // regex_t **patterns\\n regexTPtrsPtr, \\n // int patternCount\\n this.sources.length, \\n // UChar *utf8String\\n strPtr, \\n // int strLen\\n onigString.utf8Bytes.length - 1, \\n // int startOffset\\n onigString.convertUtf16OffsetToUtf8(startPosition), \\n // int *resultInfo\\n resultInfoReceiverPtr);\\n if (status !== 0) {\\n const errMessage = convertUTF8BytesFromPtrToString(onigasmH_1.onigasmH._getLastError());\\n throw new Error(errMessage);\\n }\\n const [\\n // The index of pattern which matched the string at least offset from 0 (start)\\n bestPatternIdx, \\n // Begin address of capture info encoded as pairs\\n // like [start, end, start, end, start, end, ...]\\n // - first start-end pair is entire match (index 0 and 1)\\n // - subsequent pairs are capture groups (2, 3 = first capture group, 4, 5 = second capture group and so on)\\n encodedResultBeginAddress, \\n // Length of the [start, end, ...] sequence so we know how much memory to read (will always be 0 or multiple of 2)\\n encodedResultLength,] = new Uint32Array(onigasmH_1.onigasmH.HEAPU32.buffer, resultInfoReceiverPtr, 3);\\n onigasmH_1.onigasmH._free(strPtr);\\n onigasmH_1.onigasmH._free(resultInfoReceiverPtr);\\n onigasmH_1.onigasmH._free(regexTPtrsPtr);\\n if (encodedResultLength > 0) {\\n const encodedResult = new Uint32Array(onigasmH_1.onigasmH.HEAPU32.buffer, encodedResultBeginAddress, encodedResultLength);\\n const captureIndices = [];\\n let i = 0;\\n let captureIdx = 0;\\n while (i < encodedResultLength) {\\n const index = captureIdx++;\\n let start = encodedResult[i++];\\n let end = encodedResult[i++];\\n if (onigString.hasMultiByteCharacters) {\\n start = onigString.convertUtf8OffsetToUtf16(start);\\n end = onigString.convertUtf8OffsetToUtf16(end);\\n }\\n captureIndices.push({\\n end,\\n index,\\n length: end - start,\\n start,\\n });\\n }\\n onigasmH_1.onigasmH._free(encodedResultBeginAddress);\\n return {\\n captureIndices,\\n index: bestPatternIdx,\\n scanner: this,\\n };\\n }\\n return null;\\n }\\n convertToString(value) {\\n if (value === undefined) {\\n return 'undefined';\\n }\\n if (value === null) {\\n return 'null';\\n }\\n if (value instanceof OnigString_1.default) {\\n return value.content;\\n }\\n return value.toString();\\n }\\n convertToNumber(value) {\\n value = parseInt(value, 10);\\n if (!isFinite(value)) {\\n value = 0;\\n }\\n value = Math.max(value, 0);\\n return value;\\n }\\n}\\nexports.OnigScanner = OnigScanner;\\nexports[\\\"default\\\"] = OnigScanner;\\n//# sourceMappingURL=OnigScanner.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigScanner.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/OnigString.js\":\n/*!************************************************!*\\\n !*** ./node_modules/onigasm/lib/OnigString.js ***!\n \\************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nclass OnigString {\\n constructor(content) {\\n this.substring = (start, end) => {\\n return this.source.substring(start, end);\\n };\\n this.toString = (start, end) => {\\n return this.source;\\n };\\n if (typeof content !== 'string') {\\n throw new TypeError('Argument must be a string');\\n }\\n this.source = content;\\n this._utf8Bytes = null;\\n this._utf8Indexes = null;\\n }\\n get utf8Bytes() {\\n if (!this._utf8Bytes) {\\n this.encode();\\n }\\n return this._utf8Bytes;\\n }\\n /**\\n * Returns `null` if all utf8 offsets match utf-16 offset (content has no multi byte characters)\\n */\\n get utf8Indexes() {\\n if (!this._utf8Bytes) {\\n this.encode();\\n }\\n return this._utf8Indexes;\\n }\\n get content() {\\n return this.source;\\n }\\n get length() {\\n return this.source.length;\\n }\\n get hasMultiByteCharacters() {\\n return this.utf8Indexes !== null;\\n }\\n convertUtf8OffsetToUtf16(utf8Offset) {\\n if (utf8Offset < 0) {\\n return 0;\\n }\\n const utf8Array = this._utf8Bytes;\\n if (utf8Offset >= utf8Array.length - 1) {\\n return this.source.length;\\n }\\n const utf8OffsetMap = this.utf8Indexes;\\n if (utf8OffsetMap && utf8Offset >= this._mappingTableStartOffset) {\\n return findFirstInSorted(utf8OffsetMap, utf8Offset - this._mappingTableStartOffset) + this._mappingTableStartOffset;\\n }\\n return utf8Offset;\\n }\\n convertUtf16OffsetToUtf8(utf16Offset) {\\n if (utf16Offset < 0) {\\n return 0;\\n }\\n const utf8Array = this._utf8Bytes;\\n if (utf16Offset >= this.source.length) {\\n return utf8Array.length - 1;\\n }\\n const utf8OffsetMap = this.utf8Indexes;\\n if (utf8OffsetMap && utf16Offset >= this._mappingTableStartOffset) {\\n return utf8OffsetMap[utf16Offset - this._mappingTableStartOffset] + this._mappingTableStartOffset;\\n }\\n return utf16Offset;\\n }\\n encode() {\\n const str = this.source;\\n const n = str.length;\\n let utf16OffsetToUtf8;\\n let utf8Offset = 0;\\n let mappingTableStartOffset = 0;\\n function createOffsetTable(startOffset) {\\n const maxUtf8Len = (n - startOffset) * 3;\\n if (maxUtf8Len <= 0xff) {\\n utf16OffsetToUtf8 = new Uint8Array(n - startOffset);\\n }\\n else if (maxUtf8Len <= 0xffff) {\\n utf16OffsetToUtf8 = new Uint16Array(n - startOffset);\\n }\\n else {\\n utf16OffsetToUtf8 = new Uint32Array(n - startOffset);\\n }\\n mappingTableStartOffset = startOffset;\\n utf16OffsetToUtf8[utf8Offset++] = 0;\\n }\\n const u8view = new Uint8Array((n * 3) /* alloc max now, trim later*/ + 1 /** null termination character */);\\n let ptrHead = 0;\\n let i = 0;\\n // for some reason, v8 is faster with str.length than using a variable (might be illusion)\\n while (i < str.length) {\\n let codepoint;\\n const c = str.charCodeAt(i);\\n if (utf16OffsetToUtf8) {\\n utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;\\n }\\n if (c < 0xD800 || c > 0xDFFF) {\\n codepoint = c;\\n }\\n else if (c >= 0xDC00) {\\n codepoint = 0xFFFD;\\n }\\n else {\\n if (i === n - 1) {\\n codepoint = 0xFFFD;\\n }\\n else {\\n const d = str.charCodeAt(i + 1);\\n if (0xDC00 <= d && d <= 0xDFFF) {\\n if (!utf16OffsetToUtf8) {\\n createOffsetTable(i);\\n }\\n const a = c & 0x3FF;\\n const b = d & 0x3FF;\\n codepoint = 0x10000 + (a << 10) + b;\\n i += 1;\\n utf16OffsetToUtf8[utf8Offset++] = ptrHead - mappingTableStartOffset;\\n }\\n else {\\n codepoint = 0xFFFD;\\n }\\n }\\n }\\n let bytesRequiredToEncode;\\n let offset;\\n if (codepoint <= 0x7F) {\\n bytesRequiredToEncode = 1;\\n offset = 0;\\n }\\n else if (codepoint <= 0x07FF) {\\n bytesRequiredToEncode = 2;\\n offset = 0xC0;\\n }\\n else if (codepoint <= 0xFFFF) {\\n bytesRequiredToEncode = 3;\\n offset = 0xE0;\\n }\\n else {\\n bytesRequiredToEncode = 4;\\n offset = 0xF0;\\n }\\n if (bytesRequiredToEncode === 1) {\\n u8view[ptrHead++] = codepoint;\\n }\\n else {\\n if (!utf16OffsetToUtf8) {\\n createOffsetTable(ptrHead);\\n }\\n u8view[ptrHead++] = (codepoint >> (6 * (--bytesRequiredToEncode))) + offset;\\n while (bytesRequiredToEncode > 0) {\\n const temp = codepoint >> (6 * (bytesRequiredToEncode - 1));\\n u8view[ptrHead++] = (0x80 | (temp & 0x3F));\\n bytesRequiredToEncode -= 1;\\n }\\n }\\n i += 1;\\n }\\n const utf8 = u8view.slice(0, ptrHead + 1);\\n utf8[ptrHead] = 0x00;\\n this._utf8Bytes = utf8;\\n if (utf16OffsetToUtf8) { // set if UTF-16 surrogate chars or multi-byte characters found\\n this._utf8Indexes = utf16OffsetToUtf8;\\n this._mappingTableStartOffset = mappingTableStartOffset;\\n }\\n }\\n}\\nfunction findFirstInSorted(array, i) {\\n let low = 0;\\n let high = array.length;\\n if (high === 0) {\\n return 0; // no children\\n }\\n while (low < high) {\\n const mid = Math.floor((low + high) / 2);\\n if (array[mid] >= i) {\\n high = mid;\\n }\\n else {\\n low = mid + 1;\\n }\\n }\\n // low is on the index of the first value >= i or array.length. Decrement low until we find array[low] <= i\\n while (low > 0 && (low >= array.length || array[low] > i)) {\\n low--;\\n }\\n // check whether we are on the second index of a utf-16 surrogate char. If so, go to the first index.\\n if (low > 0 && array[low] === array[low - 1]) {\\n low--;\\n }\\n return low;\\n}\\nexports[\\\"default\\\"] = OnigString;\\n//# sourceMappingURL=OnigString.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/OnigString.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/index.js\":\n/*!*******************************************!*\\\n !*** ./node_modules/onigasm/lib/index.js ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst onigasmH_1 = __webpack_require__(/*! ./onigasmH */ \\\"./node_modules/onigasm/lib/onigasmH.js\\\");\\nexports.loadWASM = onigasmH_1.loadWASM;\\nconst OnigRegExp_1 = __webpack_require__(/*! ./OnigRegExp */ \\\"./node_modules/onigasm/lib/OnigRegExp.js\\\");\\nexports.OnigRegExp = OnigRegExp_1.default;\\nconst OnigScanner_1 = __webpack_require__(/*! ./OnigScanner */ \\\"./node_modules/onigasm/lib/OnigScanner.js\\\");\\nexports.OnigScanner = OnigScanner_1.default;\\nconst OnigString_1 = __webpack_require__(/*! ./OnigString */ \\\"./node_modules/onigasm/lib/OnigString.js\\\");\\nexports.OnigString = OnigString_1.default;\\n//# sourceMappingURL=index.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/onigasm.js\":\n/*!*********************************************!*\\\n !*** ./node_modules/onigasm/lib/onigasm.js ***!\n \\*********************************************/\n/***/ ((module) => {\n\neval(\"\\nvar Onigasm = (function() {\\n var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\\n return (\\nfunction(Onigasm) {\\n Onigasm = Onigasm || {};\\n\\nvar Module=typeof Onigasm!==\\\"undefined\\\"?Onigasm:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\\\"./this.program\\\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=true;var scriptDirectory=\\\"\\\";function locateFile(path){if(Module[\\\"locateFile\\\"]){return Module[\\\"locateFile\\\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readBinary;if(ENVIRONMENT_IS_SHELL){if(typeof read!=\\\"undefined\\\"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer===\\\"function\\\"){return new Uint8Array(readbuffer(f))}data=read(f,\\\"binary\\\");assert(typeof data===\\\"object\\\");return data};if(typeof scriptArgs!=\\\"undefined\\\"){arguments_=scriptArgs}else if(typeof arguments!=\\\"undefined\\\"){arguments_=arguments}if(typeof quit===\\\"function\\\"){quit_=function(status){quit(status)}}if(typeof print!==\\\"undefined\\\"){if(typeof console===\\\"undefined\\\")console={};console.log=print;console.warn=console.error=typeof printErr!==\\\"undefined\\\"?printErr:print}}else{}var out=Module[\\\"print\\\"]||console.log.bind(console);var err=Module[\\\"printErr\\\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\\\"arguments\\\"])arguments_=Module[\\\"arguments\\\"];if(Module[\\\"thisProgram\\\"])thisProgram=Module[\\\"thisProgram\\\"];if(Module[\\\"quit\\\"])quit_=Module[\\\"quit\\\"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end>_emscripten_get_heap_size()){abort()}HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case\\\"i1\\\":case\\\"i8\\\":return 1;case\\\"i16\\\":return 2;case\\\"i32\\\":return 4;case\\\"i64\\\":return 8;case\\\"float\\\":return 4;case\\\"double\\\":return 8;default:{if(type[type.length-1]===\\\"*\\\"){return 4}else if(type[0]===\\\"i\\\"){var bits=parseInt(type.substr(1));assert(bits%8===0,\\\"getNativeTypeSize invalid bits \\\"+bits+\\\", type \\\"+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){var typeSection=[1,0,1,96];var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={\\\"i\\\":127,\\\"j\\\":126,\\\"f\\\":125,\\\"d\\\":124};typeSection.push(sigParam.length);for(var i=0;i>0]=value;break;case\\\"i8\\\":HEAP8[ptr>>0]=value;break;case\\\"i16\\\":HEAP16[ptr>>1]=value;break;case\\\"i32\\\":HEAP32[ptr>>2]=value;break;case\\\"i64\\\":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case\\\"float\\\":HEAPF32[ptr>>2]=value;break;case\\\"double\\\":HEAPF64[ptr>>3]=value;break;default:abort(\\\"invalid type for setValue: \\\"+type)}}var wasmMemory;var wasmTable=new WebAssembly.Table({\\\"initial\\\":244,\\\"maximum\\\":244+0,\\\"element\\\":\\\"anyfunc\\\"});var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort(\\\"Assertion failed: \\\"+text)}}function getCFunc(ident){var func=Module[\\\"_\\\"+ident];assert(func,\\\"Cannot call unknown function \\\"+ident+\\\", make sure it is exported\\\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\\\"string\\\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\\\"array\\\":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType===\\\"string\\\")return UTF8ToString(ret);if(returnType===\\\"boolean\\\")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str=\\\"\\\";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\\\"\\\"}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\\\"undefined\\\"?new TextDecoder(\\\"utf-16le\\\"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var WASM_PAGE_SIZE=65536;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\\\"HEAP8\\\"]=HEAP8=new Int8Array(buf);Module[\\\"HEAP16\\\"]=HEAP16=new Int16Array(buf);Module[\\\"HEAP32\\\"]=HEAP32=new Int32Array(buf);Module[\\\"HEAPU8\\\"]=HEAPU8=new Uint8Array(buf);Module[\\\"HEAPU16\\\"]=HEAPU16=new Uint16Array(buf);Module[\\\"HEAPU32\\\"]=HEAPU32=new Uint32Array(buf);Module[\\\"HEAPF32\\\"]=HEAPF32=new Float32Array(buf);Module[\\\"HEAPF64\\\"]=HEAPF64=new Float64Array(buf)}var STACK_BASE=5507664,DYNAMIC_BASE=5507664,DYNAMICTOP_PTR=264624;var INITIAL_TOTAL_MEMORY=Module[\\\"TOTAL_MEMORY\\\"]||157286400;if(Module[\\\"wasmMemory\\\"]){wasmMemory=Module[\\\"wasmMemory\\\"]}else{wasmMemory=new WebAssembly.Memory({\\\"initial\\\":INITIAL_TOTAL_MEMORY/WASM_PAGE_SIZE})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_TOTAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\\\"function\\\"){callback();continue}var func=callback.func;if(typeof func===\\\"number\\\"){if(callback.arg===undefined){Module[\\\"dynCall_v\\\"](func)}else{Module[\\\"dynCall_vi\\\"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module[\\\"preRun\\\"]){if(typeof Module[\\\"preRun\\\"]==\\\"function\\\")Module[\\\"preRun\\\"]=[Module[\\\"preRun\\\"]];while(Module[\\\"preRun\\\"].length){addOnPreRun(Module[\\\"preRun\\\"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module[\\\"postRun\\\"]){if(typeof Module[\\\"postRun\\\"]==\\\"function\\\")Module[\\\"postRun\\\"]=[Module[\\\"postRun\\\"]];while(Module[\\\"postRun\\\"].length){addOnPostRun(Module[\\\"postRun\\\"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module[\\\"monitorRunDependencies\\\"]){Module[\\\"monitorRunDependencies\\\"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module[\\\"monitorRunDependencies\\\"]){Module[\\\"monitorRunDependencies\\\"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\\\"preloadedImages\\\"]={};Module[\\\"preloadedAudios\\\"]={};function abort(what){if(Module[\\\"onAbort\\\"]){Module[\\\"onAbort\\\"](what)}what+=\\\"\\\";out(what);err(what);ABORT=true;EXITSTATUS=1;what=\\\"abort(\\\"+what+\\\"). Build with -s ASSERTIONS=1 for more info.\\\";throw new WebAssembly.RuntimeError(what)}var dataURIPrefix=\\\"data:application/octet-stream;base64,\\\";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var wasmBinaryFile=\\\"onigasm.wasm\\\";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw\\\"both async and sync fetching of the wasm failed\\\"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch===\\\"function\\\"){return fetch(wasmBinaryFile,{credentials:\\\"same-origin\\\"}).then(function(response){if(!response[\\\"ok\\\"]){throw\\\"failed to load wasm binary file at '\\\"+wasmBinaryFile+\\\"'\\\"}return response[\\\"arrayBuffer\\\"]()}).catch(function(){return getBinary()})}return new Promise(function(resolve,reject){resolve(getBinary())})}function createWasm(){var info={\\\"env\\\":asmLibraryArg,\\\"wasi_unstable\\\":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module[\\\"asm\\\"]=exports;removeRunDependency(\\\"wasm-instantiate\\\")}addRunDependency(\\\"wasm-instantiate\\\");function receiveInstantiatedSource(output){receiveInstance(output[\\\"instance\\\"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err(\\\"failed to asynchronously prepare wasm: \\\"+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming===\\\"function\\\"&&!isDataURI(wasmBinaryFile)&&typeof fetch===\\\"function\\\"){fetch(wasmBinaryFile,{credentials:\\\"same-origin\\\"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err(\\\"wasm streaming compile failed: \\\"+reason);err(\\\"falling back to ArrayBuffer instantiation\\\");instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module[\\\"instantiateWasm\\\"]){try{var exports=Module[\\\"instantiateWasm\\\"](info,receiveInstance);return exports}catch(e){err(\\\"Module.instantiateWasm callback failed with error: \\\"+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;__ATINIT__.push({func:function(){___wasm_call_ctors()}});function demangle(func){var __cxa_demangle_func=Module[\\\"___cxa_demangle\\\"]||Module[\\\"__cxa_demangle\\\"];assert(__cxa_demangle_func);try{var s=func;if(s.startsWith(\\\"__Z\\\"))s=s.substr(1);var len=lengthBytesUTF8(s)+1;var buf=_malloc(len);stringToUTF8(s,buf,len);var status=_malloc(4);var ret=__cxa_demangle_func(buf,0,0,status);if(HEAP32[status>>2]===0&&ret){return UTF8ToString(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}return func}function demangleAll(text){var regex=/\\\\b_Z[\\\\w\\\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\\\" [\\\"+x+\\\"]\\\"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return\\\"(no stack trace available)\\\"}}return err.stack.toString()}function _abort(){abort()}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_get_sbrk_ptr(){return 264624}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=65536;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize=0;i--){var last=parts[i];if(last===\\\".\\\"){parts.splice(i,1)}else if(last===\\\"..\\\"){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift(\\\"..\\\")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)===\\\"/\\\",trailingSlash=path.substr(-1)===\\\"/\\\";path=PATH.normalizeArray(path.split(\\\"/\\\").filter(function(p){return!!p}),!isAbsolute).join(\\\"/\\\");if(!path&&!isAbsolute){path=\\\".\\\"}if(path&&trailingSlash){path+=\\\"/\\\"}return(isAbsolute?\\\"/\\\":\\\"\\\")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return\\\".\\\"}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path===\\\"/\\\")return\\\"/\\\";var lastSlash=path.lastIndexOf(\\\"/\\\");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join(\\\"/\\\"))},join2:function(l,r){return PATH.normalize(l+\\\"/\\\"+r)}};var SYSCALLS={buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:0,get:function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(){var ret=UTF8ToString(SYSCALLS.get());return ret},get64:function(){var low=SYSCALLS.get(),high=SYSCALLS.get();return low},getZero:function(){SYSCALLS.get()}};function _fd_close(fd){try{return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}catch(e){if(typeof FS===\\\"undefined\\\"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _setTempRet0($i){setTempRet0($i|0)}var ASSERTIONS=false;var asmLibraryArg={\\\"abort\\\":_abort,\\\"emscripten_get_sbrk_ptr\\\":_emscripten_get_sbrk_ptr,\\\"emscripten_memcpy_big\\\":_emscripten_memcpy_big,\\\"emscripten_resize_heap\\\":_emscripten_resize_heap,\\\"fd_close\\\":_fd_close,\\\"fd_seek\\\":_fd_seek,\\\"fd_write\\\":_fd_write,\\\"memory\\\":wasmMemory,\\\"setTempRet0\\\":_setTempRet0,\\\"table\\\":wasmTable};var asm=createWasm();Module[\\\"asm\\\"]=asm;var ___wasm_call_ctors=Module[\\\"___wasm_call_ctors\\\"]=function(){return Module[\\\"asm\\\"][\\\"__wasm_call_ctors\\\"].apply(null,arguments)};var _malloc=Module[\\\"_malloc\\\"]=function(){return Module[\\\"asm\\\"][\\\"malloc\\\"].apply(null,arguments)};var _free=Module[\\\"_free\\\"]=function(){return Module[\\\"asm\\\"][\\\"free\\\"].apply(null,arguments)};var _getLastError=Module[\\\"_getLastError\\\"]=function(){return Module[\\\"asm\\\"][\\\"getLastError\\\"].apply(null,arguments)};var _compilePattern=Module[\\\"_compilePattern\\\"]=function(){return Module[\\\"asm\\\"][\\\"compilePattern\\\"].apply(null,arguments)};var _disposeCompiledPatterns=Module[\\\"_disposeCompiledPatterns\\\"]=function(){return Module[\\\"asm\\\"][\\\"disposeCompiledPatterns\\\"].apply(null,arguments)};var _findBestMatch=Module[\\\"_findBestMatch\\\"]=function(){return Module[\\\"asm\\\"][\\\"findBestMatch\\\"].apply(null,arguments)};var ___cxa_demangle=Module[\\\"___cxa_demangle\\\"]=function(){return Module[\\\"asm\\\"][\\\"__cxa_demangle\\\"].apply(null,arguments)};var _setThrew=Module[\\\"_setThrew\\\"]=function(){return Module[\\\"asm\\\"][\\\"setThrew\\\"].apply(null,arguments)};var stackSave=Module[\\\"stackSave\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackSave\\\"].apply(null,arguments)};var stackAlloc=Module[\\\"stackAlloc\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackAlloc\\\"].apply(null,arguments)};var stackRestore=Module[\\\"stackRestore\\\"]=function(){return Module[\\\"asm\\\"][\\\"stackRestore\\\"].apply(null,arguments)};var __growWasmMemory=Module[\\\"__growWasmMemory\\\"]=function(){return Module[\\\"asm\\\"][\\\"__growWasmMemory\\\"].apply(null,arguments)};var dynCall_vi=Module[\\\"dynCall_vi\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_vi\\\"].apply(null,arguments)};var dynCall_iiii=Module[\\\"dynCall_iiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iiii\\\"].apply(null,arguments)};var dynCall_iiiii=Module[\\\"dynCall_iiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iiiii\\\"].apply(null,arguments)};var dynCall_iii=Module[\\\"dynCall_iii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iii\\\"].apply(null,arguments)};var dynCall_iidiiii=Module[\\\"dynCall_iidiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_iidiiii\\\"].apply(null,arguments)};var dynCall_vii=Module[\\\"dynCall_vii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_vii\\\"].apply(null,arguments)};var dynCall_ii=Module[\\\"dynCall_ii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_ii\\\"].apply(null,arguments)};var dynCall_i=Module[\\\"dynCall_i\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_i\\\"].apply(null,arguments)};var dynCall_v=Module[\\\"dynCall_v\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_v\\\"].apply(null,arguments)};var dynCall_viiiiii=Module[\\\"dynCall_viiiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiiiii\\\"].apply(null,arguments)};var dynCall_viiiii=Module[\\\"dynCall_viiiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiiii\\\"].apply(null,arguments)};var dynCall_viiii=Module[\\\"dynCall_viiii\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_viiii\\\"].apply(null,arguments)};var dynCall_jiji=Module[\\\"dynCall_jiji\\\"]=function(){return Module[\\\"asm\\\"][\\\"dynCall_jiji\\\"].apply(null,arguments)};Module[\\\"asm\\\"]=asm;Module[\\\"ccall\\\"]=ccall;var calledRun;Module[\\\"then\\\"]=function(func){if(calledRun){func(Module)}else{var old=Module[\\\"onRuntimeInitialized\\\"];Module[\\\"onRuntimeInitialized\\\"]=function(){if(old)old();func(Module)}}return Module};function ExitStatus(status){this.name=\\\"ExitStatus\\\";this.message=\\\"Program terminated with exit(\\\"+status+\\\")\\\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;if(ABORT)return;initRuntime();preMain();if(Module[\\\"onRuntimeInitialized\\\"])Module[\\\"onRuntimeInitialized\\\"]();postRun()}if(Module[\\\"setStatus\\\"]){Module[\\\"setStatus\\\"](\\\"Running...\\\");setTimeout(function(){setTimeout(function(){Module[\\\"setStatus\\\"](\\\"\\\")},1);doRun()},1)}else{doRun()}}Module[\\\"run\\\"]=run;if(Module[\\\"preInit\\\"]){if(typeof Module[\\\"preInit\\\"]==\\\"function\\\")Module[\\\"preInit\\\"]=[Module[\\\"preInit\\\"]];while(Module[\\\"preInit\\\"].length>0){Module[\\\"preInit\\\"].pop()()}}noExitRuntime=true;run();\\n\\n\\n return Onigasm\\n}\\n);\\n})();\\nif (true)\\n module.exports = Onigasm;\\n else {}\\n \\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/onigasm.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/lib/onigasmH.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/onigasm/lib/onigasmH.js ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nObject.defineProperty(exports, \\\"__esModule\\\", ({ value: true }));\\nconst OnigasmModuleFactory = __webpack_require__(/*! ./onigasm.js */ \\\"./node_modules/onigasm/lib/onigasm.js\\\" /** when TS is compiled to JS, this will mean `lib/onigasm.js` (emitted by `emcc`) */);\\nasync function initModule(bytes) {\\n return new Promise((resolve, reject) => {\\n const { log, warn, error } = console;\\n OnigasmModuleFactory({\\n instantiateWasm(imports, successCallback) {\\n WebAssembly.instantiate(bytes, imports)\\n .then((output) => {\\n successCallback(output.instance);\\n })\\n .catch((e) => {\\n throw e;\\n });\\n return {};\\n },\\n })\\n .then(moduleH => {\\n exports.onigasmH = moduleH;\\n resolve();\\n });\\n if (typeof print !== 'undefined') {\\n // can be removed when https://github.com/emscripten-core/emscripten/issues/9829 is fixed.\\n // tslint:disable-next-line:no-console\\n console.log = log;\\n // tslint:disable-next-line:no-console\\n console.error = error;\\n // tslint:disable-next-line:no-console\\n console.warn = warn;\\n }\\n });\\n}\\nlet isInitialized = false;\\n/**\\n * Mount the .wasm file that will act as library's \\\"backend\\\"\\n * @param data Path to .wasm file or it's ArrayBuffer\\n */\\nasync function loadWASM(data) {\\n if (isInitialized) {\\n throw new Error(`Onigasm#init has been called and was succesful, subsequent calls are not allowed once initialized`);\\n }\\n if (typeof data === 'string') {\\n const arrayBuffer = await (await fetch(data)).arrayBuffer();\\n await initModule(arrayBuffer);\\n }\\n else if (data instanceof ArrayBuffer) {\\n await initModule(data);\\n }\\n else {\\n throw new TypeError(`Expected a string (URL of .wasm file) or ArrayBuffer (.wasm file itself) as first parameter`);\\n }\\n isInitialized = true;\\n}\\nexports.loadWASM = loadWASM;\\n//# sourceMappingURL=onigasmH.js.map\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/lib/onigasmH.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/lru-cache/index.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/lru-cache/index.js ***!\n \\**************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\n// A linked list to keep track of recently-used-ness\\nconst Yallist = __webpack_require__(/*! yallist */ \\\"./node_modules/onigasm/node_modules/yallist/yallist.js\\\")\\n\\nconst MAX = Symbol('max')\\nconst LENGTH = Symbol('length')\\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\\nconst ALLOW_STALE = Symbol('allowStale')\\nconst MAX_AGE = Symbol('maxAge')\\nconst DISPOSE = Symbol('dispose')\\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\\nconst LRU_LIST = Symbol('lruList')\\nconst CACHE = Symbol('cache')\\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\\n\\nconst naiveLength = () => 1\\n\\n// lruList is a yallist where the head is the youngest\\n// item, and the tail is the oldest. the list contains the Hit\\n// objects as the entries.\\n// Each Hit object has a reference to its Yallist.Node. This\\n// never changes.\\n//\\n// cache is a Map (or PseudoMap) that matches the keys to\\n// the Yallist.Node object.\\nclass LRUCache {\\n constructor (options) {\\n if (typeof options === 'number')\\n options = { max: options }\\n\\n if (!options)\\n options = {}\\n\\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\\n throw new TypeError('max must be a non-negative number')\\n // Kind of weird to have a default max of Infinity, but oh well.\\n const max = this[MAX] = options.max || Infinity\\n\\n const lc = options.length || naiveLength\\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\\n this[ALLOW_STALE] = options.stale || false\\n if (options.maxAge && typeof options.maxAge !== 'number')\\n throw new TypeError('maxAge must be a number')\\n this[MAX_AGE] = options.maxAge || 0\\n this[DISPOSE] = options.dispose\\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\\n this.reset()\\n }\\n\\n // resize the cache when the max changes.\\n set max (mL) {\\n if (typeof mL !== 'number' || mL < 0)\\n throw new TypeError('max must be a non-negative number')\\n\\n this[MAX] = mL || Infinity\\n trim(this)\\n }\\n get max () {\\n return this[MAX]\\n }\\n\\n set allowStale (allowStale) {\\n this[ALLOW_STALE] = !!allowStale\\n }\\n get allowStale () {\\n return this[ALLOW_STALE]\\n }\\n\\n set maxAge (mA) {\\n if (typeof mA !== 'number')\\n throw new TypeError('maxAge must be a non-negative number')\\n\\n this[MAX_AGE] = mA\\n trim(this)\\n }\\n get maxAge () {\\n return this[MAX_AGE]\\n }\\n\\n // resize the cache when the lengthCalculator changes.\\n set lengthCalculator (lC) {\\n if (typeof lC !== 'function')\\n lC = naiveLength\\n\\n if (lC !== this[LENGTH_CALCULATOR]) {\\n this[LENGTH_CALCULATOR] = lC\\n this[LENGTH] = 0\\n this[LRU_LIST].forEach(hit => {\\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\\n this[LENGTH] += hit.length\\n })\\n }\\n trim(this)\\n }\\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\\n\\n get length () { return this[LENGTH] }\\n get itemCount () { return this[LRU_LIST].length }\\n\\n rforEach (fn, thisp) {\\n thisp = thisp || this\\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\\n const prev = walker.prev\\n forEachStep(this, fn, walker, thisp)\\n walker = prev\\n }\\n }\\n\\n forEach (fn, thisp) {\\n thisp = thisp || this\\n for (let walker = this[LRU_LIST].head; walker !== null;) {\\n const next = walker.next\\n forEachStep(this, fn, walker, thisp)\\n walker = next\\n }\\n }\\n\\n keys () {\\n return this[LRU_LIST].toArray().map(k => k.key)\\n }\\n\\n values () {\\n return this[LRU_LIST].toArray().map(k => k.value)\\n }\\n\\n reset () {\\n if (this[DISPOSE] &&\\n this[LRU_LIST] &&\\n this[LRU_LIST].length) {\\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\\n }\\n\\n this[CACHE] = new Map() // hash of items by key\\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\\n this[LENGTH] = 0 // length of items in the list\\n }\\n\\n dump () {\\n return this[LRU_LIST].map(hit =>\\n isStale(this, hit) ? false : {\\n k: hit.key,\\n v: hit.value,\\n e: hit.now + (hit.maxAge || 0)\\n }).toArray().filter(h => h)\\n }\\n\\n dumpLru () {\\n return this[LRU_LIST]\\n }\\n\\n set (key, value, maxAge) {\\n maxAge = maxAge || this[MAX_AGE]\\n\\n if (maxAge && typeof maxAge !== 'number')\\n throw new TypeError('maxAge must be a number')\\n\\n const now = maxAge ? Date.now() : 0\\n const len = this[LENGTH_CALCULATOR](value, key)\\n\\n if (this[CACHE].has(key)) {\\n if (len > this[MAX]) {\\n del(this, this[CACHE].get(key))\\n return false\\n }\\n\\n const node = this[CACHE].get(key)\\n const item = node.value\\n\\n // dispose of the old one before overwriting\\n // split out into 2 ifs for better coverage tracking\\n if (this[DISPOSE]) {\\n if (!this[NO_DISPOSE_ON_SET])\\n this[DISPOSE](key, item.value)\\n }\\n\\n item.now = now\\n item.maxAge = maxAge\\n item.value = value\\n this[LENGTH] += len - item.length\\n item.length = len\\n this.get(key)\\n trim(this)\\n return true\\n }\\n\\n const hit = new Entry(key, value, len, now, maxAge)\\n\\n // oversized objects fall out of cache automatically.\\n if (hit.length > this[MAX]) {\\n if (this[DISPOSE])\\n this[DISPOSE](key, value)\\n\\n return false\\n }\\n\\n this[LENGTH] += hit.length\\n this[LRU_LIST].unshift(hit)\\n this[CACHE].set(key, this[LRU_LIST].head)\\n trim(this)\\n return true\\n }\\n\\n has (key) {\\n if (!this[CACHE].has(key)) return false\\n const hit = this[CACHE].get(key).value\\n return !isStale(this, hit)\\n }\\n\\n get (key) {\\n return get(this, key, true)\\n }\\n\\n peek (key) {\\n return get(this, key, false)\\n }\\n\\n pop () {\\n const node = this[LRU_LIST].tail\\n if (!node)\\n return null\\n\\n del(this, node)\\n return node.value\\n }\\n\\n del (key) {\\n del(this, this[CACHE].get(key))\\n }\\n\\n load (arr) {\\n // reset the cache\\n this.reset()\\n\\n const now = Date.now()\\n // A previous serialized cache has the most recent items first\\n for (let l = arr.length - 1; l >= 0; l--) {\\n const hit = arr[l]\\n const expiresAt = hit.e || 0\\n if (expiresAt === 0)\\n // the item was created without expiration in a non aged cache\\n this.set(hit.k, hit.v)\\n else {\\n const maxAge = expiresAt - now\\n // dont add already expired items\\n if (maxAge > 0) {\\n this.set(hit.k, hit.v, maxAge)\\n }\\n }\\n }\\n }\\n\\n prune () {\\n this[CACHE].forEach((value, key) => get(this, key, false))\\n }\\n}\\n\\nconst get = (self, key, doUse) => {\\n const node = self[CACHE].get(key)\\n if (node) {\\n const hit = node.value\\n if (isStale(self, hit)) {\\n del(self, node)\\n if (!self[ALLOW_STALE])\\n return undefined\\n } else {\\n if (doUse) {\\n if (self[UPDATE_AGE_ON_GET])\\n node.value.now = Date.now()\\n self[LRU_LIST].unshiftNode(node)\\n }\\n }\\n return hit.value\\n }\\n}\\n\\nconst isStale = (self, hit) => {\\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\\n return false\\n\\n const diff = Date.now() - hit.now\\n return hit.maxAge ? diff > hit.maxAge\\n : self[MAX_AGE] && (diff > self[MAX_AGE])\\n}\\n\\nconst trim = self => {\\n if (self[LENGTH] > self[MAX]) {\\n for (let walker = self[LRU_LIST].tail;\\n self[LENGTH] > self[MAX] && walker !== null;) {\\n // We know that we're about to delete this one, and also\\n // what the next least recently used key will be, so just\\n // go ahead and set it now.\\n const prev = walker.prev\\n del(self, walker)\\n walker = prev\\n }\\n }\\n}\\n\\nconst del = (self, node) => {\\n if (node) {\\n const hit = node.value\\n if (self[DISPOSE])\\n self[DISPOSE](hit.key, hit.value)\\n\\n self[LENGTH] -= hit.length\\n self[CACHE].delete(hit.key)\\n self[LRU_LIST].removeNode(node)\\n }\\n}\\n\\nclass Entry {\\n constructor (key, value, length, now, maxAge) {\\n this.key = key\\n this.value = value\\n this.length = length\\n this.now = now\\n this.maxAge = maxAge || 0\\n }\\n}\\n\\nconst forEachStep = (self, fn, node, thisp) => {\\n let hit = node.value\\n if (isStale(self, hit)) {\\n del(self, node)\\n if (!self[ALLOW_STALE])\\n hit = undefined\\n }\\n if (hit)\\n fn.call(thisp, hit.value, hit.key, self)\\n}\\n\\nmodule.exports = LRUCache\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/lru-cache/index.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/yallist/iterator.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/yallist/iterator.js ***!\n \\***************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\nmodule.exports = function (Yallist) {\\n Yallist.prototype[Symbol.iterator] = function* () {\\n for (let walker = this.head; walker; walker = walker.next) {\\n yield walker.value\\n }\\n }\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/yallist/iterator.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/onigasm/node_modules/yallist/yallist.js\":\n/*!**************************************************************!*\\\n !*** ./node_modules/onigasm/node_modules/yallist/yallist.js ***!\n \\**************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\nmodule.exports = Yallist\\n\\nYallist.Node = Node\\nYallist.create = Yallist\\n\\nfunction Yallist (list) {\\n var self = this\\n if (!(self instanceof Yallist)) {\\n self = new Yallist()\\n }\\n\\n self.tail = null\\n self.head = null\\n self.length = 0\\n\\n if (list && typeof list.forEach === 'function') {\\n list.forEach(function (item) {\\n self.push(item)\\n })\\n } else if (arguments.length > 0) {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n self.push(arguments[i])\\n }\\n }\\n\\n return self\\n}\\n\\nYallist.prototype.removeNode = function (node) {\\n if (node.list !== this) {\\n throw new Error('removing node which does not belong to this list')\\n }\\n\\n var next = node.next\\n var prev = node.prev\\n\\n if (next) {\\n next.prev = prev\\n }\\n\\n if (prev) {\\n prev.next = next\\n }\\n\\n if (node === this.head) {\\n this.head = next\\n }\\n if (node === this.tail) {\\n this.tail = prev\\n }\\n\\n node.list.length--\\n node.next = null\\n node.prev = null\\n node.list = null\\n\\n return next\\n}\\n\\nYallist.prototype.unshiftNode = function (node) {\\n if (node === this.head) {\\n return\\n }\\n\\n if (node.list) {\\n node.list.removeNode(node)\\n }\\n\\n var head = this.head\\n node.list = this\\n node.next = head\\n if (head) {\\n head.prev = node\\n }\\n\\n this.head = node\\n if (!this.tail) {\\n this.tail = node\\n }\\n this.length++\\n}\\n\\nYallist.prototype.pushNode = function (node) {\\n if (node === this.tail) {\\n return\\n }\\n\\n if (node.list) {\\n node.list.removeNode(node)\\n }\\n\\n var tail = this.tail\\n node.list = this\\n node.prev = tail\\n if (tail) {\\n tail.next = node\\n }\\n\\n this.tail = node\\n if (!this.head) {\\n this.head = node\\n }\\n this.length++\\n}\\n\\nYallist.prototype.push = function () {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n push(this, arguments[i])\\n }\\n return this.length\\n}\\n\\nYallist.prototype.unshift = function () {\\n for (var i = 0, l = arguments.length; i < l; i++) {\\n unshift(this, arguments[i])\\n }\\n return this.length\\n}\\n\\nYallist.prototype.pop = function () {\\n if (!this.tail) {\\n return undefined\\n }\\n\\n var res = this.tail.value\\n this.tail = this.tail.prev\\n if (this.tail) {\\n this.tail.next = null\\n } else {\\n this.head = null\\n }\\n this.length--\\n return res\\n}\\n\\nYallist.prototype.shift = function () {\\n if (!this.head) {\\n return undefined\\n }\\n\\n var res = this.head.value\\n this.head = this.head.next\\n if (this.head) {\\n this.head.prev = null\\n } else {\\n this.tail = null\\n }\\n this.length--\\n return res\\n}\\n\\nYallist.prototype.forEach = function (fn, thisp) {\\n thisp = thisp || this\\n for (var walker = this.head, i = 0; walker !== null; i++) {\\n fn.call(thisp, walker.value, i, this)\\n walker = walker.next\\n }\\n}\\n\\nYallist.prototype.forEachReverse = function (fn, thisp) {\\n thisp = thisp || this\\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\\n fn.call(thisp, walker.value, i, this)\\n walker = walker.prev\\n }\\n}\\n\\nYallist.prototype.get = function (n) {\\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\\n // abort out of the list early if we hit a cycle\\n walker = walker.next\\n }\\n if (i === n && walker !== null) {\\n return walker.value\\n }\\n}\\n\\nYallist.prototype.getReverse = function (n) {\\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\\n // abort out of the list early if we hit a cycle\\n walker = walker.prev\\n }\\n if (i === n && walker !== null) {\\n return walker.value\\n }\\n}\\n\\nYallist.prototype.map = function (fn, thisp) {\\n thisp = thisp || this\\n var res = new Yallist()\\n for (var walker = this.head; walker !== null;) {\\n res.push(fn.call(thisp, walker.value, this))\\n walker = walker.next\\n }\\n return res\\n}\\n\\nYallist.prototype.mapReverse = function (fn, thisp) {\\n thisp = thisp || this\\n var res = new Yallist()\\n for (var walker = this.tail; walker !== null;) {\\n res.push(fn.call(thisp, walker.value, this))\\n walker = walker.prev\\n }\\n return res\\n}\\n\\nYallist.prototype.reduce = function (fn, initial) {\\n var acc\\n var walker = this.head\\n if (arguments.length > 1) {\\n acc = initial\\n } else if (this.head) {\\n walker = this.head.next\\n acc = this.head.value\\n } else {\\n throw new TypeError('Reduce of empty list with no initial value')\\n }\\n\\n for (var i = 0; walker !== null; i++) {\\n acc = fn(acc, walker.value, i)\\n walker = walker.next\\n }\\n\\n return acc\\n}\\n\\nYallist.prototype.reduceReverse = function (fn, initial) {\\n var acc\\n var walker = this.tail\\n if (arguments.length > 1) {\\n acc = initial\\n } else if (this.tail) {\\n walker = this.tail.prev\\n acc = this.tail.value\\n } else {\\n throw new TypeError('Reduce of empty list with no initial value')\\n }\\n\\n for (var i = this.length - 1; walker !== null; i--) {\\n acc = fn(acc, walker.value, i)\\n walker = walker.prev\\n }\\n\\n return acc\\n}\\n\\nYallist.prototype.toArray = function () {\\n var arr = new Array(this.length)\\n for (var i = 0, walker = this.head; walker !== null; i++) {\\n arr[i] = walker.value\\n walker = walker.next\\n }\\n return arr\\n}\\n\\nYallist.prototype.toArrayReverse = function () {\\n var arr = new Array(this.length)\\n for (var i = 0, walker = this.tail; walker !== null; i++) {\\n arr[i] = walker.value\\n walker = walker.prev\\n }\\n return arr\\n}\\n\\nYallist.prototype.slice = function (from, to) {\\n to = to || this.length\\n if (to < 0) {\\n to += this.length\\n }\\n from = from || 0\\n if (from < 0) {\\n from += this.length\\n }\\n var ret = new Yallist()\\n if (to < from || to < 0) {\\n return ret\\n }\\n if (from < 0) {\\n from = 0\\n }\\n if (to > this.length) {\\n to = this.length\\n }\\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\\n walker = walker.next\\n }\\n for (; walker !== null && i < to; i++, walker = walker.next) {\\n ret.push(walker.value)\\n }\\n return ret\\n}\\n\\nYallist.prototype.sliceReverse = function (from, to) {\\n to = to || this.length\\n if (to < 0) {\\n to += this.length\\n }\\n from = from || 0\\n if (from < 0) {\\n from += this.length\\n }\\n var ret = new Yallist()\\n if (to < from || to < 0) {\\n return ret\\n }\\n if (from < 0) {\\n from = 0\\n }\\n if (to > this.length) {\\n to = this.length\\n }\\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\\n walker = walker.prev\\n }\\n for (; walker !== null && i > from; i--, walker = walker.prev) {\\n ret.push(walker.value)\\n }\\n return ret\\n}\\n\\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\\n if (start > this.length) {\\n start = this.length - 1\\n }\\n if (start < 0) {\\n start = this.length + start;\\n }\\n\\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\\n walker = walker.next\\n }\\n\\n var ret = []\\n for (var i = 0; walker && i < deleteCount; i++) {\\n ret.push(walker.value)\\n walker = this.removeNode(walker)\\n }\\n if (walker === null) {\\n walker = this.tail\\n }\\n\\n if (walker !== this.head && walker !== this.tail) {\\n walker = walker.prev\\n }\\n\\n for (var i = 2; i < arguments.length; i++) {\\n walker = insert(this, walker, arguments[i])\\n }\\n return ret;\\n}\\n\\nYallist.prototype.reverse = function () {\\n var head = this.head\\n var tail = this.tail\\n for (var walker = head; walker !== null; walker = walker.prev) {\\n var p = walker.prev\\n walker.prev = walker.next\\n walker.next = p\\n }\\n this.head = tail\\n this.tail = head\\n return this\\n}\\n\\nfunction insert (self, node, value) {\\n var inserted = node === self.head ?\\n new Node(value, null, node, self) :\\n new Node(value, node, node.next, self)\\n\\n if (inserted.next === null) {\\n self.tail = inserted\\n }\\n if (inserted.prev === null) {\\n self.head = inserted\\n }\\n\\n self.length++\\n\\n return inserted\\n}\\n\\nfunction push (self, item) {\\n self.tail = new Node(item, self.tail, null, self)\\n if (!self.head) {\\n self.head = self.tail\\n }\\n self.length++\\n}\\n\\nfunction unshift (self, item) {\\n self.head = new Node(item, null, self.head, self)\\n if (!self.tail) {\\n self.tail = self.head\\n }\\n self.length++\\n}\\n\\nfunction Node (value, prev, next, list) {\\n if (!(this instanceof Node)) {\\n return new Node(value, prev, next, list)\\n }\\n\\n this.list = list\\n this.value = value\\n\\n if (prev) {\\n prev.next = this\\n this.prev = prev\\n } else {\\n this.prev = null\\n }\\n\\n if (next) {\\n next.prev = this\\n this.next = next\\n } else {\\n this.next = null\\n }\\n}\\n\\ntry {\\n // add if support for Symbol.iterator is present\\n __webpack_require__(/*! ./iterator.js */ \\\"./node_modules/onigasm/node_modules/yallist/iterator.js\\\")(Yallist)\\n} catch (er) {}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/onigasm/node_modules/yallist/yallist.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/path/path.js\":\n/*!***********************************!*\\\n !*** ./node_modules/path/path.js ***!\n \\***********************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n// Copyright Joyent, Inc. and other Node contributors.\\r\\n//\\r\\n// Permission is hereby granted, free of charge, to any person obtaining a\\r\\n// copy of this software and associated documentation files (the\\r\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\r\\n// without limitation the rights to use, copy, modify, merge, publish,\\r\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\r\\n// persons to whom the Software is furnished to do so, subject to the\\r\\n// following conditions:\\r\\n//\\r\\n// The above copyright notice and this permission notice shall be included\\r\\n// in all copies or substantial portions of the Software.\\r\\n//\\r\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\r\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\r\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\r\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\r\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\r\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\r\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\r\\n\\r\\n\\r\\n\\r\\n\\r\\nvar isWindows = process.platform === 'win32';\\r\\nvar util = __webpack_require__(/*! util */ \\\"./node_modules/util/util.js\\\");\\r\\n\\r\\n\\r\\n// resolves . and .. elements in a path array with directory names there\\r\\n// must be no slashes or device names (c:\\\\) in the array\\r\\n// (so also no leading and trailing slashes - it does not distinguish\\r\\n// relative and absolute paths)\\r\\nfunction normalizeArray(parts, allowAboveRoot) {\\r\\n var res = [];\\r\\n for (var i = 0; i < parts.length; i++) {\\r\\n var p = parts[i];\\r\\n\\r\\n // ignore empty parts\\r\\n if (!p || p === '.')\\r\\n continue;\\r\\n\\r\\n if (p === '..') {\\r\\n if (res.length && res[res.length - 1] !== '..') {\\r\\n res.pop();\\r\\n } else if (allowAboveRoot) {\\r\\n res.push('..');\\r\\n }\\r\\n } else {\\r\\n res.push(p);\\r\\n }\\r\\n }\\r\\n\\r\\n return res;\\r\\n}\\r\\n\\r\\n// returns an array with empty elements removed from either end of the input\\r\\n// array or the original array if no elements need to be removed\\r\\nfunction trimArray(arr) {\\r\\n var lastIndex = arr.length - 1;\\r\\n var start = 0;\\r\\n for (; start <= lastIndex; start++) {\\r\\n if (arr[start])\\r\\n break;\\r\\n }\\r\\n\\r\\n var end = lastIndex;\\r\\n for (; end >= 0; end--) {\\r\\n if (arr[end])\\r\\n break;\\r\\n }\\r\\n\\r\\n if (start === 0 && end === lastIndex)\\r\\n return arr;\\r\\n if (start > end)\\r\\n return [];\\r\\n return arr.slice(start, end + 1);\\r\\n}\\r\\n\\r\\n// Regex to split a windows path into three parts: [*, device, slash,\\r\\n// tail] windows-only\\r\\nvar splitDeviceRe =\\r\\n /^([a-zA-Z]:|[\\\\\\\\\\\\/]{2}[^\\\\\\\\\\\\/]+[\\\\\\\\\\\\/]+[^\\\\\\\\\\\\/]+)?([\\\\\\\\\\\\/])?([\\\\s\\\\S]*?)$/;\\r\\n\\r\\n// Regex to split the tail part of the above into [*, dir, basename, ext]\\r\\nvar splitTailRe =\\r\\n /^([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\\\\\\\\\/]+?|)(\\\\.[^.\\\\/\\\\\\\\]*|))(?:[\\\\\\\\\\\\/]*)$/;\\r\\n\\r\\nvar win32 = {};\\r\\n\\r\\n// Function to split a filename into [root, dir, basename, ext]\\r\\nfunction win32SplitPath(filename) {\\r\\n // Separate device+slash from tail\\r\\n var result = splitDeviceRe.exec(filename),\\r\\n device = (result[1] || '') + (result[2] || ''),\\r\\n tail = result[3] || '';\\r\\n // Split the tail into dir, basename and extension\\r\\n var result2 = splitTailRe.exec(tail),\\r\\n dir = result2[1],\\r\\n basename = result2[2],\\r\\n ext = result2[3];\\r\\n return [device, dir, basename, ext];\\r\\n}\\r\\n\\r\\nfunction win32StatPath(path) {\\r\\n var result = splitDeviceRe.exec(path),\\r\\n device = result[1] || '',\\r\\n isUnc = !!device && device[1] !== ':';\\r\\n return {\\r\\n device: device,\\r\\n isUnc: isUnc,\\r\\n isAbsolute: isUnc || !!result[2], // UNC paths are always absolute\\r\\n tail: result[3]\\r\\n };\\r\\n}\\r\\n\\r\\nfunction normalizeUNCRoot(device) {\\r\\n return '\\\\\\\\\\\\\\\\' + device.replace(/^[\\\\\\\\\\\\/]+/, '').replace(/[\\\\\\\\\\\\/]+/g, '\\\\\\\\');\\r\\n}\\r\\n\\r\\n// path.resolve([from ...], to)\\r\\nwin32.resolve = function() {\\r\\n var resolvedDevice = '',\\r\\n resolvedTail = '',\\r\\n resolvedAbsolute = false;\\r\\n\\r\\n for (var i = arguments.length - 1; i >= -1; i--) {\\r\\n var path;\\r\\n if (i >= 0) {\\r\\n path = arguments[i];\\r\\n } else if (!resolvedDevice) {\\r\\n path = process.cwd();\\r\\n } else {\\r\\n // Windows has the concept of drive-specific current working\\r\\n // directories. If we've resolved a drive letter but not yet an\\r\\n // absolute path, get cwd for that drive. We're sure the device is not\\r\\n // an unc path at this points, because unc paths are always absolute.\\r\\n path = process.env['=' + resolvedDevice];\\r\\n // Verify that a drive-local cwd was found and that it actually points\\r\\n // to our drive. If not, default to the drive's root.\\r\\n if (!path || path.substr(0, 3).toLowerCase() !==\\r\\n resolvedDevice.toLowerCase() + '\\\\\\\\') {\\r\\n path = resolvedDevice + '\\\\\\\\';\\r\\n }\\r\\n }\\r\\n\\r\\n // Skip empty and invalid entries\\r\\n if (!util.isString(path)) {\\r\\n throw new TypeError('Arguments to path.resolve must be strings');\\r\\n } else if (!path) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n var result = win32StatPath(path),\\r\\n device = result.device,\\r\\n isUnc = result.isUnc,\\r\\n isAbsolute = result.isAbsolute,\\r\\n tail = result.tail;\\r\\n\\r\\n if (device &&\\r\\n resolvedDevice &&\\r\\n device.toLowerCase() !== resolvedDevice.toLowerCase()) {\\r\\n // This path points to another device so it is not applicable\\r\\n continue;\\r\\n }\\r\\n\\r\\n if (!resolvedDevice) {\\r\\n resolvedDevice = device;\\r\\n }\\r\\n if (!resolvedAbsolute) {\\r\\n resolvedTail = tail + '\\\\\\\\' + resolvedTail;\\r\\n resolvedAbsolute = isAbsolute;\\r\\n }\\r\\n\\r\\n if (resolvedDevice && resolvedAbsolute) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n // Convert slashes to backslashes when `resolvedDevice` points to an UNC\\r\\n // root. Also squash multiple slashes into a single one where appropriate.\\r\\n if (isUnc) {\\r\\n resolvedDevice = normalizeUNCRoot(resolvedDevice);\\r\\n }\\r\\n\\r\\n // At this point the path should be resolved to a full absolute path,\\r\\n // but handle relative paths to be safe (might happen when process.cwd()\\r\\n // fails)\\r\\n\\r\\n // Normalize the tail path\\r\\n resolvedTail = normalizeArray(resolvedTail.split(/[\\\\\\\\\\\\/]+/),\\r\\n !resolvedAbsolute).join('\\\\\\\\');\\r\\n\\r\\n return (resolvedDevice + (resolvedAbsolute ? '\\\\\\\\' : '') + resolvedTail) ||\\r\\n '.';\\r\\n};\\r\\n\\r\\n\\r\\nwin32.normalize = function(path) {\\r\\n var result = win32StatPath(path),\\r\\n device = result.device,\\r\\n isUnc = result.isUnc,\\r\\n isAbsolute = result.isAbsolute,\\r\\n tail = result.tail,\\r\\n trailingSlash = /[\\\\\\\\\\\\/]$/.test(tail);\\r\\n\\r\\n // Normalize the tail path\\r\\n tail = normalizeArray(tail.split(/[\\\\\\\\\\\\/]+/), !isAbsolute).join('\\\\\\\\');\\r\\n\\r\\n if (!tail && !isAbsolute) {\\r\\n tail = '.';\\r\\n }\\r\\n if (tail && trailingSlash) {\\r\\n tail += '\\\\\\\\';\\r\\n }\\r\\n\\r\\n // Convert slashes to backslashes when `device` points to an UNC root.\\r\\n // Also squash multiple slashes into a single one where appropriate.\\r\\n if (isUnc) {\\r\\n device = normalizeUNCRoot(device);\\r\\n }\\r\\n\\r\\n return device + (isAbsolute ? '\\\\\\\\' : '') + tail;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.isAbsolute = function(path) {\\r\\n return win32StatPath(path).isAbsolute;\\r\\n};\\r\\n\\r\\nwin32.join = function() {\\r\\n var paths = [];\\r\\n for (var i = 0; i < arguments.length; i++) {\\r\\n var arg = arguments[i];\\r\\n if (!util.isString(arg)) {\\r\\n throw new TypeError('Arguments to path.join must be strings');\\r\\n }\\r\\n if (arg) {\\r\\n paths.push(arg);\\r\\n }\\r\\n }\\r\\n\\r\\n var joined = paths.join('\\\\\\\\');\\r\\n\\r\\n // Make sure that the joined path doesn't start with two slashes, because\\r\\n // normalize() will mistake it for an UNC path then.\\r\\n //\\r\\n // This step is skipped when it is very clear that the user actually\\r\\n // intended to point at an UNC path. This is assumed when the first\\r\\n // non-empty string arguments starts with exactly two slashes followed by\\r\\n // at least one more non-slash character.\\r\\n //\\r\\n // Note that for normalize() to treat a path as an UNC path it needs to\\r\\n // have at least 2 components, so we don't filter for that here.\\r\\n // This means that the user can use join to construct UNC paths from\\r\\n // a server name and a share name; for example:\\r\\n // path.join('//server', 'share') -> '\\\\\\\\\\\\\\\\server\\\\\\\\share\\\\')\\r\\n if (!/^[\\\\\\\\\\\\/]{2}[^\\\\\\\\\\\\/]/.test(paths[0])) {\\r\\n joined = joined.replace(/^[\\\\\\\\\\\\/]{2,}/, '\\\\\\\\');\\r\\n }\\r\\n\\r\\n return win32.normalize(joined);\\r\\n};\\r\\n\\r\\n\\r\\n// path.relative(from, to)\\r\\n// it will solve the relative path from 'from' to 'to', for instance:\\r\\n// from = 'C:\\\\\\\\orandea\\\\\\\\test\\\\\\\\aaa'\\r\\n// to = 'C:\\\\\\\\orandea\\\\\\\\impl\\\\\\\\bbb'\\r\\n// The output of the function should be: '..\\\\\\\\..\\\\\\\\impl\\\\\\\\bbb'\\r\\nwin32.relative = function(from, to) {\\r\\n from = win32.resolve(from);\\r\\n to = win32.resolve(to);\\r\\n\\r\\n // windows is not case sensitive\\r\\n var lowerFrom = from.toLowerCase();\\r\\n var lowerTo = to.toLowerCase();\\r\\n\\r\\n var toParts = trimArray(to.split('\\\\\\\\'));\\r\\n\\r\\n var lowerFromParts = trimArray(lowerFrom.split('\\\\\\\\'));\\r\\n var lowerToParts = trimArray(lowerTo.split('\\\\\\\\'));\\r\\n\\r\\n var length = Math.min(lowerFromParts.length, lowerToParts.length);\\r\\n var samePartsLength = length;\\r\\n for (var i = 0; i < length; i++) {\\r\\n if (lowerFromParts[i] !== lowerToParts[i]) {\\r\\n samePartsLength = i;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n if (samePartsLength == 0) {\\r\\n return to;\\r\\n }\\r\\n\\r\\n var outputParts = [];\\r\\n for (var i = samePartsLength; i < lowerFromParts.length; i++) {\\r\\n outputParts.push('..');\\r\\n }\\r\\n\\r\\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\\r\\n\\r\\n return outputParts.join('\\\\\\\\');\\r\\n};\\r\\n\\r\\n\\r\\nwin32._makeLong = function(path) {\\r\\n // Note: this will *probably* throw somewhere.\\r\\n if (!util.isString(path))\\r\\n return path;\\r\\n\\r\\n if (!path) {\\r\\n return '';\\r\\n }\\r\\n\\r\\n var resolvedPath = win32.resolve(path);\\r\\n\\r\\n if (/^[a-zA-Z]\\\\:\\\\\\\\/.test(resolvedPath)) {\\r\\n // path is local filesystem path, which needs to be converted\\r\\n // to long UNC path.\\r\\n return '\\\\\\\\\\\\\\\\?\\\\\\\\' + resolvedPath;\\r\\n } else if (/^\\\\\\\\\\\\\\\\[^?.]/.test(resolvedPath)) {\\r\\n // path is network UNC path, which needs to be converted\\r\\n // to long UNC path.\\r\\n return '\\\\\\\\\\\\\\\\?\\\\\\\\UNC\\\\\\\\' + resolvedPath.substring(2);\\r\\n }\\r\\n\\r\\n return path;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.dirname = function(path) {\\r\\n var result = win32SplitPath(path),\\r\\n root = result[0],\\r\\n dir = result[1];\\r\\n\\r\\n if (!root && !dir) {\\r\\n // No dirname whatsoever\\r\\n return '.';\\r\\n }\\r\\n\\r\\n if (dir) {\\r\\n // It has a dirname, strip trailing slash\\r\\n dir = dir.substr(0, dir.length - 1);\\r\\n }\\r\\n\\r\\n return root + dir;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.basename = function(path, ext) {\\r\\n var f = win32SplitPath(path)[2];\\r\\n // TODO: make this comparison case-insensitive on windows?\\r\\n if (ext && f.substr(-1 * ext.length) === ext) {\\r\\n f = f.substr(0, f.length - ext.length);\\r\\n }\\r\\n return f;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.extname = function(path) {\\r\\n return win32SplitPath(path)[3];\\r\\n};\\r\\n\\r\\n\\r\\nwin32.format = function(pathObject) {\\r\\n if (!util.isObject(pathObject)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathObject' must be an object, not \\\" + typeof pathObject\\r\\n );\\r\\n }\\r\\n\\r\\n var root = pathObject.root || '';\\r\\n\\r\\n if (!util.isString(root)) {\\r\\n throw new TypeError(\\r\\n \\\"'pathObject.root' must be a string or undefined, not \\\" +\\r\\n typeof pathObject.root\\r\\n );\\r\\n }\\r\\n\\r\\n var dir = pathObject.dir;\\r\\n var base = pathObject.base || '';\\r\\n if (!dir) {\\r\\n return base;\\r\\n }\\r\\n if (dir[dir.length - 1] === win32.sep) {\\r\\n return dir + base;\\r\\n }\\r\\n return dir + win32.sep + base;\\r\\n};\\r\\n\\r\\n\\r\\nwin32.parse = function(pathString) {\\r\\n if (!util.isString(pathString)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathString' must be a string, not \\\" + typeof pathString\\r\\n );\\r\\n }\\r\\n var allParts = win32SplitPath(pathString);\\r\\n if (!allParts || allParts.length !== 4) {\\r\\n throw new TypeError(\\\"Invalid path '\\\" + pathString + \\\"'\\\");\\r\\n }\\r\\n return {\\r\\n root: allParts[0],\\r\\n dir: allParts[0] + allParts[1].slice(0, -1),\\r\\n base: allParts[2],\\r\\n ext: allParts[3],\\r\\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\\r\\n };\\r\\n};\\r\\n\\r\\n\\r\\nwin32.sep = '\\\\\\\\';\\r\\nwin32.delimiter = ';';\\r\\n\\r\\n\\r\\n// Split a filename into [root, dir, basename, ext], unix version\\r\\n// 'root' is just a slash, or nothing.\\r\\nvar splitPathRe =\\r\\n /^(\\\\/?|)([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\/]+?|)(\\\\.[^.\\\\/]*|))(?:[\\\\/]*)$/;\\r\\nvar posix = {};\\r\\n\\r\\n\\r\\nfunction posixSplitPath(filename) {\\r\\n return splitPathRe.exec(filename).slice(1);\\r\\n}\\r\\n\\r\\n\\r\\n// path.resolve([from ...], to)\\r\\n// posix version\\r\\nposix.resolve = function() {\\r\\n var resolvedPath = '',\\r\\n resolvedAbsolute = false;\\r\\n\\r\\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\\r\\n var path = (i >= 0) ? arguments[i] : process.cwd();\\r\\n\\r\\n // Skip empty and invalid entries\\r\\n if (!util.isString(path)) {\\r\\n throw new TypeError('Arguments to path.resolve must be strings');\\r\\n } else if (!path) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n resolvedPath = path + '/' + resolvedPath;\\r\\n resolvedAbsolute = path[0] === '/';\\r\\n }\\r\\n\\r\\n // At this point the path should be resolved to a full absolute path, but\\r\\n // handle relative paths to be safe (might happen when process.cwd() fails)\\r\\n\\r\\n // Normalize the path\\r\\n resolvedPath = normalizeArray(resolvedPath.split('/'),\\r\\n !resolvedAbsolute).join('/');\\r\\n\\r\\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\\r\\n};\\r\\n\\r\\n// path.normalize(path)\\r\\n// posix version\\r\\nposix.normalize = function(path) {\\r\\n var isAbsolute = posix.isAbsolute(path),\\r\\n trailingSlash = path && path[path.length - 1] === '/';\\r\\n\\r\\n // Normalize the path\\r\\n path = normalizeArray(path.split('/'), !isAbsolute).join('/');\\r\\n\\r\\n if (!path && !isAbsolute) {\\r\\n path = '.';\\r\\n }\\r\\n if (path && trailingSlash) {\\r\\n path += '/';\\r\\n }\\r\\n\\r\\n return (isAbsolute ? '/' : '') + path;\\r\\n};\\r\\n\\r\\n// posix version\\r\\nposix.isAbsolute = function(path) {\\r\\n return path.charAt(0) === '/';\\r\\n};\\r\\n\\r\\n// posix version\\r\\nposix.join = function() {\\r\\n var path = '';\\r\\n for (var i = 0; i < arguments.length; i++) {\\r\\n var segment = arguments[i];\\r\\n if (!util.isString(segment)) {\\r\\n throw new TypeError('Arguments to path.join must be strings');\\r\\n }\\r\\n if (segment) {\\r\\n if (!path) {\\r\\n path += segment;\\r\\n } else {\\r\\n path += '/' + segment;\\r\\n }\\r\\n }\\r\\n }\\r\\n return posix.normalize(path);\\r\\n};\\r\\n\\r\\n\\r\\n// path.relative(from, to)\\r\\n// posix version\\r\\nposix.relative = function(from, to) {\\r\\n from = posix.resolve(from).substr(1);\\r\\n to = posix.resolve(to).substr(1);\\r\\n\\r\\n var fromParts = trimArray(from.split('/'));\\r\\n var toParts = trimArray(to.split('/'));\\r\\n\\r\\n var length = Math.min(fromParts.length, toParts.length);\\r\\n var samePartsLength = length;\\r\\n for (var i = 0; i < length; i++) {\\r\\n if (fromParts[i] !== toParts[i]) {\\r\\n samePartsLength = i;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n var outputParts = [];\\r\\n for (var i = samePartsLength; i < fromParts.length; i++) {\\r\\n outputParts.push('..');\\r\\n }\\r\\n\\r\\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\\r\\n\\r\\n return outputParts.join('/');\\r\\n};\\r\\n\\r\\n\\r\\nposix._makeLong = function(path) {\\r\\n return path;\\r\\n};\\r\\n\\r\\n\\r\\nposix.dirname = function(path) {\\r\\n var result = posixSplitPath(path),\\r\\n root = result[0],\\r\\n dir = result[1];\\r\\n\\r\\n if (!root && !dir) {\\r\\n // No dirname whatsoever\\r\\n return '.';\\r\\n }\\r\\n\\r\\n if (dir) {\\r\\n // It has a dirname, strip trailing slash\\r\\n dir = dir.substr(0, dir.length - 1);\\r\\n }\\r\\n\\r\\n return root + dir;\\r\\n};\\r\\n\\r\\n\\r\\nposix.basename = function(path, ext) {\\r\\n var f = posixSplitPath(path)[2];\\r\\n // TODO: make this comparison case-insensitive on windows?\\r\\n if (ext && f.substr(-1 * ext.length) === ext) {\\r\\n f = f.substr(0, f.length - ext.length);\\r\\n }\\r\\n return f;\\r\\n};\\r\\n\\r\\n\\r\\nposix.extname = function(path) {\\r\\n return posixSplitPath(path)[3];\\r\\n};\\r\\n\\r\\n\\r\\nposix.format = function(pathObject) {\\r\\n if (!util.isObject(pathObject)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathObject' must be an object, not \\\" + typeof pathObject\\r\\n );\\r\\n }\\r\\n\\r\\n var root = pathObject.root || '';\\r\\n\\r\\n if (!util.isString(root)) {\\r\\n throw new TypeError(\\r\\n \\\"'pathObject.root' must be a string or undefined, not \\\" +\\r\\n typeof pathObject.root\\r\\n );\\r\\n }\\r\\n\\r\\n var dir = pathObject.dir ? pathObject.dir + posix.sep : '';\\r\\n var base = pathObject.base || '';\\r\\n return dir + base;\\r\\n};\\r\\n\\r\\n\\r\\nposix.parse = function(pathString) {\\r\\n if (!util.isString(pathString)) {\\r\\n throw new TypeError(\\r\\n \\\"Parameter 'pathString' must be a string, not \\\" + typeof pathString\\r\\n );\\r\\n }\\r\\n var allParts = posixSplitPath(pathString);\\r\\n if (!allParts || allParts.length !== 4) {\\r\\n throw new TypeError(\\\"Invalid path '\\\" + pathString + \\\"'\\\");\\r\\n }\\r\\n allParts[1] = allParts[1] || '';\\r\\n allParts[2] = allParts[2] || '';\\r\\n allParts[3] = allParts[3] || '';\\r\\n\\r\\n return {\\r\\n root: allParts[0],\\r\\n dir: allParts[0] + allParts[1].slice(0, -1),\\r\\n base: allParts[2],\\r\\n ext: allParts[3],\\r\\n name: allParts[2].slice(0, allParts[2].length - allParts[3].length)\\r\\n };\\r\\n};\\r\\n\\r\\n\\r\\nposix.sep = '/';\\r\\nposix.delimiter = ':';\\r\\n\\r\\n\\r\\nif (isWindows)\\r\\n module.exports = win32;\\r\\nelse /* posix */\\r\\n module.exports = posix;\\r\\n\\r\\nmodule.exports.posix = posix;\\r\\nmodule.exports.win32 = win32;\\r\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/path/path.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/process/browser.js\":\n/*!*****************************************!*\\\n !*** ./node_modules/process/browser.js ***!\n \\*****************************************/\n/***/ ((module) => {\n\neval(\"// shim for using process in browser\\nvar process = module.exports = {};\\n\\n// cached from whatever global is present so that test runners that stub it\\n// don't break things. But we need to wrap it in a try catch in case it is\\n// wrapped in strict mode code which doesn't define any globals. It's inside a\\n// function because try/catches deoptimize in certain engines.\\n\\nvar cachedSetTimeout;\\nvar cachedClearTimeout;\\n\\nfunction defaultSetTimout() {\\n throw new Error('setTimeout has not been defined');\\n}\\nfunction defaultClearTimeout () {\\n throw new Error('clearTimeout has not been defined');\\n}\\n(function () {\\n try {\\n if (typeof setTimeout === 'function') {\\n cachedSetTimeout = setTimeout;\\n } else {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n } catch (e) {\\n cachedSetTimeout = defaultSetTimout;\\n }\\n try {\\n if (typeof clearTimeout === 'function') {\\n cachedClearTimeout = clearTimeout;\\n } else {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n } catch (e) {\\n cachedClearTimeout = defaultClearTimeout;\\n }\\n} ())\\nfunction runTimeout(fun) {\\n if (cachedSetTimeout === setTimeout) {\\n //normal enviroments in sane situations\\n return setTimeout(fun, 0);\\n }\\n // if setTimeout wasn't available but was latter defined\\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n cachedSetTimeout = setTimeout;\\n return setTimeout(fun, 0);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedSetTimeout(fun, 0);\\n } catch(e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedSetTimeout.call(null, fun, 0);\\n } catch(e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n return cachedSetTimeout.call(this, fun, 0);\\n }\\n }\\n\\n\\n}\\nfunction runClearTimeout(marker) {\\n if (cachedClearTimeout === clearTimeout) {\\n //normal enviroments in sane situations\\n return clearTimeout(marker);\\n }\\n // if clearTimeout wasn't available but was latter defined\\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n cachedClearTimeout = clearTimeout;\\n return clearTimeout(marker);\\n }\\n try {\\n // when when somebody has screwed with setTimeout but no I.E. maddness\\n return cachedClearTimeout(marker);\\n } catch (e){\\n try {\\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n return cachedClearTimeout.call(null, marker);\\n } catch (e){\\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n return cachedClearTimeout.call(this, marker);\\n }\\n }\\n\\n\\n\\n}\\nvar queue = [];\\nvar draining = false;\\nvar currentQueue;\\nvar queueIndex = -1;\\n\\nfunction cleanUpNextTick() {\\n if (!draining || !currentQueue) {\\n return;\\n }\\n draining = false;\\n if (currentQueue.length) {\\n queue = currentQueue.concat(queue);\\n } else {\\n queueIndex = -1;\\n }\\n if (queue.length) {\\n drainQueue();\\n }\\n}\\n\\nfunction drainQueue() {\\n if (draining) {\\n return;\\n }\\n var timeout = runTimeout(cleanUpNextTick);\\n draining = true;\\n\\n var len = queue.length;\\n while(len) {\\n currentQueue = queue;\\n queue = [];\\n while (++queueIndex < len) {\\n if (currentQueue) {\\n currentQueue[queueIndex].run();\\n }\\n }\\n queueIndex = -1;\\n len = queue.length;\\n }\\n currentQueue = null;\\n draining = false;\\n runClearTimeout(timeout);\\n}\\n\\nprocess.nextTick = function (fun) {\\n var args = new Array(arguments.length - 1);\\n if (arguments.length > 1) {\\n for (var i = 1; i < arguments.length; i++) {\\n args[i - 1] = arguments[i];\\n }\\n }\\n queue.push(new Item(fun, args));\\n if (queue.length === 1 && !draining) {\\n runTimeout(drainQueue);\\n }\\n};\\n\\n// v8 likes predictible objects\\nfunction Item(fun, array) {\\n this.fun = fun;\\n this.array = array;\\n}\\nItem.prototype.run = function () {\\n this.fun.apply(null, this.array);\\n};\\nprocess.title = 'browser';\\nprocess.browser = true;\\nprocess.env = {};\\nprocess.argv = [];\\nprocess.version = ''; // empty string to avoid regexp issues\\nprocess.versions = {};\\n\\nfunction noop() {}\\n\\nprocess.on = noop;\\nprocess.addListener = noop;\\nprocess.once = noop;\\nprocess.off = noop;\\nprocess.removeListener = noop;\\nprocess.removeAllListeners = noop;\\nprocess.emit = noop;\\nprocess.prependListener = noop;\\nprocess.prependOnceListener = noop;\\n\\nprocess.listeners = function (name) { return [] }\\n\\nprocess.binding = function (name) {\\n throw new Error('process.binding is not supported');\\n};\\n\\nprocess.cwd = function () { return '/' };\\nprocess.chdir = function (dir) {\\n throw new Error('process.chdir is not supported');\\n};\\nprocess.umask = function() { return 0; };\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/process/browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/react/cjs/react-jsx-runtime.development.js\":\n/*!*****************************************************************!*\\\n !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!\n \\*****************************************************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"/** @license React v17.0.2\\n * react-jsx-runtime.development.js\\n *\\n * Copyright (c) Facebook, Inc. and its affiliates.\\n *\\n * This source code is licensed under the MIT license found in the\\n * LICENSE file in the root directory of this source tree.\\n */\\n\\n\\n\\nif (true) {\\n (function() {\\n'use strict';\\n\\nvar React = __webpack_require__(/*! react */ \\\"react\\\");\\nvar _assign = __webpack_require__(/*! object-assign */ \\\"./node_modules/object-assign/index.js\\\");\\n\\n// ATTENTION\\n// When adding new symbols to this file,\\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\\n// nor polyfill, then a plain number is used for performance.\\nvar REACT_ELEMENT_TYPE = 0xeac7;\\nvar REACT_PORTAL_TYPE = 0xeaca;\\nexports.Fragment = 0xeacb;\\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\\nvar REACT_PROFILER_TYPE = 0xead2;\\nvar REACT_PROVIDER_TYPE = 0xeacd;\\nvar REACT_CONTEXT_TYPE = 0xeace;\\nvar REACT_FORWARD_REF_TYPE = 0xead0;\\nvar REACT_SUSPENSE_TYPE = 0xead1;\\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\\nvar REACT_MEMO_TYPE = 0xead3;\\nvar REACT_LAZY_TYPE = 0xead4;\\nvar REACT_BLOCK_TYPE = 0xead9;\\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\\nvar REACT_SCOPE_TYPE = 0xead7;\\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\\n\\nif (typeof Symbol === 'function' && Symbol.for) {\\n var symbolFor = Symbol.for;\\n REACT_ELEMENT_TYPE = symbolFor('react.element');\\n REACT_PORTAL_TYPE = symbolFor('react.portal');\\n exports.Fragment = symbolFor('react.fragment');\\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\\n REACT_CONTEXT_TYPE = symbolFor('react.context');\\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\\n REACT_MEMO_TYPE = symbolFor('react.memo');\\n REACT_LAZY_TYPE = symbolFor('react.lazy');\\n REACT_BLOCK_TYPE = symbolFor('react.block');\\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\\n REACT_SCOPE_TYPE = symbolFor('react.scope');\\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\\n}\\n\\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\\nfunction getIteratorFn(maybeIterable) {\\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\\n return null;\\n }\\n\\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\\n\\n if (typeof maybeIterator === 'function') {\\n return maybeIterator;\\n }\\n\\n return null;\\n}\\n\\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\\n\\nfunction error(format) {\\n {\\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n args[_key2 - 1] = arguments[_key2];\\n }\\n\\n printWarning('error', format, args);\\n }\\n}\\n\\nfunction printWarning(level, format, args) {\\n // When changing this logic, you might want to also\\n // update consoleWithStackDev.www.js as well.\\n {\\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\\n var stack = ReactDebugCurrentFrame.getStackAddendum();\\n\\n if (stack !== '') {\\n format += '%s';\\n args = args.concat([stack]);\\n }\\n\\n var argsWithFormat = args.map(function (item) {\\n return '' + item;\\n }); // Careful: RN currently depends on this prefix\\n\\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\\n // breaks IE9: https://github.com/facebook/react/issues/13610\\n // eslint-disable-next-line react-internal/no-production-logging\\n\\n Function.prototype.apply.call(console[level], console, argsWithFormat);\\n }\\n}\\n\\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\\n\\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\\n\\nfunction isValidElementType(type) {\\n if (typeof type === 'string' || typeof type === 'function') {\\n return true;\\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\\n\\n\\n if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\\n return true;\\n }\\n\\n if (typeof type === 'object' && type !== null) {\\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {\\n return true;\\n }\\n }\\n\\n return false;\\n}\\n\\nfunction getWrappedName(outerType, innerType, wrapperName) {\\n var functionName = innerType.displayName || innerType.name || '';\\n return outerType.displayName || (functionName !== '' ? wrapperName + \\\"(\\\" + functionName + \\\")\\\" : wrapperName);\\n}\\n\\nfunction getContextName(type) {\\n return type.displayName || 'Context';\\n}\\n\\nfunction getComponentName(type) {\\n if (type == null) {\\n // Host root, text node or just invalid type.\\n return null;\\n }\\n\\n {\\n if (typeof type.tag === 'number') {\\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\\n }\\n }\\n\\n if (typeof type === 'function') {\\n return type.displayName || type.name || null;\\n }\\n\\n if (typeof type === 'string') {\\n return type;\\n }\\n\\n switch (type) {\\n case exports.Fragment:\\n return 'Fragment';\\n\\n case REACT_PORTAL_TYPE:\\n return 'Portal';\\n\\n case REACT_PROFILER_TYPE:\\n return 'Profiler';\\n\\n case REACT_STRICT_MODE_TYPE:\\n return 'StrictMode';\\n\\n case REACT_SUSPENSE_TYPE:\\n return 'Suspense';\\n\\n case REACT_SUSPENSE_LIST_TYPE:\\n return 'SuspenseList';\\n }\\n\\n if (typeof type === 'object') {\\n switch (type.$$typeof) {\\n case REACT_CONTEXT_TYPE:\\n var context = type;\\n return getContextName(context) + '.Consumer';\\n\\n case REACT_PROVIDER_TYPE:\\n var provider = type;\\n return getContextName(provider._context) + '.Provider';\\n\\n case REACT_FORWARD_REF_TYPE:\\n return getWrappedName(type, type.render, 'ForwardRef');\\n\\n case REACT_MEMO_TYPE:\\n return getComponentName(type.type);\\n\\n case REACT_BLOCK_TYPE:\\n return getComponentName(type._render);\\n\\n case REACT_LAZY_TYPE:\\n {\\n var lazyComponent = type;\\n var payload = lazyComponent._payload;\\n var init = lazyComponent._init;\\n\\n try {\\n return getComponentName(init(payload));\\n } catch (x) {\\n return null;\\n }\\n }\\n }\\n }\\n\\n return null;\\n}\\n\\n// Helpers to patch console.logs to avoid logging during side-effect free\\n// replaying on render function. This currently only patches the object\\n// lazily which won't cover if the log function was extracted eagerly.\\n// We could also eagerly patch the method.\\nvar disabledDepth = 0;\\nvar prevLog;\\nvar prevInfo;\\nvar prevWarn;\\nvar prevError;\\nvar prevGroup;\\nvar prevGroupCollapsed;\\nvar prevGroupEnd;\\n\\nfunction disabledLog() {}\\n\\ndisabledLog.__reactDisabledLog = true;\\nfunction disableLogs() {\\n {\\n if (disabledDepth === 0) {\\n /* eslint-disable react-internal/no-production-logging */\\n prevLog = console.log;\\n prevInfo = console.info;\\n prevWarn = console.warn;\\n prevError = console.error;\\n prevGroup = console.group;\\n prevGroupCollapsed = console.groupCollapsed;\\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\\n\\n var props = {\\n configurable: true,\\n enumerable: true,\\n value: disabledLog,\\n writable: true\\n }; // $FlowFixMe Flow thinks console is immutable.\\n\\n Object.defineProperties(console, {\\n info: props,\\n log: props,\\n warn: props,\\n error: props,\\n group: props,\\n groupCollapsed: props,\\n groupEnd: props\\n });\\n /* eslint-enable react-internal/no-production-logging */\\n }\\n\\n disabledDepth++;\\n }\\n}\\nfunction reenableLogs() {\\n {\\n disabledDepth--;\\n\\n if (disabledDepth === 0) {\\n /* eslint-disable react-internal/no-production-logging */\\n var props = {\\n configurable: true,\\n enumerable: true,\\n writable: true\\n }; // $FlowFixMe Flow thinks console is immutable.\\n\\n Object.defineProperties(console, {\\n log: _assign({}, props, {\\n value: prevLog\\n }),\\n info: _assign({}, props, {\\n value: prevInfo\\n }),\\n warn: _assign({}, props, {\\n value: prevWarn\\n }),\\n error: _assign({}, props, {\\n value: prevError\\n }),\\n group: _assign({}, props, {\\n value: prevGroup\\n }),\\n groupCollapsed: _assign({}, props, {\\n value: prevGroupCollapsed\\n }),\\n groupEnd: _assign({}, props, {\\n value: prevGroupEnd\\n })\\n });\\n /* eslint-enable react-internal/no-production-logging */\\n }\\n\\n if (disabledDepth < 0) {\\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\\n }\\n }\\n}\\n\\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\\nvar prefix;\\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\\n {\\n if (prefix === undefined) {\\n // Extract the VM specific prefix used by each line.\\n try {\\n throw Error();\\n } catch (x) {\\n var match = x.stack.trim().match(/\\\\n( *(at )?)/);\\n prefix = match && match[1] || '';\\n }\\n } // We use the prefix to ensure our stacks line up with native stack frames.\\n\\n\\n return '\\\\n' + prefix + name;\\n }\\n}\\nvar reentry = false;\\nvar componentFrameCache;\\n\\n{\\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\\n componentFrameCache = new PossiblyWeakMap();\\n}\\n\\nfunction describeNativeComponentFrame(fn, construct) {\\n // If something asked for a stack inside a fake render, it should get ignored.\\n if (!fn || reentry) {\\n return '';\\n }\\n\\n {\\n var frame = componentFrameCache.get(fn);\\n\\n if (frame !== undefined) {\\n return frame;\\n }\\n }\\n\\n var control;\\n reentry = true;\\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\\n\\n Error.prepareStackTrace = undefined;\\n var previousDispatcher;\\n\\n {\\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\\n // for warnings.\\n\\n ReactCurrentDispatcher.current = null;\\n disableLogs();\\n }\\n\\n try {\\n // This should throw.\\n if (construct) {\\n // Something should be setting the props in the constructor.\\n var Fake = function () {\\n throw Error();\\n }; // $FlowFixMe\\n\\n\\n Object.defineProperty(Fake.prototype, 'props', {\\n set: function () {\\n // We use a throwing setter instead of frozen or non-writable props\\n // because that won't throw in a non-strict mode function.\\n throw Error();\\n }\\n });\\n\\n if (typeof Reflect === 'object' && Reflect.construct) {\\n // We construct a different control for this case to include any extra\\n // frames added by the construct call.\\n try {\\n Reflect.construct(Fake, []);\\n } catch (x) {\\n control = x;\\n }\\n\\n Reflect.construct(fn, [], Fake);\\n } else {\\n try {\\n Fake.call();\\n } catch (x) {\\n control = x;\\n }\\n\\n fn.call(Fake.prototype);\\n }\\n } else {\\n try {\\n throw Error();\\n } catch (x) {\\n control = x;\\n }\\n\\n fn();\\n }\\n } catch (sample) {\\n // This is inlined manually because closure doesn't do it for us.\\n if (sample && control && typeof sample.stack === 'string') {\\n // This extracts the first frame from the sample that isn't also in the control.\\n // Skipping one frame that we assume is the frame that calls the two.\\n var sampleLines = sample.stack.split('\\\\n');\\n var controlLines = control.stack.split('\\\\n');\\n var s = sampleLines.length - 1;\\n var c = controlLines.length - 1;\\n\\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\\n // We expect at least one stack frame to be shared.\\n // Typically this will be the root most one. However, stack frames may be\\n // cut off due to maximum stack limits. In this case, one maybe cut off\\n // earlier than the other. We assume that the sample is longer or the same\\n // and there for cut off earlier. So we should find the root most frame in\\n // the sample somewhere in the control.\\n c--;\\n }\\n\\n for (; s >= 1 && c >= 0; s--, c--) {\\n // Next we find the first one that isn't the same which should be the\\n // frame that called our sample function and the control.\\n if (sampleLines[s] !== controlLines[c]) {\\n // In V8, the first line is describing the message but other VMs don't.\\n // If we're about to return the first line, and the control is also on the same\\n // line, that's a pretty good indicator that our sample threw at same line as\\n // the control. I.e. before we entered the sample frame. So we ignore this result.\\n // This can happen if you passed a class to function component, or non-function.\\n if (s !== 1 || c !== 1) {\\n do {\\n s--;\\n c--; // We may still have similar intermediate frames from the construct call.\\n // The next one that isn't the same should be our match though.\\n\\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\\n // V8 adds a \\\"new\\\" prefix for native classes. Let's remove it to make it prettier.\\n var _frame = '\\\\n' + sampleLines[s].replace(' at new ', ' at ');\\n\\n {\\n if (typeof fn === 'function') {\\n componentFrameCache.set(fn, _frame);\\n }\\n } // Return the line we found.\\n\\n\\n return _frame;\\n }\\n } while (s >= 1 && c >= 0);\\n }\\n\\n break;\\n }\\n }\\n }\\n } finally {\\n reentry = false;\\n\\n {\\n ReactCurrentDispatcher.current = previousDispatcher;\\n reenableLogs();\\n }\\n\\n Error.prepareStackTrace = previousPrepareStackTrace;\\n } // Fallback to just using the name if we couldn't make it throw.\\n\\n\\n var name = fn ? fn.displayName || fn.name : '';\\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\\n\\n {\\n if (typeof fn === 'function') {\\n componentFrameCache.set(fn, syntheticFrame);\\n }\\n }\\n\\n return syntheticFrame;\\n}\\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\\n {\\n return describeNativeComponentFrame(fn, false);\\n }\\n}\\n\\nfunction shouldConstruct(Component) {\\n var prototype = Component.prototype;\\n return !!(prototype && prototype.isReactComponent);\\n}\\n\\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\\n\\n if (type == null) {\\n return '';\\n }\\n\\n if (typeof type === 'function') {\\n {\\n return describeNativeComponentFrame(type, shouldConstruct(type));\\n }\\n }\\n\\n if (typeof type === 'string') {\\n return describeBuiltInComponentFrame(type);\\n }\\n\\n switch (type) {\\n case REACT_SUSPENSE_TYPE:\\n return describeBuiltInComponentFrame('Suspense');\\n\\n case REACT_SUSPENSE_LIST_TYPE:\\n return describeBuiltInComponentFrame('SuspenseList');\\n }\\n\\n if (typeof type === 'object') {\\n switch (type.$$typeof) {\\n case REACT_FORWARD_REF_TYPE:\\n return describeFunctionComponentFrame(type.render);\\n\\n case REACT_MEMO_TYPE:\\n // Memo may contain any component type so we recursively resolve it.\\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\\n\\n case REACT_BLOCK_TYPE:\\n return describeFunctionComponentFrame(type._render);\\n\\n case REACT_LAZY_TYPE:\\n {\\n var lazyComponent = type;\\n var payload = lazyComponent._payload;\\n var init = lazyComponent._init;\\n\\n try {\\n // Lazy may contain any component type so we recursively resolve it.\\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\\n } catch (x) {}\\n }\\n }\\n }\\n\\n return '';\\n}\\n\\nvar loggedTypeFailures = {};\\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\\n\\nfunction setCurrentlyValidatingElement(element) {\\n {\\n if (element) {\\n var owner = element._owner;\\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\\n } else {\\n ReactDebugCurrentFrame.setExtraStackFrame(null);\\n }\\n }\\n}\\n\\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\\n {\\n // $FlowFixMe This is okay but Flow doesn't know it.\\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\\n\\n for (var typeSpecName in typeSpecs) {\\n if (has(typeSpecs, typeSpecName)) {\\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\\n // fail the render phase where it didn't fail before. So we log it.\\n // After these have been cleaned up, we'll let them throw.\\n\\n try {\\n // This is intentionally an invariant that gets caught. It's the same\\n // behavior as without this statement except with a better message.\\n if (typeof typeSpecs[typeSpecName] !== 'function') {\\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\\n err.name = 'Invariant Violation';\\n throw err;\\n }\\n\\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\\n } catch (ex) {\\n error$1 = ex;\\n }\\n\\n if (error$1 && !(error$1 instanceof Error)) {\\n setCurrentlyValidatingElement(element);\\n\\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\\n\\n setCurrentlyValidatingElement(null);\\n }\\n\\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\\n // Only monitor this failure once because there tends to be a lot of the\\n // same error.\\n loggedTypeFailures[error$1.message] = true;\\n setCurrentlyValidatingElement(element);\\n\\n error('Failed %s type: %s', location, error$1.message);\\n\\n setCurrentlyValidatingElement(null);\\n }\\n }\\n }\\n }\\n}\\n\\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nvar RESERVED_PROPS = {\\n key: true,\\n ref: true,\\n __self: true,\\n __source: true\\n};\\nvar specialPropKeyWarningShown;\\nvar specialPropRefWarningShown;\\nvar didWarnAboutStringRefs;\\n\\n{\\n didWarnAboutStringRefs = {};\\n}\\n\\nfunction hasValidRef(config) {\\n {\\n if (hasOwnProperty.call(config, 'ref')) {\\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\\n\\n if (getter && getter.isReactWarning) {\\n return false;\\n }\\n }\\n }\\n\\n return config.ref !== undefined;\\n}\\n\\nfunction hasValidKey(config) {\\n {\\n if (hasOwnProperty.call(config, 'key')) {\\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\\n\\n if (getter && getter.isReactWarning) {\\n return false;\\n }\\n }\\n }\\n\\n return config.key !== undefined;\\n}\\n\\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\\n {\\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\\n var componentName = getComponentName(ReactCurrentOwner.current.type);\\n\\n if (!didWarnAboutStringRefs[componentName]) {\\n error('Component \\\"%s\\\" contains the string ref \\\"%s\\\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);\\n\\n didWarnAboutStringRefs[componentName] = true;\\n }\\n }\\n }\\n}\\n\\nfunction defineKeyPropWarningGetter(props, displayName) {\\n {\\n var warnAboutAccessingKey = function () {\\n if (!specialPropKeyWarningShown) {\\n specialPropKeyWarningShown = true;\\n\\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\\n }\\n };\\n\\n warnAboutAccessingKey.isReactWarning = true;\\n Object.defineProperty(props, 'key', {\\n get: warnAboutAccessingKey,\\n configurable: true\\n });\\n }\\n}\\n\\nfunction defineRefPropWarningGetter(props, displayName) {\\n {\\n var warnAboutAccessingRef = function () {\\n if (!specialPropRefWarningShown) {\\n specialPropRefWarningShown = true;\\n\\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\\n }\\n };\\n\\n warnAboutAccessingRef.isReactWarning = true;\\n Object.defineProperty(props, 'ref', {\\n get: warnAboutAccessingRef,\\n configurable: true\\n });\\n }\\n}\\n/**\\n * Factory method to create a new React element. This no longer adheres to\\n * the class pattern, so do not use new to call it. Also, instanceof check\\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\\n * if something is a React Element.\\n *\\n * @param {*} type\\n * @param {*} props\\n * @param {*} key\\n * @param {string|object} ref\\n * @param {*} owner\\n * @param {*} self A *temporary* helper to detect places where `this` is\\n * different from the `owner` when React.createElement is called, so that we\\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\\n * functions, and as long as `this` and owner are the same, there will be no\\n * change in behavior.\\n * @param {*} source An annotation object (added by a transpiler or otherwise)\\n * indicating filename, line number, and/or other information.\\n * @internal\\n */\\n\\n\\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\\n var element = {\\n // This tag allows us to uniquely identify this as a React Element\\n $$typeof: REACT_ELEMENT_TYPE,\\n // Built-in properties that belong on the element\\n type: type,\\n key: key,\\n ref: ref,\\n props: props,\\n // Record the component responsible for creating this element.\\n _owner: owner\\n };\\n\\n {\\n // The validation flag is currently mutative. We put it on\\n // an external backing store so that we can freeze the whole object.\\n // This can be replaced with a WeakMap once they are implemented in\\n // commonly used development environments.\\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\\n // the validation flag non-enumerable (where possible, which should\\n // include every environment we run tests in), so the test framework\\n // ignores it.\\n\\n Object.defineProperty(element._store, 'validated', {\\n configurable: false,\\n enumerable: false,\\n writable: true,\\n value: false\\n }); // self and source are DEV only properties.\\n\\n Object.defineProperty(element, '_self', {\\n configurable: false,\\n enumerable: false,\\n writable: false,\\n value: self\\n }); // Two elements created in two different places should be considered\\n // equal for testing purposes and therefore we hide it from enumeration.\\n\\n Object.defineProperty(element, '_source', {\\n configurable: false,\\n enumerable: false,\\n writable: false,\\n value: source\\n });\\n\\n if (Object.freeze) {\\n Object.freeze(element.props);\\n Object.freeze(element);\\n }\\n }\\n\\n return element;\\n};\\n/**\\n * https://github.com/reactjs/rfcs/pull/107\\n * @param {*} type\\n * @param {object} props\\n * @param {string} key\\n */\\n\\nfunction jsxDEV(type, config, maybeKey, source, self) {\\n {\\n var propName; // Reserved names are extracted\\n\\n var props = {};\\n var key = null;\\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\\n // issue if key is also explicitly declared (ie.
\\n // or
). We want to deprecate key spread,\\n // but as an intermediary step, we will use jsxDEV for everything except\\n //
, because we aren't currently able to tell if\\n // key is explicitly declared to be undefined or not.\\n\\n if (maybeKey !== undefined) {\\n key = '' + maybeKey;\\n }\\n\\n if (hasValidKey(config)) {\\n key = '' + config.key;\\n }\\n\\n if (hasValidRef(config)) {\\n ref = config.ref;\\n warnIfStringRefCannotBeAutoConverted(config, self);\\n } // Remaining properties are added to a new props object\\n\\n\\n for (propName in config) {\\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\\n props[propName] = config[propName];\\n }\\n } // Resolve default props\\n\\n\\n if (type && type.defaultProps) {\\n var defaultProps = type.defaultProps;\\n\\n for (propName in defaultProps) {\\n if (props[propName] === undefined) {\\n props[propName] = defaultProps[propName];\\n }\\n }\\n }\\n\\n if (key || ref) {\\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\\n\\n if (key) {\\n defineKeyPropWarningGetter(props, displayName);\\n }\\n\\n if (ref) {\\n defineRefPropWarningGetter(props, displayName);\\n }\\n }\\n\\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\\n }\\n}\\n\\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\\n\\nfunction setCurrentlyValidatingElement$1(element) {\\n {\\n if (element) {\\n var owner = element._owner;\\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\\n } else {\\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\\n }\\n }\\n}\\n\\nvar propTypesMisspellWarningShown;\\n\\n{\\n propTypesMisspellWarningShown = false;\\n}\\n/**\\n * Verifies the object is a ReactElement.\\n * See https://reactjs.org/docs/react-api.html#isvalidelement\\n * @param {?object} object\\n * @return {boolean} True if `object` is a ReactElement.\\n * @final\\n */\\n\\nfunction isValidElement(object) {\\n {\\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\\n }\\n}\\n\\nfunction getDeclarationErrorAddendum() {\\n {\\n if (ReactCurrentOwner$1.current) {\\n var name = getComponentName(ReactCurrentOwner$1.current.type);\\n\\n if (name) {\\n return '\\\\n\\\\nCheck the render method of `' + name + '`.';\\n }\\n }\\n\\n return '';\\n }\\n}\\n\\nfunction getSourceInfoErrorAddendum(source) {\\n {\\n if (source !== undefined) {\\n var fileName = source.fileName.replace(/^.*[\\\\\\\\\\\\/]/, '');\\n var lineNumber = source.lineNumber;\\n return '\\\\n\\\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\\n }\\n\\n return '';\\n }\\n}\\n/**\\n * Warn if there's no key explicitly set on dynamic arrays of children or\\n * object keys are not valid. This allows us to keep track of children between\\n * updates.\\n */\\n\\n\\nvar ownerHasKeyUseWarning = {};\\n\\nfunction getCurrentComponentErrorInfo(parentType) {\\n {\\n var info = getDeclarationErrorAddendum();\\n\\n if (!info) {\\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\\n\\n if (parentName) {\\n info = \\\"\\\\n\\\\nCheck the top-level render call using <\\\" + parentName + \\\">.\\\";\\n }\\n }\\n\\n return info;\\n }\\n}\\n/**\\n * Warn if the element doesn't have an explicit key assigned to it.\\n * This element is in an array. The array could grow and shrink or be\\n * reordered. All children that haven't already been validated are required to\\n * have a \\\"key\\\" property assigned to it. Error statuses are cached so a warning\\n * will only be shown once.\\n *\\n * @internal\\n * @param {ReactElement} element Element that requires a key.\\n * @param {*} parentType element's parent's type.\\n */\\n\\n\\nfunction validateExplicitKey(element, parentType) {\\n {\\n if (!element._store || element._store.validated || element.key != null) {\\n return;\\n }\\n\\n element._store.validated = true;\\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\\n\\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\\n return;\\n }\\n\\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\\n // property, it may be the creator of the child that's responsible for\\n // assigning it a key.\\n\\n var childOwner = '';\\n\\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\\n // Give the component that originally created this child.\\n childOwner = \\\" It was passed a child from \\\" + getComponentName(element._owner.type) + \\\".\\\";\\n }\\n\\n setCurrentlyValidatingElement$1(element);\\n\\n error('Each child in a list should have a unique \\\"key\\\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\\n\\n setCurrentlyValidatingElement$1(null);\\n }\\n}\\n/**\\n * Ensure that every element either is passed in a static location, in an\\n * array with an explicit keys property defined, or in an object literal\\n * with valid key property.\\n *\\n * @internal\\n * @param {ReactNode} node Statically passed child of any type.\\n * @param {*} parentType node's parent's type.\\n */\\n\\n\\nfunction validateChildKeys(node, parentType) {\\n {\\n if (typeof node !== 'object') {\\n return;\\n }\\n\\n if (Array.isArray(node)) {\\n for (var i = 0; i < node.length; i++) {\\n var child = node[i];\\n\\n if (isValidElement(child)) {\\n validateExplicitKey(child, parentType);\\n }\\n }\\n } else if (isValidElement(node)) {\\n // This element was passed in a valid location.\\n if (node._store) {\\n node._store.validated = true;\\n }\\n } else if (node) {\\n var iteratorFn = getIteratorFn(node);\\n\\n if (typeof iteratorFn === 'function') {\\n // Entry iterators used to provide implicit keys,\\n // but now we print a separate warning for them later.\\n if (iteratorFn !== node.entries) {\\n var iterator = iteratorFn.call(node);\\n var step;\\n\\n while (!(step = iterator.next()).done) {\\n if (isValidElement(step.value)) {\\n validateExplicitKey(step.value, parentType);\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n/**\\n * Given an element, validate that its props follow the propTypes definition,\\n * provided by the type.\\n *\\n * @param {ReactElement} element\\n */\\n\\n\\nfunction validatePropTypes(element) {\\n {\\n var type = element.type;\\n\\n if (type === null || type === undefined || typeof type === 'string') {\\n return;\\n }\\n\\n var propTypes;\\n\\n if (typeof type === 'function') {\\n propTypes = type.propTypes;\\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\\n // Inner props are checked in the reconciler.\\n type.$$typeof === REACT_MEMO_TYPE)) {\\n propTypes = type.propTypes;\\n } else {\\n return;\\n }\\n\\n if (propTypes) {\\n // Intentionally inside to avoid triggering lazy initializers:\\n var name = getComponentName(type);\\n checkPropTypes(propTypes, element.props, 'prop', name, element);\\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\\n\\n var _name = getComponentName(type);\\n\\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\\n }\\n\\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\\n }\\n }\\n}\\n/**\\n * Given a fragment, validate that it can only be provided with fragment props\\n * @param {ReactElement} fragment\\n */\\n\\n\\nfunction validateFragmentProps(fragment) {\\n {\\n var keys = Object.keys(fragment.props);\\n\\n for (var i = 0; i < keys.length; i++) {\\n var key = keys[i];\\n\\n if (key !== 'children' && key !== 'key') {\\n setCurrentlyValidatingElement$1(fragment);\\n\\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\\n\\n setCurrentlyValidatingElement$1(null);\\n break;\\n }\\n }\\n\\n if (fragment.ref !== null) {\\n setCurrentlyValidatingElement$1(fragment);\\n\\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\\n\\n setCurrentlyValidatingElement$1(null);\\n }\\n }\\n}\\n\\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\\n {\\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\\n // succeed and there will likely be errors in render.\\n\\n if (!validType) {\\n var info = '';\\n\\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\\n info += ' You likely forgot to export your component from the file ' + \\\"it's defined in, or you might have mixed up default and named imports.\\\";\\n }\\n\\n var sourceInfo = getSourceInfoErrorAddendum(source);\\n\\n if (sourceInfo) {\\n info += sourceInfo;\\n } else {\\n info += getDeclarationErrorAddendum();\\n }\\n\\n var typeString;\\n\\n if (type === null) {\\n typeString = 'null';\\n } else if (Array.isArray(type)) {\\n typeString = 'array';\\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\\n typeString = \\\"<\\\" + (getComponentName(type.type) || 'Unknown') + \\\" />\\\";\\n info = ' Did you accidentally export a JSX literal instead of a component?';\\n } else {\\n typeString = typeof type;\\n }\\n\\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\\n }\\n\\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\\n // TODO: Drop this when these are no longer allowed as the type argument.\\n\\n if (element == null) {\\n return element;\\n } // Skip key warning if the type isn't valid since our key validation logic\\n // doesn't expect a non-string/function type and can throw confusing errors.\\n // We don't want exception behavior to differ between dev and prod.\\n // (Rendering will throw with a helpful message and as soon as the type is\\n // fixed, the key warnings will appear.)\\n\\n\\n if (validType) {\\n var children = props.children;\\n\\n if (children !== undefined) {\\n if (isStaticChildren) {\\n if (Array.isArray(children)) {\\n for (var i = 0; i < children.length; i++) {\\n validateChildKeys(children[i], type);\\n }\\n\\n if (Object.freeze) {\\n Object.freeze(children);\\n }\\n } else {\\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\\n }\\n } else {\\n validateChildKeys(children, type);\\n }\\n }\\n }\\n\\n if (type === exports.Fragment) {\\n validateFragmentProps(element);\\n } else {\\n validatePropTypes(element);\\n }\\n\\n return element;\\n }\\n} // These two functions exist to still get child warnings in dev\\n// even with the prod transform. This means that jsxDEV is purely\\n// opt-in behavior for better messages but that we won't stop\\n// giving you warnings if you use production apis.\\n\\nfunction jsxWithValidationStatic(type, props, key) {\\n {\\n return jsxWithValidation(type, props, key, true);\\n }\\n}\\nfunction jsxWithValidationDynamic(type, props, key) {\\n {\\n return jsxWithValidation(type, props, key, false);\\n }\\n}\\n\\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\\n// for now we can ship identical prod functions\\n\\nvar jsxs = jsxWithValidationStatic ;\\n\\nexports.jsx = jsx;\\nexports.jsxs = jsxs;\\n })();\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/react/cjs/react-jsx-runtime.development.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/react/jsx-runtime.js\":\n/*!*******************************************!*\\\n !*** ./node_modules/react/jsx-runtime.js ***!\n \\*******************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\nif (false) {} else {\\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ \\\"./node_modules/react/cjs/react-jsx-runtime.development.js\\\");\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/react/jsx-runtime.js?\");\n\n/***/ }),\n\n/***/ \"./src/components/button/index.less\":\n/*!******************************************!*\\\n !*** ./src/components/button/index.less ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/button/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/index.less\":\n/*!********************************************!*\\\n !*** ./src/components/filelist/index.less ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/filelist/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/index.less\":\n/*!*****************************************!*\\\n !*** ./src/components/icons/index.less ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/icons/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/modal/index.less\":\n/*!*****************************************!*\\\n !*** ./src/components/modal/index.less ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/modal/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/index.less\":\n/*!*********************************************!*\\\n !*** ./src/components/openedtab/index.less ***!\n \\*********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/openedtab/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/prettier/index.less\":\n/*!********************************************!*\\\n !*** ./src/components/prettier/index.less ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/prettier/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/index.less\":\n/*!******************************************!*\\\n !*** ./src/components/select/index.less ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/components/select/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/multi/index.less\":\n/*!******************************!*\\\n !*** ./src/multi/index.less ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/multi/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.less?\");\n\n/***/ }),\n\n/***/ \"./src/single/index.less\":\n/*!*******************************!*\\\n !*** ./src/single/index.less ***!\n \\*******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \\\"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \\\"./node_modules/style-loader/dist/runtime/styleDomAPI.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \\\"./node_modules/style-loader/dist/runtime/insertBySelector.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \\\"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \\\"./node_modules/style-loader/dist/runtime/insertStyleElement.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \\\"./node_modules/style-loader/dist/runtime/styleTagTransform.js\\\");\\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../node_modules/css-loader/dist/cjs.js!../../node_modules/less-loader/dist/cjs.js!./index.less */ \\\"./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/single/index.less\\\");\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\nvar options = {};\\n\\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\\n\\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \\\"head\\\");\\n \\noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\\n\\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], options);\\n\\n\\n\\n\\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"] && _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_less_loader_dist_cjs_js_index_less__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"].locals : undefined);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.less?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\":\n/*!****************************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!\n \\****************************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nvar stylesInDOM = [];\\n\\nfunction getIndexByIdentifier(identifier) {\\n var result = -1;\\n\\n for (var i = 0; i < stylesInDOM.length; i++) {\\n if (stylesInDOM[i].identifier === identifier) {\\n result = i;\\n break;\\n }\\n }\\n\\n return result;\\n}\\n\\nfunction modulesToDom(list, options) {\\n var idCountMap = {};\\n var identifiers = [];\\n\\n for (var i = 0; i < list.length; i++) {\\n var item = list[i];\\n var id = options.base ? item[0] + options.base : item[0];\\n var count = idCountMap[id] || 0;\\n var identifier = \\\"\\\".concat(id, \\\" \\\").concat(count);\\n idCountMap[id] = count + 1;\\n var indexByIdentifier = getIndexByIdentifier(identifier);\\n var obj = {\\n css: item[1],\\n media: item[2],\\n sourceMap: item[3],\\n supports: item[4],\\n layer: item[5]\\n };\\n\\n if (indexByIdentifier !== -1) {\\n stylesInDOM[indexByIdentifier].references++;\\n stylesInDOM[indexByIdentifier].updater(obj);\\n } else {\\n var updater = addElementStyle(obj, options);\\n options.byIndex = i;\\n stylesInDOM.splice(i, 0, {\\n identifier: identifier,\\n updater: updater,\\n references: 1\\n });\\n }\\n\\n identifiers.push(identifier);\\n }\\n\\n return identifiers;\\n}\\n\\nfunction addElementStyle(obj, options) {\\n var api = options.domAPI(options);\\n api.update(obj);\\n\\n var updater = function updater(newObj) {\\n if (newObj) {\\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\\n return;\\n }\\n\\n api.update(obj = newObj);\\n } else {\\n api.remove();\\n }\\n };\\n\\n return updater;\\n}\\n\\nmodule.exports = function (list, options) {\\n options = options || {};\\n list = list || [];\\n var lastIdentifiers = modulesToDom(list, options);\\n return function update(newList) {\\n newList = newList || [];\\n\\n for (var i = 0; i < lastIdentifiers.length; i++) {\\n var identifier = lastIdentifiers[i];\\n var index = getIndexByIdentifier(identifier);\\n stylesInDOM[index].references--;\\n }\\n\\n var newLastIdentifiers = modulesToDom(newList, options);\\n\\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\\n var _identifier = lastIdentifiers[_i];\\n\\n var _index = getIndexByIdentifier(_identifier);\\n\\n if (stylesInDOM[_index].references === 0) {\\n stylesInDOM[_index].updater();\\n\\n stylesInDOM.splice(_index, 1);\\n }\\n }\\n\\n lastIdentifiers = newLastIdentifiers;\\n };\\n};\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\":\n/*!********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!\n \\********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\nvar memo = {};\\n/* istanbul ignore next */\\n\\nfunction getTarget(target) {\\n if (typeof memo[target] === \\\"undefined\\\") {\\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\\n\\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\\n try {\\n // This will throw an exception if access to iframe is blocked\\n // due to cross-origin restrictions\\n styleTarget = styleTarget.contentDocument.head;\\n } catch (e) {\\n // istanbul ignore next\\n styleTarget = null;\\n }\\n }\\n\\n memo[target] = styleTarget;\\n }\\n\\n return memo[target];\\n}\\n/* istanbul ignore next */\\n\\n\\nfunction insertBySelector(insert, style) {\\n var target = getTarget(insert);\\n\\n if (!target) {\\n throw new Error(\\\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\\\");\\n }\\n\\n target.appendChild(style);\\n}\\n\\nmodule.exports = insertBySelector;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/insertBySelector.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\":\n/*!**********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!\n \\**********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction insertStyleElement(options) {\\n var element = document.createElement(\\\"style\\\");\\n options.setAttributes(element, options.attributes);\\n options.insert(element, options.options);\\n return element;\\n}\\n\\nmodule.exports = insertStyleElement;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/insertStyleElement.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\":\n/*!**********************************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!\n \\**********************************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction setAttributesWithoutAttributes(styleElement) {\\n var nonce = true ? __webpack_require__.nc : 0;\\n\\n if (nonce) {\\n styleElement.setAttribute(\\\"nonce\\\", nonce);\\n }\\n}\\n\\nmodule.exports = setAttributesWithoutAttributes;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!\n \\***************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction apply(styleElement, options, obj) {\\n var css = \\\"\\\";\\n\\n if (obj.supports) {\\n css += \\\"@supports (\\\".concat(obj.supports, \\\") {\\\");\\n }\\n\\n if (obj.media) {\\n css += \\\"@media \\\".concat(obj.media, \\\" {\\\");\\n }\\n\\n var needLayer = typeof obj.layer !== \\\"undefined\\\";\\n\\n if (needLayer) {\\n css += \\\"@layer\\\".concat(obj.layer.length > 0 ? \\\" \\\".concat(obj.layer) : \\\"\\\", \\\" {\\\");\\n }\\n\\n css += obj.css;\\n\\n if (needLayer) {\\n css += \\\"}\\\";\\n }\\n\\n if (obj.media) {\\n css += \\\"}\\\";\\n }\\n\\n if (obj.supports) {\\n css += \\\"}\\\";\\n }\\n\\n var sourceMap = obj.sourceMap;\\n\\n if (sourceMap && typeof btoa !== \\\"undefined\\\") {\\n css += \\\"\\\\n/*# sourceMappingURL=data:application/json;base64,\\\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \\\" */\\\");\\n } // For old IE\\n\\n /* istanbul ignore if */\\n\\n\\n options.styleTagTransform(css, styleElement, options.options);\\n}\\n\\nfunction removeStyleElement(styleElement) {\\n // istanbul ignore if\\n if (styleElement.parentNode === null) {\\n return false;\\n }\\n\\n styleElement.parentNode.removeChild(styleElement);\\n}\\n/* istanbul ignore next */\\n\\n\\nfunction domAPI(options) {\\n var styleElement = options.insertStyleElement(options);\\n return {\\n update: function update(obj) {\\n apply(styleElement, options, obj);\\n },\\n remove: function remove() {\\n removeStyleElement(styleElement);\\n }\\n };\\n}\\n\\nmodule.exports = domAPI;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/styleDomAPI.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!\n \\*********************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\neval(\"\\n\\n/* istanbul ignore next */\\nfunction styleTagTransform(css, styleElement) {\\n if (styleElement.styleSheet) {\\n styleElement.styleSheet.cssText = css;\\n } else {\\n while (styleElement.firstChild) {\\n styleElement.removeChild(styleElement.firstChild);\\n }\\n\\n styleElement.appendChild(document.createTextNode(css));\\n }\\n}\\n\\nmodule.exports = styleTagTransform;\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/style-loader/dist/runtime/styleTagTransform.js?\");\n\n/***/ }),\n\n/***/ \"./src/components/Setting/index.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/Setting/index.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _components_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/select */ \\\"./src/components/select/index.tsx\\\");\\n/* harmony import */ var _components_icons_close__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/icons/close */ \\\"./src/components/icons/close.tsx\\\");\\n/* harmony import */ var _components_icons_setting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/icons/setting */ \\\"./src/components/icons/setting.tsx\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\nvar Setting = function (_a) {\\n var getTarget = _a.getTarget, autoPrettier = _a.autoPrettier, onAutoPrettierChange = _a.onAutoPrettierChange, _b = _a.defaultTheme, defaultTheme = _b === void 0 ? 'GithubLightDefault' : _b, _c = _a.disablePrettier, disablePrettier = _c === void 0 ? false : _c;\\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), visible = _d[0], setVisible = _d[1];\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultTheme), theme = _e[0], setTheme = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_6__.configTheme)(defaultTheme);\\n }, []);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-button\\\", onClick: function () { return setVisible(true); } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_setting__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { style: {\\n width: '16px',\\n height: '16px',\\n } }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({ destroyOnClose: true, onClose: function () { return setVisible(false); }, visible: visible, getTarget: getTarget }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-header\\\" }, { children: [\\\"\\\\u8BBE\\\\u7F6E\\\", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () { return setVisible(false); }, className: \\\"music-monaco-editor-setting-header-close\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_close__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { style: {\\n width: '12px',\\n height: '12px',\\n } }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-setting-content\\\" }, { children: [disablePrettier ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-row\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-name\\\" }, { children: \\\"prettier\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-value\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"input\\\", { defaultChecked: autoPrettier, type: \\\"checkbox\\\", onChange: onAutoPrettierChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"label\\\", { children: \\\"prettier on save\\\" })] }))] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-row\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-name\\\" }, { children: \\\"\\\\u4E3B\\\\u9898\\\\u9009\\\\u62E9\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-input-value\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_select__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], __assign({ value: theme, getContainer: getTarget, onChange: function (v) {\\n setTheme(v);\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_6__.configTheme)(v);\\n } }, { children: _utils_consts__WEBPACK_IMPORTED_MODULE_7__.THEMES.map(function (theme) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_select__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"].Menu, { label: theme, value: theme }, theme)); }) })) }))] }))] }))] })) }))] }));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Setting);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/Setting/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/button/index.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/button/index.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/button/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\nvar Button = function (_a) {\\n var _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, children = _a.children, _d = _a.onClick, onClick = _d === void 0 ? function () { return null; } : _d, style = _a.style;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: onClick, style: style, className: \\\"music-monaco-editor-button\\\\n music-monaco-editor-button-\\\".concat(type, \\\"\\\\n \\\").concat(className) }, { children: children })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Button);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/button/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/file.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/filelist/file.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons */ \\\"./src/components/icons/index.tsx\\\");\\n/* harmony import */ var _components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/arrow */ \\\"./src/components/icons/arrow.tsx\\\");\\n/* harmony import */ var _components_icons_delete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/icons/delete */ \\\"./src/components/icons/delete.tsx\\\");\\n/* harmony import */ var _components_icons_edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/icons/edit */ \\\"./src/components/icons/edit.tsx\\\");\\n/* harmony import */ var _components_icons_addfile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @components/icons/addfile */ \\\"./src/components/icons/addfile.tsx\\\");\\n/* harmony import */ var _components_icons_addfolder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @components/icons/addfolder */ \\\"./src/components/icons/addfolder.tsx\\\");\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar File = function (_a) {\\n var getAllFiles = _a.getAllFiles, _b = _a.disableFileOps, disableFileOps = _b === void 0 ? {} : _b, _c = _a.disableFolderOps, disableFolderOps = _c === void 0 ? {} : _c, file = _a.file, onPathChange = _a.onPathChange, _d = _a.currentPath, currentPath = _d === void 0 ? '' : _d, root = _a.root, onAddFile = _a.onAddFile, onConfirmAddFile = _a.onConfirmAddFile, onDeleteFile = _a.onDeleteFile, onEditFileName = _a.onEditFileName, onConfirmAddFolder = _a.onConfirmAddFolder, onAddFolder = _a.onAddFolder, onDeleteFolder = _a.onDeleteFolder, onEditFolderName = _a.onEditFolderName;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), showChild = _e[0], setShowChild = _e[1];\\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), editing = _f[0], setEditing = _f[1];\\n var nameRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n setShowChild(function (pre) { return !pre; });\\n }, []);\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var key = e.currentTarget.dataset.src;\\n onPathChange(key);\\n }, [onPathChange]);\\n var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), showError = _g[0], setShowError = _g[1];\\n var handleBlur = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var _a;\\n setShowError('');\\n var name = (_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.textContent;\\n if (editing) {\\n setEditing(false);\\n if (file.name !== name) {\\n if (file._isDirectory) {\\n onEditFolderName(file.path, name);\\n }\\n else if (name) {\\n var newpath = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getOldNewPath)(file.path, name).newpath;\\n var files = getAllFiles();\\n if (!files[newpath]) {\\n onEditFileName(file.path, name);\\n }\\n }\\n }\\n }\\n else {\\n if (file._isDirectory) {\\n onConfirmAddFolder(__assign(__assign({}, file), { name: name }));\\n }\\n else {\\n onConfirmAddFile(__assign(__assign({}, file), { name: name }));\\n }\\n }\\n }, [\\n getAllFiles,\\n editing,\\n file,\\n onEditFileName,\\n onConfirmAddFile,\\n onConfirmAddFolder,\\n onEditFolderName,\\n ]);\\n var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\\n var _a;\\n var name = (_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.textContent;\\n if (!name) {\\n return setShowError('文件名不能为空');\\n }\\n if (file.name === name) {\\n return setShowError('');\\n }\\n var newpath = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getOldNewPath)(file.path, name).newpath;\\n var filenames = Object.keys(getAllFiles());\\n for (var i = 0; i < filenames.length; i++) {\\n if (newpath === filenames[i]) {\\n return setShowError('文件名已存在');\\n }\\n else if (filenames[i].startsWith(newpath + '/')) {\\n return setShowError('文件名已存在');\\n }\\n }\\n setShowError('');\\n }, [getAllFiles, file]);\\n var handleKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n if (e.keyCode === 13) {\\n e.preventDefault();\\n handleBlur();\\n }\\n }, [handleBlur]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (!root && !file.name) {\\n nameRef.current.focus();\\n }\\n }, [file, root]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a, _b;\\n if (editing) {\\n var dotIndex = file.name.indexOf('.');\\n nameRef.current.textContent = file.name;\\n nameRef.current.focus();\\n var selection = window.getSelection();\\n var range = document.createRange();\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\\n // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\\n range.setStart((_a = nameRef.current) === null || _a === void 0 ? void 0 : _a.firstChild, 0);\\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\\n // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain\\n range.setEnd((_b = nameRef.current) === null || _b === void 0 ? void 0 : _b.firstChild, dotIndex > 0 ? dotIndex : file.name.length);\\n selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();\\n selection === null || selection === void 0 ? void 0 : selection.addRange(range);\\n }\\n }, [editing, file]);\\n var keys = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {\\n if (file._isFile)\\n return [];\\n var childs = file.children;\\n var folders = Object.keys(childs).filter(function (key) { return !childs[key]._isFile; }).sort();\\n var files = Object.keys(childs).filter(function (key) { return childs[key]._isFile; }).sort();\\n return folders.concat(files);\\n }, [file]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (currentPath && currentPath.startsWith(file.path + '/')) {\\n setShowChild(true);\\n }\\n }, [currentPath, file.path]);\\n if (file._isFile) {\\n var fileType = void 0;\\n if (file.name && file.name.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(file.name.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ \\\"data-src\\\": file.path, title: file.path, onClick: handlePathChange, className: \\\"music-monaco-editor-list-file-item-row \\\".concat(currentPath === file.path ? 'music-monaco-editor-list-file-item-row-focused' : '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { type: fileType, style: {\\n marginLeft: '14px',\\n marginRight: '5px',\\n } }), (file.name && !editing) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-file-item-row-name\\\" }, { children: file.name })), disableFileOps.rename ? null : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_edit__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setEditing(true);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }), disableFileOps.delete ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_delete__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n onDeleteFile(file.path);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }))] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onClick: function (e) {\\n e.stopPropagation();\\n }, onInput: handleChange, spellCheck: false, onKeyDown: handleKeyDown, onBlur: handleBlur, ref: nameRef, className: \\\"music-monaco-editor-list-file-item-new\\\\n \\\".concat(showError ? 'music-monaco-editor-list-file-item-new-error' : ''), contentEditable: true }) }))] }), file.path));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-file-item\\\" }, { children: [file._isDirectory && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ onClick: handleClick, className: \\\"music-monaco-editor-list-file-item-row\\\", title: file.path }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_arrow__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { collpase: !showChild }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { style: {\\n marginRight: '5px',\\n }, type: showChild ? 'default_folder_opened' : 'default_folder' }), (file.name && !editing) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-file-item-row-name\\\" }, { children: file.name })), disableFolderOps.rename ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_edit__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setEditing(true);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFolderOps.delete ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_delete__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n onDeleteFolder(file.path);\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFileOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfile__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setShowChild(true);\\n onAddFile(file.path + '/');\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" })), disableFolderOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfolder__WEBPACK_IMPORTED_MODULE_7__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n setShowChild(true);\\n onAddFolder(file.path + '/');\\n }, className: \\\"music-monaco-editor-list-split-icon\\\" }))] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onClick: function (e) {\\n e.stopPropagation();\\n }, onInput: handleChange, spellCheck: false, onKeyDown: handleKeyDown, onBlur: handleBlur, ref: nameRef, className: \\\"music-monaco-editor-list-file-item-new\\\\n \\\".concat(showError ? 'music-monaco-editor-list-file-item-new-error' : ''), contentEditable: true }))] }))), (showChild || root) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ style: { paddingLeft: file._isDirectory ? '7px' : '0' } }, { children: keys.map(function (item) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(File, { getAllFiles: getAllFiles, disableFileOps: disableFileOps, disableFolderOps: disableFolderOps, onEditFileName: onEditFileName, onEditFolderName: onEditFolderName, onDeleteFile: onDeleteFile, onDeleteFolder: onDeleteFolder, onConfirmAddFile: onConfirmAddFile, onConfirmAddFolder: onConfirmAddFolder, onAddFile: onAddFile, onAddFolder: onAddFolder, currentPath: currentPath, root: false, file: file.children[item], onPathChange: onPathChange }, item)); }) })))] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (File);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/file.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/filelist/index.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/filelist/index.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons_addfile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons/addfile */ \\\"./src/components/icons/addfile.tsx\\\");\\n/* harmony import */ var _components_icons_addfolder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/addfolder */ \\\"./src/components/icons/addfolder.tsx\\\");\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @utils/index */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./file */ \\\"./src/components/filelist/file.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/filelist/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\nvar FileTree = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var defaultFiles = _a.defaultFiles, getAllFiles = _a.getAllFiles, onPathChange = _a.onPathChange, title = _a.title, _b = _a.currentPath, currentPath = _b === void 0 ? '' : _b, style = _a.style, onAddFile = _a.onAddFile, onDeleteFile = _a.onDeleteFile, onEditFileName = _a.onEditFileName, onAddFolder = _a.onAddFolder, onDeleteFolder = _a.onDeleteFolder, onEditFolderName = _a.onEditFolderName, rootEl = _a.rootEl, _c = _a.disableFileOps, disableFileOps = _c === void 0 ? {} : _c, _d = _a.disableFolderOps, disableFolderOps = _d === void 0 ? {} : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(function () { return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.generateFileTree)(defaultFiles); }), filetree = _e[0], setFiletree = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n refresh: function (files) { return setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.generateFileTree)(files)); },\\n }); });\\n var addFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFile)(filetree, path));\\n }, [filetree]);\\n var deleteFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n target: rootEl.current,\\n okText: '删除',\\n onOk: function (close) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, path));\\n onDeleteFile(path);\\n close();\\n },\\n title: '是否确实要删除本文件',\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5220\\\\u9664\\\\u540E\\\\u4E0D\\\\u53EF\\\\u6062\\\\u590D\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", path] })] })); }\\n });\\n }, [filetree, onDeleteFile, rootEl]);\\n var editFileName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.editSourceFileName)(filetree, path, name));\\n onEditFileName(path, name);\\n }, [filetree, onEditFileName]);\\n var handleConfirmAddFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (file) {\\n var tree = {};\\n if (file.name) {\\n var newpath = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.getOldNewPath)(file.path, file.name).newpath;\\n var files = getAllFiles();\\n if (files[newpath] || files[newpath] === '') {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFile)(tree, file.path + file.name);\\n setTimeout(function () {\\n onAddFile(file.path + file.name);\\n }, 500);\\n }\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFile)(filetree, file.path);\\n }\\n setFiletree(tree);\\n }, [filetree, onAddFile, getAllFiles]);\\n var addFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFolder)(filetree, path));\\n }, [filetree]);\\n var deleteFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n target: rootEl.current,\\n okText: '删除',\\n onOk: function (close) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, path));\\n onDeleteFolder(path);\\n close();\\n },\\n title: '是否确实要删除此文件夹',\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u6587\\\\u4EF6\\\\u5939\\\\u5220\\\\u9664\\\\u540E\\\\u4E0D\\\\u53EF\\\\u6062\\\\u590D\\\\uFF0C\\\\u540C\\\\u65F6\\\\u4F1A\\\\u5220\\\\u9664\\\\u5B50\\\\u6587\\\\u4EF6\\\\u5939\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", path] })] })); }\\n });\\n }, [filetree, onDeleteFolder, rootEl]);\\n var editFolderName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n setFiletree((0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.editSourceFolderName)(filetree, path, name));\\n onEditFolderName(path, name);\\n }, [filetree, onEditFolderName]);\\n var handleConfirmAddFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (file) {\\n var tree = {};\\n if (file.name) {\\n var newpath = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.getOldNewPath)(file.path, file.name).newpath;\\n var filenames = Object.keys(getAllFiles());\\n var exist = false;\\n for (var i = 0; i < filenames.length; i++) {\\n if (newpath === filenames[i]) {\\n exist = true;\\n break;\\n }\\n else if (filenames[i].startsWith(newpath + '/')) {\\n exist = true;\\n break;\\n }\\n }\\n if (exist) {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.addSourceFolder)(tree, file.path + file.name);\\n onAddFolder(file.path + file.name);\\n }\\n }\\n else {\\n tree = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.deleteSourceFolder)(filetree, file.path);\\n }\\n setFiletree(tree);\\n }, [filetree, onAddFolder]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-wrapper\\\", style: style }, { children: [title && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-title\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1 }, className: \\\"music-monaco-editor-list-title-name\\\" }, { children: title })), disableFileOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfile__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n addFile('/');\\n }, className: \\\"music-monaco-editor-list-title-icon\\\" })), disableFolderOps.add ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_addfolder__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { onClick: function (e) {\\n e.stopPropagation();\\n addFolder('/');\\n }, className: \\\"music-monaco-editor-list-title-icon\\\" }))] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-list-files\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_file__WEBPACK_IMPORTED_MODULE_6__[\\\"default\\\"], { getAllFiles: getAllFiles, disableFileOps: disableFileOps, disableFolderOps: disableFolderOps, onEditFileName: editFileName, onEditFolderName: editFolderName, onDeleteFile: deleteFile, onDeleteFolder: deleteFolder, onAddFile: addFile, onAddFolder: addFolder, onConfirmAddFile: handleConfirmAddFile, onConfirmAddFolder: handleConfirmAddFolder, currentPath: currentPath, root: true, file: filetree, onPathChange: onPathChange }) }))] })));\\n});\\nFileTree.displayName = 'filetree';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_1___default().memo(FileTree));\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/filelist/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/addfile.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/icons/addfile.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar AddFileIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M4 7H3V4H0V3h3V0h1v3h3v1H4v3zm6.5-5.9l3.4 3.5.1.4v8.5l-.5.5h-10l-.5-.5V8h1v5h9V6H9V2H5V1h5.2l.3.1zM10 2v3h2.9L10 2z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddFileIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/addfile.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/addfolder.tsx\":\n/*!********************************************!*\\\n !*** ./src/components/icons/addfolder.tsx ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar AddFolderIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ className: className, onClick: onClick, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M7 3H4V0H3v3H0v1h3v3h1V4h3V3zM5.5 7H5V6h.3l.8-.9.4-.1H14V4H8V3h6.5l.5.5v10l-.5.5h-13l-.5-.5V5h1v8h12V6H6.7l-.8.9-.4.1z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddFolderIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/addfolder.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/arrow.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/arrow.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar Arrow = function (_a) {\\n var _b = _a.collpase, collpase = _b === void 0 ? true : _b;\\n return collpase ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5 5v.7l-5 5z\\\" }) }))) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M7.976 10.072l4.357-4.357.619.618L8.285 11h-.618L3 6.333l.619-.618 4.357 4.357z\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Arrow);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/arrow.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/close.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/close.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar Close = function (props) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ width: \\\"24px\\\", height: \\\"24px\\\", viewBox: \\\"0 0 24 24\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, props, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fill: \\\"none\\\", stroke: \\\"currentColor\\\", strokeWidth: 2, d: \\\"M3,3 L21,21 M3,21 L21,3\\\" }) }))); };\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Close);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/close.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/delete.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/icons/delete.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar DeleteIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { fillRule: \\\"evenodd\\\", clipRule: \\\"evenodd\\\", d: \\\"M10 3h3v1h-1v9l-1 1H4l-1-1V4H2V3h3V2a1 1 0 011-1h3a1 1 0 011 1v1zM9 2H6v1h3V2zM4 13h7V4H4v9zm2-8H5v7h1V5zm1 0h1v7H7V5zm2 0h1v7H9V5z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DeleteIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/delete.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/edit.tsx\":\n/*!***************************************!*\\\n !*** ./src/components/icons/edit.tsx ***!\n \\***************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar EditIcon = function (_a) {\\n var className = _a.className, onClick = _a.onClick;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ onClick: onClick, className: className, width: \\\"1em\\\", height: \\\"1em\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"none\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M13.23 1h-1.46L3.52 9.25l-.16.22L1 13.59 2.41 15l4.12-2.36.22-.16L15 4.23V2.77L13.23 1zM2.41 13.59l1.51-3 1.45 1.45-2.96 1.55zm3.83-2.06L4.47 9.76l8-8 1.77 1.77-8 8z\\\", fill: \\\"currentColor\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EditIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/edit.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/index.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/icons/index.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/icons/index.less\\\");\\n\\n\\n\\n\\nvar fileTypeMap = function (fileType) {\\n var type = fileType.split('_').slice(-1)[0];\\n var config = {\\n ts: 'typescript',\\n js: 'js',\\n tsx: 'reactts',\\n jsx: 'reactjs',\\n md: 'markdown',\\n };\\n return config[type] ? \\\"file_type_\\\".concat(config[type]) : fileType;\\n};\\nvar Icon = function (_a) {\\n var _b = _a.type, type = _b === void 0 ? 'default_file' : _b, _c = _a.style, style = _c === void 0 ? {} : _c, _d = _a.className, className = _d === void 0 ? '' : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\\\"\\\".concat(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.ASSETSPATH, \\\"icons/\\\").concat(fileTypeMap(type), \\\".svg\\\")), src = _e[0], setSrc = _e[1];\\n var handleError = function (e) {\\n setSrc(\\\"\\\".concat(_utils_consts__WEBPACK_IMPORTED_MODULE_2__.ASSETSPATH, \\\"icons/default_file.svg\\\"));\\n };\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { onError: handleError, style: style, src: src, className: \\\"music-monaco-icons \\\".concat(className) }));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/prettier.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/icons/prettier.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar PrettierIcon = function (_a) {\\n var className = _a.className;\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"svg\\\", __assign({ className: className, xmlns: \\\"http://www.w3.org/2000/svg\\\", viewBox: \\\"0 0 16 16\\\", fill: \\\"currentColor\\\", width: \\\"1em\\\", height: \\\"1em\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M10.33 1.67h-8c-.45-.02-.43-.67 0-.67h8c.44 0 .46.64 0 .67zm-8 2.66c-.45-.02-.43-.66 0-.66H7c.44 0 .45.64 0 .66H2.33zM5.67 3c-.46-.02-.44-.66 0-.67h6.66c.44.01.46.65 0 .67H5.67zm5.33.67c.44 0 .45.64 0 .66H8.33c-.45-.02-.43-.66 0-.66H11zm1.33.66c-.45-.02-.43-.66 0-.66H13c.44 0 .45.64 0 .66h-.67zm-10 1.34c-.45-.02-.43-.67 0-.67h1.34c.43 0 .45.64 0 .67H2.33zm8 0c-.45-.02-.43-.67 0-.67h3.34c.43 0 .45.64 0 .67h-3.34zM5 5.67C4.55 5.65 4.57 5 5 5h.67c.43 0 .45.64 0 .67H5zm-2.67 8c-.45-.02-.43-.67 0-.67h1.34c.43 0 .45.64 0 .67H2.33zm2.67 0c-.45-.02-.43-.67 0-.67h.67c.43 0 .45.64 0 .67H5zM10.33 7c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67h-3.34zm-8 0c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67H2.33zm0 5.33c-.45-.02-.43-.66 0-.66h3.34c.43 0 .45.64 0 .66H2.33zm0 2.67c-.45-.02-.43-.66 0-.67h3.34c.43.01.45.65 0 .67H2.33zm0-6.67c-.45-.02-.43-.66 0-.66H3c.44 0 .45.64 0 .66h-.67zm2 0c-.45-.02-.43-.66 0-.66h2c.44 0 .46.64 0 .66h-2zm3.34 0c-.46-.02-.44-.66 0-.66H13c.44 0 .45.64 0 .66H7.67zm2.66 1.34c-.45-.02-.43-.67 0-.67h2c.44 0 .46.64 0 .67h-2zm-4 0c-.45-.02-.43-.67 0-.67H9c.44 0 .45.64 0 .67H6.33zm-4 0c-.45-.02-.43-.67 0-.67H5c.44 0 .45.64 0 .67H2.33zm0 1.33c-.45-.02-.43-.66 0-.67H3c.44.01.45.65 0 .67h-.67zm2 0c-.45-.02-.43-.66 0-.67h6c.44.01.46.65 0 .67h-6zm-2-8c-.45-.02-.43-.66 0-.67h2c.44.01.46.65 0 .67h-2z\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PrettierIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/prettier.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/icons/setting.tsx\":\n/*!******************************************!*\\\n !*** ./src/components/icons/setting.tsx ***!\n \\******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\nvar SettingIcon = function (props) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"svg\\\", __assign({ width: \\\"32px\\\", height: \\\"32px\\\", viewBox: \\\"0 0 32 32\\\", enableBackground: \\\"new 0 0 32 32\\\", id: \\\"Stock_cut\\\", xmlSpace: \\\"preserve\\\", xmlns: \\\"http://www.w3.org/2000/svg\\\", xmlnsXlink: \\\"http://www.w3.org/1999/xlink\\\" }, props, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"desc\\\", {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"g\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"path\\\", { d: \\\"M31,19v-6h-4.425 c-0.252-0.888-0.611-1.729-1.065-2.51L29,7l-4-4l-3.49,3.49C21.028,6.21,20.525,5.967,20,5.761V1h-8v4.761 c-0.525,0.205-1.028,0.449-1.51,0.728L7,3L3,7l3.49,3.49C6.036,11.271,5.676,12.112,5.425,13H1v6h4.425 c0.252,0.888,0.611,1.729,1.065,2.51L3,25l4,4l3.49-3.49c0.482,0.28,0.986,0.523,1.51,0.728V31h8v-4.761 c0.525-0.205,1.028-0.449,1.51-0.728L25,29l4-4l-3.49-3.49c0.454-0.781,0.813-1.622,1.065-2.51H31z\\\", fill: \\\"none\\\", stroke: \\\"currentColor\\\", strokeLinejoin: \\\"round\\\", strokeMiterlimit: 10, strokeWidth: 2 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"circle\\\", { cx: 16, cy: 16, fill: \\\"none\\\", r: 5, stroke: \\\"currentColor\\\", strokeLinejoin: \\\"round\\\", strokeMiterlimit: 10, strokeWidth: 2 })] })] }))); };\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingIcon);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/icons/setting.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/modal/index.tsx\":\n/*!****************************************!*\\\n !*** ./src/components/modal/index.tsx ***!\n \\****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \\\"react-dom\\\");\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _components_icons_close__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/icons/close */ \\\"./src/components/icons/close.tsx\\\");\\n/* harmony import */ var _components_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/button */ \\\"./src/components/button/index.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/modal/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\nvar Modal = function (props) {\\n var elRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(document.createElement('div'));\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var rootEl = props.getTarget() || document.body;\\n if (props.visible) {\\n rootEl && rootEl.appendChild(elRef.current);\\n }\\n else {\\n rootEl && rootEl.contains(elRef.current) && rootEl.removeChild(elRef.current);\\n }\\n }, [props.visible]);\\n return react_dom__WEBPACK_IMPORTED_MODULE_2___default().createPortal((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: function () { return props.onClose && props.onClose(); } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content\\\" }, { children: (props.destroyOnClose && !props.visible) ? null : props.children }))] })), elRef.current);\\n};\\nModal.create = function (props) {\\n var el = document.createElement('div');\\n function close() {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n react_dom__WEBPACK_IMPORTED_MODULE_2___default().render((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal \\\".concat(props.className || '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: close }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content\\\" }, { children: props.content(close) }))] })), el);\\n var rootEl = props.target || document.body;\\n rootEl && rootEl.appendChild(el);\\n return {\\n close: function () {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n };\\n};\\nModal.confirm = function (props) {\\n var el = document.createElement('div');\\n function close() {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n react_dom__WEBPACK_IMPORTED_MODULE_2___default().render((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal \\\".concat(props.className || '') }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { className: \\\"music-monaco-editor-modal-mask\\\", onClick: close }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content music-monaco-editor-modal-content-confirm\\\" }, { children: [props.title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-title\\\" }, { children: props.title })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-content\\\" }, { children: props.content(close) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-footer\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_button__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ onClick: function () {\\n if (props.onCancel) {\\n props.onCancel(close);\\n }\\n else {\\n close();\\n }\\n } }, { children: props.cancelText || '取消' })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_button__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ onClick: function () { props.onOk && props.onOk(close); }, type: \\\"primary\\\", style: { marginLeft: '4px' } }, { children: props.okText || '确认' }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-modal-content-close\\\", onClick: close }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_close__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { style: {\\n width: '12px',\\n height: '12px'\\n } }) }))] }))] })), el);\\n var rootEl = props.target || document.body;\\n rootEl && rootEl.appendChild(el);\\n return {\\n close: function () {\\n rootEl && rootEl.contains(el) && rootEl.removeChild(el);\\n }\\n };\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Modal);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/modal/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/index.tsx\":\n/*!********************************************!*\\\n !*** ./src/components/openedtab/index.tsx ***!\n \\********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var _tabitem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tabitem */ \\\"./src/components/openedtab/tabitem.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/openedtab/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nfunction dealFiles(files) {\\n var count = {};\\n var resolvedFiles = files.map(function (file) {\\n var path = file.path;\\n var paths = path.split('/');\\n var name = paths.slice(-1)[0];\\n var pre = paths.slice(-2, -1)[0];\\n var prefix = pre ? \\\".../\\\".concat(pre) : './';\\n return __assign({ name: name, prefix: prefix }, file);\\n });\\n resolvedFiles.forEach(function (file) {\\n if (count[file.name]) {\\n count[file.name] += 1;\\n }\\n else {\\n count[file.name] = 1;\\n }\\n });\\n return resolvedFiles.map(function (v) { return (__assign(__assign({}, v), { showPrefix: count[v.name] > 1 })); });\\n}\\nvar OpenedTab = function (_a) {\\n var openedFiles = _a.openedFiles, onPathChange = _a.onPathChange, currentPath = _a.currentPath, onCloseFile = _a.onCloseFile, rootEl = _a.rootEl, onSaveFile = _a.onSaveFile, onAbortSave = _a.onAbortSave, onCloseOtherFiles = _a.onCloseOtherFiles;\\n var files = dealFiles(openedFiles);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-opened-tab-wrapper\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-opened-tab\\\" }, { children: files.map(function (file) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabitem__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"], { onSaveFile: onSaveFile, onAbortSave: onAbortSave, rootEl: rootEl, onCloseFile: onCloseFile, file: file, onPathChange: onPathChange, currentPath: currentPath, onCloseOtherFiles: onCloseOtherFiles }, file.path);\\n }) })) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenedTab);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/openedtab/tabitem.tsx\":\n/*!**********************************************!*\\\n !*** ./src/components/openedtab/tabitem.tsx ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons */ \\\"./src/components/icons/index.tsx\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\nvar TabItem = function (_a) {\\n var file = _a.file, onPathChange = _a.onPathChange, currentPath = _a.currentPath, onCloseFile = _a.onCloseFile, rootEl = _a.rootEl, onSaveFile = _a.onSaveFile, onAbortSave = _a.onAbortSave, onCloseOtherFiles = _a.onCloseOtherFiles;\\n var itemRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var name = file.path.split('/').slice(-1)[0];\\n var fileType;\\n if (file.path && file.path.indexOf('.') !== -1) {\\n fileType = \\\"file_type_\\\".concat(file.path.split('.').slice(-1));\\n }\\n else {\\n fileType = 'default_file';\\n }\\n var active = currentPath === file.path;\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var key = e.currentTarget.dataset.src;\\n if (onPathChange) {\\n onPathChange(key);\\n }\\n }, [onPathChange]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n if (active) {\\n (_a = itemRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({\\n block: 'nearest',\\n });\\n }\\n }, [active]);\\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), hover = _b[0], setHover = _b[1];\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), hoverRight = _c[0], setHoverRight = _c[1];\\n var handleOver = function (e) {\\n if (e.target instanceof HTMLElement) {\\n if (e.target.dataset.name === 'editing') {\\n setHoverRight(true);\\n }\\n else {\\n setHoverRight(false);\\n }\\n }\\n setHover(true);\\n };\\n var handleLeave = function () {\\n setHover(false);\\n setHoverRight(false);\\n };\\n var handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n e.stopPropagation();\\n if (file.status === 'editing') {\\n setTimeout(function () {\\n _components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"].confirm({\\n title: '是否要保存对本文件的修改',\\n target: rootEl.current,\\n okText: '保存',\\n cancelText: '不保存',\\n onCancel: function (close) {\\n close();\\n onAbortSave(file.path);\\n },\\n onOk: function (close) {\\n close();\\n onCloseFile(file.path);\\n onSaveFile(file.path);\\n },\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5982\\\\u679C\\\\u4E0D\\\\u4FDD\\\\u5B58\\\\uFF0C\\\\u4F60\\\\u7684\\\\u66F4\\\\u6539\\\\u5C06\\\\u4E22\\\\u5931\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [\\\"\\\\u5F53\\\\u524D\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84: \\\", file.path] })] })); },\\n });\\n });\\n }\\n else {\\n onCloseFile(file.path);\\n }\\n }, [file, onCloseFile, onAbortSave, rootEl, onSaveFile]);\\n var handleMouseDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n if (e.button !== 2) {\\n return;\\n }\\n var position = {\\n x: e.clientX,\\n y: e.clientY,\\n };\\n setTimeout(function () {\\n _components_modal__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"].create({\\n title: '是否确认删除?',\\n target: rootEl.current,\\n onOk: function (close) {\\n close();\\n },\\n content: function (close) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ style: {\\n top: \\\"\\\".concat(position.y, \\\"px\\\"),\\n left: \\\"\\\".concat(position.x, \\\"px\\\"),\\n }, className: \\\"music-monaco-editor-rightclick-panel\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function (e) {\\n close();\\n handleClose(e);\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n close();\\n onCloseOtherFiles(file.path);\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close others\\\" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n close();\\n onCloseOtherFiles('');\\n }, className: \\\"music-monaco-editor-rightclick-panel-item\\\" }, { children: \\\"Close all\\\" }))] }))); },\\n className: 'music-monaco-editor-modal-rightclick'\\n });\\n });\\n }, [handleClose, onCloseOtherFiles, file.path, rootEl]);\\n var closeVisible = true;\\n if (file.status === 'editing' && !hoverRight) {\\n closeVisible = false;\\n }\\n else if (file.status !== 'editing' && !hover && !active) {\\n closeVisible = false;\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ ref: itemRef, onContextMenu: function (e) { return e.preventDefault(); }, onMouseDown: handleMouseDown, onMouseOver: handleOver, onMouseLeave: handleLeave, \\\"data-src\\\": file.path, className: \\\"music-monaco-editor-opened-tab-item \\\".concat(active ? 'music-monaco-editor-opened-tab-item-focused' : ''), onClick: handlePathChange }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { type: fileType, style: { marginRight: '2px' } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ style: { flex: 1, paddingRight: '5px' } }, { children: name })), file.showPrefix && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ className: \\\"music-monaco-editor-opened-tab-item-prefix\\\" }, { children: file.prefix }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", { \\\"data-name\\\": \\\"editing\\\", className: \\\"music-monaco-editor-opened-tab-item-editing\\\", style: {\\n visibility: (file.status === 'editing' && !hoverRight) ? 'visible' : 'hidden'\\n } }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"span\\\", __assign({ \\\"data-name\\\": \\\"editing\\\", onClick: handleClose, style: {\\n visibility: closeVisible ? 'visible' : 'hidden'\\n }, className: \\\"music-monaco-editor-opened-tab-item-close\\\" }, { children: \\\"x\\\" }))] })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabItem);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/openedtab/tabitem.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/prettier/index.tsx\":\n/*!*******************************************!*\\\n !*** ./src/components/prettier/index.tsx ***!\n \\*******************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _icons_prettier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/prettier */ \\\"./src/components/icons/prettier.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/prettier/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\n\\nvar Prettier = function (props) {\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n function loadPrettier() {\\n return __awaiter(this, void 0, void 0, function () {\\n function provideDocumentFormattingEdits(model) {\\n var p = window.require('prettier');\\n if (!p.prettier)\\n return;\\n try {\\n var text = p.prettier.format(model.getValue(), {\\n filepath: model.uri.path,\\n plugins: p.prettierPlugins,\\n singleQuote: true,\\n tabWidth: 4,\\n });\\n return [\\n {\\n range: model.getFullModelRange(),\\n text: text,\\n },\\n ];\\n }\\n catch (e) {\\n console.log(new Error('prettier format error'));\\n }\\n }\\n return __generator(this, function (_a) {\\n window.monaco.languages.registerDocumentFormattingEditProvider('javascript', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n window.monaco.languages.registerDocumentFormattingEditProvider('typescript', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n setTimeout(function () {\\n window.monaco.languages.registerDocumentFormattingEditProvider('html', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n }, 3000);\\n window.monaco.languages.registerDocumentFormattingEditProvider('css', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n window.monaco.languages.registerDocumentFormattingEditProvider('less', {\\n provideDocumentFormattingEdits: provideDocumentFormattingEdits\\n });\\n return [2 /*return*/];\\n });\\n });\\n }\\n loadPrettier();\\n }, []);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({}, props, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons_prettier__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { className: \\\"music-monaco-editor-prettier-icon\\\" }) })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Prettier);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/prettier/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/components/menu.tsx\":\n/*!***************************************************!*\\\n !*** ./src/components/select/components/menu.tsx ***!\n \\***************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\nvar Menu = function (_a) {\\n var _b = _a.label, label = _b === void 0 ? '' : _b, value = _a.value, className = _a.className, _c = _a.defaultValue, defaultValue = _c === void 0 ? '' : _c, _d = _a.handleSelect, handleSelect = _d === void 0 ? function () { return ({}); } : _d;\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), selected = _e[0], setSelected = _e[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (defaultValue === value) {\\n setSelected(true);\\n }\\n }, [value, defaultValue]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ onClick: function () {\\n handleSelect({ value: value, label: label });\\n }, className: \\\"music-monaco-editor-select-item \\\".concat(selected ? 'music-monaco-editor-select-item-selected' : '') }, { children: label })));\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Menu);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/components/menu.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/components/position.tsx\":\n/*!*******************************************************!*\\\n !*** ./src/components/select/components/position.tsx ***!\n \\*******************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \\\"react-dom\\\");\\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\\n\\n\\nvar Position = function (_a) {\\n var instance = _a.instance, targetRef = _a.targetRef, _b = _a.children, children = _b === void 0 ? null : _b, getContainer = _a.getContainer, _c = _a.onNotVisibleArea, onNotVisibleArea = _c === void 0 ? function () { return ({}); } : _c;\\n var container = getContainer && getContainer() || document.body;\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n container.appendChild(instance);\\n return function () {\\n if (container.contains(instance)) {\\n container.removeChild(instance);\\n }\\n };\\n }, [instance, container]);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n function setInstanceStyle() {\\n var _a = targetRef.current.getBoundingClientRect(), top = _a.top, left = _a.left, height = _a.height, width = _a.width;\\n var _b = container.getBoundingClientRect(), top1 = _b.top, left1 = _b.left;\\n var style = {\\n top: container.scrollTop + (top - top1) + height + 1 + 'px',\\n left: container.scrollLeft + (left - left1) + 'px',\\n };\\n instance.style.top = style.top;\\n instance.style.left = style.left;\\n instance.style.width = width + 'px';\\n return { top: top, left: left, height: height };\\n }\\n setInstanceStyle();\\n function handleScroll() {\\n var _a = setInstanceStyle(), top = _a.top, height = _a.height;\\n if (container.offsetTop > top) {\\n onNotVisibleArea();\\n }\\n if (top - container.offsetTop + height > container.offsetHeight) {\\n onNotVisibleArea();\\n }\\n }\\n container.addEventListener('scroll', handleScroll);\\n return function () {\\n container.removeEventListener('scroll', handleScroll);\\n };\\n }, [targetRef, container]);\\n return react_dom__WEBPACK_IMPORTED_MODULE_1___default().createPortal(children, instance);\\n};\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Position);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/components/position.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/components/select/index.tsx\":\n/*!*****************************************!*\\\n !*** ./src/components/select/index.tsx ***!\n \\*****************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_icons_arrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/icons/arrow */ \\\"./src/components/icons/arrow.tsx\\\");\\n/* harmony import */ var _components_menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/menu */ \\\"./src/components/select/components/menu.tsx\\\");\\n/* harmony import */ var _components_position__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/position */ \\\"./src/components/select/components/position.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \\\"./src/components/select/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\n\\n\\nvar instance = document.createElement('div');\\ninstance.className = \\\"music-monaco-editor-select-items\\\";\\nvar Select = function (_a) {\\n var defaultValue = _a.defaultValue, _b = _a.onChange, onChange = _b === void 0 ? function () { return ({}); } : _b, getContainer = _a.getContainer, children = _a.children, valueFromProps = _a.value;\\n var isControlled = typeof valueFromProps !== 'undefined';\\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultValue || ''), internalValue = _c[0], setInternalValue = _c[1];\\n var value = isControlled ? valueFromProps : internalValue;\\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), visible = _d[0], setVisible = _d[1];\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({ value: defaultValue, label: '' }), data = _e[0], setData = _e[1];\\n var targetRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var container = (getContainer && getContainer()) || document.body;\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (!children)\\n return;\\n var childs = react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children);\\n for (var i = 0; i < childs.length; i++) {\\n var child = childs[i];\\n if (react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(child)) {\\n if (child.props.value === value) {\\n setData(child.props);\\n break;\\n }\\n }\\n }\\n }, [value, children]);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n return function () {\\n if (container.contains(instance)) {\\n container.removeChild(instance);\\n }\\n };\\n }, [container]);\\n var handleSelect = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (data) {\\n if (!isControlled) {\\n setInternalValue(data.value);\\n }\\n setData(data);\\n setVisible(false);\\n onChange && onChange(data.value);\\n }, [onChange, isControlled]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ ref: targetRef, className: \\\"music-monaco-editor-select\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-select-content\\\", onClick: function (e) {\\n e.stopPropagation();\\n setVisible(function (pre) { return !pre; });\\n } }, { children: [data.label, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-select-content-arrow\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_icons_arrow__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { collpase: !visible }) }))] })) })), visible && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_position__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"], __assign({ instance: instance, targetRef: targetRef, getContainer: getContainer }, { children: react__WEBPACK_IMPORTED_MODULE_1___default().Children.toArray(children).map(function (child) { return (react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(child) ? react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, {\\n // @ts-ignore\\n defaultValue: data.value,\\n handleSelect: handleSelect,\\n }) : child); }) })))] }));\\n};\\nSelect.Menu = _components_menu__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"];\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Select);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/components/select/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditor\\\": () => (/* reexport safe */ _multi__WEBPACK_IMPORTED_MODULE_0__.MultiEditor),\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* reexport safe */ _single__WEBPACK_IMPORTED_MODULE_1__.SingleEditor)\\n/* harmony export */ });\\n/* harmony import */ var _multi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multi */ \\\"./src/multi/index.tsx\\\");\\n/* harmony import */ var _single__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./single */ \\\"./src/single/index.tsx\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n\\n\\n\\n// 准备monaco-editor主题等\\n(0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.startUp)();\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/index.ts?\");\n\n/***/ }),\n\n/***/ \"./src/multi/Editor.tsx\":\n/*!******************************!*\\\n !*** ./src/multi/Editor.tsx ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditorComp\\\": () => (/* binding */ MultiEditorComp),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _components_openedtab__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/openedtab */ \\\"./src/components/openedtab/index.tsx\\\");\\n/* harmony import */ var _components_filelist__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @components/filelist */ \\\"./src/components/filelist/index.tsx\\\");\\n/* harmony import */ var _components_modal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @components/modal */ \\\"./src/components/modal/index.tsx\\\");\\n/* harmony import */ var _components_prettier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @components/prettier */ \\\"./src/components/prettier/index.tsx\\\");\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _utils_consts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @utils/consts */ \\\"./src/utils/consts.ts\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\n/* harmony import */ var _components_Setting__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @components/Setting */ \\\"./src/components/Setting/index.tsx\\\");\\n/* harmony import */ var _hook__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hook */ \\\"./src/multi/hook.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n// eslint-disable-next-line @typescript-eslint/no-empty-function\\nvar noop = function () { };\\nvar MultiEditorComp = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var defaultPath = _a.defaultPath, _b = _a.defaultTheme, defaultTheme = _b === void 0 ? 'OneDarkPro' : _b, onPathChange = _a.onPathChange, onValueChange = _a.onValueChange, onRenameFile = _a.onRenameFile, _c = _a.defaultFiles, defaultFiles = _c === void 0 ? {} : _c, onFileChange = _a.onFileChange, onFileSave = _a.onFileSave, _d = _a.ideConfig, ideConfig = _d === void 0 ? {\\n disableFileOps: {},\\n disableFolderOps: {},\\n disableEslint: false,\\n disableSetting: false,\\n disablePrettier: false,\\n saveWhenBlur: false,\\n } : _d, options = _a.options, title = _a.title;\\n var onPathChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onPathChange);\\n var onValueChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onValueChange);\\n var onFileChangeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onFileChange);\\n var onFileSaveRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(onFileSave);\\n var optionsRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useVarRef)(options);\\n var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var filelistRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var editorRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var prePath = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');\\n var filesRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(__assign({}, defaultFiles));\\n var valueLisenerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\\n var editorStatesRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(new Map());\\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultPath && filesRef.current[defaultPath]\\n ? [\\n {\\n path: defaultPath,\\n },\\n ]\\n : []), openedFiles = _e[0], setOpenedFiles = _e[1];\\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultPath || ''), curPath = _f[0], setCurPath = _f[1];\\n var curPathRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(defaultPath || '');\\n var curValueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');\\n var _g = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.usePrettier)(editorRef), autoPrettierRef = _g[0], handleSetAutoPrettier = _g[1], handleFromat = _g[2];\\n var _h = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useDragLine)(180), styles = _h[0], handleMoveStart = _h[1], handleMove = _h[2], handleMoveEnd = _h[3];\\n var disableEslintRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(ideConfig.disableEslint);\\n disableEslintRef.current = ideConfig.disableEslint;\\n var restoreModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var _a, _b;\\n var editorStates = editorStatesRef.current;\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (path !== prePath.current && prePath.current) {\\n editorStates.set(prePath.current, (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.saveViewState());\\n }\\n if (model && editorRef.current) {\\n editorRef.current.setModel(model);\\n // 如果path改变,那么恢复上一次的状态\\n if (path !== prePath.current) {\\n // 取消上次的监听\\n if (valueLisenerRef.current && valueLisenerRef.current.dispose) {\\n valueLisenerRef.current.dispose();\\n }\\n var editorState = editorStates.get(path);\\n if (editorState) {\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.restoreViewState(editorState);\\n }\\n // 聚焦editor\\n // editorRef.current?.focus();\\n var timer_1 = null;\\n var v = model.getValue();\\n curValueRef.current = v;\\n valueLisenerRef.current = model.onDidChangeContent(function () {\\n var v = model.getValue();\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === path) {\\n v.status = 'editing';\\n }\\n return v;\\n });\\n });\\n curValueRef.current = v;\\n if (onValueChangeRef.current) {\\n onValueChangeRef.current(v, path);\\n }\\n // eslint解析需要消抖,延迟500ms消抖即可\\n if (timer_1)\\n clearTimeout(timer_1);\\n timer_1 = setTimeout(function () {\\n timer_1 = null;\\n _utils__WEBPACK_IMPORTED_MODULE_6__.worker.then(function (res) {\\n if (!disableEslintRef.current) {\\n res.postMessage({\\n code: model.getValue(),\\n version: model.getVersionId(),\\n path: path,\\n });\\n }\\n });\\n }, 500);\\n });\\n }\\n _utils__WEBPACK_IMPORTED_MODULE_6__.worker.then(function (res) {\\n if (!disableEslintRef.current) {\\n res.postMessage({\\n code: model.getValue(),\\n version: model.getVersionId(),\\n path: path,\\n });\\n }\\n });\\n prePath.current = path;\\n return model;\\n }\\n else {\\n // 如果当前model不存在,那么取消监听\\n if (valueLisenerRef.current && valueLisenerRef.current.dispose) {\\n valueLisenerRef.current.dispose();\\n }\\n }\\n return false;\\n }, [onValueChangeRef]);\\n var seCurPathAndNotify = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n if (path !== curPathRef.current) {\\n curPathRef.current = path;\\n if (onPathChangeRef.current && path && notify) {\\n onPathChangeRef.current(path);\\n }\\n setCurPath(path);\\n }\\n }, [onPathChangeRef]);\\n var openOrFocusPath = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n setOpenedFiles(function (pre) {\\n var exist = false;\\n pre.forEach(function (v) {\\n if (v.path === path) {\\n exist = true;\\n }\\n });\\n if (exist) {\\n return pre;\\n }\\n else {\\n return __spreadArray(__spreadArray([], pre, true), [{ path: path }], false);\\n }\\n });\\n seCurPathAndNotify(path, notify);\\n }, [seCurPathAndNotify]);\\n var handlePathChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, nofity) {\\n if (nofity === void 0) { nofity = true; }\\n var model = restoreModel(path);\\n if (model) {\\n openOrFocusPath(path, nofity);\\n }\\n }, [restoreModel, openOrFocusPath]);\\n (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useInit)(filesRef, editorRef, options, handlePathChange, defaultPath, ideConfig.disableEslint);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n setTimeout(function () {\\n if (defaultPath) {\\n handlePathChange(defaultPath);\\n }\\n });\\n }, []);\\n var saveFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, model) {\\n var _a;\\n if (autoPrettierRef.current && !ideConfig.disablePrettier) {\\n var realpath_1 = path || curPathRef.current;\\n (_a = handleFromat()) === null || _a === void 0 ? void 0 : _a.then(function () {\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === realpath_1) {\\n v.status = 'saved';\\n }\\n return v;\\n });\\n });\\n var val = (model === null || model === void 0 ? void 0 : model.getValue()) || curValueRef.current;\\n filesRef.current[realpath_1] = val;\\n if (onFileSaveRef.current) {\\n onFileSaveRef.current(realpath_1, val);\\n }\\n });\\n }\\n else {\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path === curPathRef.current) {\\n v.status = 'saved';\\n }\\n return v;\\n });\\n });\\n filesRef.current[curPathRef.current] = curValueRef.current;\\n if (onFileSaveRef.current) {\\n onFileSaveRef.current(curPathRef.current, curValueRef.current);\\n }\\n }\\n }, [handleFromat, autoPrettierRef, ideConfig.disablePrettier, onFileSaveRef]);\\n var editorNodeRef = (0,_hook__WEBPACK_IMPORTED_MODULE_10__.useEditor)(editorRef, optionsRef, openOrFocusPath, ideConfig.saveWhenBlur ? saveFile : noop);\\n var onCloseFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var targetPath = '';\\n if (openedFiles.length) {\\n var res = openedFiles.filter(function (v, index) {\\n if (v.path === path) {\\n if (index === 0) {\\n if (openedFiles[index + 1]) {\\n targetPath = openedFiles[index + 1].path;\\n }\\n }\\n else {\\n targetPath = openedFiles[index - 1].path;\\n }\\n }\\n return v.path !== path;\\n });\\n // 目标文件是当前文件,且存在下一激活文件时,执行model及path切换的逻辑\\n if (targetPath && curPathRef.current === path) {\\n restoreModel(targetPath);\\n seCurPathAndNotify(targetPath);\\n }\\n if (res.length === 0) {\\n restoreModel('');\\n seCurPathAndNotify('');\\n prePath.current = '';\\n }\\n setOpenedFiles(res);\\n }\\n }, [restoreModel, openedFiles, seCurPathAndNotify]);\\n var closeOtherFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var unSavedFiles = openedFiles.filter(function (v) { return v.status === 'editing'; });\\n if (unSavedFiles.length) {\\n _components_modal__WEBPACK_IMPORTED_MODULE_4__[\\\"default\\\"].confirm({\\n title: '是否要保留未保存文件的修改',\\n target: rootRef.current,\\n okText: '保存',\\n cancelText: '不保存',\\n onCancel: function (close) {\\n close();\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n // 恢复文件的数值修改\\n unSavedFiles.forEach(function (v) {\\n var value = filesRef.current[v.path] || '';\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(v.path, value);\\n });\\n prePath.current = path;\\n },\\n onOk: function (close) {\\n close();\\n unSavedFiles.forEach(function (v) {\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === v.path; });\\n if (autoPrettierRef.current) {\\n var p = window.require('prettier');\\n if (!p.prettier)\\n return;\\n var text = p.prettier.format(model === null || model === void 0 ? void 0 : model.getValue(), {\\n filepath: model === null || model === void 0 ? void 0 : model.uri.path,\\n plugins: p.prettierPlugins,\\n singleQuote: true,\\n tabWidth: 4,\\n });\\n filesRef.current[v.path] = text;\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(v.path, text);\\n }\\n else {\\n filesRef.current[v.path] = (model === null || model === void 0 ? void 0 : model.getValue()) || '';\\n }\\n });\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n prePath.current = path;\\n },\\n content: function () { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u5982\\\\u679C\\\\u4E0D\\\\u4FDD\\\\u5B58\\\\uFF0C\\\\u4F60\\\\u7684\\\\u66F4\\\\u6539\\\\u5C06\\\\u4E22\\\\u5931\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: \\\"\\\\u672A\\\\u4FDD\\\\u5B58\\\\u7684\\\\u6587\\\\u4EF6\\\\u8DEF\\\\u5F84:\\\" }), unSavedFiles.map(function (v) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: v.path }, v.path)); })] })); },\\n });\\n }\\n else {\\n setOpenedFiles(function (pre) { return pre.filter(function (p) { return p.path === path; }); });\\n restoreModel(path);\\n seCurPathAndNotify(path);\\n prePath.current = path;\\n }\\n }, [restoreModel, openedFiles, autoPrettierRef, seCurPathAndNotify]);\\n var abortFileChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n var value = filesRef.current[path] || '';\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(path, value);\\n onCloseFile(path);\\n }, [onCloseFile]);\\n var dealKey = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\\n var ctrlKey = e.ctrlKey || e.metaKey;\\n var keyCode = e.keyCode;\\n if (ctrlKey && keyCode === 83) {\\n e.preventDefault();\\n saveFile();\\n }\\n }, [saveFile]);\\n // useEffect(() => {\\n // if (onPathChangeRef.current && curPath) {\\n // onPathChangeRef.current(curPath);\\n // }\\n // curPathRef.current = curPath;\\n // }, [curPath, onPathChangeRef]);\\n var addFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, value, notify) {\\n if (notify === void 0) { notify = true; }\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(path, value || '');\\n filesRef.current[path] = value || '';\\n handlePathChange(path);\\n if (notify && onFileChangeRef.current) {\\n onFileChangeRef.current('addFile', {\\n path: path,\\n value: '',\\n });\\n }\\n }, [handlePathChange, onFileChangeRef]);\\n var deleteFile = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n onCloseFile(path);\\n setTimeout(function () {\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.deleteModel)(path);\\n }, 50);\\n delete filesRef.current[path];\\n if (onFileChangeRef.current && notify) {\\n onFileChangeRef.current('deleteFile', {\\n path: path,\\n });\\n }\\n }, [onCloseFile, onFileChangeRef]);\\n var editFileName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n var value = filesRef.current[path] || '';\\n deleteFile(path, false);\\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.getOldNewPath)(path, name), oldpath = _a.oldpath, newpath = _a.newpath;\\n addFile(newpath, value, false);\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('renameFile', {\\n path: oldpath,\\n newpath: newpath,\\n });\\n }\\n if (onRenameFile) {\\n onRenameFile(oldpath, newpath);\\n }\\n }, [deleteFile, addFile, onFileChangeRef, onRenameFile]);\\n var addFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, notify) {\\n if (notify === void 0) { notify = true; }\\n var hasChild = false;\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n hasChild = true;\\n }\\n });\\n if (!hasChild) {\\n filesRef.current[path] = null;\\n }\\n if (onFileChangeRef.current && notify) {\\n onFileChangeRef.current('addFolder', {\\n path: path,\\n });\\n }\\n }, [onFileChangeRef]);\\n var deleteFolder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path) {\\n // 删除目录引用\\n delete filesRef.current[path];\\n // 删除子路径下的子文件和文件夹\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n var value = filesRef.current[p];\\n if (typeof value === 'string') {\\n deleteFile(p, false);\\n }\\n }\\n });\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('deleteFolder', {\\n path: path,\\n });\\n }\\n }, [deleteFile, onFileChangeRef]);\\n var editFolderName = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (path, name) {\\n var paths = (path || '/').slice(1).split('/');\\n var newPath = '/' + paths.slice(0, -1).concat(name).join('/');\\n // 删除文件夹引用\\n delete filesRef.current[path];\\n // 新建文件夹引用\\n addFolder(newPath, false);\\n // 删除子路径下的子文件和文件夹\\n Object.keys(filesRef.current).forEach(function (p) {\\n if (p.startsWith(path + '/')) {\\n var value_1 = filesRef.current[p];\\n if (typeof value_1 === 'string') {\\n setTimeout(function () {\\n // 子文件需要删除原model\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.deleteModel)(p);\\n // 重新创建新model\\n var finalPath = p.replace(path + '/', newPath + '/');\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.createOrUpdateModel)(finalPath, value_1 || '');\\n filesRef.current[finalPath] = value_1 || '';\\n }, 50);\\n }\\n delete filesRef.current[p];\\n }\\n });\\n // 对已打开的涉事文件进行路径替换处理\\n setOpenedFiles(function (pre) {\\n return pre.map(function (v) {\\n if (v.path.startsWith(path + '/')) {\\n v.path = v.path.replace(path + '/', newPath + '/');\\n }\\n return v;\\n });\\n });\\n // 如果涉及当前激活的model,则需要重新打开\\n if (curPathRef.current.startsWith(path + '/')) {\\n setTimeout(function () {\\n handlePathChange(curPathRef.current.replace(path + '/', newPath + '/'));\\n }, 50);\\n }\\n if (onFileChangeRef.current) {\\n onFileChangeRef.current('renameFolder', {\\n path: path,\\n newpath: newPath,\\n });\\n }\\n }, [handlePathChange, addFolder, onFileChangeRef]);\\n var decorcations = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var locModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (loc) {\\n var _a, _b;\\n var start = loc.start, end = loc.end;\\n decorcations.current = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.deltaDecorations(decorcations.current || [], [\\n {\\n range: new window.monaco.Range(start.line, start.column, end.line, end.column),\\n options: {\\n className: 'music-monaco-editor-highlight',\\n isWholeLine: true,\\n },\\n },\\n ]);\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.revealLineInCenter(start.line);\\n }, []);\\n var refreshFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (files, path, loc) {\\n // 初始化文件列表\\n (0,_utils__WEBPACK_IMPORTED_MODULE_6__.initFiles)(files);\\n // 删除多余文件\\n Object.keys(filesRef.current).forEach(function (file) {\\n if (files[file]) {\\n filesRef.current[file] = files[file];\\n }\\n else {\\n // deleteFile(file); // FIXME: 为什么这么写\\n delete filesRef.current[file];\\n }\\n });\\n // 保存新的打开文件列表\\n filesRef.current = __assign({}, files);\\n // 重置openedTab\\n setOpenedFiles(function (pre) {\\n return pre\\n .filter(function (v) { return files[v.path]; })\\n .map(function (v) { return (__assign(__assign({}, v), { status: 'saved' })); });\\n });\\n if (path !== curPathRef.current) {\\n // 重置当前tab\\n var res = files[curPathRef.current] ? curPathRef.current : '';\\n if (path && files[path]) {\\n res = path;\\n }\\n handlePathChange(res);\\n }\\n loc && locModel(loc);\\n // 更新文件列表\\n filelistRef.current.refresh(files);\\n }, [deleteFile, handlePathChange, locModel]);\\n var getAllFiles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.filterNull)(filesRef.current); }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n getValue: function (path) { return filesRef.current[path]; },\\n getAllValue: getAllFiles,\\n getSupportThemes: function () { return _utils_consts__WEBPACK_IMPORTED_MODULE_7__.THEMES; },\\n setTheme: function (name) { return (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_8__.configTheme)(name); },\\n refresh: refreshFiles,\\n }); });\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ ref: rootRef, id: \\\"music-monaco-editor-root\\\", tabIndex: 0, onKeyDown: dealKey, onMouseMove: handleMove, onMouseUp: handleMoveEnd, className: \\\"music-monaco-editor\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_filelist__WEBPACK_IMPORTED_MODULE_3__[\\\"default\\\"], { getAllFiles: getAllFiles, title: title, disableFileOps: ideConfig.disableFileOps, disableFolderOps: ideConfig.disableFolderOps, ref: filelistRef, rootEl: rootRef, onEditFileName: editFileName, onDeleteFile: deleteFile, onAddFile: addFile, onAddFolder: addFolder, onDeleteFolder: deleteFolder, onEditFolderName: editFolderName, style: styles, currentPath: curPath, defaultFiles: defaultFiles, onPathChange: handlePathChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { onMouseDown: handleMoveStart, className: \\\"music-monaco-editor-drag\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-area\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_openedtab__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], { onCloseOtherFiles: closeOtherFiles, onSaveFile: saveFile, onAbortSave: abortFileChange, rootEl: rootRef, currentPath: curPath, openedFiles: openedFiles, onCloseFile: onCloseFile, onPathChange: handlePathChange }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { ref: editorNodeRef, style: { flex: 1, width: '100%' } }), openedFiles.length === 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-area-empty\\\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { src: \\\"//p5.music.126.net/obj/wo3DlcOGw6DClTvDisK1/5759801316/fb85/e193/a256/03a81ea60cf94212bbc814f2c82b6940.png\\\", className: \\\"music-monaco-editor-area-empty-icon\\\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { children: title })] })))] })), ideConfig.disablePrettier ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_prettier__WEBPACK_IMPORTED_MODULE_5__[\\\"default\\\"], { onClick: handleFromat, className: \\\"music-monaco-editor-prettier\\\" })), ideConfig.disableSetting ? null : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_Setting__WEBPACK_IMPORTED_MODULE_9__[\\\"default\\\"], { disablePrettier: ideConfig.disablePrettier, defaultTheme: defaultTheme, getTarget: function () { return rootRef.current; }, autoPrettier: autoPrettierRef.current, onAutoPrettierChange: handleSetAutoPrettier }))] })));\\n});\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiEditorComp);\\nMultiEditorComp.displayName = 'MultiEditorComp';\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/Editor.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/multi/hook.ts\":\n/*!***************************!*\\\n !*** ./src/multi/hook.ts ***!\n \\***************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"useDragLine\\\": () => (/* binding */ useDragLine),\\n/* harmony export */ \\\"usePrettier\\\": () => (/* binding */ usePrettier),\\n/* harmony export */ \\\"useInit\\\": () => (/* binding */ useInit),\\n/* harmony export */ \\\"useEditor\\\": () => (/* binding */ useEditor),\\n/* harmony export */ \\\"useVarRef\\\": () => (/* binding */ useVarRef)\\n/* harmony export */ });\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @utils */ \\\"./src/utils/index.ts\\\");\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\nfunction useDragLine(num) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(num), filelistWidth = _a[0], setFilelistWidth = _a[1];\\n var dragStartRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({\\n pageX: 0,\\n width: 0,\\n start: false,\\n });\\n var handleMoveStart = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n dragStartRef.current = {\\n pageX: e.pageX,\\n width: filelistWidth,\\n start: true,\\n };\\n }, [filelistWidth]);\\n var handleMove = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n if (dragStartRef.current.start) {\\n var width = dragStartRef.current.width + (e.pageX - dragStartRef.current.pageX);\\n setFilelistWidth(width > 140 ? width : 0);\\n }\\n }, []);\\n var handleMoveEnd = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n dragStartRef.current = {\\n pageX: e.pageX,\\n width: 0,\\n start: false,\\n };\\n }, []);\\n var styles = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({\\n width: \\\"\\\".concat(filelistWidth, \\\"px\\\"),\\n }); }, [filelistWidth]);\\n return [styles, handleMoveStart, handleMove, handleMoveEnd];\\n}\\nfunction usePrettier(editorRef) {\\n var autoPrettierRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);\\n var handleSetAutoPrettier = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e) {\\n autoPrettierRef.current = e.target.checked;\\n }, []);\\n var handleFromat = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\\n var _a;\\n // @ts-ignore\\n return (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getAction('editor.action.formatDocument').run();\\n }, [editorRef]);\\n return [autoPrettierRef, handleSetAutoPrettier, handleFromat];\\n}\\nfunction useInit(filesRef, editorRef, options, handlePathChange, defaultPath, disableEslint) {\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.initFiles)(filesRef.current);\\n if (defaultPath) {\\n handlePathChange(defaultPath || '');\\n }\\n }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n if (editorRef.current) {\\n if (options.theme) {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)(options.theme);\\n }\\n editorRef.current.updateOptions(options);\\n }\\n }, [options, editorRef]);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n _utils__WEBPACK_IMPORTED_MODULE_1__.worker.then(function (res) {\\n return (res.onmessage = function (event) {\\n var _a;\\n if (!disableEslint) {\\n var _b = event.data, markers = _b.markers, version = _b.version;\\n var model = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel();\\n if (model && model.getVersionId() === version) {\\n window.monaco.editor.setModelMarkers(model, 'eslint', markers);\\n }\\n }\\n });\\n });\\n }, [editorRef, disableEslint]);\\n}\\nfunction useEditor(editorRef, optionsRef, openOrFocusPath, saveFile) {\\n var _this = this;\\n var editorNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n // 创建editor 实例\\n editorRef.current = window.monaco.editor.create(editorNodeRef.current, __assign(__assign({}, optionsRef.current), { model: null }));\\n var editorService = editorRef.current._codeEditorService;\\n var openEditorBase = editorService.openCodeEditor.bind(editorService);\\n editorService.openCodeEditor = function (input, source, sideBySide) { return __awaiter(_this, void 0, void 0, function () {\\n var result, fullPath;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, openEditorBase(input, source)];\\n case 1:\\n result = _a.sent();\\n if (result === null) {\\n fullPath = input.resource.path;\\n source.setModel(window.monaco.editor.getModel(input.resource));\\n openOrFocusPath(fullPath);\\n source.setSelection(input.options.selection);\\n source.revealLine(input.options.selection.startLineNumber);\\n }\\n return [2 /*return*/, result]; // always return the base result\\n }\\n });\\n }); };\\n editorRef.current.onDidBlurEditorText(function () {\\n var _a;\\n var model = ((_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel()) || undefined;\\n var path = model === null || model === void 0 ? void 0 : model.uri.path;\\n saveFile(path, model);\\n });\\n return function () {\\n // 销毁实例\\n if (editorRef.current) {\\n editorRef.current.dispose();\\n }\\n };\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, [openOrFocusPath, editorRef, optionsRef]);\\n return editorNodeRef;\\n}\\nvar useVarRef = function (param) {\\n var varRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(param);\\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\\n varRef.current = param;\\n }, [param]);\\n return varRef;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/hook.ts?\");\n\n/***/ }),\n\n/***/ \"./src/multi/index.tsx\":\n/*!*****************************!*\\\n !*** ./src/multi/index.tsx ***!\n \\*****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"MultiEditor\\\": () => (/* binding */ MultiEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Editor */ \\\"./src/multi/Editor.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/multi/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\n\\nvar MultiEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0), setCount = _a[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var interval = setInterval(function () {\\n setCount(function (pre) { return pre + 1; });\\n if (window.monaco) {\\n clearInterval(interval);\\n }\\n }, 100);\\n return function () {\\n clearInterval(interval);\\n };\\n }, []);\\n if (window.monaco) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Editor__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({}, props, { ref: ref }));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-loading\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { className: \\\"music-monaco-editor-loading-icon\\\", src: \\\"https://p6.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9879093207/2dbb/873a/9e97/e817279537a0417d042f62fbb1b99eea.gif\\\" }) })));\\n});\\nMultiEditor.displayName = 'MultiEditorEntry';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/multi/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/single/Editor.tsx\":\n/*!*******************************!*\\\n !*** ./src/single/Editor.tsx ***!\n \\*******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"INITIAL_OPTIONS\\\": () => (/* binding */ INITIAL_OPTIONS),\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* binding */ SingleEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _utils_initEditor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @utils/initEditor */ \\\"./src/utils/initEditor.ts\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n\\n\\nvar INITIAL_OPTIONS = {\\n theme: 'GithubDarkDefault',\\n fontSize: 14,\\n tabSize: 2,\\n fontFamily: 'Menlo, Monaco, Courier New, monospace',\\n folding: true,\\n minimap: {\\n enabled: false,\\n },\\n autoIndent: 'advanced',\\n contextmenu: true,\\n useTabStops: true,\\n wordBasedSuggestions: true,\\n formatOnPaste: true,\\n automaticLayout: true,\\n lineNumbers: 'on',\\n wordWrap: 'off',\\n scrollBeyondLastLine: false,\\n fixedOverflowWidgets: false,\\n snippetSuggestions: 'top',\\n scrollbar: {\\n vertical: 'auto',\\n horizontal: 'auto',\\n verticalScrollbarSize: 10,\\n horizontalScrollbarSize: 10,\\n },\\n};\\nfunction getStringValue(value) {\\n if (typeof value === 'undefined') {\\n return value;\\n }\\n return String(value);\\n}\\nvar SingleEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_a, ref) {\\n var value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, onBlur = _a.onBlur, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? '100%' : _c, loc = _a.loc, _d = _a.style, style = _d === void 0 ? {} : _d, _e = _a.options, options = _e === void 0 ? {} : _e;\\n var editorRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var editorNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value);\\n valueRef.current = value;\\n var onChangeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(onChange);\\n onChangeRef.current = onChange;\\n var onBlurRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(onBlur);\\n onBlurRef.current = onBlur;\\n var modelRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () { return ({\\n getEditor: function () { return editorRef === null || editorRef === void 0 ? void 0 : editorRef.current; },\\n }); });\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n editorRef.current = window.monaco.editor.create(editorNodeRef.current, __assign(__assign({}, options), INITIAL_OPTIONS));\\n var model = window.monaco.editor.createModel(\\n // value如果是number, 会报错\\n getStringValue(valueRef.current) || getStringValue(defaultValue) || '', (options === null || options === void 0 ? void 0 : options.language) || 'javascript');\\n editorRef.current.setModel(model);\\n modelRef.current = model;\\n var sub = model.onDidChangeContent(function () {\\n var v = model.getValue();\\n if (v !== valueRef.current && onChangeRef.current) {\\n onChangeRef.current(v);\\n }\\n });\\n var blurSub = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.onDidBlurEditorText(function () {\\n var _a, _b, _c;\\n var v = ((_b = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel()) === null || _b === void 0 ? void 0 : _b.getValue()) || '';\\n (_c = onBlurRef.current) === null || _c === void 0 ? void 0 : _c.call(onBlurRef, v);\\n });\\n return function () {\\n if (editorRef.current) {\\n editorRef.current.dispose();\\n }\\n sub.dispose();\\n blurSub.dispose();\\n model.dispose();\\n };\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, []);\\n // 更新options\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (editorRef.current) {\\n editorRef.current.updateOptions(options || {});\\n }\\n }, [options]);\\n // 更新高亮区域\\n var decorcations = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\\n var locModel = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (loc, forceCenter) {\\n var _a, _b;\\n if (loc) {\\n var start = loc.start, end = loc.end;\\n decorcations.current = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.deltaDecorations(decorcations.current || [], [\\n {\\n range: new window.monaco.Range(start.line, start.column, end.line, end.column),\\n options: {\\n className: 'music-monaco-editor-highlight',\\n isWholeLine: true,\\n },\\n },\\n ]);\\n if (forceCenter) {\\n (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.revealLineInCenter(start.line);\\n }\\n }\\n }, []);\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n // 默认高亮用户选中的行\\n locModel(loc, false);\\n }, [loc, locModel]);\\n // 更新model 语言\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (options.language && modelRef.current) {\\n window.monaco.editor.setModelLanguage(modelRef.current, options.language);\\n }\\n }, [options.language]);\\n // 控制主题\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n if (options.theme) {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)(options.theme);\\n }\\n else {\\n (0,_utils_initEditor__WEBPACK_IMPORTED_MODULE_2__.configTheme)('GithubLightDefault');\\n }\\n }, [options.theme]);\\n // 受控,外部改变,同步monaco\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var _a;\\n // undefined,表示外界不受控,不做处理\\n if (value === undefined)\\n return;\\n var model = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getModel();\\n if (value !== (model === null || model === void 0 ? void 0 : model.getValue())) {\\n // const viewState = editorRef.current?.saveViewState();\\n // model?.pushEditOperations(\\n // [],\\n // [\\n // {\\n // range: model?.getFullModelRange(),\\n // text: value || '',\\n // },\\n // ],\\n // () => null\\n // );\\n model === null || model === void 0 ? void 0 : model.setValue(getStringValue(value) || '');\\n // if (viewState) {\\n // editorRef.current?.restoreViewState(viewState);\\n // }\\n locModel(loc, true);\\n }\\n // eslint-disable-next-line react-hooks/exhaustive-deps\\n }, [value, locModel]);\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", { ref: editorNodeRef, style: __assign({ width: width, height: height }, style) }));\\n});\\nSingleEditor.displayName = 'SingleEditor';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SingleEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/Editor.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/single/index.tsx\":\n/*!******************************!*\\\n !*** ./src/single/index.tsx ***!\n \\******************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"SingleEditor\\\": () => (/* binding */ SingleEditor),\\n/* harmony export */ \\\"default\\\": () => (__WEBPACK_DEFAULT_EXPORT__)\\n/* harmony export */ });\\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \\\"./node_modules/react/jsx-runtime.js\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \\\"react\\\");\\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Editor */ \\\"./src/single/Editor.tsx\\\");\\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less */ \\\"./src/single/index.less\\\");\\nvar __assign = (undefined && undefined.__assign) || function () {\\n __assign = Object.assign || function(t) {\\n for (var s, i = 1, n = arguments.length; i < n; i++) {\\n s = arguments[i];\\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\\n t[p] = s[p];\\n }\\n return t;\\n };\\n return __assign.apply(this, arguments);\\n};\\n\\n// @ts-nocheck\\n\\n\\n\\nvar SingleEditor = react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {\\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0), setCount = _a[1];\\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\\n var interval = setInterval(function () {\\n setCount(function (pre) { return pre + 1; });\\n if (window.monaco) {\\n clearInterval(interval);\\n }\\n }, 100);\\n }, []);\\n if (window.monaco) {\\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Editor__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"], __assign({}, props, { ref: ref }));\\n }\\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"div\\\", __assign({ className: \\\"music-monaco-editor-loading\\\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\\\"img\\\", { className: \\\"music-monaco-editor-loading-icon\\\", src: \\\"https://p6.music.126.net/obj/wo3DlcOGw6DClTvDisK1/9879093207/2dbb/873a/9e97/e817279537a0417d042f62fbb1b99eea.gif\\\" }) })));\\n});\\nSingleEditor.displayName = 'SingleEditor';\\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SingleEditor);\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/single/index.tsx?\");\n\n/***/ }),\n\n/***/ \"./src/utils/consts.ts\":\n/*!*****************************!*\\\n !*** ./src/utils/consts.ts ***!\n \\*****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"ASSETSPATH\\\": () => (/* binding */ ASSETSPATH),\\n/* harmony export */ \\\"THEMES\\\": () => (/* binding */ THEMES),\\n/* harmony export */ \\\"ESLINTCONFIG\\\": () => (/* binding */ ESLINTCONFIG)\\n/* harmony export */ });\\n// @ts-ignore\\nvar ASSETSPATH = \\\"https://s9.music.126.net/musicst/npm/react-monaco-editor-lite/1.2.3/\\\";\\nvar DARKTHEMES = [\\n 'GithubDarkDefault',\\n // 'AtlanticNight',\\n // 'Nebula',\\n // 'ShadesOfPurple',\\n // 'AtomOneDark',\\n // 'NoctisAzureus',\\n // 'AuroraX', // bad\\n // 'Hopscotch',\\n // 'NoctisBordo',\\n // 'SnazzyOperator',\\n // 'NoctisLux',\\n // 'SublimeMaterialThemeDark',\\n // 'HybridNext',\\n // 'OneDarkPro',\\n // 'SynthWave84',\\n // 'KimbieDark',\\n // 'OneMonokai',\\n // 'TokyoNightStorm',\\n // 'CodeSandBox',\\n // 'Lucario',\\n // 'Panda',\\n // 'TomorrowNightBlue',\\n // 'Darktooth',\\n // 'MonokaiDimmed',\\n // 'ReUI',\\n // 'Twilight',\\n // 'MonokaiPro',\\n // 'RemedyDark',\\n];\\nvar LIGHTTHEMES = [\\n 'GithubLightDefault',\\n // 'EvaLight',\\n // 'FlatUI',\\n // 'SnazzyLight', // bad\\n // 'AyuLight',\\n // 'BlulocoLight', // bad\\n // 'HorlaLightTheme', // bad\\n];\\nvar THEMES = DARKTHEMES.concat(LIGHTTHEMES);\\nvar ESLINTCONFIG = {\\n parserOptions: {\\n ecmaVersion: 'latest',\\n sourceType: 'module',\\n ecmaFeatures: {\\n jsx: true,\\n },\\n },\\n plugins: ['react'],\\n extends: ['eslint:recommended', 'plugin:react/recommended'],\\n rules: {\\n 'jsx-uses-react': 'error',\\n 'react/jsx-uses-vars': 'error',\\n 'constructor-super': 2,\\n 'for-direction': 2,\\n 'getter-return': 2,\\n 'no-async-promise-executor': 2,\\n 'no-case-declarations': 2,\\n 'no-class-assign': 2,\\n 'no-compare-neg-zero': 2,\\n 'no-cond-assign': 2,\\n 'no-const-assign': 2,\\n 'no-constant-condition': 2,\\n 'no-control-regex': 2,\\n 'no-debugger': 2,\\n 'no-delete-var': 2,\\n 'no-dupe-args': 2,\\n 'no-dupe-class-members': 2,\\n 'no-dupe-else-if': 2,\\n 'no-dupe-keys': 2,\\n 'no-duplicate-case': 2,\\n 'no-empty': 2,\\n 'no-empty-character-class': 2,\\n 'no-empty-pattern': 2,\\n 'no-ex-assign': 2,\\n 'no-extra-boolean-cast': 2,\\n 'no-extra-semi': 2,\\n 'no-fallthrough': 2,\\n 'no-func-assign': 2,\\n 'no-global-assign': 2,\\n 'no-import-assign': 2,\\n 'no-inner-declarations': 2,\\n 'no-invalid-regexp': 2,\\n 'no-irregular-whitespace': 2,\\n 'no-loss-of-precision': 2,\\n 'no-misleading-character-class': 2,\\n 'no-mixed-spaces-and-tabs': 2,\\n 'no-new-symbol': 2,\\n 'no-nonoctal-decimal-escape': 2,\\n 'no-obj-calls': 2,\\n 'no-octal': 2,\\n 'no-prototype-builtins': 2,\\n 'no-redeclare': 2,\\n 'no-regex-spaces': 2,\\n 'no-self-assign': 2,\\n 'no-setter-return': 2,\\n 'no-shadow-restricted-names': 2,\\n 'no-sparse-arrays': 2,\\n 'no-this-before-super': 2,\\n 'no-undef': 2,\\n 'no-unexpected-multiline': 2,\\n 'no-unreachable': 2,\\n 'no-unsafe-finally': 2,\\n 'no-unsafe-negation': 2,\\n 'no-unsafe-optional-chaining': 2,\\n 'no-unused-labels': 2,\\n 'no-unused-vars': 2,\\n 'no-useless-backreference': 2,\\n 'no-useless-catch': 2,\\n 'no-useless-escape': 2,\\n 'no-with': 2,\\n 'require-yield': 2,\\n 'use-isnan': 2,\\n 'valid-typeof': 2,\\n 'no-console': 2,\\n },\\n env: {\\n browser: true,\\n },\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/consts.ts?\");\n\n/***/ }),\n\n/***/ \"./src/utils/index.ts\":\n/*!****************************!*\\\n !*** ./src/utils/index.ts ***!\n \\****************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"deepCopy\\\": () => (/* binding */ deepCopy),\\n/* harmony export */ \\\"generateFileTree\\\": () => (/* binding */ generateFileTree),\\n/* harmony export */ \\\"addSourceFile\\\": () => (/* binding */ addSourceFile),\\n/* harmony export */ \\\"deleteSourceFile\\\": () => (/* binding */ deleteSourceFile),\\n/* harmony export */ \\\"editSourceFileName\\\": () => (/* binding */ editSourceFileName),\\n/* harmony export */ \\\"addSourceFolder\\\": () => (/* binding */ addSourceFolder),\\n/* harmony export */ \\\"deleteSourceFolder\\\": () => (/* binding */ deleteSourceFolder),\\n/* harmony export */ \\\"editSourceFolderName\\\": () => (/* binding */ editSourceFolderName),\\n/* harmony export */ \\\"getOldNewPath\\\": () => (/* binding */ getOldNewPath),\\n/* harmony export */ \\\"createOrUpdateModel\\\": () => (/* binding */ createOrUpdateModel),\\n/* harmony export */ \\\"initFiles\\\": () => (/* binding */ initFiles),\\n/* harmony export */ \\\"deleteModel\\\": () => (/* binding */ deleteModel),\\n/* harmony export */ \\\"copyDataToClipBoard\\\": () => (/* binding */ copyDataToClipBoard),\\n/* harmony export */ \\\"worker\\\": () => (/* binding */ worker),\\n/* harmony export */ \\\"setMonacoSyntasValidation\\\": () => (/* binding */ setMonacoSyntasValidation),\\n/* harmony export */ \\\"filterNull\\\": () => (/* binding */ filterNull)\\n/* harmony export */ });\\n/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./consts */ \\\"./src/utils/consts.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\nfunction deepCopy(obj) {\\n return JSON.parse(JSON.stringify(obj));\\n}\\n// 生成文件树\\nfunction generateFileTree(files) {\\n var keys = Object.keys(files);\\n var tree = {\\n isDirectory: true,\\n children: {},\\n path: '/',\\n };\\n keys.forEach(function (key) {\\n var path = key.slice(1).split('/');\\n var temp = tree.children;\\n path.forEach(function (v, index) {\\n if (index === path.length - 1) {\\n temp[v] = {\\n name: v,\\n path: key,\\n value: files[key],\\n _isFile: true,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + path.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n });\\n return tree;\\n}\\n// 在文件树中添加文件\\nfunction addSourceFile(sourcetree, path, value) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var name = paths[paths.length - 1];\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[v] = {\\n name: name,\\n value: value || '',\\n path: path,\\n _isFile: true,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中删除文件\\nfunction deleteSourceFile(sourcetree, path) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中修改文件名称\\nfunction editSourceFileName(sourcetree, path, name) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[name] = {\\n name: name,\\n path: '/' + paths.slice(0, index).concat(name).join('/'),\\n value: temp[v].value,\\n _isFile: true,\\n };\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中增加文件夹\\nfunction addSourceFolder(sourcetree, path, value) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[v] = {\\n children: {},\\n path: path,\\n _isDirectory: true,\\n name: v,\\n };\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\n// 在文件树中删除文件夹\\nfunction deleteSourceFolder(sourcetree, path) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n return copy;\\n}\\nfunction editSubFolder(tree, oldPath, newPath) {\\n tree.path = tree.path.replace(oldPath, newPath);\\n if (tree._isDirectory) {\\n Object.keys(tree.children).forEach(function (v) {\\n return editSubFolder(tree.children[v], oldPath, newPath);\\n });\\n }\\n}\\n// 在文件树中修改文件夹名称\\nfunction editSourceFolderName(sourcetree, path, name) {\\n var copy = deepCopy(sourcetree);\\n var paths = (path || '/').slice(1).split('/');\\n var temp = copy.children;\\n var newPath = '/' + paths.slice(0, -1).concat(name).join('/');\\n paths.forEach(function (v, index) {\\n if (index === paths.length - 1) {\\n temp[name] = {\\n name: name,\\n path: newPath,\\n children: temp[v].children,\\n _isDirectory: true,\\n };\\n delete temp[v];\\n }\\n else if (temp[v]) {\\n temp = temp[v].children;\\n }\\n else {\\n temp[v] = {\\n _isDirectory: true,\\n children: {},\\n path: '/' + paths.slice(0, index + 1).join('/'),\\n name: v,\\n };\\n temp = temp[v].children;\\n }\\n });\\n // 修改文件夹名称后,修改子路径下所有文件及文件夹的路径\\n editSubFolder(temp[name], path + '/', newPath + '/');\\n return copy;\\n}\\nfunction getOldNewPath(oldpath, newname) {\\n var paths = oldpath.split('/');\\n paths.splice(-1);\\n paths.push(newname);\\n var newpath = paths.join('/');\\n return {\\n oldpath: oldpath,\\n newpath: newpath,\\n };\\n}\\nfunction createOrUpdateModel(path, value) {\\n // model 是否存在\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (model) {\\n if (model.getValue() !== value) {\\n model.pushEditOperations([], [\\n {\\n range: model === null || model === void 0 ? void 0 : model.getFullModelRange(),\\n text: value,\\n },\\n ], function () { return []; });\\n }\\n }\\n else if (path) {\\n var type = '';\\n if (path.indexOf('.') !== -1) {\\n type = path.split('.').slice(-1)[0];\\n }\\n else {\\n type = 'javascript';\\n }\\n var config = {\\n js: 'javascript',\\n ts: 'typescript',\\n less: 'less',\\n jsx: 'javascript',\\n tsx: 'typescript',\\n };\\n model = window.monaco.editor.createModel(value, config[type] || type, new window.monaco.Uri().with({ path: path, scheme: 'music' }));\\n // model.updateOptions({\\n // tabSize: 4,\\n // });\\n }\\n}\\nfunction initFiles(files) {\\n Object.keys(files).forEach(function (key) {\\n var value = files[key];\\n if (typeof value === 'string') {\\n createOrUpdateModel(key, value);\\n }\\n });\\n}\\n// TODO:删除model\\nfunction deleteModel(path) {\\n // model 是否存在\\n var model = window.monaco.editor\\n .getModels()\\n .find(function (model) { return model.uri.path === path; });\\n if (model) {\\n model.dispose();\\n }\\n else {\\n console.warn('要删除的model不存在');\\n }\\n}\\n// TODO:重命名model\\nvar copyDataToClipBoard = function (data, callback) {\\n var input = document.createElement('input');\\n document.body.appendChild(input);\\n input.setAttribute('value', data);\\n input.select();\\n if (document.execCommand('copy')) {\\n document.execCommand('copy');\\n callback && callback(true);\\n }\\n else {\\n callback && callback(false);\\n }\\n document.body.removeChild(input);\\n};\\nvar worker = new Promise(function (resolve) { return __awaiter(void 0, void 0, void 0, function () {\\n var codeString, localWorkerUrl;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_0__.ASSETSPATH, \\\"eslint.worker.js\\\")).then(function (res) {\\n return res.text();\\n })];\\n case 1:\\n codeString = _a.sent();\\n localWorkerUrl = window.URL.createObjectURL(new Blob([codeString], {\\n type: 'application/javascript',\\n }));\\n resolve(new Worker(localWorkerUrl));\\n return [2 /*return*/];\\n }\\n });\\n}); });\\n//\\nvar setMonacoSyntasValidation = function (disable) {\\n window.monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({\\n noSemanticValidation: disable,\\n noSyntaxValidation: disable,\\n });\\n};\\nvar filterNull = function (obj) {\\n if (obj === void 0) { obj = {}; }\\n var newobj = {};\\n Object.keys(obj).forEach(function (key) {\\n if (obj[key] !== null) {\\n newobj[key] = obj[key];\\n }\\n });\\n return newobj;\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/index.ts?\");\n\n/***/ }),\n\n/***/ \"./src/utils/initEditor.ts\":\n/*!*********************************!*\\\n !*** ./src/utils/initEditor.ts ***!\n \\*********************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ \\\"themes\\\": () => (/* binding */ themes),\\n/* harmony export */ \\\"configTheme\\\": () => (/* binding */ configTheme),\\n/* harmony export */ \\\"startUp\\\": () => (/* binding */ startUp)\\n/* harmony export */ });\\n/* harmony import */ var onigasm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! onigasm */ \\\"./node_modules/onigasm/lib/index.js\\\");\\n/* harmony import */ var monaco_textmate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! monaco-textmate */ \\\"./node_modules/monaco-textmate/dist/main.js\\\");\\n/* harmony import */ var monaco_textmate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(monaco_textmate__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var monaco_editor_textmate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! monaco-editor-textmate */ \\\"./node_modules/monaco-editor-textmate/dist/index.js\\\");\\n/* harmony import */ var _consts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./consts */ \\\"./src/utils/consts.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\n\\n\\n\\n\\nfunction loadScript(url, cb) {\\n var script = document.createElement('script');\\n script.src = url;\\n document.getElementsByTagName('body')[0].appendChild(script);\\n script.onload = cb;\\n}\\n// function loadCode(code: string) {\\n// const script = document.createElement('script');\\n// script.type = ' text/javascript';\\n// script.appendChild(document.createTextNode(code));\\n// document.getElementsByTagName('body')[0].appendChild(script);\\n// }\\nvar execed = false;\\nvar grammerMap = {\\n 'source.ts': 'Typescript.tmLanguage.json',\\n 'source.js': 'Javascript.tmLanguage.json',\\n 'source.js.jsx': 'JavaScriptReact.tmLanguage.json',\\n 'source.ts.tsx': 'TypesSriptReact.tmLanguage.json',\\n 'source.css': 'css.tmLanguage.json',\\n 'source.less': 'less.tmLanguage.json',\\n 'text.html.basic': 'html.tmLanguage.json',\\n};\\nvar themes = {};\\nfunction configTheme(name) {\\n return __awaiter(this, void 0, void 0, function () {\\n var theme, _a, _b, prefix, style, res;\\n return __generator(this, function (_c) {\\n switch (_c.label) {\\n case 0:\\n theme = themes[name];\\n if (!!theme) return [3 /*break*/, 3];\\n _b = (_a = JSON).parse;\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"themes/\\\").concat(name, \\\".json?v=0\\\"))];\\n case 1: return [4 /*yield*/, (_c.sent()).text()];\\n case 2:\\n theme = _b.apply(_a, [_c.sent()]);\\n themes[name] = theme;\\n // 定义主题\\n window.monaco.editor.defineTheme(name, theme);\\n _c.label = 3;\\n case 3:\\n prefix = '--monaco-';\\n style = document.getElementById('monaco-editor-theme-style');\\n if (!style) {\\n style = document.createElement('style');\\n style.id = 'monaco-editor-theme-style';\\n document.getElementsByTagName('head')[0].appendChild(style);\\n }\\n res = '#music-monaco-editor-root {';\\n Object.keys(theme.colors).forEach(function (v) {\\n res += \\\"\\\".concat(prefix).concat(v.replace('.', '-'), \\\": \\\").concat(theme.colors[v] || 'rgba(0, 0, 0, 0)', \\\";\\\");\\n });\\n res += '}';\\n style.innerHTML = res;\\n // 设置主题\\n window.monaco.editor.setTheme(name);\\n return [2 /*return*/];\\n }\\n });\\n });\\n}\\nfunction addExtraLib() {\\n return __awaiter(this, void 0, void 0, function () {\\n var res;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react/index.d.ts\\\"))];\\n case 1: return [4 /*yield*/, (_a.sent()).text()];\\n case 2:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.setCompilerOptions({\\n allowJs: true,\\n allowNonTsExtensions: true,\\n allowSyntheticDefaultImports: true, // for use of import React from 'react' ranther than import * as React from 'react'\\n });\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react/index.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react/index.d.ts');\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react/global.d.ts\\\"))];\\n case 3: return [4 /*yield*/, (_a.sent()).text()];\\n case 4:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/%40types/react/global.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/%40types/react/global.d.ts');\\n return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"@types/react-dom/index.d.ts\\\"))];\\n case 5: return [4 /*yield*/, (_a.sent()).text()];\\n case 6:\\n res = _a.sent();\\n window.monaco.languages.typescript.javascriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react-dom/index.d.ts');\\n window.monaco.languages.typescript.typescriptDefaults.addExtraLib(res, 'music:/node_modules/@types/react-dom/index.d.ts');\\n return [2 /*return*/];\\n }\\n });\\n });\\n}\\nfunction configMonaco() {\\n var _this = this;\\n var init = function () { return __awaiter(_this, void 0, void 0, function () {\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n window.monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);\\n // 加载textmate语义解析webassembly文件\\n return [4 /*yield*/, (0,onigasm__WEBPACK_IMPORTED_MODULE_0__.loadWASM)(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"onigasm.wasm\\\"))];\\n case 1:\\n // 加载textmate语义解析webassembly文件\\n _a.sent();\\n addExtraLib();\\n return [2 /*return*/];\\n }\\n });\\n }); };\\n init();\\n window.monaco.languages.register({ id: 'JavascriptReact' });\\n window.monaco.languages.register({ id: 'TypescriptReact' });\\n // 创建语法映射\\n var grammars = new Map();\\n grammars.set('typescript', 'source.ts');\\n grammars.set('javascript', 'source.js');\\n grammars.set('JavascriptReact', 'source.js.jsx');\\n grammars.set('TypescriptReact', 'source.ts.tsx');\\n grammars.set('less', 'source.less');\\n grammars.set('css', 'source.css');\\n grammars.set('html', 'text.html.basic');\\n // 创建一个注册表,可以从作用域名称来加载对应的语法文件\\n var registry = new monaco_textmate__WEBPACK_IMPORTED_MODULE_1__.Registry({\\n getGrammarDefinition: function (scopeName) { return __awaiter(_this, void 0, void 0, function () {\\n var res;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0: return [4 /*yield*/, fetch(\\\"\\\".concat(_consts__WEBPACK_IMPORTED_MODULE_3__.ASSETSPATH, \\\"Grammars/\\\").concat(grammerMap[scopeName]))];\\n case 1: return [4 /*yield*/, (_a.sent()).text()];\\n case 2:\\n res = _a.sent();\\n return [2 /*return*/, {\\n format: 'json',\\n content: res,\\n }];\\n }\\n });\\n }); },\\n });\\n // 将语法映射揉进monaco\\n function wireMonacoGrammars() {\\n (0,monaco_editor_textmate__WEBPACK_IMPORTED_MODULE_2__.wireTmGrammars)(window.monaco, registry, grammars);\\n }\\n // 延迟语法解析的修改,防止monaco在加载后覆盖次语法映射\\n setTimeout(function () {\\n wireMonacoGrammars();\\n }, 3000);\\n}\\nvar startUp = function () {\\n if (execed)\\n return;\\n execed = true;\\n loadScript('https://g.alicdn.com/code/lib/monaco-editor/0.31.1/min/vs/loader.min.js', function () {\\n window.require.config({\\n paths: {\\n vs: 'https://g.alicdn.com/code/lib/monaco-editor/0.31.1/min/vs',\\n },\\n });\\n // eslint-disable-next-line @typescript-eslint/no-empty-function\\n window.require(['vs/editor/editor.main'], function () { });\\n // window.define(\\n // 'prettier',\\n // [\\n // 'https://unpkg.com/prettier@2.5.1/standalone.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-babel.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-html.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-postcss.js',\\n // 'https://unpkg.com/prettier@2.5.1/parser-typescript.js',\\n // ],\\n // (prettier: any, ...args: any[]) => {\\n // const prettierPlugins = {\\n // babel: args[0],\\n // html: args[1],\\n // postcss: args[2],\\n // typescript: args[3],\\n // };\\n // return {\\n // prettier,\\n // prettierPlugins,\\n // };\\n // }\\n // );\\n });\\n var interval = setInterval(function () {\\n if (window.monaco) {\\n configMonaco();\\n clearInterval(interval);\\n }\\n }, 100);\\n};\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./src/utils/initEditor.ts?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/node_modules/inherits/inherits_browser.js\":\n/*!*********************************************************************!*\\\n !*** ./node_modules/util/node_modules/inherits/inherits_browser.js ***!\n \\*********************************************************************/\n/***/ ((module) => {\n\neval(\"if (typeof Object.create === 'function') {\\n // implementation from standard node.js 'util' module\\n module.exports = function inherits(ctor, superCtor) {\\n ctor.super_ = superCtor\\n ctor.prototype = Object.create(superCtor.prototype, {\\n constructor: {\\n value: ctor,\\n enumerable: false,\\n writable: true,\\n configurable: true\\n }\\n });\\n };\\n} else {\\n // old school shim for old browsers\\n module.exports = function inherits(ctor, superCtor) {\\n ctor.super_ = superCtor\\n var TempCtor = function () {}\\n TempCtor.prototype = superCtor.prototype\\n ctor.prototype = new TempCtor()\\n ctor.prototype.constructor = ctor\\n }\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/node_modules/inherits/inherits_browser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/support/isBufferBrowser.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/util/support/isBufferBrowser.js ***!\n \\******************************************************/\n/***/ ((module) => {\n\neval(\"module.exports = function isBuffer(arg) {\\n return arg && typeof arg === 'object'\\n && typeof arg.copy === 'function'\\n && typeof arg.fill === 'function'\\n && typeof arg.readUInt8 === 'function';\\n}\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/support/isBufferBrowser.js?\");\n\n/***/ }),\n\n/***/ \"./node_modules/util/util.js\":\n/*!***********************************!*\\\n !*** ./node_modules/util/util.js ***!\n \\***********************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\neval(\"/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \\\"./node_modules/process/browser.js\\\");\\n// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\nvar formatRegExp = /%[sdj%]/g;\\nexports.format = function(f) {\\n if (!isString(f)) {\\n var objects = [];\\n for (var i = 0; i < arguments.length; i++) {\\n objects.push(inspect(arguments[i]));\\n }\\n return objects.join(' ');\\n }\\n\\n var i = 1;\\n var args = arguments;\\n var len = args.length;\\n var str = String(f).replace(formatRegExp, function(x) {\\n if (x === '%%') return '%';\\n if (i >= len) return x;\\n switch (x) {\\n case '%s': return String(args[i++]);\\n case '%d': return Number(args[i++]);\\n case '%j':\\n try {\\n return JSON.stringify(args[i++]);\\n } catch (_) {\\n return '[Circular]';\\n }\\n default:\\n return x;\\n }\\n });\\n for (var x = args[i]; i < len; x = args[++i]) {\\n if (isNull(x) || !isObject(x)) {\\n str += ' ' + x;\\n } else {\\n str += ' ' + inspect(x);\\n }\\n }\\n return str;\\n};\\n\\n\\n// Mark that a method should not be used.\\n// Returns a modified function which warns once by default.\\n// If --no-deprecation is set, then it is a no-op.\\nexports.deprecate = function(fn, msg) {\\n // Allow for deprecating things in the process of starting up.\\n if (isUndefined(__webpack_require__.g.process)) {\\n return function() {\\n return exports.deprecate(fn, msg).apply(this, arguments);\\n };\\n }\\n\\n if (process.noDeprecation === true) {\\n return fn;\\n }\\n\\n var warned = false;\\n function deprecated() {\\n if (!warned) {\\n if (process.throwDeprecation) {\\n throw new Error(msg);\\n } else if (process.traceDeprecation) {\\n console.trace(msg);\\n } else {\\n console.error(msg);\\n }\\n warned = true;\\n }\\n return fn.apply(this, arguments);\\n }\\n\\n return deprecated;\\n};\\n\\n\\nvar debugs = {};\\nvar debugEnviron;\\nexports.debuglog = function(set) {\\n if (isUndefined(debugEnviron))\\n debugEnviron = process.env.NODE_DEBUG || '';\\n set = set.toUpperCase();\\n if (!debugs[set]) {\\n if (new RegExp('\\\\\\\\b' + set + '\\\\\\\\b', 'i').test(debugEnviron)) {\\n var pid = process.pid;\\n debugs[set] = function() {\\n var msg = exports.format.apply(exports, arguments);\\n console.error('%s %d: %s', set, pid, msg);\\n };\\n } else {\\n debugs[set] = function() {};\\n }\\n }\\n return debugs[set];\\n};\\n\\n\\n/**\\n * Echos the value of a value. Trys to print the value out\\n * in the best way possible given the different types.\\n *\\n * @param {Object} obj The object to print out.\\n * @param {Object} opts Optional options object that alters the output.\\n */\\n/* legacy: obj, showHidden, depth, colors*/\\nfunction inspect(obj, opts) {\\n // default options\\n var ctx = {\\n seen: [],\\n stylize: stylizeNoColor\\n };\\n // legacy...\\n if (arguments.length >= 3) ctx.depth = arguments[2];\\n if (arguments.length >= 4) ctx.colors = arguments[3];\\n if (isBoolean(opts)) {\\n // legacy...\\n ctx.showHidden = opts;\\n } else if (opts) {\\n // got an \\\"options\\\" object\\n exports._extend(ctx, opts);\\n }\\n // set default options\\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\\n if (isUndefined(ctx.depth)) ctx.depth = 2;\\n if (isUndefined(ctx.colors)) ctx.colors = false;\\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\\n if (ctx.colors) ctx.stylize = stylizeWithColor;\\n return formatValue(ctx, obj, ctx.depth);\\n}\\nexports.inspect = inspect;\\n\\n\\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\\ninspect.colors = {\\n 'bold' : [1, 22],\\n 'italic' : [3, 23],\\n 'underline' : [4, 24],\\n 'inverse' : [7, 27],\\n 'white' : [37, 39],\\n 'grey' : [90, 39],\\n 'black' : [30, 39],\\n 'blue' : [34, 39],\\n 'cyan' : [36, 39],\\n 'green' : [32, 39],\\n 'magenta' : [35, 39],\\n 'red' : [31, 39],\\n 'yellow' : [33, 39]\\n};\\n\\n// Don't use 'blue' not visible on cmd.exe\\ninspect.styles = {\\n 'special': 'cyan',\\n 'number': 'yellow',\\n 'boolean': 'yellow',\\n 'undefined': 'grey',\\n 'null': 'bold',\\n 'string': 'green',\\n 'date': 'magenta',\\n // \\\"name\\\": intentionally not styling\\n 'regexp': 'red'\\n};\\n\\n\\nfunction stylizeWithColor(str, styleType) {\\n var style = inspect.styles[styleType];\\n\\n if (style) {\\n return '\\\\u001b[' + inspect.colors[style][0] + 'm' + str +\\n '\\\\u001b[' + inspect.colors[style][1] + 'm';\\n } else {\\n return str;\\n }\\n}\\n\\n\\nfunction stylizeNoColor(str, styleType) {\\n return str;\\n}\\n\\n\\nfunction arrayToHash(array) {\\n var hash = {};\\n\\n array.forEach(function(val, idx) {\\n hash[val] = true;\\n });\\n\\n return hash;\\n}\\n\\n\\nfunction formatValue(ctx, value, recurseTimes) {\\n // Provide a hook for user-specified inspect functions.\\n // Check that value is an object with an inspect function on it\\n if (ctx.customInspect &&\\n value &&\\n isFunction(value.inspect) &&\\n // Filter out the util module, it's inspect function is special\\n value.inspect !== exports.inspect &&\\n // Also filter out any prototype objects using the circular check.\\n !(value.constructor && value.constructor.prototype === value)) {\\n var ret = value.inspect(recurseTimes, ctx);\\n if (!isString(ret)) {\\n ret = formatValue(ctx, ret, recurseTimes);\\n }\\n return ret;\\n }\\n\\n // Primitive types cannot have properties\\n var primitive = formatPrimitive(ctx, value);\\n if (primitive) {\\n return primitive;\\n }\\n\\n // Look up the keys of the object.\\n var keys = Object.keys(value);\\n var visibleKeys = arrayToHash(keys);\\n\\n if (ctx.showHidden) {\\n keys = Object.getOwnPropertyNames(value);\\n }\\n\\n // IE doesn't make error fields non-enumerable\\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\\n if (isError(value)\\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\\n return formatError(value);\\n }\\n\\n // Some type of object without properties can be shortcutted.\\n if (keys.length === 0) {\\n if (isFunction(value)) {\\n var name = value.name ? ': ' + value.name : '';\\n return ctx.stylize('[Function' + name + ']', 'special');\\n }\\n if (isRegExp(value)) {\\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\\n }\\n if (isDate(value)) {\\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\\n }\\n if (isError(value)) {\\n return formatError(value);\\n }\\n }\\n\\n var base = '', array = false, braces = ['{', '}'];\\n\\n // Make Array say that they are Array\\n if (isArray(value)) {\\n array = true;\\n braces = ['[', ']'];\\n }\\n\\n // Make functions say that they are functions\\n if (isFunction(value)) {\\n var n = value.name ? ': ' + value.name : '';\\n base = ' [Function' + n + ']';\\n }\\n\\n // Make RegExps say that they are RegExps\\n if (isRegExp(value)) {\\n base = ' ' + RegExp.prototype.toString.call(value);\\n }\\n\\n // Make dates with properties first say the date\\n if (isDate(value)) {\\n base = ' ' + Date.prototype.toUTCString.call(value);\\n }\\n\\n // Make error with message first say the error\\n if (isError(value)) {\\n base = ' ' + formatError(value);\\n }\\n\\n if (keys.length === 0 && (!array || value.length == 0)) {\\n return braces[0] + base + braces[1];\\n }\\n\\n if (recurseTimes < 0) {\\n if (isRegExp(value)) {\\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\\n } else {\\n return ctx.stylize('[Object]', 'special');\\n }\\n }\\n\\n ctx.seen.push(value);\\n\\n var output;\\n if (array) {\\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\\n } else {\\n output = keys.map(function(key) {\\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\\n });\\n }\\n\\n ctx.seen.pop();\\n\\n return reduceToSingleString(output, base, braces);\\n}\\n\\n\\nfunction formatPrimitive(ctx, value) {\\n if (isUndefined(value))\\n return ctx.stylize('undefined', 'undefined');\\n if (isString(value)) {\\n var simple = '\\\\'' + JSON.stringify(value).replace(/^\\\"|\\\"$/g, '')\\n .replace(/'/g, \\\"\\\\\\\\'\\\")\\n .replace(/\\\\\\\\\\\"/g, '\\\"') + '\\\\'';\\n return ctx.stylize(simple, 'string');\\n }\\n if (isNumber(value))\\n return ctx.stylize('' + value, 'number');\\n if (isBoolean(value))\\n return ctx.stylize('' + value, 'boolean');\\n // For some reason typeof null is \\\"object\\\", so special case here.\\n if (isNull(value))\\n return ctx.stylize('null', 'null');\\n}\\n\\n\\nfunction formatError(value) {\\n return '[' + Error.prototype.toString.call(value) + ']';\\n}\\n\\n\\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\\n var output = [];\\n for (var i = 0, l = value.length; i < l; ++i) {\\n if (hasOwnProperty(value, String(i))) {\\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\\n String(i), true));\\n } else {\\n output.push('');\\n }\\n }\\n keys.forEach(function(key) {\\n if (!key.match(/^\\\\d+$/)) {\\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\\n key, true));\\n }\\n });\\n return output;\\n}\\n\\n\\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\\n var name, str, desc;\\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\\n if (desc.get) {\\n if (desc.set) {\\n str = ctx.stylize('[Getter/Setter]', 'special');\\n } else {\\n str = ctx.stylize('[Getter]', 'special');\\n }\\n } else {\\n if (desc.set) {\\n str = ctx.stylize('[Setter]', 'special');\\n }\\n }\\n if (!hasOwnProperty(visibleKeys, key)) {\\n name = '[' + key + ']';\\n }\\n if (!str) {\\n if (ctx.seen.indexOf(desc.value) < 0) {\\n if (isNull(recurseTimes)) {\\n str = formatValue(ctx, desc.value, null);\\n } else {\\n str = formatValue(ctx, desc.value, recurseTimes - 1);\\n }\\n if (str.indexOf('\\\\n') > -1) {\\n if (array) {\\n str = str.split('\\\\n').map(function(line) {\\n return ' ' + line;\\n }).join('\\\\n').substr(2);\\n } else {\\n str = '\\\\n' + str.split('\\\\n').map(function(line) {\\n return ' ' + line;\\n }).join('\\\\n');\\n }\\n }\\n } else {\\n str = ctx.stylize('[Circular]', 'special');\\n }\\n }\\n if (isUndefined(name)) {\\n if (array && key.match(/^\\\\d+$/)) {\\n return str;\\n }\\n name = JSON.stringify('' + key);\\n if (name.match(/^\\\"([a-zA-Z_][a-zA-Z_0-9]*)\\\"$/)) {\\n name = name.substr(1, name.length - 2);\\n name = ctx.stylize(name, 'name');\\n } else {\\n name = name.replace(/'/g, \\\"\\\\\\\\'\\\")\\n .replace(/\\\\\\\\\\\"/g, '\\\"')\\n .replace(/(^\\\"|\\\"$)/g, \\\"'\\\");\\n name = ctx.stylize(name, 'string');\\n }\\n }\\n\\n return name + ': ' + str;\\n}\\n\\n\\nfunction reduceToSingleString(output, base, braces) {\\n var numLinesEst = 0;\\n var length = output.reduce(function(prev, cur) {\\n numLinesEst++;\\n if (cur.indexOf('\\\\n') >= 0) numLinesEst++;\\n return prev + cur.replace(/\\\\u001b\\\\[\\\\d\\\\d?m/g, '').length + 1;\\n }, 0);\\n\\n if (length > 60) {\\n return braces[0] +\\n (base === '' ? '' : base + '\\\\n ') +\\n ' ' +\\n output.join(',\\\\n ') +\\n ' ' +\\n braces[1];\\n }\\n\\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\\n}\\n\\n\\n// NOTE: These type checking functions intentionally don't use `instanceof`\\n// because it is fragile and can be easily faked with `Object.create()`.\\nfunction isArray(ar) {\\n return Array.isArray(ar);\\n}\\nexports.isArray = isArray;\\n\\nfunction isBoolean(arg) {\\n return typeof arg === 'boolean';\\n}\\nexports.isBoolean = isBoolean;\\n\\nfunction isNull(arg) {\\n return arg === null;\\n}\\nexports.isNull = isNull;\\n\\nfunction isNullOrUndefined(arg) {\\n return arg == null;\\n}\\nexports.isNullOrUndefined = isNullOrUndefined;\\n\\nfunction isNumber(arg) {\\n return typeof arg === 'number';\\n}\\nexports.isNumber = isNumber;\\n\\nfunction isString(arg) {\\n return typeof arg === 'string';\\n}\\nexports.isString = isString;\\n\\nfunction isSymbol(arg) {\\n return typeof arg === 'symbol';\\n}\\nexports.isSymbol = isSymbol;\\n\\nfunction isUndefined(arg) {\\n return arg === void 0;\\n}\\nexports.isUndefined = isUndefined;\\n\\nfunction isRegExp(re) {\\n return isObject(re) && objectToString(re) === '[object RegExp]';\\n}\\nexports.isRegExp = isRegExp;\\n\\nfunction isObject(arg) {\\n return typeof arg === 'object' && arg !== null;\\n}\\nexports.isObject = isObject;\\n\\nfunction isDate(d) {\\n return isObject(d) && objectToString(d) === '[object Date]';\\n}\\nexports.isDate = isDate;\\n\\nfunction isError(e) {\\n return isObject(e) &&\\n (objectToString(e) === '[object Error]' || e instanceof Error);\\n}\\nexports.isError = isError;\\n\\nfunction isFunction(arg) {\\n return typeof arg === 'function';\\n}\\nexports.isFunction = isFunction;\\n\\nfunction isPrimitive(arg) {\\n return arg === null ||\\n typeof arg === 'boolean' ||\\n typeof arg === 'number' ||\\n typeof arg === 'string' ||\\n typeof arg === 'symbol' || // ES6 symbol\\n typeof arg === 'undefined';\\n}\\nexports.isPrimitive = isPrimitive;\\n\\nexports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ \\\"./node_modules/util/support/isBufferBrowser.js\\\");\\n\\nfunction objectToString(o) {\\n return Object.prototype.toString.call(o);\\n}\\n\\n\\nfunction pad(n) {\\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\\n}\\n\\n\\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\\n 'Oct', 'Nov', 'Dec'];\\n\\n// 26 Feb 16:19:34\\nfunction timestamp() {\\n var d = new Date();\\n var time = [pad(d.getHours()),\\n pad(d.getMinutes()),\\n pad(d.getSeconds())].join(':');\\n return [d.getDate(), months[d.getMonth()], time].join(' ');\\n}\\n\\n\\n// log is just a thin wrapper to console.log that prepends a timestamp\\nexports.log = function() {\\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\\n};\\n\\n\\n/**\\n * Inherit the prototype methods from one constructor into another.\\n *\\n * The Function.prototype.inherits from lang.js rewritten as a standalone\\n * function (not on Function.prototype). NOTE: If this file is to be loaded\\n * during bootstrapping this function needs to be rewritten using some native\\n * functions as prototype setup using normal JavaScript does not work as\\n * expected during bootstrapping (see mirror.js in r114903).\\n *\\n * @param {function} ctor Constructor function which needs to inherit the\\n * prototype.\\n * @param {function} superCtor Constructor function to inherit prototype from.\\n */\\nexports.inherits = __webpack_require__(/*! inherits */ \\\"./node_modules/util/node_modules/inherits/inherits_browser.js\\\");\\n\\nexports._extend = function(origin, add) {\\n // Don't do anything if add isn't an object\\n if (!add || !isObject(add)) return origin;\\n\\n var keys = Object.keys(add);\\n var i = keys.length;\\n while (i--) {\\n origin[keys[i]] = add[keys[i]];\\n }\\n return origin;\\n};\\n\\nfunction hasOwnProperty(obj, prop) {\\n return Object.prototype.hasOwnProperty.call(obj, prop);\\n}\\n\\n\\n//# sourceURL=webpack://react-monaco-editor-lite/./node_modules/util/util.js?\");\n\n/***/ }),\n\n/***/ \"react\":\n/*!************************!*\\\n !*** external \"react\" ***!\n \\************************/\n/***/ ((module) => {\n\n\"use strict\";\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n/***/ }),\n\n/***/ \"react-dom\":\n/*!****************************!*\\\n !*** external \"react-dom\" ***!\n \\****************************/\n/***/ ((module) => {\n\n\"use strict\";\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t(() => {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = (module) => {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\t() => (module['default']) :\n/******/ \t\t\t\t() => (module);\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/global */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t(() => {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = (exports) => {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module can't be inlined because the eval devtool is used.\n/******/ \tvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});","'use strict';\nconst colorConvert = require('color-convert');\n\nconst wrapAnsi16 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => function () {\n\tconst code = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => function () {\n\tconst rgb = fn.apply(colorConvert, arguments);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39],\n\n\t\t\t// Bright color\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Fix humans\n\tstyles.color.grey = styles.color.gray;\n\n\tfor (const groupName of Object.keys(styles)) {\n\t\tconst group = styles[groupName];\n\n\t\tfor (const styleName of Object.keys(group)) {\n\t\t\tconst style = group[styleName];\n\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\n\t\tObject.defineProperty(styles, 'codes', {\n\t\t\tvalue: codes,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tconst ansi2ansi = n => n;\n\tconst rgb2rgb = (r, g, b) => [r, g, b];\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 0)\n\t};\n\tstyles.color.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 0)\n\t};\n\n\tstyles.bgColor.ansi = {\n\t\tansi: wrapAnsi16(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi256 = {\n\t\tansi256: wrapAnsi256(ansi2ansi, 10)\n\t};\n\tstyles.bgColor.ansi16m = {\n\t\trgb: wrapAnsi16m(rgb2rgb, 10)\n\t};\n\n\tfor (let key of Object.keys(colorConvert)) {\n\t\tif (typeof colorConvert[key] !== 'object') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst suite = colorConvert[key];\n\n\t\tif (key === 'ansi16') {\n\t\t\tkey = 'ansi';\n\t\t}\n\n\t\tif ('ansi16' in suite) {\n\t\t\tstyles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);\n\t\t\tstyles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);\n\t\t}\n\n\t\tif ('ansi256' in suite) {\n\t\t\tstyles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);\n\t\t\tstyles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);\n\t\t}\n\n\t\tif ('rgb' in suite) {\n\t\t\tstyles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);\n\t\t\tstyles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nconst escapeStringRegexp = require('escape-string-regexp');\nconst ansiStyles = require('ansi-styles');\nconst stdoutColor = require('supports-color').stdout;\n\nconst template = require('./templates.js');\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tif ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, args) {\n\tconst results = [];\n\tconst chunks = args.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tif (!isNaN(chunk)) {\n\t\t\tresults.push(Number(chunk));\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const styleName of Object.keys(enabled)) {\n\t\tif (Array.isArray(enabled[styleName])) {\n\t\t\tif (!(styleName in current)) {\n\t\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t\t}\n\n\t\t\tif (enabled[styleName].length > 0) {\n\t\t\t\tcurrent = current[styleName].apply(current, enabled[styleName]);\n\t\t\t} else {\n\t\t\t\tcurrent = current[styleName];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, tmp) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {\n\t\tif (escapeChar) {\n\t\t\tchunk.push(unescape(escapeChar));\n\t\t} else if (style) {\n\t\t\tconst str = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(chr);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMsg);\n\t}\n\n\treturn chunks.join('');\n};\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","'use strict';\nmodule.exports = {\n\tstdout: false,\n\tstderr: false\n};\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _zh_CN = _interopRequireDefault(require(\"../../date-picker/locale/zh_CN\"));\nvar _default = _zh_CN[\"default\"];\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _zh_CN = _interopRequireDefault(require(\"rc-picker/lib/locale/zh_CN\"));\nvar _zh_CN2 = _interopRequireDefault(require(\"../../time-picker/locale/zh_CN\"));\n// 统一合并为完整的 Locale\nvar locale = {\n lang: (0, _extends2[\"default\"])({\n placeholder: '请选择日期',\n yearPlaceholder: '请选择年份',\n quarterPlaceholder: '请选择季度',\n monthPlaceholder: '请选择月份',\n weekPlaceholder: '请选择周',\n rangePlaceholder: ['开始日期', '结束日期'],\n rangeYearPlaceholder: ['开始年份', '结束年份'],\n rangeMonthPlaceholder: ['开始月份', '结束月份'],\n rangeQuarterPlaceholder: ['开始季度', '结束季度'],\n rangeWeekPlaceholder: ['开始周', '结束周']\n }, _zh_CN[\"default\"]),\n timePickerLocale: (0, _extends2[\"default\"])({}, _zh_CN2[\"default\"])\n};\n// should add whitespace between char in Button\nlocale.lang.ok = '确定';\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nvar _default = locale;\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\")[\"default\"];\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _zh_CN = _interopRequireDefault(require(\"rc-pagination/lib/locale/zh_CN\"));\nvar _zh_CN2 = _interopRequireDefault(require(\"../calendar/locale/zh_CN\"));\nvar _zh_CN3 = _interopRequireDefault(require(\"../date-picker/locale/zh_CN\"));\nvar _zh_CN4 = _interopRequireDefault(require(\"../time-picker/locale/zh_CN\"));\n/* eslint-disable no-template-curly-in-string */\n\nvar typeTemplate = '${label}不是一个有效的${type}';\nvar localeValues = {\n locale: 'zh-cn',\n Pagination: _zh_CN[\"default\"],\n DatePicker: _zh_CN3[\"default\"],\n TimePicker: _zh_CN4[\"default\"],\n Calendar: _zh_CN2[\"default\"],\n // locales for all components\n global: {\n placeholder: '请选择'\n },\n Table: {\n filterTitle: '筛选',\n filterConfirm: '确定',\n filterReset: '重置',\n filterEmptyText: '无筛选项',\n filterCheckall: '全选',\n filterSearchPlaceholder: '在筛选项中搜索',\n selectAll: '全选当页',\n selectInvert: '反选当页',\n selectNone: '清空所有',\n selectionAll: '全选所有',\n sortTitle: '排序',\n expand: '展开行',\n collapse: '关闭行',\n triggerDesc: '点击降序',\n triggerAsc: '点击升序',\n cancelSort: '取消排序'\n },\n Modal: {\n okText: '确定',\n cancelText: '取消',\n justOkText: '知道了'\n },\n Popconfirm: {\n cancelText: '取消',\n okText: '确定'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: '请输入搜索内容',\n itemUnit: '项',\n itemsUnit: '项',\n remove: '删除',\n selectCurrent: '全选当页',\n removeCurrent: '删除当页',\n selectAll: '全选所有',\n removeAll: '删除全部',\n selectInvert: '反选当页'\n },\n Upload: {\n uploading: '文件上传中',\n removeFile: '删除文件',\n uploadError: '上传错误',\n previewFile: '预览文件',\n downloadFile: '下载文件'\n },\n Empty: {\n description: '暂无数据'\n },\n Icon: {\n icon: '图标'\n },\n Text: {\n edit: '编辑',\n copy: '复制',\n copied: '复制成功',\n expand: '展开'\n },\n PageHeader: {\n back: '返回'\n },\n Form: {\n optional: '(可选)',\n defaultValidateMessages: {\n \"default\": '字段验证错误${label}',\n required: '请输入${label}',\n \"enum\": '${label}必须是其中一个[${enum}]',\n whitespace: '${label}不能为空字符',\n date: {\n format: '${label}日期格式无效',\n parse: '${label}不能转换为日期',\n invalid: '${label}是一个无效日期'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n \"boolean\": typeTemplate,\n integer: typeTemplate,\n \"float\": typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label}须为${len}个字符',\n min: '${label}最少${min}个字符',\n max: '${label}最多${max}个字符',\n range: '${label}须在${min}-${max}字符之间'\n },\n number: {\n len: '${label}必须等于${len}',\n min: '${label}最小值为${min}',\n max: '${label}最大值为${max}',\n range: '${label}须在${min}-${max}之间'\n },\n array: {\n len: '须为${len}个${label}',\n min: '最少${min}个${label}',\n max: '最多${max}个${label}',\n range: '${label}数量须在${min}-${max}之间'\n },\n pattern: {\n mismatch: '${label}与模式不匹配${pattern}'\n }\n }\n },\n Image: {\n preview: '预览'\n }\n};\nvar _default = localeValues;\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar locale = {\n placeholder: '请选择时间',\n rangePlaceholder: ['开始时间', '结束时间']\n};\nvar _default = locale;\nexports[\"default\"] = _default;","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","(function(){\n\"use strict\";\nvar doc = document;\nvar win = window;\nvar docEle = doc.documentElement;\nvar createElement = doc.createElement.bind(doc);\nvar div = createElement('div');\nvar table = createElement('table');\nvar tbody = createElement('tbody');\nvar tr = createElement('tr');\nvar isArray = Array.isArray, ArrayPrototype = Array.prototype;\nvar concat = ArrayPrototype.concat, filter = ArrayPrototype.filter, indexOf = ArrayPrototype.indexOf, map = ArrayPrototype.map, push = ArrayPrototype.push, slice = ArrayPrototype.slice, some = ArrayPrototype.some, splice = ArrayPrototype.splice;\nvar idRe = /^#(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nvar classRe = /^\\.(?:[\\w-]|\\\\.|[^\\x00-\\xa0])*$/;\nvar htmlRe = /<.+>/;\nvar tagRe = /^\\w+$/;\n// @require ./variables.ts\nfunction find(selector, context) {\n var isFragment = isDocumentFragment(context);\n return !selector || (!isFragment && !isDocument(context) && !isElement(context))\n ? []\n : !isFragment && classRe.test(selector)\n ? context.getElementsByClassName(selector.slice(1).replace(/\\\\/g, ''))\n : !isFragment && tagRe.test(selector)\n ? context.getElementsByTagName(selector)\n : context.querySelectorAll(selector);\n}\n// @require ./find.ts\n// @require ./variables.ts\nvar Cash = /** @class */ (function () {\n function Cash(selector, context) {\n if (!selector)\n return;\n if (isCash(selector))\n return selector;\n var eles = selector;\n if (isString(selector)) {\n var ctx = context || doc;\n eles = idRe.test(selector) && isDocument(ctx)\n ? ctx.getElementById(selector.slice(1).replace(/\\\\/g, ''))\n : htmlRe.test(selector)\n ? parseHTML(selector)\n : isCash(ctx)\n ? ctx.find(selector)\n : isString(ctx)\n ? cash(ctx).find(selector)\n : find(selector, ctx);\n if (!eles)\n return;\n }\n else if (isFunction(selector)) {\n return this.ready(selector); //FIXME: `fn.ready` is not included in `core`, but it's actually a core functionality\n }\n if (eles.nodeType || eles === win)\n eles = [eles];\n this.length = eles.length;\n for (var i = 0, l = this.length; i < l; i++) {\n this[i] = eles[i];\n }\n }\n Cash.prototype.init = function (selector, context) {\n return new Cash(selector, context);\n };\n return Cash;\n}());\nvar fn = Cash.prototype;\nvar cash = fn.init;\ncash.fn = cash.prototype = fn; // Ensuring that `cash () instanceof cash`\nfn.length = 0;\nfn.splice = splice; // Ensuring a cash collection gets printed as array-like in Chrome's devtools\nif (typeof Symbol === 'function') { // Ensuring a cash collection is iterable\n fn[Symbol['iterator']] = ArrayPrototype[Symbol['iterator']];\n}\nfunction isCash(value) {\n return value instanceof Cash;\n}\nfunction isWindow(value) {\n return !!value && value === value.window;\n}\nfunction isDocument(value) {\n return !!value && value.nodeType === 9;\n}\nfunction isDocumentFragment(value) {\n return !!value && value.nodeType === 11;\n}\nfunction isElement(value) {\n return !!value && value.nodeType === 1;\n}\nfunction isText(value) {\n return !!value && value.nodeType === 3;\n}\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isString(value) {\n return typeof value === 'string';\n}\nfunction isUndefined(value) {\n return value === undefined;\n}\nfunction isNull(value) {\n return value === null;\n}\nfunction isNumeric(value) {\n return !isNaN(parseFloat(value)) && isFinite(value);\n}\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null)\n return false;\n var proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\ncash.isWindow = isWindow;\ncash.isFunction = isFunction;\ncash.isArray = isArray;\ncash.isNumeric = isNumeric;\ncash.isPlainObject = isPlainObject;\nfunction each(arr, callback, _reverse) {\n if (_reverse) {\n var i = arr.length;\n while (i--) {\n if (callback.call(arr[i], i, arr[i]) === false)\n return arr;\n }\n }\n else if (isPlainObject(arr)) {\n var keys = Object.keys(arr);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (callback.call(arr[key], key, arr[key]) === false)\n return arr;\n }\n }\n else {\n for (var i = 0, l = arr.length; i < l; i++) {\n if (callback.call(arr[i], i, arr[i]) === false)\n return arr;\n }\n }\n return arr;\n}\ncash.each = each;\nfn.each = function (callback) {\n return each(this, callback);\n};\nfn.empty = function () {\n return this.each(function (i, ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild);\n }\n });\n};\nfunction extend() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var deep = isBoolean(sources[0]) ? sources.shift() : false;\n var target = sources.shift();\n var length = sources.length;\n if (!target)\n return {};\n if (!length)\n return extend(deep, cash, target);\n for (var i = 0; i < length; i++) {\n var source = sources[i];\n for (var key in source) {\n if (deep && (isArray(source[key]) || isPlainObject(source[key]))) {\n if (!target[key] || target[key].constructor !== source[key].constructor)\n target[key] = new source[key].constructor();\n extend(deep, target[key], source[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n }\n return target;\n}\ncash.extend = extend;\nfn.extend = function (plugins) {\n return extend(fn, plugins);\n};\n// @require ./type_checking.ts\nvar splitValuesRe = /\\S+/g;\nfunction getSplitValues(str) {\n return isString(str) ? str.match(splitValuesRe) || [] : [];\n}\nfn.toggleClass = function (cls, force) {\n var classes = getSplitValues(cls);\n var isForce = !isUndefined(force);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n each(classes, function (i, c) {\n if (isForce) {\n force ? ele.classList.add(c) : ele.classList.remove(c);\n }\n else {\n ele.classList.toggle(c);\n }\n });\n });\n};\nfn.addClass = function (cls) {\n return this.toggleClass(cls, true);\n};\nfn.removeAttr = function (attr) {\n var attrs = getSplitValues(attr);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n each(attrs, function (i, a) {\n ele.removeAttribute(a);\n });\n });\n};\nfunction attr(attr, value) {\n if (!attr)\n return;\n if (isString(attr)) {\n if (arguments.length < 2) {\n if (!this[0] || !isElement(this[0]))\n return;\n var value_1 = this[0].getAttribute(attr);\n return isNull(value_1) ? undefined : value_1;\n }\n if (isUndefined(value))\n return this;\n if (isNull(value))\n return this.removeAttr(attr);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n ele.setAttribute(attr, value);\n });\n }\n for (var key in attr) {\n this.attr(key, attr[key]);\n }\n return this;\n}\nfn.attr = attr;\nfn.removeClass = function (cls) {\n if (arguments.length)\n return this.toggleClass(cls, false);\n return this.attr('class', '');\n};\nfn.hasClass = function (cls) {\n return !!cls && some.call(this, function (ele) { return isElement(ele) && ele.classList.contains(cls); });\n};\nfn.get = function (index) {\n if (isUndefined(index))\n return slice.call(this);\n index = Number(index);\n return this[index < 0 ? index + this.length : index];\n};\nfn.eq = function (index) {\n return cash(this.get(index));\n};\nfn.first = function () {\n return this.eq(0);\n};\nfn.last = function () {\n return this.eq(-1);\n};\nfunction text(text) {\n if (isUndefined(text)) {\n return this.get().map(function (ele) { return isElement(ele) || isText(ele) ? ele.textContent : ''; }).join('');\n }\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n ele.textContent = text;\n });\n}\nfn.text = text;\n// @require core/type_checking.ts\n// @require core/variables.ts\nfunction computeStyle(ele, prop, isVariable) {\n if (!isElement(ele))\n return;\n var style = win.getComputedStyle(ele, null);\n return isVariable ? style.getPropertyValue(prop) || undefined : style[prop] || ele.style[prop];\n}\n// @require ./compute_style.ts\nfunction computeStyleInt(ele, prop) {\n return parseInt(computeStyle(ele, prop), 10) || 0;\n}\n// @require css/helpers/compute_style_int.ts\nfunction getExtraSpace(ele, xAxis) {\n return computeStyleInt(ele, \"border\".concat(xAxis ? 'Left' : 'Top', \"Width\")) + computeStyleInt(ele, \"padding\".concat(xAxis ? 'Left' : 'Top')) + computeStyleInt(ele, \"padding\".concat(xAxis ? 'Right' : 'Bottom')) + computeStyleInt(ele, \"border\".concat(xAxis ? 'Right' : 'Bottom', \"Width\"));\n}\n// @require css/helpers/compute_style.ts\nvar defaultDisplay = {};\nfunction getDefaultDisplay(tagName) {\n if (defaultDisplay[tagName])\n return defaultDisplay[tagName];\n var ele = createElement(tagName);\n doc.body.insertBefore(ele, null);\n var display = computeStyle(ele, 'display');\n doc.body.removeChild(ele);\n return defaultDisplay[tagName] = display !== 'none' ? display : 'block';\n}\n// @require css/helpers/compute_style.ts\nfunction isHidden(ele) {\n return computeStyle(ele, 'display') === 'none';\n}\n// @require ./cash.ts\nfunction matches(ele, selector) {\n var matches = ele && (ele['matches'] || ele['webkitMatchesSelector'] || ele['msMatchesSelector']);\n return !!matches && !!selector && matches.call(ele, selector);\n}\n// @require ./matches.ts\n// @require ./type_checking.ts\nfunction getCompareFunction(comparator) {\n return isString(comparator)\n ? function (i, ele) { return matches(ele, comparator); }\n : isFunction(comparator)\n ? comparator\n : isCash(comparator)\n ? function (i, ele) { return comparator.is(ele); }\n : !comparator\n ? function () { return false; }\n : function (i, ele) { return ele === comparator; };\n}\nfn.filter = function (comparator) {\n var compare = getCompareFunction(comparator);\n return cash(filter.call(this, function (ele, i) { return compare.call(ele, i, ele); }));\n};\n// @require collection/filter.ts\nfunction filtered(collection, comparator) {\n return !comparator ? collection : collection.filter(comparator);\n}\nfn.detach = function (comparator) {\n filtered(this, comparator).each(function (i, ele) {\n if (ele.parentNode) {\n ele.parentNode.removeChild(ele);\n }\n });\n return this;\n};\nvar fragmentRe = /^\\s*<(\\w+)[^>]*>/;\nvar singleTagRe = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/;\nvar containers = {\n '*': div,\n tr: tbody,\n td: tr,\n th: tr,\n thead: table,\n tbody: table,\n tfoot: table\n};\n//TODO: Create elements inside a document fragment, in order to prevent inline event handlers from firing\n//TODO: Ensure the created elements have the fragment as their parent instead of null, this also ensures we can deal with detatched nodes more reliably\nfunction parseHTML(html) {\n if (!isString(html))\n return [];\n if (singleTagRe.test(html))\n return [createElement(RegExp.$1)];\n var fragment = fragmentRe.test(html) && RegExp.$1;\n var container = containers[fragment] || containers['*'];\n container.innerHTML = html;\n return cash(container.childNodes).detach().get();\n}\ncash.parseHTML = parseHTML;\nfn.has = function (selector) {\n var comparator = isString(selector)\n ? function (i, ele) { return find(selector, ele).length; }\n : function (i, ele) { return ele.contains(selector); };\n return this.filter(comparator);\n};\nfn.not = function (comparator) {\n var compare = getCompareFunction(comparator);\n return this.filter(function (i, ele) { return (!isString(comparator) || isElement(ele)) && !compare.call(ele, i, ele); });\n};\nfunction pluck(arr, prop, deep, until) {\n var plucked = [];\n var isCallback = isFunction(prop);\n var compare = until && getCompareFunction(until);\n for (var i = 0, l = arr.length; i < l; i++) {\n if (isCallback) {\n var val_1 = prop(arr[i]);\n if (val_1.length)\n push.apply(plucked, val_1);\n }\n else {\n var val_2 = arr[i][prop];\n while (val_2 != null) {\n if (until && compare(-1, val_2))\n break;\n plucked.push(val_2);\n val_2 = deep ? val_2[prop] : null;\n }\n }\n }\n return plucked;\n}\n// @require core/pluck.ts\n// @require core/variables.ts\nfunction getValue(ele) {\n if (ele.multiple && ele.options)\n return pluck(filter.call(ele.options, function (option) { return option.selected && !option.disabled && !option.parentNode.disabled; }), 'value');\n return ele.value || '';\n}\nfunction val(value) {\n if (!arguments.length)\n return this[0] && getValue(this[0]);\n return this.each(function (i, ele) {\n var isSelect = ele.multiple && ele.options;\n if (isSelect || checkableRe.test(ele.type)) {\n var eleValue_1 = isArray(value) ? map.call(value, String) : (isNull(value) ? [] : [String(value)]);\n if (isSelect) {\n each(ele.options, function (i, option) {\n option.selected = eleValue_1.indexOf(option.value) >= 0;\n }, true);\n }\n else {\n ele.checked = eleValue_1.indexOf(ele.value) >= 0;\n }\n }\n else {\n ele.value = isUndefined(value) || isNull(value) ? '' : value;\n }\n });\n}\nfn.val = val;\nfn.is = function (comparator) {\n var compare = getCompareFunction(comparator);\n return some.call(this, function (ele, i) { return compare.call(ele, i, ele); });\n};\ncash.guid = 1;\nfunction unique(arr) {\n return arr.length > 1 ? filter.call(arr, function (item, index, self) { return indexOf.call(self, item) === index; }) : arr;\n}\ncash.unique = unique;\nfn.add = function (selector, context) {\n return cash(unique(this.get().concat(cash(selector, context).get())));\n};\nfn.children = function (comparator) {\n return filtered(cash(unique(pluck(this, function (ele) { return ele.children; }))), comparator);\n};\nfn.parent = function (comparator) {\n return filtered(cash(unique(pluck(this, 'parentNode'))), comparator);\n};\nfn.index = function (selector) {\n var child = selector ? cash(selector)[0] : this[0];\n var collection = selector ? this : cash(child).parent().children();\n return indexOf.call(collection, child);\n};\nfn.closest = function (comparator) {\n var filtered = this.filter(comparator);\n if (filtered.length)\n return filtered;\n var $parent = this.parent();\n if (!$parent.length)\n return filtered;\n return $parent.closest(comparator);\n};\nfn.siblings = function (comparator) {\n return filtered(cash(unique(pluck(this, function (ele) { return cash(ele).parent().children().not(ele); }))), comparator);\n};\nfn.find = function (selector) {\n return cash(unique(pluck(this, function (ele) { return find(selector, ele); })));\n};\n// @require core/variables.ts\n// @require collection/filter.ts\n// @require traversal/find.ts\nvar HTMLCDATARe = /^\\s*\\s*$/g;\nvar scriptTypeRe = /^$|^module$|\\/(java|ecma)script/i;\nvar scriptAttributes = ['type', 'src', 'nonce', 'noModule'];\nfunction evalScripts(node, doc) {\n var collection = cash(node);\n collection.filter('script').add(collection.find('script')).each(function (i, ele) {\n if (scriptTypeRe.test(ele.type) && docEle.contains(ele)) { // The script type is supported // The element is attached to the DOM // Using `documentElement` for broader browser support\n var script_1 = createElement('script');\n script_1.text = ele.textContent.replace(HTMLCDATARe, '');\n each(scriptAttributes, function (i, attr) {\n if (ele[attr])\n script_1[attr] = ele[attr];\n });\n doc.head.insertBefore(script_1, null);\n doc.head.removeChild(script_1);\n }\n });\n}\n// @require ./eval_scripts.ts\nfunction insertElement(anchor, target, left, inside, evaluate) {\n if (inside) { // prepend/append\n anchor.insertBefore(target, left ? anchor.firstChild : null);\n }\n else { // before/after\n if (anchor.nodeName === 'HTML') {\n anchor.parentNode.replaceChild(target, anchor);\n }\n else {\n anchor.parentNode.insertBefore(target, left ? anchor : anchor.nextSibling);\n }\n }\n if (evaluate) {\n evalScripts(target, anchor.ownerDocument);\n }\n}\n// @require ./insert_element.ts\nfunction insertSelectors(selectors, anchors, inverse, left, inside, reverseLoop1, reverseLoop2, reverseLoop3) {\n each(selectors, function (si, selector) {\n each(cash(selector), function (ti, target) {\n each(cash(anchors), function (ai, anchor) {\n var anchorFinal = inverse ? target : anchor;\n var targetFinal = inverse ? anchor : target;\n var indexFinal = inverse ? ti : ai;\n insertElement(anchorFinal, !indexFinal ? targetFinal : targetFinal.cloneNode(true), left, inside, !indexFinal);\n }, reverseLoop3);\n }, reverseLoop2);\n }, reverseLoop1);\n return anchors;\n}\nfn.after = function () {\n return insertSelectors(arguments, this, false, false, false, true, true);\n};\nfn.append = function () {\n return insertSelectors(arguments, this, false, false, true);\n};\nfunction html(html) {\n if (!arguments.length)\n return this[0] && this[0].innerHTML;\n if (isUndefined(html))\n return this;\n var hasScript = /]/.test(html);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n if (hasScript) {\n cash(ele).empty().append(html);\n }\n else {\n ele.innerHTML = html;\n }\n });\n}\nfn.html = html;\nfn.appendTo = function (selector) {\n return insertSelectors(arguments, this, true, false, true);\n};\nfn.wrapInner = function (selector) {\n return this.each(function (i, ele) {\n var $ele = cash(ele);\n var contents = $ele.contents();\n contents.length ? contents.wrapAll(selector) : $ele.append(selector);\n });\n};\nfn.before = function () {\n return insertSelectors(arguments, this, false, true);\n};\nfn.wrapAll = function (selector) {\n var structure = cash(selector);\n var wrapper = structure[0];\n while (wrapper.children.length)\n wrapper = wrapper.firstElementChild;\n this.first().before(structure);\n return this.appendTo(wrapper);\n};\nfn.wrap = function (selector) {\n return this.each(function (i, ele) {\n var wrapper = cash(selector)[0];\n cash(ele).wrapAll(!i ? wrapper : wrapper.cloneNode(true));\n });\n};\nfn.insertAfter = function (selector) {\n return insertSelectors(arguments, this, true, false, false, false, false, true);\n};\nfn.insertBefore = function (selector) {\n return insertSelectors(arguments, this, true, true);\n};\nfn.prepend = function () {\n return insertSelectors(arguments, this, false, true, true, true, true);\n};\nfn.prependTo = function (selector) {\n return insertSelectors(arguments, this, true, true, true, false, false, true);\n};\nfn.contents = function () {\n return cash(unique(pluck(this, function (ele) { return ele.tagName === 'IFRAME' ? [ele.contentDocument] : (ele.tagName === 'TEMPLATE' ? ele.content.childNodes : ele.childNodes); })));\n};\nfn.next = function (comparator, _all, _until) {\n return filtered(cash(unique(pluck(this, 'nextElementSibling', _all, _until))), comparator);\n};\nfn.nextAll = function (comparator) {\n return this.next(comparator, true);\n};\nfn.nextUntil = function (until, comparator) {\n return this.next(comparator, true, until);\n};\nfn.parents = function (comparator, _until) {\n return filtered(cash(unique(pluck(this, 'parentElement', true, _until))), comparator);\n};\nfn.parentsUntil = function (until, comparator) {\n return this.parents(comparator, until);\n};\nfn.prev = function (comparator, _all, _until) {\n return filtered(cash(unique(pluck(this, 'previousElementSibling', _all, _until))), comparator);\n};\nfn.prevAll = function (comparator) {\n return this.prev(comparator, true);\n};\nfn.prevUntil = function (until, comparator) {\n return this.prev(comparator, true, until);\n};\nfn.map = function (callback) {\n return cash(concat.apply([], map.call(this, function (ele, i) { return callback.call(ele, i, ele); })));\n};\nfn.clone = function () {\n return this.map(function (i, ele) { return ele.cloneNode(true); });\n};\nfn.offsetParent = function () {\n return this.map(function (i, ele) {\n var offsetParent = ele.offsetParent;\n while (offsetParent && computeStyle(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.offsetParent;\n }\n return offsetParent || docEle;\n });\n};\nfn.slice = function (start, end) {\n return cash(slice.call(this, start, end));\n};\n// @require ./cash.ts\nvar dashAlphaRe = /-([a-z])/g;\nfunction camelCase(str) {\n return str.replace(dashAlphaRe, function (match, letter) { return letter.toUpperCase(); });\n}\nfn.ready = function (callback) {\n var cb = function () { return setTimeout(callback, 0, cash); };\n if (doc.readyState !== 'loading') {\n cb();\n }\n else {\n doc.addEventListener('DOMContentLoaded', cb);\n }\n return this;\n};\nfn.unwrap = function () {\n this.parent().each(function (i, ele) {\n if (ele.tagName === 'BODY')\n return;\n var $ele = cash(ele);\n $ele.replaceWith($ele.children());\n });\n return this;\n};\nfn.offset = function () {\n var ele = this[0];\n if (!ele)\n return;\n var rect = ele.getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset,\n left: rect.left + win.pageXOffset\n };\n};\nfn.position = function () {\n var ele = this[0];\n if (!ele)\n return;\n var isFixed = (computeStyle(ele, 'position') === 'fixed');\n var offset = isFixed ? ele.getBoundingClientRect() : this.offset();\n if (!isFixed) {\n var doc_1 = ele.ownerDocument;\n var offsetParent = ele.offsetParent || doc_1.documentElement;\n while ((offsetParent === doc_1.body || offsetParent === doc_1.documentElement) && computeStyle(offsetParent, 'position') === 'static') {\n offsetParent = offsetParent.parentNode;\n }\n if (offsetParent !== ele && isElement(offsetParent)) {\n var parentOffset = cash(offsetParent).offset();\n offset.top -= parentOffset.top + computeStyleInt(offsetParent, 'borderTopWidth');\n offset.left -= parentOffset.left + computeStyleInt(offsetParent, 'borderLeftWidth');\n }\n }\n return {\n top: offset.top - computeStyleInt(ele, 'marginTop'),\n left: offset.left - computeStyleInt(ele, 'marginLeft')\n };\n};\nvar propMap = {\n /* GENERAL */\n class: 'className',\n contenteditable: 'contentEditable',\n /* LABEL */\n for: 'htmlFor',\n /* INPUT */\n readonly: 'readOnly',\n maxlength: 'maxLength',\n tabindex: 'tabIndex',\n /* TABLE */\n colspan: 'colSpan',\n rowspan: 'rowSpan',\n /* IMAGE */\n usemap: 'useMap'\n};\nfn.prop = function (prop, value) {\n if (!prop)\n return;\n if (isString(prop)) {\n prop = propMap[prop] || prop;\n if (arguments.length < 2)\n return this[0] && this[0][prop];\n return this.each(function (i, ele) { ele[prop] = value; });\n }\n for (var key in prop) {\n this.prop(key, prop[key]);\n }\n return this;\n};\nfn.removeProp = function (prop) {\n return this.each(function (i, ele) { delete ele[propMap[prop] || prop]; });\n};\nvar cssVariableRe = /^--/;\n// @require ./variables.ts\nfunction isCSSVariable(prop) {\n return cssVariableRe.test(prop);\n}\n// @require core/camel_case.ts\n// @require core/cash.ts\n// @require core/each.ts\n// @require core/variables.ts\n// @require ./is_css_variable.ts\nvar prefixedProps = {};\nvar style = div.style;\nvar vendorsPrefixes = ['webkit', 'moz', 'ms'];\nfunction getPrefixedProp(prop, isVariable) {\n if (isVariable === void 0) { isVariable = isCSSVariable(prop); }\n if (isVariable)\n return prop;\n if (!prefixedProps[prop]) {\n var propCC = camelCase(prop);\n var propUC = \"\".concat(propCC[0].toUpperCase()).concat(propCC.slice(1));\n var props = (\"\".concat(propCC, \" \").concat(vendorsPrefixes.join(\"\".concat(propUC, \" \"))).concat(propUC)).split(' ');\n each(props, function (i, p) {\n if (p in style) {\n prefixedProps[prop] = p;\n return false;\n }\n });\n }\n return prefixedProps[prop];\n}\n// @require core/type_checking.ts\n// @require ./is_css_variable.ts\nvar numericProps = {\n animationIterationCount: true,\n columnCount: true,\n flexGrow: true,\n flexShrink: true,\n fontWeight: true,\n gridArea: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnStart: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowStart: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n widows: true,\n zIndex: true\n};\nfunction getSuffixedValue(prop, value, isVariable) {\n if (isVariable === void 0) { isVariable = isCSSVariable(prop); }\n return !isVariable && !numericProps[prop] && isNumeric(value) ? \"\".concat(value, \"px\") : value;\n}\nfunction css(prop, value) {\n if (isString(prop)) {\n var isVariable_1 = isCSSVariable(prop);\n prop = getPrefixedProp(prop, isVariable_1);\n if (arguments.length < 2)\n return this[0] && computeStyle(this[0], prop, isVariable_1);\n if (!prop)\n return this;\n value = getSuffixedValue(prop, value, isVariable_1);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n if (isVariable_1) {\n ele.style.setProperty(prop, value);\n }\n else {\n ele.style[prop] = value;\n }\n });\n }\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n return this;\n}\n;\nfn.css = css;\nfunction attempt(fn, arg) {\n try {\n return fn(arg);\n }\n catch (_a) {\n return arg;\n }\n}\n// @require core/attempt.ts\n// @require core/camel_case.ts\nvar JSONStringRe = /^\\s+|\\s+$/;\nfunction getData(ele, key) {\n var value = ele.dataset[key] || ele.dataset[camelCase(key)];\n if (JSONStringRe.test(value))\n return value;\n return attempt(JSON.parse, value);\n}\n// @require core/attempt.ts\n// @require core/camel_case.ts\nfunction setData(ele, key, value) {\n value = attempt(JSON.stringify, value);\n ele.dataset[camelCase(key)] = value;\n}\nfunction data(name, value) {\n if (!name) {\n if (!this[0])\n return;\n var datas = {};\n for (var key in this[0].dataset) {\n datas[key] = getData(this[0], key);\n }\n return datas;\n }\n if (isString(name)) {\n if (arguments.length < 2)\n return this[0] && getData(this[0], name);\n if (isUndefined(value))\n return this;\n return this.each(function (i, ele) { setData(ele, name, value); });\n }\n for (var key in name) {\n this.data(key, name[key]);\n }\n return this;\n}\nfn.data = data;\nfunction getDocumentDimension(doc, dimension) {\n var docEle = doc.documentElement;\n return Math.max(doc.body[\"scroll\".concat(dimension)], docEle[\"scroll\".concat(dimension)], doc.body[\"offset\".concat(dimension)], docEle[\"offset\".concat(dimension)], docEle[\"client\".concat(dimension)]);\n}\neach([true, false], function (i, outer) {\n each(['Width', 'Height'], function (i, prop) {\n var name = \"\".concat(outer ? 'outer' : 'inner').concat(prop);\n fn[name] = function (includeMargins) {\n if (!this[0])\n return;\n if (isWindow(this[0]))\n return outer ? this[0][\"inner\".concat(prop)] : this[0].document.documentElement[\"client\".concat(prop)];\n if (isDocument(this[0]))\n return getDocumentDimension(this[0], prop);\n return this[0][\"\".concat(outer ? 'offset' : 'client').concat(prop)] + (includeMargins && outer ? computeStyleInt(this[0], \"margin\".concat(i ? 'Top' : 'Left')) + computeStyleInt(this[0], \"margin\".concat(i ? 'Bottom' : 'Right')) : 0);\n };\n });\n});\neach(['Width', 'Height'], function (index, prop) {\n var propLC = prop.toLowerCase();\n fn[propLC] = function (value) {\n if (!this[0])\n return isUndefined(value) ? undefined : this;\n if (!arguments.length) {\n if (isWindow(this[0]))\n return this[0].document.documentElement[\"client\".concat(prop)];\n if (isDocument(this[0]))\n return getDocumentDimension(this[0], prop);\n return this[0].getBoundingClientRect()[propLC] - getExtraSpace(this[0], !index);\n }\n var valueNumber = parseInt(value, 10);\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n var boxSizing = computeStyle(ele, 'boxSizing');\n ele.style[propLC] = getSuffixedValue(propLC, valueNumber + (boxSizing === 'border-box' ? getExtraSpace(ele, !index) : 0));\n });\n };\n});\nvar displayProperty = '___cd';\nfn.toggle = function (force) {\n return this.each(function (i, ele) {\n if (!isElement(ele))\n return;\n var hidden = isHidden(ele);\n var show = isUndefined(force) ? hidden : force;\n if (show) {\n ele.style.display = ele[displayProperty] || '';\n if (isHidden(ele)) {\n ele.style.display = getDefaultDisplay(ele.tagName);\n }\n }\n else if (!hidden) {\n ele[displayProperty] = computeStyle(ele, 'display');\n ele.style.display = 'none';\n }\n });\n};\nfn.hide = function () {\n return this.toggle(false);\n};\nfn.show = function () {\n return this.toggle(true);\n};\nvar eventsNamespace = '___ce';\nvar eventsNamespacesSeparator = '.';\nvar eventsFocus = { focus: 'focusin', blur: 'focusout' };\nvar eventsHover = { mouseenter: 'mouseover', mouseleave: 'mouseout' };\nvar eventsMouseRe = /^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;\n// @require ./variables.ts\nfunction getEventNameBubbling(name) {\n return eventsHover[name] || eventsFocus[name] || name;\n}\n// @require ./variables.ts\nfunction parseEventName(eventName) {\n var parts = eventName.split(eventsNamespacesSeparator);\n return [parts[0], parts.slice(1).sort()]; // [name, namespace[]]\n}\nfn.trigger = function (event, data) {\n if (isString(event)) {\n var _a = parseEventName(event), nameOriginal = _a[0], namespaces = _a[1];\n var name_1 = getEventNameBubbling(nameOriginal);\n if (!name_1)\n return this;\n var type = eventsMouseRe.test(name_1) ? 'MouseEvents' : 'HTMLEvents';\n event = doc.createEvent(type);\n event.initEvent(name_1, true, true);\n event.namespace = namespaces.join(eventsNamespacesSeparator);\n event.___ot = nameOriginal;\n }\n event.___td = data;\n var isEventFocus = (event.___ot in eventsFocus);\n return this.each(function (i, ele) {\n if (isEventFocus && isFunction(ele[event.___ot])) {\n ele[\"___i\".concat(event.type)] = true; // Ensuring the native event is ignored\n ele[event.___ot]();\n ele[\"___i\".concat(event.type)] = false; // Ensuring the custom event is not ignored\n }\n ele.dispatchEvent(event);\n });\n};\n// @require ./variables.ts\nfunction getEventsCache(ele) {\n return ele[eventsNamespace] = (ele[eventsNamespace] || {});\n}\n// @require core/guid.ts\n// @require events/helpers/get_events_cache.ts\nfunction addEvent(ele, name, namespaces, selector, callback) {\n var eventCache = getEventsCache(ele);\n eventCache[name] = (eventCache[name] || []);\n eventCache[name].push([namespaces, selector, callback]);\n ele.addEventListener(name, callback);\n}\nfunction hasNamespaces(ns1, ns2) {\n return !ns2 || !some.call(ns2, function (ns) { return ns1.indexOf(ns) < 0; });\n}\n// @require ./get_events_cache.ts\n// @require ./has_namespaces.ts\n// @require ./parse_event_name.ts\nfunction removeEvent(ele, name, namespaces, selector, callback) {\n var cache = getEventsCache(ele);\n if (!name) {\n for (name in cache) {\n removeEvent(ele, name, namespaces, selector, callback);\n }\n }\n else if (cache[name]) {\n cache[name] = cache[name].filter(function (_a) {\n var ns = _a[0], sel = _a[1], cb = _a[2];\n if ((callback && cb.guid !== callback.guid) || !hasNamespaces(ns, namespaces) || (selector && selector !== sel))\n return true;\n ele.removeEventListener(name, cb);\n });\n }\n}\nfn.off = function (eventFullName, selector, callback) {\n var _this = this;\n if (isUndefined(eventFullName)) {\n this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n removeEvent(ele);\n });\n }\n else if (!isString(eventFullName)) {\n for (var key in eventFullName) {\n this.off(key, eventFullName[key]);\n }\n }\n else {\n if (isFunction(selector)) {\n callback = selector;\n selector = '';\n }\n each(getSplitValues(eventFullName), function (i, eventFullName) {\n var _a = parseEventName(eventFullName), nameOriginal = _a[0], namespaces = _a[1];\n var name = getEventNameBubbling(nameOriginal);\n _this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n removeEvent(ele, name, namespaces, selector, callback);\n });\n });\n }\n return this;\n};\nfn.remove = function (comparator) {\n filtered(this, comparator).detach().off();\n return this;\n};\nfn.replaceWith = function (selector) {\n return this.before(selector).remove();\n};\nfn.replaceAll = function (selector) {\n cash(selector).replaceWith(this);\n return this;\n};\nfunction on(eventFullName, selector, data, callback, _one) {\n var _this = this;\n if (!isString(eventFullName)) {\n for (var key in eventFullName) {\n this.on(key, selector, data, eventFullName[key], _one);\n }\n return this;\n }\n if (!isString(selector)) {\n if (isUndefined(selector) || isNull(selector)) {\n selector = '';\n }\n else if (isUndefined(data)) {\n data = selector;\n selector = '';\n }\n else {\n callback = data;\n data = selector;\n selector = '';\n }\n }\n if (!isFunction(callback)) {\n callback = data;\n data = undefined;\n }\n if (!callback)\n return this;\n each(getSplitValues(eventFullName), function (i, eventFullName) {\n var _a = parseEventName(eventFullName), nameOriginal = _a[0], namespaces = _a[1];\n var name = getEventNameBubbling(nameOriginal);\n var isEventHover = (nameOriginal in eventsHover);\n var isEventFocus = (nameOriginal in eventsFocus);\n if (!name)\n return;\n _this.each(function (i, ele) {\n if (!isElement(ele) && !isDocument(ele) && !isWindow(ele))\n return;\n var finalCallback = function (event) {\n if (event.target[\"___i\".concat(event.type)])\n return event.stopImmediatePropagation(); // Ignoring native event in favor of the upcoming custom one\n if (event.namespace && !hasNamespaces(namespaces, event.namespace.split(eventsNamespacesSeparator)))\n return;\n if (!selector && ((isEventFocus && (event.target !== ele || event.___ot === name)) || (isEventHover && event.relatedTarget && ele.contains(event.relatedTarget))))\n return;\n var thisArg = ele;\n if (selector) {\n var target = event.target;\n while (!matches(target, selector)) {\n if (target === ele)\n return;\n target = target.parentNode;\n if (!target)\n return;\n }\n thisArg = target;\n }\n Object.defineProperty(event, 'currentTarget', {\n configurable: true,\n get: function () {\n return thisArg;\n }\n });\n Object.defineProperty(event, 'delegateTarget', {\n configurable: true,\n get: function () {\n return ele;\n }\n });\n Object.defineProperty(event, 'data', {\n configurable: true,\n get: function () {\n return data;\n }\n });\n var returnValue = callback.call(thisArg, event, event.___td);\n if (_one) {\n removeEvent(ele, name, namespaces, selector, finalCallback);\n }\n if (returnValue === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n finalCallback.guid = callback.guid = (callback.guid || cash.guid++);\n addEvent(ele, name, namespaces, selector, finalCallback);\n });\n });\n return this;\n}\nfn.on = on;\nfunction one(eventFullName, selector, data, callback) {\n return this.on(eventFullName, selector, data, callback, true);\n}\n;\nfn.one = one;\nvar queryEncodeCRLFRe = /\\r?\\n/g;\nfunction queryEncode(prop, value) {\n return \"&\".concat(encodeURIComponent(prop), \"=\").concat(encodeURIComponent(value.replace(queryEncodeCRLFRe, '\\r\\n')));\n}\nvar skippableRe = /file|reset|submit|button|image/i;\nvar checkableRe = /radio|checkbox/i;\nfn.serialize = function () {\n var query = '';\n this.each(function (i, ele) {\n each(ele.elements || [ele], function (i, ele) {\n if (ele.disabled || !ele.name || ele.tagName === 'FIELDSET' || skippableRe.test(ele.type) || (checkableRe.test(ele.type) && !ele.checked))\n return;\n var value = getValue(ele);\n if (!isUndefined(value)) {\n var values = isArray(value) ? value : [value];\n each(values, function (i, value) {\n query += queryEncode(ele.name, value);\n });\n }\n });\n });\n return query.slice(1);\n};\n// @require core/types.ts\n// @require core/cash.ts\n// @require core/type_checking.ts\n// @require core/variables.ts\n// @require core/each.ts\n// @require core/extend.ts\n// @require core/find.ts\n// @require core/get_compare_function.ts\n// @require core/get_split_values.ts\n// @require core/guid.ts\n// @require core/parse_html.ts\n// @require core/unique.ts\n// @require attributes/add_class.ts\n// @require attributes/attr.ts\n// @require attributes/has_class.ts\n// @require attributes/prop.ts\n// @require attributes/remove_attr.ts\n// @require attributes/remove_class.ts\n// @require attributes/remove_prop.ts\n// @require attributes/toggle_class.ts\n// @require collection/add.ts\n// @require collection/each.ts\n// @require collection/eq.ts\n// @require collection/filter.ts\n// @require collection/first.ts\n// @require collection/get.ts\n// @require collection/index.ts\n// @require collection/last.ts\n// @require collection/map.ts\n// @require collection/slice.ts\n// @require css/css.ts\n// @require data/data.ts\n// @require dimensions/inner_outer.ts\n// @require dimensions/normal.ts\n// @require effects/hide.ts\n// @require effects/show.ts\n// @require effects/toggle.ts\n// @require events/off.ts\n// @require events/on.ts\n// @require events/one.ts\n// @require events/ready.ts\n// @require events/trigger.ts\n// @require forms/serialize.ts\n// @require forms/val.ts\n// @require manipulation/after.ts\n// @require manipulation/append.ts\n// @require manipulation/append_to.ts\n// @require manipulation/before.ts\n// @require manipulation/clone.ts\n// @require manipulation/detach.ts\n// @require manipulation/empty.ts\n// @require manipulation/html.ts\n// @require manipulation/insert_after.ts\n// @require manipulation/insert_before.ts\n// @require manipulation/prepend.ts\n// @require manipulation/prepend_to.ts\n// @require manipulation/remove.ts\n// @require manipulation/replace_all.ts\n// @require manipulation/replace_with.ts\n// @require manipulation/text.ts\n// @require manipulation/unwrap.ts\n// @require manipulation/wrap.ts\n// @require manipulation/wrap_all.ts\n// @require manipulation/wrap_inner.ts\n// @require offset/offset.ts\n// @require offset/offset_parent.ts\n// @require offset/position.ts\n// @require traversal/children.ts\n// @require traversal/closest.ts\n// @require traversal/contents.ts\n// @require traversal/find.ts\n// @require traversal/has.ts\n// @require traversal/is.ts\n// @require traversal/next.ts\n// @require traversal/next_all.ts\n// @require traversal/next_until.ts\n// @require traversal/not.ts\n// @require traversal/parent.ts\n// @require traversal/parents.ts\n// @require traversal/parents_until.ts\n// @require traversal/prev.ts\n// @require traversal/prev_all.ts\n// @require traversal/prev_until.ts\n// @require traversal/siblings.ts\n// @no-require extras/get_script.ts\n// @no-require extras/shorthands.ts\n// @require methods.ts\nif (typeof exports !== 'undefined') { // Node.js\n module.exports = cash;\n}\nelse { // Browser\n win['cash'] = win['$'] = cash;\n}\n})();","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import { mergeWith } from 'lodash';\nexport const defaultTheme = {\n colors: {\n // 主色序列\n primary: {\n 10: '#f0f5ff',\n 20: '#d6e4ff',\n 30: '#adc6ff',\n 40: '#85a5ff',\n 50: '#597ef7',\n 60: '#2f54eb',\n 70: '#1d39c4',\n 80: '#10239e',\n 90: '#061178',\n 100: '#030852',\n },\n // 灰色序列\n gray: {\n 10: '#f5f5f5',\n 20: '#f0f0f0',\n 30: '#dddddd',\n 40: '#bfbfbf',\n 50: '#8c8c8c',\n 60: '#595959',\n 70: '#434343',\n 80: '#262626',\n 90: '#1f1f1f',\n 100: '#141414',\n },\n // 警告色序列\n error: {\n 10: '#fff2f0',\n 20: '#ffedeb',\n 30: '#ffc8c2',\n 40: '#ffa099',\n 50: '#f7716d',\n 60: '#eb4141',\n 70: '#c42d32',\n 80: '#9e1c25',\n 90: '#78101a',\n 100: '#520A13',\n },\n // 成功色序列\n success: {\n 10: '#e4f2e5',\n 20: '#d3e6d6',\n 30: '#a5d9ae',\n 40: '#7acc8c',\n 50: '#54bfcf',\n 60: '#32b357',\n 70: '#208c42',\n 80: '#126630',\n 90: '#08401e',\n 100: '#031a0c',\n },\n // 警告色序列\n warning: {\n 10: '#fffbe6',\n 20: '#ffeda3',\n 30: '#ffe07a',\n 40: '#ffd152',\n 50: '#ffbf29',\n 60: '#ffa900',\n 70: '#d98900',\n 80: '#b36b00',\n 90: '#8c4f00',\n 100: '#663600',\n },\n // 品牌色\n black: '#000',\n white: '#FFF',\n brand: 'colors.primary.60',\n highlight: 'colors.error.50',\n text: {\n normal: 'colors.gray.90',\n secondary: 'colors.gray.80',\n disabled: 'colors.gray.40',\n title: 'colors.gray.100',\n body: 'colors.gray.80',\n note: 'colors.gray.70',\n placeholder: 'colors.gray.40', // 占位,禁用\n },\n link: {\n link: 'colors.primary.60',\n focus: 'colors.primary.60',\n hover: 'colors.primary.50',\n active: 'colors.primary.70',\n disabled: 'colors.primary.10',\n },\n background: {\n normal: 'colors.gray.10',\n secondary: 'colors.gray.20',\n disabled: 'colors.gray.10',\n },\n line: {\n normal: 'colors.gray.30',\n secondary: 'colors.gray.40',\n disabled: 'colors.gray.30',\n },\n line1: '#f2f3f5',\n line2: '#e5e6eb',\n line3: '#c9cdd4',\n line4: '#86909c',\n fill1: '#f7f8fa',\n fill2: '#f2f3f5',\n fill3: '#e5e6eb',\n fill4: '#c9cdd4',\n fill5: '#4e5969',\n text1: '#1d2129',\n text2: '#4e5969',\n text3: '#86909c',\n text4: '#c9cdd4',\n text5: '#ffffff',\n },\n space: {\n s: '4px',\n m: '8px',\n l: '12px',\n xl: '16px',\n xxl: '20px',\n },\n fontSizes: {\n note: '12px',\n body: '12px',\n subtitle: '14px',\n title: '16px',\n subheader: '20px',\n header: '24px',\n },\n borders: {\n solid: '1px solid',\n dashed: '1px dashed',\n },\n radii: {\n s: '2px',\n m: '4px',\n l: '8px',\n xl: '12px',\n xxl: '24px',\n },\n shadows: {\n lowUp: '0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03)',\n lowDown: '0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03)',\n lowLeft: '-6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03)',\n lowRight: '6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03)',\n medianUp: '0px -4px 8px -4px rgba(0,0,0,0.12),0px -8px 16px 0px rgba(0,0,0,0.08),0px -12px 24px 8px rgba(0,0,0,0.04)',\n medianRight: '4px 0px 8px -4px rgba(0,0,0,0.12),8px 0px 16px 0px rgba(0,0,0,0.08),12px 0px 24px 8px rgba(0,0,0,0.04)',\n medianDown: '0px 4px 8px -4px rgba(0,0,0,0.12),0px 8px 16px 0px rgba(0,0,0,0.08),0px 12px 24px 8px rgba(0,0,0,0.04)',\n medianLeft: '-4px 0px 8px -4px rgba(0,0,0,0.12),-8px 0px 16px 0px rgba(0,0,0,0.08),-12px 0px 24px 8px rgba(0,0,0,0.04)',\n highUp: '0px -8px 16px -8px rgba(0,0,0,0.08),0px -12px 24px 12px rgba(0,0,0,0.04),0px -16px 48px 16px rgba(0,0,0,0.02)',\n highRight: '8px 0px 16px -8px rgba(0,0,0,0.08),12px 0px 24px 12px rgba(0,0,0,0.04),16px 0px 48px 16px rgba(0,0,0,0.02)',\n highDown: '0px 8px 16px -8px rgba(0,0,0,0.08),0px 12px 24px 12px rgba(0,0,0,0.04),0px 16px 48px 16px rgba(0,0,0,0.02)',\n highLeft: '-8px 0px 16px -8px rgba(0,0,0,0.08),-12px 0px 24px 12px rgba(0,0,0,0.04),-16px 0px 48px 16px rgba(0,0,0,0.02)',\n },\n};\n/**\n * 修改默认主题\n * @param overrides\n * @param baseTheme\n * @returns\n */\nexport function extendTheme(overrides, baseTheme = defaultTheme) {\n return mergeWith({}, baseTheme, overrides);\n}\n","import { get, hasIn, isNil } from 'lodash';\nimport { defaultTheme } from '../theme';\nexport const DEFAULT_PREFIX = '--coral';\nconst hexRegex = /^#[a-fA-F0-9]{3,6}$/;\nconst rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/;\nconst rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nfunction parseToRGB(color) {\n if (color.match(hexRegex)) {\n return {\n red: parseInt(`${color[1]}${color[2]}`, 16),\n green: parseInt(`${color[3]}${color[4]}`, 16),\n blue: parseInt(`${color[5]}${color[6]}`, 16),\n };\n }\n throw new Error('color is not a valid hex value');\n}\n/**\n * background: ${rgba('#ffffff', 0.4)};\n * @param hexColor\n * @param alpha\n */\nexport function rgba(hexColor, alpha) {\n if (!hexColor) {\n return;\n }\n const rgbValue = parseToRGB(hexColor);\n return `rgba(${rgbValue.red},${rgbValue.green},${rgbValue.blue},${alpha})`;\n}\nconst THEME_TOKEN_PATTERN = /^(colors|fontSizes|lineHeights|borders|radii|shadows|space|sizes|zIndices|components)./;\nconst CSS_FUNCTION_PATTERN = /^[a-z]+(-[a-z]*)?\\(.+\\)$/;\n/**\n * 是否为有效的 token path\n * @param token\n */\nexport function isValidTokenPath(token) {\n if (token && THEME_TOKEN_PATTERN.test(token)) {\n return true;\n }\n return false;\n}\nconst tokenPathToVariable = (token, prefix) => {\n return `var(${prefix}-${token.split('.').join('-')})`;\n};\nfunction tokenGetterFactory(scale, getter) {\n return (token, prefix = DEFAULT_PREFIX) => {\n if (isNil(token)) {\n return;\n }\n if (getter && typeof getter === 'function') {\n const temp = getter(token);\n if (!isNil(temp)) {\n return temp;\n }\n }\n if (typeof token === 'number') {\n return token;\n }\n // 优先检查符合 tokenPath 规范,符合规范的直接转换,不检查有效性\n if (isValidTokenPath(token)) {\n return tokenPathToVariable(token, prefix);\n }\n // 再检查是不是 css function,如果是,直接返回\n if (CSS_FUNCTION_PATTERN.test(token)) {\n return token;\n }\n // 最后尝试加入 scale 在 theme 中寻找\n if (scale) {\n const themedToken = [scale, token].join('.');\n // TODO: 暂不支持解析到扩展 theme token,最好的做法是放到 ThemeProvider 里通过 context 找\n if (hasIn(defaultTheme, themedToken)) {\n return tokenPathToVariable(themedToken, prefix);\n }\n }\n // 不符合条件的直接返回\n return token;\n };\n}\n/**\n * 获取对应的 css variable token\n */\nexport const getToken = tokenGetterFactory();\n/**\n * color token to css variables\n */\nexport const colors = tokenGetterFactory('colors', (token) => {\n if (hexRegex.test(token) || rgbRegex.test(token) || rgbaRegex.test(token)) {\n return token;\n }\n return;\n});\nexport const borders = tokenGetterFactory('borders', (token) => {\n if (Number(token) === 0) {\n return 0;\n }\n if (token.split(' ').length > 1) {\n return token;\n }\n return;\n});\nexport const shadows = tokenGetterFactory('shadows', (token) => {\n if (token && token.split(' ').length > 4) {\n return token;\n }\n return;\n});\n/**\n * 正则:匹配是否为有效的单位数值\n * @example\n * 22px, 22.2%, 33vw, 44vh\n */\nconst SIZE_UNIT_VALUE = /^\\d+(\\.\\d+)?(px|vw|vh|%)$/;\nconst sizeGetter = (token) => {\n if (typeof token === 'number') {\n return `${token}px`;\n }\n if (typeof token === 'string' && SIZE_UNIT_VALUE.test(token)) {\n return token;\n }\n return;\n};\nexport const sizes = tokenGetterFactory('sizes', sizeGetter);\nexport const space = tokenGetterFactory('space', sizeGetter);\nexport const radii = tokenGetterFactory('radii', sizeGetter);\nexport const fontSizes = tokenGetterFactory('fontSizes', sizeGetter);\nexport const lineHeights = tokenGetterFactory('lineHeights', (token) => {\n if (typeof token === 'number') {\n return token;\n }\n if (typeof token === 'string' && SIZE_UNIT_VALUE.test(token)) {\n return token;\n }\n return;\n});\n/**\n * 获取 value 的真实值\n * @param token\n * @param themeObject\n */\nexport function getTokenValue(token, themeObject = {}) {\n let val = token;\n while (isValidTokenPath(val)) {\n val = get(themeObject, val);\n }\n return val;\n}\n","import { assign } from 'lodash';\nimport { getToken, sizes, space, radii, fontSizes, lineHeights, colors, shadows, borders, DEFAULT_PREFIX, } from '../helpers';\nconst getRawValue = (value) => value;\nconst getValueMap = {\n colors,\n fontSizes,\n lineHeights,\n space,\n sizes,\n borders,\n radii,\n shadows,\n zIndices: getToken,\n};\nexport const system = (args) => {\n const config = {};\n const keys = Object.keys(args);\n for (const key of keys) {\n const conf = args[key];\n if (conf === true) {\n config[key] = createStyleFunction({\n property: key,\n getValue: getRawValue,\n });\n }\n else {\n // conf is a object\n config[key] = createStyleFunction(conf);\n }\n }\n const parser = createParser(config);\n return parser;\n};\nexport const compose = (...parsers) => {\n const config = {};\n for (const parser of parsers) {\n if (!parser || !parser.config) {\n continue;\n }\n assign(config, parser.config);\n }\n const parser = createParser(config);\n return parser;\n};\nfunction createParser(config) {\n const parse = (props) => {\n var _a;\n const styles = {};\n const prefix = props.prefix || ((_a = props.theme) === null || _a === void 0 ? void 0 : _a.prefix) || DEFAULT_PREFIX;\n for (const key in props) {\n if (key === 'theme')\n continue;\n if (key === 'prefix')\n continue;\n if (!config[key])\n continue;\n const sx = config[key];\n const raw = props[key];\n // const scale = sx.scale;\n // TODO: raw is object\n // TODO: raw is responsive object\n assign(styles, sx(raw, prefix));\n }\n return styles;\n };\n parse.config = config;\n parse.propNames = Object.keys(config);\n return parse;\n}\nfunction createStyleFunction({ properties: propertiesProp, property, scale, getValue: getValueProp, }) {\n const properties = propertiesProp || [property];\n const getValue = getValueProp || getValueMap[scale] || getRawValue;\n const sx = (value, prefix) => {\n const result = {};\n const n = getValue(value, prefix);\n if (n === null) {\n return;\n }\n properties.forEach((prop) => {\n result[prop] = n;\n });\n return result;\n };\n sx.scale = scale;\n return sx;\n}\n","import { system } from './core';\nconst config = {\n display: true,\n overflow: true,\n overflowX: true,\n overflowY: true,\n verticalAlign: true,\n width: {\n property: 'width',\n scale: 'sizes',\n },\n height: {\n property: 'height',\n scale: 'sizes',\n },\n minWidth: {\n property: 'minWidth',\n scale: 'sizes',\n },\n minHeight: {\n property: 'minHeight',\n scale: 'sizes',\n },\n maxWidth: {\n property: 'maxWidth',\n scale: 'sizes',\n },\n maxHeight: {\n property: 'maxHeight',\n scale: 'sizes',\n },\n size: {\n properties: ['width', 'height'],\n scale: 'sizes',\n },\n};\nexport const layout = system(config);\n","import { system } from './core';\nconst config = {\n fontFamily: true,\n fontStyle: true,\n letterSpacing: true,\n textAlign: true,\n fontSize: {\n property: 'fontSize',\n scale: 'fontSizes',\n },\n fontWeight: {\n property: 'fontWeight',\n scale: 'fontWeights',\n },\n lineHeight: {\n property: 'lineHeight',\n scale: 'lineHeights',\n },\n};\nexport const typography = system(config);\n","import { system } from './core';\nconst config = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: true,\n columnGap: {\n property: 'columnGap',\n scale: 'space',\n },\n rowGap: {\n property: 'rowGap',\n scale: 'space',\n },\n gap: {\n property: 'gap',\n scale: 'space',\n },\n // item\n flex: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: true,\n justifySelf: true,\n alignSelf: true,\n order: true,\n};\nexport const flexbox = system(config);\n","import { system } from './core';\nconst config = {\n gridGap: {\n property: 'gridGap',\n scale: 'space',\n },\n gridColumnGap: {\n property: 'gridColumnGap',\n scale: 'space',\n },\n gridRowGap: {\n property: 'gridRowGap',\n scale: 'space',\n },\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridAutoRows: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridRowSpan: true,\n};\nexport const grid = system(config);\n","import { system } from './core';\nconst config = {\n position: true,\n zIndex: {\n property: 'zIndex',\n scale: 'zIndices',\n },\n top: {\n property: 'top',\n scale: 'space',\n },\n right: {\n property: 'right',\n scale: 'space',\n },\n bottom: {\n property: 'bottom',\n scale: 'space',\n },\n left: {\n property: 'left',\n scale: 'space',\n },\n};\nexport const position = system(config);\n","import { system } from './core';\nconst config = {\n color: {\n property: 'color',\n scale: 'colors',\n },\n backgroundColor: {\n property: 'backgroundColor',\n scale: 'colors',\n },\n background: {\n property: 'background',\n scale: 'colors',\n },\n backgroundImage: true,\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n opacity: true,\n};\nconfig.bg = config.background;\nconfig.bgImage = config.backgroundImage;\nconfig.bgSize = config.backgroundSize;\nconfig.bgPosition = config.backgroundPosition;\nconfig.bgRepeat = config.backgroundRepeat;\nconfig.bgAttachment = config.backgroundAttachment;\nexport const color = system(config);\n","import { system } from './core';\nconst config = {\n borderStyle: true,\n borderTopStyle: true,\n borderRightStyle: true,\n borderBottomStyle: true,\n borderLeftStyle: true,\n border: {\n property: 'border',\n scale: 'borders',\n },\n borderWidth: {\n property: 'borderWidth',\n scale: 'sizes',\n },\n borderColor: {\n property: 'borderColor',\n scale: 'colors',\n },\n borderRadius: {\n property: 'borderRadius',\n scale: 'radii',\n },\n borderTop: {\n property: 'borderTop',\n scale: 'borders',\n },\n borderTopLeftRadius: {\n property: 'borderTopLeftRadius',\n scale: 'radii',\n },\n borderTopRightRadius: {\n property: 'borderTopRightRadius',\n scale: 'radii',\n },\n borderRight: {\n property: 'borderRight',\n scale: 'borders',\n },\n borderBottom: {\n property: 'borderBottom',\n scale: 'borders',\n },\n borderBottomLeftRadius: {\n property: 'borderBottomLeftRadius',\n scale: 'radii',\n },\n borderBottomRightRadius: {\n property: 'borderBottomRightRadius',\n scale: 'radii',\n },\n borderLeft: {\n property: 'borderLeft',\n scale: 'borders',\n },\n borderX: {\n properties: ['borderLeft', 'borderRight'],\n scale: 'borders',\n },\n borderY: {\n properties: ['borderTop', 'borderBottom'],\n scale: 'borders',\n },\n borderTopWidth: {\n property: 'borderTopWidth',\n scale: 'sizes',\n },\n borderTopColor: {\n property: 'borderTopColor',\n scale: 'colors',\n },\n borderBottomWidth: {\n property: 'borderBottomWidth',\n scale: 'sizes',\n },\n borderBottomColor: {\n property: 'borderBottomColor',\n scale: 'colors',\n },\n borderLeftWidth: {\n property: 'borderLeftWidth',\n scale: 'sizes',\n },\n borderLeftColor: {\n property: 'borderLeftColor',\n scale: 'colors',\n },\n borderRightWidth: {\n property: 'borderRightWidth',\n scale: 'sizes',\n },\n borderRightColor: {\n property: 'borderRightColor',\n scale: 'colors',\n },\n};\nexport const border = system(config);\n","import { system } from './core';\nconst configs = {\n margin: {\n property: 'margin',\n scale: 'space',\n },\n marginTop: {\n property: 'marginTop',\n scale: 'space',\n },\n marginRight: {\n property: 'marginRight',\n scale: 'space',\n },\n marginBottom: {\n property: 'marginBottom',\n scale: 'space',\n },\n marginLeft: {\n property: 'marginLeft',\n scale: 'space',\n },\n marginX: {\n properties: ['marginLeft', 'marginRight'],\n scale: 'space',\n },\n marginY: {\n properties: ['marginTop', 'marginBottom'],\n scale: 'space',\n },\n padding: {\n property: 'padding',\n scale: 'space',\n },\n paddingTop: {\n property: 'paddingTop',\n scale: 'space',\n },\n paddingRight: {\n property: 'paddingRight',\n scale: 'space',\n },\n paddingBottom: {\n property: 'paddingBottom',\n scale: 'space',\n },\n paddingLeft: {\n property: 'paddingLeft',\n scale: 'space',\n },\n paddingX: {\n properties: ['paddingLeft', 'paddingRight'],\n scale: 'space',\n },\n paddingY: {\n properties: ['paddingTop', 'paddingBottom'],\n scale: 'space',\n },\n};\nconfigs.m = configs.margin;\nconfigs.mt = configs.marginTop;\nconfigs.mr = configs.marginRight;\nconfigs.mb = configs.marginBottom;\nconfigs.ml = configs.marginLeft;\nconfigs.mx = configs.marginX;\nconfigs.my = configs.marginY;\nconfigs.p = configs.padding;\nconfigs.pt = configs.paddingTop;\nconfigs.pr = configs.paddingRight;\nconfigs.pb = configs.paddingBottom;\nconfigs.pl = configs.paddingLeft;\nconfigs.px = configs.paddingX;\nconfigs.py = configs.paddingY;\nexport const space = system(configs);\n","import { system } from './core';\nconst config = {\n boxShadow: {\n property: 'boxShadow',\n scale: 'shadows',\n },\n textShadow: {\n property: 'textShadow',\n scale: 'shadows',\n },\n};\nexport const shadow = system(config);\n","import { system } from './core';\nexport const base = system({\n // visible: {\n // property: 'visibility',\n // scale: 'base',\n // getValue: (val: boolean) => (!!val ? 'visible' : 'hidden'),\n // },\n visibility: true,\n whiteSpace: true,\n userSelect: true,\n pointerEvents: true,\n overflowWrap: true,\n textOverflow: true,\n cursor: true,\n outline: true,\n});\n","import memoize from '@emotion/memoize';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { compose } from './core';\nimport { layout } from './layout';\nimport { typography } from './typography';\nimport { flexbox } from './flexbox';\nimport { grid } from './grid';\nimport { position } from './position';\nimport { color } from './color';\nimport { border } from './border';\nimport { space } from './space';\nimport { shadow } from './shadows';\nimport { base } from './base';\nconst createShouldForwardProp = (props) => {\n const regex = new RegExp(`^(${props.join('|')})$`);\n return memoize((prop) => isPropValid(prop) && !regex.test(prop));\n};\nexport const cssProps = (props) => {\n if (Array.isArray(props.css)) {\n return props.css.join('');\n }\n return props.css;\n};\n// 基础属性\nconst common = {\n config: {\n prefix: true,\n theme: true,\n },\n};\nexport const allStyledProps = compose(common, base, layout, typography, flexbox, grid, position, color, border, space, shadow);\nexport const textStyledProps = compose(common, base, typography, color);\nexport const allStyledPropNames = allStyledProps.propNames;\nexport const shouldForwardProp = createShouldForwardProp(allStyledPropNames);\nexport * from './core';\nexport * from './base';\nexport * from './layout';\nexport * from './typography';\nexport * from './flexbox';\nexport * from './grid';\nexport * from './position';\nexport * from './color';\nexport * from './border';\nexport * from './space';\nexport * from './shadows';\n","import styled from 'styled-components';\nimport { shouldForwardProp, cssProps, allStyledProps } from './core';\n/**\n * 创建一个 System Component\n * @param component HTML 标签\n * @param initCss 初始化的 CSS 样式\n * @param options 自定义选项\n * @returns react component\n */\nexport function coral(component, initCss, options) {\n const attrs = typeof (options === null || options === void 0 ? void 0 : options.attrs) === 'function' ? options === null || options === void 0 ? void 0 : options.attrs : () => options === null || options === void 0 ? void 0 : options.attrs;\n const shouldForward = (options === null || options === void 0 ? void 0 : options.shouldForwardProp) || shouldForwardProp;\n return styled(component)\n .attrs((props) => ({\n prefix: props.prefix || (options === null || options === void 0 ? void 0 : options.prefix),\n ...attrs(props),\n }))\n .withConfig({\n shouldForwardProp: shouldForward,\n }) `\n ${initCss}\n ${allStyledProps}\n ${cssProps}\n `;\n}\n","import { coral } from '../coral';\nexport const Box = coral('div');\nexport const Button = coral('button');\nexport const Center = coral('div', undefined, {\n attrs: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n","import { createGlobalStyle } from 'styled-components';\nexport const CssVariables = createGlobalStyle `\n :root {\n ${(props) => props.variables.map((item) => item.join(':')).join(';')}\n }\n`;\n","import React, { createContext, useContext, useMemo } from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport { assign } from 'lodash';\nimport { defaultTheme } from '../theme';\nimport { getTokenValue, isValidTokenPath, getToken, DEFAULT_PREFIX } from '../helpers';\nimport { CssVariables } from './global-styles';\nconst SystemContext = createContext({\n prefix: DEFAULT_PREFIX,\n theme: defaultTheme,\n});\nexport const useSystem = () => useContext(SystemContext);\nexport const useTheme = () => {\n const { theme } = useSystem();\n const getValue = (path) => getTokenValue(path);\n return {\n theme,\n getValue,\n };\n};\n/**\n * 获取 css variable 的根节点,例如 --tango-colors-brand 返回 --tango\n * @param str\n * @returns\n */\nconst getRootPrefix = (str) => {\n const input = str.startsWith('--') ? str.slice(2) : str;\n return ['--', input.split('-')[0]].join('');\n};\nfunction themeToVariables(obj, prefix) {\n let paths = [];\n Object.keys(obj).forEach((key) => {\n const keypath = prefix ? [prefix, key].join('-') : key;\n if (typeof obj[key] === 'string') {\n let val = obj[key];\n if (isValidTokenPath(val)) {\n const rootPrefix = getRootPrefix(prefix);\n val = getToken(val, rootPrefix);\n }\n paths.push([keypath, val]);\n }\n else {\n paths = paths.concat(themeToVariables(obj[key], keypath));\n }\n });\n return paths;\n}\nexport function SystemProvider({ prefix = DEFAULT_PREFIX, theme = defaultTheme, children }) {\n const context = useMemo(() => ({ theme, prefix }), [theme, prefix]);\n const variables = useMemo(() => themeToVariables(theme, prefix), [theme, prefix]);\n const mergedTheme = useMemo(() => assign({}, theme, { prefix }), [theme, prefix]);\n return (React.createElement(SystemContext.Provider, { value: context },\n React.createElement(ThemeProvider, { theme: mergedTheme },\n React.createElement(CssVariables, { variables: variables }),\n children)));\n}\n","import React from 'react';\nexport function forwardRef(component) {\n return React.forwardRef(component);\n}\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { Box } from './box';\nimport { space, toPercent, toNumber } from '../helpers';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nconst FlexStyle = css `\n & > *:not(style) ~ *:not(style) {\n margin-top: ${(props) => props.flexDirection === 'column' && props['data-gap']};\n margin-left: ${(props) => props.flexDirection === 'row' && props['data-gap']};\n margin-bottom: ${(props) => props.flexDirection === 'column-reverse' && props['data-gap']};\n margin-right: ${(props) => props.flexDirection === 'row-reverse' && props['data-gap']};\n }\n`;\nexport const Flex = forwardRef((props, ref) => {\n const { direction = 'row', spacing, align, justify, wrap, flex, basis, grow, shrink, css, ...rest } = props;\n const { prefix } = useSystem();\n const gap = space(spacing, prefix);\n return (React.createElement(Box, { ref: ref, display: \"flex\", flexDirection: direction, alignItems: align, justifyContent: justify, flexWrap: wrap, flexBasis: basis, flexGrow: grow, flexShrink: shrink, css: [FlexStyle, css], \"data-gap\": gap, ...rest }));\n});\n// TODO: 待定\nconst COLS_TOTAL = 12;\nconst getWidth = (span) => {\n if (span === 'auto') {\n return span;\n }\n return toPercent(toNumber(span) / COLS_TOTAL);\n};\nexport const FlexItem = forwardRef((props, ref) => {\n const { span, flex: flexProp, ...rest } = props;\n const width = span ? getWidth(span) : undefined;\n const flex = width ? '0 0 auto' : '1 0 0%';\n return React.createElement(Box, { ref: ref, width: width, flex: flexProp || flex, ...rest });\n});\n","export function isNumber(value) {\n return typeof value === 'number';\n}\nexport function toNumber(value) {\n if (typeof value === 'number') {\n return value;\n }\n const num = parseFloat(value);\n return isNaN(num) ? 0 : num;\n}\nexport function toPercent(value) {\n return `${value * 100}%`;\n}\n","import React from 'react';\nimport { Box } from './box';\nimport { isNumber, space } from '../helpers';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nexport const Grid = forwardRef((props, ref) => {\n const { columns, spacingX, spacingY, spacing, minChildWidth, templateColumns: templateColumnsProp, templateRows, area, templateArea, ...rest } = props;\n const { prefix } = useSystem();\n const templateColumns = minChildWidth ? widthToColumns(minChildWidth) : countToColumns(columns);\n return (React.createElement(Box, { display: \"grid\", gridGap: space(spacing, prefix), gridColumnGap: space(spacingX, prefix), gridRowGap: space(spacingY, prefix), gridTemplateColumns: templateColumnsProp || templateColumns, gridTemplateRows: templateRows, gridArea: area, gridTemplateAreas: templateArea, ref: ref, ...rest }));\n});\nexport const GridItem = forwardRef((props, ref) => {\n const { colSpan = 'auto', colStart, colEnd, rowEnd, rowSpan = 'auto', rowStart, ...rest } = props;\n return (React.createElement(Box, { ref: ref, gridColumn: toSpan(colSpan), gridColumnStart: colStart, gridColumnEnd: colEnd, gridRow: toSpan(rowSpan), gridRowStart: rowStart, gridRowEnd: rowEnd, ...rest }));\n});\nfunction toSpan(span) {\n return span === 'auto' ? 'auto' : `span ${span}/span ${span}`;\n}\nfunction toPx(n) {\n return isNumber(n) ? `${n}px` : n;\n}\nfunction widthToColumns(width) {\n return `repeat(auto-fit, minmax(${toPx(width)}, 1fr))`;\n}\nfunction countToColumns(count) {\n return `repeat(${count}, 1fr)`;\n}\n","import { css } from 'styled-components';\nimport { coral } from '../coral';\nconst truncatedStyle = css `\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\nconst textClampStyle = css `\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: ${(props) => props.$lineClamp};\n`;\nconst textStyle = css `\n ${(props) => props.$lineClamp > 0 && textClampStyle};\n ${(props) => props.$truncated && truncatedStyle};\n`;\nexport const Text = coral('span', textStyle, {\n attrs: (props) => ({\n textAlign: props.align,\n $truncated: props.truncated,\n $lineClamp: props.lineClamp,\n }),\n});\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { coral } from '../coral';\nimport { forwardRef } from '../forward-ref';\nimport { useSystem } from '../provider';\nimport { colors } from '../helpers';\nconst linkStyle = css `\n text-decoration: none;\n color: ${(props) => props.$linkColor};\n\n &:hover {\n color: ${(props) => props.$hoverColor};\n text-decoration: underline;\n }\n\n &:active {\n color: ${(props) => props.$activeColor};\n }\n`;\nconst A = coral('a', linkStyle);\nexport const Link = forwardRef(({ isExternal, ...rest }, ref) => {\n const { prefix } = useSystem();\n const pass = {\n $linkColor: colors('link.link', prefix),\n $hoverColor: colors('link.hover', prefix),\n $activeColor: colors('link.active', prefix),\n };\n return React.createElement(A, { target: isExternal ? '_blank' : undefined, ...rest, ...pass, ref: ref });\n});\n","import React from 'react';\nimport { css } from 'styled-components';\nimport { space } from '../helpers';\nimport { Box } from './box';\nimport { useSystem } from '../provider';\nimport { forwardRef } from '../forward-ref';\nconst attachedStyle = css `\n > *:first-child:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n > *:last-child:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n > *:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n\n > *:not(:last-child) {\n margin-right: -1px;\n }\n`;\nconst normalStyle = css `\n > *:not(:last-child) {\n margin-right: ${(props) => props['data-gapx']};\n margin-bottom: ${(props) => props['data-gapy']};\n }\n`;\nexport const Group = forwardRef((props, ref) => {\n const { block, attached, spacingX = 'm', spacingY = 0, css, children, ...rest } = props;\n const { prefix } = useSystem();\n return (React.createElement(Box, { ref: ref, role: \"group\", display: block ? 'block' : 'inline-block', css: [attached ? attachedStyle : normalStyle, css], \"data-gapx\": space(spacingX, prefix), \"data-gapy\": space(spacingY, prefix), ...rest }, children));\n});\n","/**\r\n * CSS-JSON Converter for JavaScript\r\n * Converts CSS to JSON and back.\r\n * Version 2.1\r\n *\r\n * Released under the MIT license.\r\n *\r\n * Copyright (c) 2013 Aram Kocharyan, http://aramk.com/\r\n\r\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\r\n documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation\r\n the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and\r\n to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\n The above copyright notice and this permission notice shall be included in all copies or substantial portions\r\n of the Software.\r\n\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r\n THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n THE SOFTWARE.\r\n */\r\n\r\n\r\n/*******************************************************************************\r\n * UMD pattern for exporting module\r\n */\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === 'object') {\r\n // Node. Does not work with strict CommonJS, but\r\n // only CommonJS-like environments that support module.exports,\r\n // like Node.\r\n module.exports = factory();\r\n } else {\r\n // Browser globals (root is window)\r\n root.CSSJSON = factory();\r\n }\r\n}(this, function () {\r\n\r\n var CSSJSON = new function () {\r\n\r\n var base = this;\r\n\r\n base.init = function () {\r\n // String functions\r\n String.prototype.trim = function () {\r\n return this.replace(/^\\s+|\\s+$/g, '');\r\n };\r\n\r\n String.prototype.repeat = function (n) {\r\n return new Array(1 + n).join(this);\r\n };\r\n };\r\n base.init();\r\n\r\n var selX = /([^\\s\\;\\{\\}][^\\;\\{\\}]*)\\{/g;\r\n var endX = /\\}/g;\r\n var lineX = /([^\\;\\{\\}]*)\\;/g;\r\n var commentX = /\\/\\*[\\s\\S]*?\\*\\//g;\r\n var lineAttrX = /([^\\:]+):([^\\;]*);/;\r\n\r\n // This is used, a concatenation of all above. We use alternation to\r\n // capture.\r\n var altX = /(\\/\\*[\\s\\S]*?\\*\\/)|([^\\s\\;\\{\\}][^\\;\\{\\}]*(?=\\{))|(\\})|([^\\;\\{\\}]+\\;(?!\\s*\\*\\/))/gmi;\r\n\r\n // Capture groups\r\n var capComment = 1;\r\n var capSelector = 2;\r\n var capEnd = 3;\r\n var capAttr = 4;\r\n\r\n var isEmpty = function (x) {\r\n return typeof x == 'undefined' || x.length == 0 || x == null;\r\n };\r\n\r\n /**\r\n * Input is css string and current pos, returns JSON object\r\n *\r\n * @param cssString\r\n * The CSS string.\r\n * @param args\r\n * An optional argument object. ordered: Whether order of\r\n * comments and other nodes should be kept in the output. This\r\n * will return an object where all the keys are numbers and the\r\n * values are objects containing \"name\" and \"value\" keys for each\r\n * node. comments: Whether to capture comments. split: Whether to\r\n * split each comma separated list of selectors.\r\n */\r\n base.toJSON = function (cssString, args) {\r\n var node = {\r\n children: {},\r\n attributes: {}\r\n };\r\n var match = null;\r\n var count = 0;\r\n\r\n if (typeof args == 'undefined') {\r\n var args = {\r\n ordered: false,\r\n comments: false,\r\n stripComments: false,\r\n split: false\r\n };\r\n }\r\n if (args.stripComments) {\r\n args.comments = false;\r\n cssString = cssString.replace(commentX, '');\r\n }\r\n\r\n while ((match = altX.exec(cssString)) != null) {\r\n if (!isEmpty(match[capComment]) && args.comments) {\r\n // Comment\r\n var add = match[capComment].trim();\r\n node[count++] = add;\r\n } else if (!isEmpty(match[capSelector])) {\r\n // New node, we recurse\r\n var name = match[capSelector].trim();\r\n // This will return when we encounter a closing brace\r\n var newNode = base.toJSON(cssString, args);\r\n if (args.ordered) {\r\n var obj = {};\r\n obj['name'] = name;\r\n obj['value'] = newNode;\r\n // Since we must use key as index to keep order and not\r\n // name, this will differentiate between a Rule Node and an\r\n // Attribute, since both contain a name and value pair.\r\n obj['type'] = 'rule';\r\n node[count++] = obj;\r\n } else {\r\n if (args.split) {\r\n var bits = name.split(',');\r\n } else {\r\n var bits = [name];\r\n }\r\n for (i in bits) {\r\n var sel = bits[i].trim();\r\n if (sel in node.children) {\r\n for (var att in newNode.attributes) {\r\n node.children[sel].attributes[att] = newNode.attributes[att];\r\n }\r\n } else {\r\n node.children[sel] = newNode;\r\n }\r\n }\r\n }\r\n } else if (!isEmpty(match[capEnd])) {\r\n // Node has finished\r\n return node;\r\n } else if (!isEmpty(match[capAttr])) {\r\n var line = match[capAttr].trim();\r\n var attr = lineAttrX.exec(line);\r\n if (attr) {\r\n // Attribute\r\n var name = attr[1].trim();\r\n var value = attr[2].trim();\r\n if (args.ordered) {\r\n var obj = {};\r\n obj['name'] = name;\r\n obj['value'] = value;\r\n obj['type'] = 'attr';\r\n node[count++] = obj;\r\n } else {\r\n if (name in node.attributes) {\r\n var currVal = node.attributes[name];\r\n if (!(currVal instanceof Array)) {\r\n node.attributes[name] = [currVal];\r\n }\r\n node.attributes[name].push(value);\r\n } else {\r\n node.attributes[name] = value;\r\n }\r\n }\r\n } else {\r\n // Semicolon terminated line\r\n node[count++] = line;\r\n }\r\n }\r\n }\r\n\r\n return node;\r\n };\r\n\r\n /**\r\n * @param node\r\n * A JSON node.\r\n * @param depth\r\n * The depth of the current node; used for indentation and\r\n * optional.\r\n * @param breaks\r\n * Whether to add line breaks in the output.\r\n */\r\n base.toCSS = function (node, depth, breaks) {\r\n var cssString = '';\r\n if (typeof depth == 'undefined') {\r\n depth = 0;\r\n }\r\n if (typeof breaks == 'undefined') {\r\n breaks = false;\r\n }\r\n if (node.attributes) {\r\n for (i in node.attributes) {\r\n var att = node.attributes[i];\r\n if (att instanceof Array) {\r\n for (var j = 0; j < att.length; j++) {\r\n cssString += strAttr(i, att[j], depth);\r\n }\r\n } else {\r\n cssString += strAttr(i, att, depth);\r\n }\r\n }\r\n }\r\n if (node.children) {\r\n var first = true;\r\n for (i in node.children) {\r\n if (breaks && !first) {\r\n cssString += '\\n';\r\n } else {\r\n first = false;\r\n }\r\n cssString += strNode(i, node.children[i], depth);\r\n }\r\n }\r\n return cssString;\r\n };\r\n\r\n // Helpers\r\n\r\n var strAttr = function (name, value, depth) {\r\n return '\\t'.repeat(depth) + name + ': ' + value + ';\\n';\r\n };\r\n\r\n var strNode = function (name, value, depth) {\r\n var cssString = '\\t'.repeat(depth) + name + ' {\\n';\r\n cssString += base.toCSS(value, depth + 1);\r\n cssString += '\\t'.repeat(depth) + '}\\n';\r\n return cssString;\r\n };\r\n\r\n };\r\n\r\n return CSSJSON;\r\n}));\r\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","'use strict';\nmodule.exports = require('./globals.json');\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell\n// License: MIT. (See LICENSE.)\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n})\n\n// This regex comes from regex.coffee, and is inserted here by generate-index.js\n// (run `npm run build`).\nexports.default = /((['\"])(?:(?!\\2|\\\\).|\\\\(?:\\r\\n|[\\s\\S]))*(\\2)?|`(?:[^`\\\\$]|\\\\[\\s\\S]|\\$(?!\\{)|\\$\\{(?:[^{}]|\\{[^}]*\\}?)*\\}?)*(`)?)|(\\/\\/.*)|(\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?)|(\\/(?!\\*)(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\]\\\\]).|\\\\.)+\\/(?:(?!\\s*(?:\\b|[\\u0080-\\uFFFF$\\\\'\"~({]|[+\\-!](?!=)|\\.?\\d))|[gmiyus]{1,6}\\b(?![\\u0080-\\uFFFF$\\\\]|\\s*(?:[+\\-*%&|^<>!=?({]|\\/(?![\\/*])))))|(0[xX][\\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][+-]?\\d+)?)|((?!\\d)(?:(?!\\s)[$\\w\\u0080-\\uFFFF]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+)|(--|\\+\\+|&&|\\|\\||=>|\\.{3}|(?:[+\\-\\/%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\\](){}])|(\\s+)|(^$|[\\s\\S])/g\n\nexports.matchToToken = function(match) {\n var token = {type: \"invalid\", value: match[0], closed: undefined}\n if (match[ 1]) token.type = \"string\" , token.closed = !!(match[3] || match[4])\n else if (match[ 5]) token.type = \"comment\"\n else if (match[ 6]) token.type = \"comment\", token.closed = !!match[7]\n else if (match[ 8]) token.type = \"regex\"\n else if (match[ 9]) token.type = \"number\"\n else if (match[10]) token.type = \"name\"\n else if (match[11]) token.type = \"punctuator\"\n else if (match[12]) token.type = \"whitespace\"\n return token\n}\n","'use strict';\n\nconst object = {};\nconst hasOwnProperty = object.hasOwnProperty;\nconst forOwn = (object, callback) => {\n\tfor (const key in object) {\n\t\tif (hasOwnProperty.call(object, key)) {\n\t\t\tcallback(key, object[key]);\n\t\t}\n\t}\n};\n\nconst extend = (destination, source) => {\n\tif (!source) {\n\t\treturn destination;\n\t}\n\tforOwn(source, (key, value) => {\n\t\tdestination[key] = value;\n\t});\n\treturn destination;\n};\n\nconst forEach = (array, callback) => {\n\tconst length = array.length;\n\tlet index = -1;\n\twhile (++index < length) {\n\t\tcallback(array[index]);\n\t}\n};\n\nconst toString = object.toString;\nconst isArray = Array.isArray;\nconst isBuffer = Buffer.isBuffer;\nconst isObject = (value) => {\n\t// This is a very simple check, but it’s good enough for what we need.\n\treturn toString.call(value) == '[object Object]';\n};\nconst isString = (value) => {\n\treturn typeof value == 'string' ||\n\t\ttoString.call(value) == '[object String]';\n};\nconst isNumber = (value) => {\n\treturn typeof value == 'number' ||\n\t\ttoString.call(value) == '[object Number]';\n};\nconst isFunction = (value) => {\n\treturn typeof value == 'function';\n};\nconst isMap = (value) => {\n\treturn toString.call(value) == '[object Map]';\n};\nconst isSet = (value) => {\n\treturn toString.call(value) == '[object Set]';\n};\n\n/*--------------------------------------------------------------------------*/\n\n// https://mathiasbynens.be/notes/javascript-escapes#single\nconst singleEscapes = {\n\t'\"': '\\\\\"',\n\t'\\'': '\\\\\\'',\n\t'\\\\': '\\\\\\\\',\n\t'\\b': '\\\\b',\n\t'\\f': '\\\\f',\n\t'\\n': '\\\\n',\n\t'\\r': '\\\\r',\n\t'\\t': '\\\\t'\n\t// `\\v` is omitted intentionally, because in IE < 9, '\\v' == 'v'.\n\t// '\\v': '\\\\x0B'\n};\nconst regexSingleEscape = /[\"'\\\\\\b\\f\\n\\r\\t]/;\n\nconst regexDigit = /[0-9]/;\nconst regexWhitelist = /[ !#-&\\(-\\[\\]-_a-~]/;\n\nconst jsesc = (argument, options) => {\n\tconst increaseIndentation = () => {\n\t\toldIndent = indent;\n\t\t++options.indentLevel;\n\t\tindent = options.indent.repeat(options.indentLevel)\n\t};\n\t// Handle options\n\tconst defaults = {\n\t\t'escapeEverything': false,\n\t\t'minimal': false,\n\t\t'isScriptContext': false,\n\t\t'quotes': 'single',\n\t\t'wrap': false,\n\t\t'es6': false,\n\t\t'json': false,\n\t\t'compact': true,\n\t\t'lowercaseHex': false,\n\t\t'numbers': 'decimal',\n\t\t'indent': '\\t',\n\t\t'indentLevel': 0,\n\t\t'__inline1__': false,\n\t\t'__inline2__': false\n\t};\n\tconst json = options && options.json;\n\tif (json) {\n\t\tdefaults.quotes = 'double';\n\t\tdefaults.wrap = true;\n\t}\n\toptions = extend(defaults, options);\n\tif (\n\t\toptions.quotes != 'single' &&\n\t\toptions.quotes != 'double' &&\n\t\toptions.quotes != 'backtick'\n\t) {\n\t\toptions.quotes = 'single';\n\t}\n\tconst quote = options.quotes == 'double' ?\n\t\t'\"' :\n\t\t(options.quotes == 'backtick' ?\n\t\t\t'`' :\n\t\t\t'\\''\n\t\t);\n\tconst compact = options.compact;\n\tconst lowercaseHex = options.lowercaseHex;\n\tlet indent = options.indent.repeat(options.indentLevel);\n\tlet oldIndent = '';\n\tconst inline1 = options.__inline1__;\n\tconst inline2 = options.__inline2__;\n\tconst newLine = compact ? '' : '\\n';\n\tlet result;\n\tlet isEmpty = true;\n\tconst useBinNumbers = options.numbers == 'binary';\n\tconst useOctNumbers = options.numbers == 'octal';\n\tconst useDecNumbers = options.numbers == 'decimal';\n\tconst useHexNumbers = options.numbers == 'hexadecimal';\n\n\tif (json && argument && isFunction(argument.toJSON)) {\n\t\targument = argument.toJSON();\n\t}\n\n\tif (!isString(argument)) {\n\t\tif (isMap(argument)) {\n\t\t\tif (argument.size == 0) {\n\t\t\t\treturn 'new Map()';\n\t\t\t}\n\t\t\tif (!compact) {\n\t\t\t\toptions.__inline1__ = true;\n\t\t\t\toptions.__inline2__ = false;\n\t\t\t}\n\t\t\treturn 'new Map(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isSet(argument)) {\n\t\t\tif (argument.size == 0) {\n\t\t\t\treturn 'new Set()';\n\t\t\t}\n\t\t\treturn 'new Set(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isBuffer(argument)) {\n\t\t\tif (argument.length == 0) {\n\t\t\t\treturn 'Buffer.from([])';\n\t\t\t}\n\t\t\treturn 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';\n\t\t}\n\t\tif (isArray(argument)) {\n\t\t\tresult = [];\n\t\t\toptions.wrap = true;\n\t\t\tif (inline1) {\n\t\t\t\toptions.__inline1__ = false;\n\t\t\t\toptions.__inline2__ = true;\n\t\t\t}\n\t\t\tif (!inline2) {\n\t\t\t\tincreaseIndentation();\n\t\t\t}\n\t\t\tforEach(argument, (value) => {\n\t\t\t\tisEmpty = false;\n\t\t\t\tif (inline2) {\n\t\t\t\t\toptions.__inline2__ = false;\n\t\t\t\t}\n\t\t\t\tresult.push(\n\t\t\t\t\t(compact || inline2 ? '' : indent) +\n\t\t\t\t\tjsesc(value, options)\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (isEmpty) {\n\t\t\t\treturn '[]';\n\t\t\t}\n\t\t\tif (inline2) {\n\t\t\t\treturn '[' + result.join(', ') + ']';\n\t\t\t}\n\t\t\treturn '[' + newLine + result.join(',' + newLine) + newLine +\n\t\t\t\t(compact ? '' : oldIndent) + ']';\n\t\t} else if (isNumber(argument)) {\n\t\t\tif (json) {\n\t\t\t\t// Some number values (e.g. `Infinity`) cannot be represented in JSON.\n\t\t\t\treturn JSON.stringify(argument);\n\t\t\t}\n\t\t\tif (useDecNumbers) {\n\t\t\t\treturn String(argument);\n\t\t\t}\n\t\t\tif (useHexNumbers) {\n\t\t\t\tlet hexadecimal = argument.toString(16);\n\t\t\t\tif (!lowercaseHex) {\n\t\t\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t\t\t}\n\t\t\t\treturn '0x' + hexadecimal;\n\t\t\t}\n\t\t\tif (useBinNumbers) {\n\t\t\t\treturn '0b' + argument.toString(2);\n\t\t\t}\n\t\t\tif (useOctNumbers) {\n\t\t\t\treturn '0o' + argument.toString(8);\n\t\t\t}\n\t\t} else if (!isObject(argument)) {\n\t\t\tif (json) {\n\t\t\t\t// For some values (e.g. `undefined`, `function` objects),\n\t\t\t\t// `JSON.stringify(value)` returns `undefined` (which isn’t valid\n\t\t\t\t// JSON) instead of `'null'`.\n\t\t\t\treturn JSON.stringify(argument) || 'null';\n\t\t\t}\n\t\t\treturn String(argument);\n\t\t} else { // it’s an object\n\t\t\tresult = [];\n\t\t\toptions.wrap = true;\n\t\t\tincreaseIndentation();\n\t\t\tforOwn(argument, (key, value) => {\n\t\t\t\tisEmpty = false;\n\t\t\t\tresult.push(\n\t\t\t\t\t(compact ? '' : indent) +\n\t\t\t\t\tjsesc(key, options) + ':' +\n\t\t\t\t\t(compact ? '' : ' ') +\n\t\t\t\t\tjsesc(value, options)\n\t\t\t\t);\n\t\t\t});\n\t\t\tif (isEmpty) {\n\t\t\t\treturn '{}';\n\t\t\t}\n\t\t\treturn '{' + newLine + result.join(',' + newLine) + newLine +\n\t\t\t\t(compact ? '' : oldIndent) + '}';\n\t\t}\n\t}\n\n\tconst string = argument;\n\t// Loop over each code unit in the string and escape it\n\tlet index = -1;\n\tconst length = string.length;\n\tresult = '';\n\twhile (++index < length) {\n\t\tconst character = string.charAt(index);\n\t\tif (options.es6) {\n\t\t\tconst first = string.charCodeAt(index);\n\t\t\tif ( // check if it’s the start of a surrogate pair\n\t\t\t\tfirst >= 0xD800 && first <= 0xDBFF && // high surrogate\n\t\t\t\tlength > index + 1 // there is a next code unit\n\t\t\t) {\n\t\t\t\tconst second = string.charCodeAt(index + 1);\n\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate\n\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\tconst codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t\t\t\t\tlet hexadecimal = codePoint.toString(16);\n\t\t\t\t\tif (!lowercaseHex) {\n\t\t\t\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t\t\t\t}\n\t\t\t\t\tresult += '\\\\u{' + hexadecimal + '}';\n\t\t\t\t\t++index;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!options.escapeEverything) {\n\t\t\tif (regexWhitelist.test(character)) {\n\t\t\t\t// It’s a printable ASCII character that is not `\"`, `'` or `\\`,\n\t\t\t\t// so don’t escape it.\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '\"') {\n\t\t\t\tresult += quote == character ? '\\\\\"' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '`') {\n\t\t\t\tresult += quote == character ? '\\\\`' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (character == '\\'') {\n\t\t\t\tresult += quote == character ? '\\\\\\'' : character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tcharacter == '\\0' &&\n\t\t\t!json &&\n\t\t\t!regexDigit.test(string.charAt(index + 1))\n\t\t) {\n\t\t\tresult += '\\\\0';\n\t\t\tcontinue;\n\t\t}\n\t\tif (regexSingleEscape.test(character)) {\n\t\t\t// no need for a `hasOwnProperty` check here\n\t\t\tresult += singleEscapes[character];\n\t\t\tcontinue;\n\t\t}\n\t\tconst charCode = character.charCodeAt(0);\n\t\tif (options.minimal && charCode != 0x2028 && charCode != 0x2029) {\n\t\t\tresult += character;\n\t\t\tcontinue;\n\t\t}\n\t\tlet hexadecimal = charCode.toString(16);\n\t\tif (!lowercaseHex) {\n\t\t\thexadecimal = hexadecimal.toUpperCase();\n\t\t}\n\t\tconst longhand = hexadecimal.length > 2 || json;\n\t\tconst escaped = '\\\\' + (longhand ? 'u' : 'x') +\n\t\t\t('0000' + hexadecimal).slice(longhand ? -4 : -2);\n\t\tresult += escaped;\n\t\tcontinue;\n\t}\n\tif (options.wrap) {\n\t\tresult = quote + result + quote;\n\t}\n\tif (quote == '`') {\n\t\tresult = result.replace(/\\$\\{/g, '\\\\\\$\\{');\n\t}\n\tif (options.isScriptContext) {\n\t\t// https://mathiasbynens.be/notes/etago\n\t\treturn result\n\t\t\t.replace(/<\\/(script|style)/gi, '<\\\\/$1')\n\t\t\t.replace(/ Date.now\n * @param node\n * @returns\n */\nfunction getNameByMemberExpression(node) {\n let objectName;\n let propertyName;\n if (t.isIdentifier(node.object) || t.isJSXIdentifier(node.object)) {\n objectName = node.object.name;\n }\n if (t.isIdentifier(node.property) || t.isJSXIdentifier(node.property)) {\n propertyName = node.property.name;\n }\n if (t.isMemberExpression(node.object) || t.isJSXMemberExpression(node.object)) {\n objectName = getNameByMemberExpression(node.object);\n }\n if (t.isMemberExpression(node.property) || t.isJSXMemberExpression(node.property)) {\n propertyName = getNameByMemberExpression(node.property);\n }\n return `${objectName}.${propertyName}`;\n}\n/**\n * 将 的 jsxAttributeName 或 objectPropertyKey 转换为 js value\n * @param node jsxAttributeName or objectPropertyKey\n * @returns simple js value\n */\nexport function keyNode2value(node) {\n if (!node) {\n logger.error('invalid property key', node);\n return;\n }\n let ret;\n switch (node.type) {\n case 'Identifier':\n case 'JSXIdentifier':\n ret = node.name;\n break;\n case 'StringLiteral':\n ret = `\"${node.value}\"`;\n break;\n case 'NumericLiteral':\n ret = node.value;\n break;\n case 'MemberExpression':\n ret = getNameByMemberExpression(node);\n break;\n case 'JSXMemberExpression':\n ret = getNameByMemberExpression(node);\n break;\n default:\n logger.error('unknown property key', node);\n break;\n }\n return ret;\n}\n/**\n * 将 t.Node 生成为字符串代码\n * @param node\n * @returns\n */\nexport function node2code(node) {\n let ret = '';\n switch (node.type) {\n case 'StringLiteral':\n case 'NumericLiteral':\n ret = node.extra.raw;\n break;\n case 'BooleanLiteral':\n ret = `${node.value}`;\n break;\n case 'NullLiteral':\n ret = 'null';\n break;\n default:\n ret = expression2code(node);\n break;\n }\n return ret;\n}\n/**\n * 将 t.Node 生成为 js 值\n * @param node ast node\n * @param hasExpressionWrapper 是否包裹表达式\n * @returns a plain javascript value\n */\nexport function node2value(node, hasExpressionWrapper = true) {\n let ret;\n switch (node.type) {\n case 'StringLiteral':\n case 'NumericLiteral':\n case 'BooleanLiteral': {\n ret = node.value;\n break;\n }\n case 'NullLiteral':\n ret = null;\n break;\n case 'Identifier': // {data}\n case 'MemberExpression': // {this.props.data}\n case 'OptionalMemberExpression': // {a?.b}\n case 'UnaryExpression': // {!false}\n case 'ArrowFunctionExpression': // {() => {}}\n case 'TemplateLiteral': // {`hello ${text}`}\n case 'ConditionalExpression': // {a ? 'foo' : 'bar'}\n case 'LogicalExpression': // { a || b}\n case 'BinaryExpression': // { a + b}\n case 'TaggedTemplateExpression': // {css``}\n case 'CallExpression': // {[1,2,3].map(fn)}\n case 'JSXElement': // {hello}\n case 'JSXFragment': // <>\n ret = expression2code(node);\n if (hasExpressionWrapper) {\n ret = `{${ret}}`;\n }\n break;\n case 'ObjectExpression': {\n ret = node.properties.reduce((prev, propertyNode) => {\n if (propertyNode.type === 'ObjectProperty') {\n const key = keyNode2value(propertyNode.key);\n const value = node2value(propertyNode.value, hasExpressionWrapper);\n // key 可能是字符串,也可能是数字\n prev[key] = value;\n }\n // FIXME: property is a SpreadElement\n return prev;\n }, {});\n break;\n }\n case 'ArrayExpression': {\n ret = node.elements.map((elementNode) => node2value(elementNode, hasExpressionWrapper));\n break;\n }\n default:\n logger.error('unknown ast node:', node);\n break;\n }\n return ret;\n}\n/**\n * jsx 属性值节点转为 js value\n */\nexport function jsxAttributeValueNode2value(node) {\n // e.g. 此时没有 value node\n if (!node) {\n return true;\n }\n let ret;\n switch (node.type) {\n case 'JSXExpressionContainer':\n // \n // \n // \n // \n // \n ret = jsxAttributeValueNode2value(node.expression);\n break;\n default:\n ret = node2value(node);\n break;\n }\n return ret;\n}\n","import { isValidExpressionCode } from './ast';\nconst defineServiceHandlerNames = ['defineServices', 'createServices'];\nconst sfHandlerPattern = new RegExp(`^(${defineServiceHandlerNames.join('|')})$`);\n/**\n * 判断给定的函数名是否是 defineServices\n * @param name\n * @returns\n */\nexport function isDefineService(name) {\n return sfHandlerPattern.test(name);\n}\nconst defineStoreHandlerName = 'defineStore';\n/**\n * 判断给定的函数名是否是 defineStore\n * @param name\n * @returns\n */\nexport function isDefineStore(name) {\n return defineStoreHandlerName === name;\n}\n/**\n * 是否是 tango 的变量引用\n * @example tango.stores.app.name\n * @example tango.stores?.app?.name\n *\n * @param name\n * @returns\n */\nexport function isTangoVariable(name) {\n return /^tango\\??\\.(stores|services)\\??\\./.test(name) && name.split('.').length > 2;\n}\nconst templatePattern = /^{(.+)}$/s;\n/**\n * 判断给定字符串是否被表达式容器`{expCode}`包裹\n * @param code\n */\nexport function isWrappedByExpressionContainer(code, isStrict = true) {\n if (isStrict && isValidExpressionCode(code)) {\n return false;\n }\n return templatePattern.test(code);\n}\n","/**\n * code to ast\n */\nimport { parse, parseExpression } from '@babel/parser';\nimport * as t from '@babel/types';\nimport { logger, isValidObjectString, getVariableContent, isPlainObject, } from '@music163/tango-helpers';\nimport { isWrappedByExpressionContainer } from '../assert';\n// @see https://babeljs.io/docs/en/babel-parser#pluginss\nconst babelParserConfig = {\n sourceType: 'module',\n plugins: [\n 'jsx',\n 'doExpressions',\n 'objectRestSpread',\n 'decorators-legacy',\n 'classProperties',\n 'asyncGenerators',\n 'functionBind',\n 'dynamicImport',\n 'optionalChaining',\n ],\n};\n/**\n * 检测代码是否是合法的代码\n * @param code\n * @returns true 为合法代码,false 为非法代码\n */\nexport function isValidCode(code) {\n try {\n parse(code, babelParserConfig);\n }\n catch (err) {\n return false;\n }\n return true;\n}\n/**\n * 检测代码是否是合法的表达式代码\n * 表达式是一组代码的集合,它返回一个值;每一个合法的表达式都能计算成某个值\n * 只要你输入这段代码,可以形成一个值,就算是表达式\n * @example x = 1; // 1\n * @example 1=1\n * @example 'hello'\n * @example { foo: 'bar' }\n * @param code\n * @returns\n */\nexport function isValidExpressionCode(code) {\n try {\n parseExpression(code, babelParserConfig);\n }\n catch (err) {\n return false;\n }\n return true;\n}\n/**\n * 将源代码解析为一棵完整的 ast 树 t.File\n * @param code\n * @returns\n */\nexport function code2ast(code) {\n try {\n return parse(code, babelParserConfig);\n }\n catch (err) {\n logger.error('[code2ast failed!]', err);\n }\n}\n/**\n * 将代码片段解析为 ast 节点\n * @example \n * @example { foo: 'foo' }\n * @example [{ foo: 'bar' }]\n * @example () => {}\n * @param code 输入字符串\n * @returns\n */\nexport function code2expression(code) {\n if (!code) {\n return;\n }\n if (code.endsWith(';')) {\n code = code.slice(0, -1);\n }\n let expNode;\n try {\n expNode = t.cloneNode(parseExpression(code, babelParserConfig), false, true);\n }\n catch (err) {\n logger.error('invalid code', err);\n // expNode = t.identifier('undefined');\n }\n return expNode;\n}\n/**\n * 表达式代码片段转为 ast 树\n * @param code\n * @returns File\n */\nexport function expressionCode2ast(code) {\n if (isWrappedByExpressionContainer(code)) {\n code = getVariableContent(code);\n }\n const node = code2expression(code);\n return t.file(t.program([t.blockStatement([t.expressionStatement(node)])]));\n}\n/**\n * 将 js 值解析为 t.Node\n * @param value\n * @returns\n */\nexport function value2node(value) {\n let ret;\n switch (typeof value) {\n case 'number':\n ret = t.numericLiteral(value);\n break;\n case 'string':\n if (isWrappedByExpressionContainer(value)) {\n // 再检查是否是表达式容器,例如 {this.foo}, {1}\n const innerString = getVariableContent(value);\n ret = code2expression(innerString);\n }\n else {\n ret = t.stringLiteral(value);\n }\n break;\n case 'boolean':\n ret = t.booleanLiteral(value);\n break;\n case 'function':\n ret = code2expression(String(value));\n break;\n case 'object': {\n if (value === null) {\n ret = t.nullLiteral();\n }\n else if (isPlainObject(value)) {\n ret = object2node(value);\n }\n else if (Array.isArray(value)) {\n ret = t.arrayExpression(value.map((val) => value2node(val)));\n }\n else {\n ret = t.identifier('undefined');\n logger.error('value2node: not support value!', ret);\n }\n break;\n }\n case 'undefined':\n ret = t.identifier('undefined');\n break;\n default: {\n logger.error(`value2node: unsupport value <${value}>`);\n break;\n }\n }\n return ret;\n}\n/**\n * 将 js 普通对象解析为 t.Node\n */\nexport function object2node(obj, getValueNode = value2node) {\n if (!isPlainObject(obj)) {\n return value2node(obj);\n }\n return t.objectExpression(Object.keys(obj).map((key) => {\n const valNode = getValueNode(obj[key], key);\n return t.objectProperty(t.identifier(key), valNode);\n }));\n}\nexport function code2jsxAttributeValueNode(code) {\n return t.jsxExpressionContainer(code2expression(code));\n}\nexport function value2jsxAttributeValueNode(value) {\n let ret;\n switch (typeof value) {\n // FIXME: 重构这个逻辑,是不是统一当成 code 处理\n case 'string': {\n if (value.length > 1) {\n value = value.trim();\n }\n if (isValidObjectString(value)) {\n // 先检查是否是对象字符串\n ret = t.jsxExpressionContainer(code2expression(value));\n }\n else if (isWrappedByExpressionContainer(value)) {\n // 再检查是否是表达式容器,例如 {this.foo}, {1}\n const innerString = getVariableContent(value);\n ret = t.jsxExpressionContainer(code2expression(innerString));\n }\n else {\n ret = t.stringLiteral(value);\n }\n break;\n }\n default:\n ret = t.jsxExpressionContainer(value2node(value));\n break;\n }\n return ret;\n}\nexport function value2jsxChildrenValueNode(value) {\n let ret;\n switch (typeof value) {\n case 'string':\n if (isWrappedByExpressionContainer(value)) {\n const innerString = getVariableContent(value);\n ret = t.jsxExpressionContainer(code2expression(innerString));\n }\n else {\n ret = t.jsxText(value);\n }\n break;\n case 'number':\n ret = t.jsxText(String(value));\n break;\n case 'object':\n // value 为 JSXElement[]的情况下直接return\n return value;\n default:\n break;\n }\n return ret ? [ret] : [];\n}\n/**\n * 给定具体的 value 值,生成 JSXAttribute\n * @param name 属性名\n * @param value 属性值代码\n * @returns\n */\nexport function makeJSXAttribute(name, value) {\n return t.jsxAttribute(t.jsxIdentifier(name), value2jsxAttributeValueNode(value));\n}\n/**\n * 给定具体的 value 代码,生成 JSXAttribute\n * @param name 属性名\n * @param valueCode 属性值代码\n * @returns\n */\nexport function makeJSXAttributeByCode(name, valueCode) {\n return t.jsxAttribute(t.jsxIdentifier(name), code2jsxAttributeValueNode(valueCode));\n}\n/**\n * 生成 JSXElement\n * @param name\n * @param attributes\n * @param children\n * @param selfClosing\n * @returns\n */\nexport function makeJSXElement(name, attributes, children, selfClosing) {\n return t.jsxElement(t.jsxOpeningElement(t.jsxIdentifier(name), attributes), t.jsxClosingElement(t.jsxIdentifier(name)), children !== null && children !== void 0 ? children : [], selfClosing);\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nexport var DropMethod;\n(function (DropMethod) {\n DropMethod[\"ReplaceNode\"] = \"replaceNode\";\n DropMethod[\"InsertBefore\"] = \"insertBefore\";\n DropMethod[\"InsertAfter\"] = \"insertAfter\";\n DropMethod[\"InsertChild\"] = \"insertChild\";\n DropMethod[\"InsertFirstChild\"] = \"insertFirstChild\";\n})(DropMethod || (DropMethod = {}));\n/**\n * 放置目标类\n */\nexport class DropTarget {\n get node() {\n return this.workspace.getNode(this.data.id, this.data.filename);\n }\n /**\n * 获取对应的 prototype\n */\n get prototype() {\n var _a, _b;\n return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.name) ? this.workspace.getPrototype((_b = this.data) === null || _b === void 0 ? void 0 : _b.name) : null;\n }\n get id() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.id;\n }\n get bounding() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.bounding;\n }\n get display() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.display;\n }\n constructor(workspace) {\n this.workspace = workspace;\n this.method = DropMethod.InsertAfter;\n this.data = null;\n makeObservable(this, {\n method: observable,\n data: observable,\n set: action,\n clear: action,\n node: computed,\n });\n }\n set(data, method) {\n this.data = data;\n this.method = method;\n }\n /**\n * 重置\n */\n clear() {\n this.data = null;\n }\n /**\n * 获取对应的 node\n * @deprecated\n */\n getNode() {\n return this.node;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nexport var HistoryMessage;\n(function (HistoryMessage) {\n HistoryMessage[\"InitView\"] = \"initView\";\n HistoryMessage[\"AddFile\"] = \"addFile\";\n HistoryMessage[\"RemoveFile\"] = \"removeFile\";\n HistoryMessage[\"UpdateDependency\"] = \"updateDependency\";\n HistoryMessage[\"RemoveDependency\"] = \"removeDependency\";\n HistoryMessage[\"RemoveNode\"] = \"removeNode\";\n HistoryMessage[\"ReplaceNode\"] = \"replaceNode\";\n HistoryMessage[\"CloneNode\"] = \"cloneNode\";\n HistoryMessage[\"InsertNode\"] = \"insertNode\";\n HistoryMessage[\"DropNode\"] = \"dropNode\";\n HistoryMessage[\"UpdateAttribute\"] = \"updateAttribute\";\n HistoryMessage[\"UpdateCode\"] = \"updateCode\";\n})(HistoryMessage || (HistoryMessage = {}));\n/**\n * 工作区的历史记录记录\n */\nexport class TangoHistory {\n get index() {\n return this._index;\n }\n get length() {\n return this._records.length;\n }\n get list() {\n return toJS(this._records);\n }\n get couldBack() {\n return this._records.length > 0 && this._index > -1;\n }\n get couldForward() {\n return this._records.length > this._index + 1;\n }\n constructor(workspace) {\n // 历史记录\n this._records = [];\n // 当前记录指针\n this._index = 0;\n // 最多记录数\n this._maxSize = 100;\n this.workspace = workspace;\n makeObservable(this, {\n _records: observable,\n _index: observable,\n back: action,\n forward: action,\n go: action,\n push: action,\n couldBack: computed,\n couldForward: computed,\n });\n }\n _sync(data) {\n if (data) {\n Object.keys(data).forEach((filename) => {\n this.workspace.getFile(filename).update(data[filename]);\n });\n }\n }\n /**\n * 上一步\n */\n back() {\n if (this.couldBack) {\n const item = this._records[this._index - 1];\n this._sync(item.data);\n this._index--;\n }\n }\n /**\n * 下一步\n */\n forward() {\n if (this.couldForward) {\n const item = this._records[this._index + 1];\n this._sync(item.data);\n this._index++;\n }\n }\n /**\n * 通过相对位置从历史记录加载记录\n */\n go(index) {\n const item = this._records[index];\n if (item) {\n this._sync(item.data);\n this._index = index;\n }\n }\n /**\n * push 数据进入历史记录堆栈\n */\n push(data) {\n if (this._index < this._records.length - 1) {\n this._records = this._records.slice(0, this._index + 1);\n }\n this._index = this._records.length;\n this._records.push(Object.assign({ time: Date.now() }, data));\n const overCount = this._records.length - this._maxSize;\n if (overCount > 0) {\n this._records.splice(0, overCount);\n this._index = this._records.length - 1;\n }\n }\n}\n","/**\n * 访问,遍历,修改 ast tree\n */\nimport * as t from '@babel/types';\nimport traverse from '@babel/traverse';\nimport { isFunction, SLOT, logger, parseDndId, upperCamelCase, } from '@music163/tango-helpers';\nimport { keyNode2value, jsxAttributeValueNode2value, node2value, node2code } from './generate';\nimport { value2jsxAttributeValueNode, value2jsxChildrenValueNode, value2node, makeJSXAttribute, code2expression, object2node, } from './parse';\nimport { getFullPath, isValidComponentName } from '../string';\nimport { isDefineService, isDefineStore, isTangoVariable } from '../assert';\n/**\n * 将 Node 节点构造为一棵树,并执行树的遍历操作,此操作会修改原始的节点\n * @param node\n * @param options\n * @returns 返回完整的 File AST\n */\nexport function traverseExpressionNode(node, options) {\n const file = t.file(t.program([t.blockStatement([t.expressionStatement(node)])]));\n traverse(file, options);\n return file;\n}\n/**\n * 遍历 jsxElement 的 attributes 集合\n * @param node\n * @param visitCallback\n */\nfunction visitJSXElementAttributes(node, visitCallback) {\n var _a;\n node.openingElement.attributes.forEach((attrNode) => {\n if (isFunction(visitCallback) && attrNode.type === 'JSXAttribute') {\n const name = keyNode2value(attrNode.name);\n const value = jsxAttributeValueNode2value(attrNode.value);\n visitCallback(name, value, attrNode);\n }\n });\n // TIP: 如果 children 节点为简单数据类型,则也作为属性值\n if (node.children.length === 1) {\n const onlyChild = node.children[0];\n let nodeValue;\n if (t.isJSXText(onlyChild)) {\n nodeValue = (_a = onlyChild.value) === null || _a === void 0 ? void 0 : _a.trim();\n }\n else if (t.isJSXExpressionContainer(onlyChild)) {\n nodeValue = jsxAttributeValueNode2value(onlyChild);\n }\n if (nodeValue) {\n visitCallback('children', nodeValue, node.children);\n }\n }\n}\n/**\n * 删除 jsxElement 的目标属性\n * @param node\n * @param attrName\n */\nfunction removeJSXElementAttributeByName(node, attrName) {\n node.openingElement.attributes = node.openingElement.attributes.filter((attrNode) => {\n if (t.isJSXAttribute(attrNode)) {\n const name = keyNode2value(attrNode.name);\n return name !== attrName;\n }\n return true;\n });\n}\n/**\n * 获取 jsx 节点的属性集\n * @param node\n * @returns\n */\nexport function getJSXElementAttributes(node) {\n const ret = {};\n visitJSXElementAttributes(node, (name, value) => {\n ret[name] = value;\n });\n return ret;\n}\n/**\n * 获取 jsx 结点的子元素名字\n * @param node\n * @returns\n */\nexport function getJSXElementChildrenNames(node) {\n const names = new Set();\n traverseExpressionNode(node, {\n JSXElement(path) {\n const name = getJSXElementName(path.node);\n // invalid name\n if (!name) {\n return;\n }\n // html tags, e.g. div, span...\n if (name.toLowerCase() === name) {\n return;\n }\n const parts = name.split('.');\n // 嵌套类型 Button.Group,只取父级\n if (parts.length) {\n names.add(parts[0]);\n }\n },\n });\n return Array.from(names);\n}\n/**\n * 匹配名字叫 targetName 的组件\n * @param ast\n * @param targetName\n * @param callback\n */\nfunction visitJSXElementByName(ast, targetName, callback) {\n const visitors = {\n JSXElement(path) {\n if (getJSXElementName(path.node) === targetName) {\n callback(path.node);\n }\n },\n };\n switch (ast.type) {\n case 'File':\n traverse(ast, visitors);\n break;\n case 'JSXElement':\n traverseExpressionNode(ast, visitors);\n }\n}\n/**\n * 查询所有XFormItem的字段名\n * @param ast 当前文件AST\n * @returns 所有 XFormItem 的字段名\n */\nexport function queryXFormItemFields(ast) {\n const fields = [];\n visitJSXElementByName(ast, 'XFormItem', (node) => {\n const attrs = getJSXElementAttributes(node);\n if (attrs.name && !fields.includes(attrs.name)) {\n fields.push(attrs.name);\n }\n });\n return fields;\n}\n/**\n * 根据 dnd id 判断是否是目标的 JSXElement\n * @param node\n * @param id\n */\nexport function isJSXElementById(node, jsxElementNodeId) {\n let isTargetJSXElement = false;\n visitJSXElementAttributes(node, (name, value) => {\n if (name === SLOT.dnd && value === jsxElementNodeId) {\n isTargetJSXElement = true;\n }\n });\n return isTargetJSXElement;\n}\n/**\n * 在目标 jsx 元素中添加子元素\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function appendChildToJSXElement(ast, targetJSXElementNodeId, newNode, position) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n // 强制变为非闭合标签 & 避免children添加失败\n if (path.node.openingElement.selfClosing) {\n path.node.openingElement.selfClosing = false;\n path.node.closingElement = t.jSXClosingElement(path.node.openingElement.name);\n }\n if (position === 'last') {\n path.node.children.push(newNode);\n }\n else {\n path.node.children.unshift(newNode);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在目标 jsx 元素后添加兄弟节点\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n */\nexport function insertSiblingAfterJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n if (path.parentPath.isJSXElement()) {\n path.insertAfter(newNode);\n }\n else if (path.parentPath.isJSXExpressionContainer()) {\n const fragmentNode = t.jsxFragment(t.jsxOpeningFragment(), t.jsxClosingFragment(), [\n t.cloneDeepWithoutLoc(path.node),\n newNode,\n ]);\n path.replaceWith(fragmentNode);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在目标 jsx 元素前添加兄弟节点\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function insertSiblingBeforeJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n path.insertBefore(newNode);\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 替换目标 jsx 元素为新的元素\n * @param ast\n * @param targetJSXElementNodeId\n * @param newNode\n * @returns\n */\nexport function replaceJSXElement(ast, targetJSXElementNodeId, newNode) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n path.replaceWith(newNode);\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 删除目标 jsx 元素\n * @param ast\n * @param targetJSXElementNodeId\n */\nexport function removeJSXElement(ast, targetJSXElementNodeId) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, targetJSXElementNodeId)) {\n const { parentPath } = path;\n const ancestorPath = path.parentPath.parentPath;\n if (t.isJSXElement(parentPath.node)) {\n path.remove();\n }\n else if (t.isJSXAttribute(ancestorPath.node)) {\n // 如果祖先节点在 jsxAttribute 上,则删除该属性\n ancestorPath.remove();\n }\n else {\n logger.error('removeJSXElement failed', path.node);\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 替换跟结点的子元素\n * @example 例如替换 `return (empty block)` 的子元素\n * @param ast\n * @param nodes\n */\nexport function replaceRootJSXElementChildren(ast, nodes) {\n traverse(ast, {\n JSXElement(path) {\n path.node.children = nodes;\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 新增 JSXElement 的属性节点\n * @param node\n * @param name\n * @param value\n */\nfunction addJSXElementAttribute(node, name, value) {\n if (name === 'children' && node.children) {\n // jsx children 的情况\n node.children = value2jsxChildrenValueNode(value);\n }\n else {\n // basic attributes\n const jsxAttributeNode = t.jsxAttribute(t.jsxIdentifier(name), value2jsxAttributeValueNode(value));\n node.openingElement.attributes.push(jsxAttributeNode);\n }\n return node;\n}\nexport function updateJSXElementAttribute(node, attrName, attrValue) {\n const isUndefinedValue = attrValue === undefined;\n let isExist = false;\n if (isUndefinedValue) {\n // 清空该属性\n removeJSXElementAttributeByName(node, attrName);\n }\n else {\n // 更新该属性\n visitJSXElementAttributes(node, (name, prevValue, jsxAttributeNode) => {\n if (name === attrName) {\n isExist = true;\n // @ts-ignore\n if (t.isJSXAttribute(jsxAttributeNode)) {\n jsxAttributeNode.value = value2jsxAttributeValueNode(attrValue);\n }\n else if (name === 'children') {\n node.children = value2jsxChildrenValueNode(attrValue);\n }\n }\n });\n }\n if (!isExist && !isUndefinedValue) {\n // 添加该属性\n addJSXElementAttribute(node, attrName, attrValue);\n }\n return node;\n}\nexport function updateJSXAttributes(ast, nodeId, config) {\n traverse(ast, {\n JSXElement(path) {\n if (isJSXElementById(path.node, nodeId)) {\n Object.keys(config).forEach((attrName) => {\n updateJSXElementAttribute(path.node, attrName, config[attrName]);\n });\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 从 ast 中找到最后一次 import 的位置的序号\n */\nfunction getLastImportDeclarationIndex(node) {\n let lastImportIndex = 0;\n node.body.forEach((item, index) => {\n if (item.type === 'ImportDeclaration') {\n lastImportIndex = index + 1;\n }\n });\n return lastImportIndex;\n}\n/**\n * 从 ast 中找到最后一次 export 的位置的序号\n */\nfunction getLastExportDeclarationIndex(node) {\n let lastExportIndex = 0;\n node.body.forEach((item, index) => {\n if (item.type === 'ExportNamedDeclaration') {\n lastExportIndex = index + 1;\n }\n });\n return lastExportIndex;\n}\n/**\n * 生成新的 ImportDeclaration\n * @deprecated 使用 makeImportDeclaration2 代替\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function makeImportDeclarationLegacy(importedModule) {\n var _a;\n const specifierNodes = ((_a = importedModule.specifiers) === null || _a === void 0 ? void 0 : _a.map((localName) => t.importSpecifier(t.identifier(localName), t.identifier(localName)))) || [];\n let defaultSpecifierNode;\n if (importedModule.defaultSpecifier) {\n defaultSpecifierNode = t.importDefaultSpecifier(t.identifier(importedModule.defaultSpecifier));\n }\n const newSpecifierNodes = [defaultSpecifierNode, ...specifierNodes].filter((spec) => !!spec);\n return t.importDeclaration(newSpecifierNodes, t.stringLiteral(importedModule.sourcePath));\n}\nfunction specifierData2node(data) {\n switch (data.type) {\n case 'ImportDefaultSpecifier':\n return t.importDefaultSpecifier(t.identifier(data.localName));\n case 'ImportSpecifier':\n return t.importSpecifier(t.identifier(data.importedName || data.localName), t.identifier(data.localName));\n case 'ImportNamespaceSpecifier':\n return t.importNamespaceSpecifier(t.identifier(data.localName));\n default:\n return;\n }\n}\nfunction specifierDataList2nodes(specifiers) {\n return specifiers.map((item) => specifierData2node(item)).filter((item) => !!item);\n}\nexport function makeImportDeclaration(source, specifiers) {\n const specifierNodes = specifierDataList2nodes(specifiers);\n return t.importDeclaration(specifierNodes, t.stringLiteral(source));\n}\n/**\n * @deprecated 使用 parseImportDeclaration 代替\n * @param node\n * @returns\n */\nfunction getImportDeclarationData(node) {\n const sourcePath = node2value(node.source);\n let defaultSpecifier;\n const specifiers = [];\n node.specifiers.forEach((specifier) => {\n if (specifier.type === 'ImportDefaultSpecifier') {\n defaultSpecifier = keyNode2value(specifier.local);\n }\n else if (specifier.type === 'ImportSpecifier') {\n specifiers.push(keyNode2value(specifier.local));\n }\n });\n return {\n defaultSpecifier,\n specifiers,\n sourcePath,\n };\n}\n/**\n * 添加新的导入语句\n * @deprecated 使用 addImportDeclaration2 代替\n * @param ast\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function addImportDeclarationLegacy(ast, importedModule) {\n traverse(ast, {\n Program(path) {\n const lastIndex = getLastImportDeclarationIndex(path.node);\n const newImportDeclaration = makeImportDeclarationLegacy(importedModule);\n path.node.body.splice(lastIndex, 0, newImportDeclaration);\n path.stop();\n },\n });\n return ast;\n}\nexport function addImportDeclaration(ast, source, specifiers) {\n traverse(ast, {\n Program(path) {\n const lastIndex = getLastImportDeclarationIndex(path.node);\n const newImportDeclaration = makeImportDeclaration(source, specifiers);\n path.node.body.splice(lastIndex, 0, newImportDeclaration);\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 更新已有的导入语句\n * @deprecated 使用 updateImportDeclaration2 代替\n * @param ast\n * @param importedModule\n * @param importedSourcePath\n * @returns\n */\nexport function updateImportDeclarationLegacy(ast, importedModule) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === importedModule.sourcePath) {\n const newImportDeclaration = makeImportDeclarationLegacy(importedModule);\n path.replaceWith(newImportDeclaration);\n path.stop(); // 只修改匹配到的第一条\n }\n },\n });\n return ast;\n}\nexport function updateImportDeclaration(ast, source, specifiers) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === source) {\n const newImportDeclaration = makeImportDeclaration(source, specifiers);\n path.replaceWith(newImportDeclaration);\n path.stop(); // 只修改匹配到的第一条\n }\n },\n });\n return ast;\n}\n/**\n * 再已有的导入语句中添加新的导入符号\n * @param ast\n * @param source\n * @param newSpecifiers\n * @returns\n */\nexport function insertImportSpecifiers(ast, source, newSpecifiers) {\n traverse(ast, {\n ImportDeclaration(path) {\n const currentSourcePath = node2value(path.node.source);\n if (currentSourcePath === source) {\n const nodes = specifierDataList2nodes(newSpecifiers);\n path.node.specifiers.push(...nodes);\n // 只在匹配到的第一个导入声明语句添加即可,不再重复执行\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 新增类属性\n * @param ast\n * @param classPropertyNode\n * @returns\n */\nexport function addClassProperty(ast, classPropertyNode) {\n traverse(ast, {\n ClassBody(path) {\n path.node.body.push(classPropertyNode);\n path.stop();\n },\n });\n return ast;\n}\n/**\n * 更新类属性\n * @param ast\n * @param targetPropertyName\n * @param propertyValueNode\n * @returns\n */\nexport function updateClassProperty(ast, targetPropertyName, propertyValueNode) {\n traverse(ast, {\n ClassProperty(path) {\n const name = keyNode2value(path.node.key);\n if (name === targetPropertyName) {\n path.node.value = propertyValueNode;\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 在 routes.js 中添加新的路由规则\n * @param ast\n * @param pageName\n * @returns\n */\nexport function addRouteToRouteFile(ast, routePath, importFilePath) {\n if (/.jsx?$/.test(importFilePath)) {\n importFilePath = importFilePath.split('.')[0];\n }\n const component = upperCamelCase(routePath.split('/').join('-'));\n traverse(ast, {\n Program(path) {\n const lastImportIndex = getLastImportDeclarationIndex(path.node);\n path.node.body.splice(lastImportIndex, 0, t.importDeclaration([t.importDefaultSpecifier(t.identifier(component))], t.stringLiteral(importFilePath.replace('/src', '.'))));\n },\n ArrayExpression(path) {\n const newNode = t.objectExpression([\n t.objectProperty(t.identifier('path'), t.stringLiteral(routePath)),\n t.objectProperty(t.identifier('component'), t.identifier(component)),\n t.objectProperty(t.identifier('exact'), t.booleanLiteral(true)),\n ]);\n path.node.elements.push(newNode);\n },\n });\n return ast;\n}\n/**\n * 更新页面路由\n * @param ast\n * @param oldRoutePath\n * @param newRoutePath\n * @returns\n */\nexport function updateRouteToRouteFile(ast, oldRoutePath, newRoutePath) {\n traverse(ast, {\n ObjectExpression(path) {\n path.node.properties.forEach((prop) => {\n if (t.isObjectProperty(prop) &&\n node2value(prop.key, false) === 'path' &&\n node2value(prop.value, false) === oldRoutePath) {\n prop.value = t.stringLiteral(newRoutePath);\n }\n });\n },\n });\n return ast;\n}\nexport function removeRouteFromRouteFile(ast, routePath, importPath) {\n traverse(ast, {\n ArrayExpression(path) {\n path.node.elements = path.node.elements.filter((element) => {\n if (element.type === 'ObjectExpression') {\n const properties = node2value(element);\n if (properties.path === routePath) {\n return false;\n }\n }\n return true;\n });\n },\n ImportDeclaration(path) {\n const sourceValue = node2value(path.node.source);\n if (sourceValue === importPath) {\n path.remove();\n }\n },\n });\n return ast;\n}\nexport function traverseRouteFile(ast) {\n const routes = [];\n const importMap = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { defaultSpecifier, sourcePath } = getImportDeclarationData(path.node);\n if (defaultSpecifier) {\n importMap[defaultSpecifier] = sourcePath;\n }\n },\n ObjectExpression(path) {\n const { node } = path;\n const route = node2value(node, false);\n routes.push(route);\n },\n });\n routes.forEach((item) => {\n if (item.component && importMap[item.component]) {\n item.importPath = importMap[item.component];\n }\n });\n return routes;\n}\n/**\n * 在 stores/index.js 中添加新的store\n * @param ast\n * @param storeName\n * @returns\n */\nexport function addStoreToEntryFile(ast, storeName) {\n const filepath = `./${storeName}`;\n const component = storeName;\n traverse(ast, {\n Program(path) {\n const lastExportIndex = getLastExportDeclarationIndex(path.node);\n path.node.body.splice(lastExportIndex, 0, t.exportNamedDeclaration(null, [t.exportSpecifier(t.identifier('default'), t.identifier(component))], t.stringLiteral(filepath)));\n },\n });\n return ast;\n}\n/**\n * 在 stores/index.js 中移除一行导出语句\n * @example export { default as app } from \"./app\";\n * @param ast\n * @param storeName\n * @returns\n */\nexport function removeStoreToEntryFile(ast, storeName) {\n traverse(ast, {\n ExportNamedDeclaration(path) {\n var _a;\n const name = keyNode2value((_a = path.node.specifiers) === null || _a === void 0 ? void 0 : _a[0].exported);\n if (name === storeName) {\n path.remove();\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function traverseStoreEntryFile(ast) {\n const stores = [];\n traverse(ast, {\n ExportSpecifier(path) {\n const name = keyNode2value(path.node.exported);\n stores.push(name);\n },\n });\n return stores;\n}\nexport function addStoreState(ast, stateName, initValue) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n node.arguments[0].properties.push(t.objectProperty(t.identifier(stateName), code2expression(initValue)));\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function removeStoreState(ast, stateName) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n let { properties } = node.arguments[0];\n properties = properties.filter((prop) => {\n if (prop.type === 'SpreadElement') {\n return true;\n }\n const propName = keyNode2value(prop.key);\n return propName !== stateName;\n });\n node.arguments[0].properties = properties;\n }\n },\n });\n return ast;\n}\nexport function updateStoreState(ast, stateName, code) {\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n const { properties } = node.arguments[0];\n for (const prop of properties) {\n if (prop.type === 'SpreadElement') {\n continue;\n }\n const propName = keyNode2value(prop.key);\n if (propName === stateName) {\n // TIP: 仅支持对象属性,方法必须需要写为箭头函数\n if (prop.type === 'ObjectProperty') {\n prop.value = code2expression(code);\n break;\n }\n }\n }\n }\n },\n });\n return ast;\n}\nexport function traverseStoreFile(ast) {\n let namespace;\n const actions = [];\n const states = [];\n traverse(ast, {\n CallExpression(path) {\n const { node } = path;\n const calleeName = keyNode2value(node.callee);\n if (isDefineStore(calleeName) &&\n node.arguments.length &&\n t.isObjectExpression(node.arguments[0])) {\n node.arguments[0].properties.forEach((item) => {\n switch (item.type) {\n case 'ObjectMethod': {\n actions.push({\n name: keyNode2value(item.key),\n type: 'method',\n });\n break;\n }\n case 'ObjectProperty': {\n const name = keyNode2value(item.key);\n if (t.isArrowFunctionExpression(item.value)) {\n actions.push({\n name,\n type: 'method',\n code: node2code(item.value),\n });\n }\n else if (t.isFunctionExpression(item.value)) {\n actions.push({\n name,\n type: 'method',\n code: node2code(item.value),\n });\n }\n else {\n states.push({\n name,\n type: 'property',\n code: node2code(item.value),\n });\n }\n break;\n }\n default:\n }\n });\n if (node.arguments[1]) {\n namespace = node2value(node.arguments[1], false);\n }\n path.stop();\n }\n },\n });\n return {\n namespace,\n states,\n actions,\n };\n}\nexport function deleteServiceConfigFromServiceFile(ast, serviceFunctionName) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n if (path.node.arguments.length) {\n const configNode = path.node.arguments[0];\n if (t.isObjectExpression(configNode)) {\n const index = configNode.properties.findIndex((property) => {\n if (t.isObjectProperty(property)) {\n return keyNode2value(property.key) === serviceFunctionName;\n }\n return false;\n });\n configNode.properties.splice(index, 1);\n }\n }\n path.stop();\n }\n },\n });\n return ast;\n}\n/**\n * 将服务函数的配置参数转为 ast 节点\n * @param payload\n * @returns\n */\nexport function serviceConfig2Node(payload) {\n return object2node(payload, (value, key) => {\n if (key === 'formatter' && value) {\n return code2expression(value);\n }\n return value2node(value);\n });\n}\nexport function updateServiceConfigToServiceFile(ast, config) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName) && path.node.arguments.length) {\n const configNode = path.node.arguments[0];\n if (t.isObjectExpression(configNode)) {\n const newPropertiesNodeMap = Object.keys(config).reduce((properties, key) => {\n const serviceConfig = config[key];\n const property = t.objectProperty(t.identifier(key), serviceConfig2Node(serviceConfig));\n properties[key] = property;\n return properties;\n }, {});\n Object.keys(newPropertiesNodeMap).forEach((nodeKey) => {\n // 如果已存在, 找到原来的 propertyNode 进行替换\n const targetIndex = configNode.properties.findIndex((propNode) => {\n if (t.isObjectProperty(propNode)) {\n return keyNode2value(propNode.key) === nodeKey;\n }\n return false;\n });\n if (targetIndex !== -1) {\n configNode.properties[targetIndex] = newPropertiesNodeMap[nodeKey];\n }\n else {\n // 不存在,直接塞到最后边\n configNode.properties.push(newPropertiesNodeMap[nodeKey]);\n }\n });\n }\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function updateBaseConfigToServiceFile(ast, config) {\n traverse(ast, {\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n switch (path.node.arguments.length) {\n case 1:\n // 没有 baseConfig,直接创建新的参数即可\n path.node.arguments.push(value2node(config));\n break;\n case 2: {\n // 已存在 baseConfig,需要进行参数的合并\n const baseConfigNode = path.node.arguments[1];\n if (t.isObjectExpression(baseConfigNode)) {\n const baseConfig = node2value(baseConfigNode);\n path.node.arguments[1] = value2node(Object.assign(Object.assign({}, baseConfig), config));\n }\n break;\n }\n default:\n break;\n }\n path.stop();\n }\n },\n });\n return ast;\n}\nexport function traverseServiceFile(ast) {\n let services;\n const baseConfig = {\n encryptFetch: false,\n };\n const imports = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n imports[source] = specifiers;\n },\n CallExpression(path) {\n const calleeName = keyNode2value(path.node.callee);\n if (isDefineService(calleeName)) {\n if (path.node.arguments.length) {\n services = node2value(path.node.arguments[0], false);\n if (path.node.arguments[1]) {\n const config = node2value(path.node.arguments[1]);\n baseConfig.encryptFetch = !!config.encryptFetch;\n baseConfig.namespace = config.namespace || 'index';\n }\n }\n path.stop();\n }\n },\n });\n return {\n imports,\n services,\n baseConfig,\n };\n}\nfunction getJSXElementName(node) {\n return keyNode2value(node.openingElement.name);\n}\n/**\n * 从 JSXElement 中移除追踪属性\n * @param node\n * @returns\n */\nfunction clearJSXElementTrackingData(node) {\n const attributes = node.openingElement.attributes.filter((attrNode) => {\n if (t.isJSXAttribute(attrNode)) {\n const attrName = keyNode2value(attrNode.name);\n if (attrName === SLOT.dnd) {\n return false;\n }\n }\n return true;\n });\n node.openingElement.attributes = attributes;\n return node;\n}\n/**\n * 从 JSXElement 中移除追踪属性\n * @param node\n * @returns\n */\nfunction removeTrackingDataFromNodeAst(node) {\n traverseExpressionNode(node, {\n JSXElement(path) {\n clearJSXElementTrackingData(path.node);\n },\n });\n return node;\n}\n/**\n * 从视图文件的 ast 中移除追踪代码\n * @param ast\n * @warning TODO: 有 bug ,注释会重复生成,参考 https://github.com/babel/babel/issues/14549\n */\nfunction removeTrackingDataFromViewAst(ast) {\n traverse(ast, {\n JSXElement(path) {\n clearJSXElementTrackingData(path.node);\n },\n });\n return ast;\n}\n/**\n * 清除文件中的无效导入代码\n * @param ast\n * @returns\n */\nexport function removeUnusedImportSpecifiers(ast) {\n traverse(ast, {\n ImportDeclaration(path) {\n const sourceValue = path.node.source.value;\n // e.g. import 'style.less'; import './index.css'\n if (!path.node.specifiers.length && /\\.(css|less|scss|js)$/.test(sourceValue)) {\n return;\n }\n // e.g. import {} from 'pkg';\n if (!path.node.specifiers.length) {\n path.remove();\n return;\n }\n const specifiers = path.node.specifiers.filter((specifier) => {\n const name = keyNode2value(specifier.local);\n const binding = path.scope.getBinding(name);\n return binding === null || binding === void 0 ? void 0 : binding.referenced;\n });\n if (!specifiers.length) {\n path.remove();\n }\n else if (specifiers.length !== path.node.specifiers.length) {\n path.node.specifiers = specifiers;\n }\n },\n });\n return ast;\n}\n/**\n * 克隆一个全新的 JSXElement 节点\n * @param node\n * @returns\n */\nexport function cloneJSXElementWithoutTrackingData(node) {\n let cloned = t.cloneNode(node, true, true);\n cloned = removeTrackingDataFromNodeAst(cloned);\n return cloned;\n}\nexport function traverseViewFile(ast, idGenerator) {\n const imports = {};\n const importedModules = {};\n const nodes = [];\n const cloneAst = t.cloneNode(ast, true, true);\n const cleanAst = removeTrackingDataFromViewAst(cloneAst);\n const variables = []; // 使用的 tango 变量\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n if (imports[source]) {\n // 存在重复的导入语句,合并导入符号列表\n imports[source] = imports[source].concat(specifiers);\n }\n else {\n imports[source] = specifiers;\n }\n // FIXME: 下面的逻辑兼容旧的逻辑,后续需要移除掉\n const declarationData = specifiers.reduce((prev, cur) => {\n switch (cur.type) {\n case 'ImportDefaultSpecifier':\n prev.defaultSpecifier = cur.localName;\n break;\n case 'ImportSpecifier':\n prev.specifiers.push(cur.localName);\n break;\n case 'ImportNamespaceSpecifier':\n prev.specifiers.push(cur.localName);\n break;\n default:\n break;\n }\n return prev;\n }, {\n defaultSpecifier: undefined,\n specifiers: [],\n sourcePath: source,\n });\n const exist = importedModules[source];\n if (!exist) {\n importedModules[source] = declarationData;\n }\n else {\n importedModules[source] = Array.isArray(exist)\n ? exist.concat([declarationData])\n : [exist, declarationData];\n }\n },\n MemberExpression(path) {\n const variable = node2value(path.node, false);\n const parentNode = path.parentPath.node;\n if (!t.isMemberExpression(parentNode) &&\n isTangoVariable(variable) &&\n !variables.includes(variable)) {\n variables.push(variable);\n }\n },\n OptionalMemberExpression(path) {\n const variable = node2value(path.node, false);\n if (isTangoVariable(variable) && !variables.includes(variable)) {\n variables.push(variable);\n }\n },\n JSXElement(path) {\n const attributes = getJSXElementAttributes(path.node);\n // 获取组件的追踪属性\n const trackId = attributes[SLOT.dnd];\n let { component, id } = parseDndId(trackId);\n component = component || getJSXElementName(path.node);\n idGenerator.setItem(component);\n if (!isValidComponentName(component)) {\n return;\n }\n // 如果没有 ID,生成组件的追踪 ID\n if (!trackId) {\n id = idGenerator.generateId(component);\n }\n // 在组件属性中添加追踪标记\n if (!attributes[SLOT.dnd]) {\n path.node.openingElement.attributes.unshift(makeJSXAttribute(SLOT.dnd, id));\n }\n // parentId 用于追溯上下游关系\n let parentId;\n const parentNode = path.findParent((p) => p.isJSXElement());\n if (t.isJSXElement(parentNode === null || parentNode === void 0 ? void 0 : parentNode.node)) {\n const parentAttributes = getJSXElementAttributes(parentNode.node);\n parentId = parentAttributes[SLOT.dnd];\n }\n nodes.push({\n id,\n parentId,\n component,\n rawNode: path.node,\n });\n },\n });\n return {\n ast,\n cleanAst,\n nodes,\n imports,\n importedModules,\n variables,\n };\n}\nexport function traverseComponentsEntryFile(ast, baseDir) {\n const exportMap = {};\n traverse(ast, {\n ExportNamedDeclaration(path) {\n const node = path.node;\n let source = node2value(node.source);\n if (baseDir) {\n // fix relative source path\n source = getFullPath(baseDir, source);\n }\n node.specifiers.forEach((specifier) => {\n if (t.isExportSpecifier(specifier)) {\n const name = keyNode2value(specifier.exported);\n if (name) {\n exportMap[name] = {\n source,\n exportedName: name,\n };\n }\n }\n });\n },\n });\n return { ast, exportMap };\n}\n/**\n * 解析导入语句\n */\nfunction parseImportDeclaration(node) {\n const source = node2value(node.source);\n const specifiers = [];\n node.specifiers.forEach((specifierNode) => {\n const data = {\n localName: keyNode2value(specifierNode.local),\n type: specifierNode.type,\n };\n if (specifierNode.type === 'ImportSpecifier') {\n data.importedName = keyNode2value(specifierNode.imported);\n }\n specifiers.push(data);\n });\n return {\n source,\n specifiers,\n };\n}\n/**\n * 基本的文件解析过程\n * @param ast\n */\nexport function traverseFile(ast) {\n const imports = {};\n traverse(ast, {\n ImportDeclaration(path) {\n const { source, specifiers } = parseImportDeclaration(path.node);\n imports[source] = specifiers;\n },\n });\n return {\n imports,\n };\n}\n","import { getVariableContent } from '@music163/tango-helpers';\nimport { value2node, expression2code, isValidExpressionCode } from './ast';\nimport { isWrappedByExpressionContainer } from './assert';\n/**\n * 将 js value 转换为代码字符串\n */\nexport function value2code(value) {\n const node = value2node(value);\n const code = expression2code(node);\n return code;\n}\n/**\n * 是否是字符串代码\n * @param code\n * @returns\n */\nfunction isStringCode(code) {\n return /^\".*\"$/.test(code === null || code === void 0 ? void 0 : code.trim());\n}\n/**\n * js value 转为表达式代码\n * @example 1 => 1\n * @example hello => \"hello\"\n * @example { foo: bar } => {{ foo: bar }}\n * @example [1,2,3] => {[1,2,3]}\n *\n * @param val js value\n * @returns 表达式代码\n */\nexport function value2expressionCode(val) {\n if (!val)\n return '';\n let ret;\n switch (typeof val) {\n case 'string': {\n if (isValidExpressionCode(val)) {\n ret = val;\n }\n else if (isWrappedByExpressionContainer(val, false)) {\n ret = getVariableContent(val);\n }\n else if (isStringCode(val)) {\n ret = val;\n }\n else {\n ret = `\"${val}\"`;\n }\n break;\n }\n case 'number':\n ret = String(val);\n break;\n case 'object':\n ret = value2code(val);\n break;\n default:\n ret = '';\n break;\n }\n return ret;\n}\n","import { isNil, logger, uuid, } from '@music163/tango-helpers';\nimport { getRelativePath, isFilepath } from './string';\nimport { code2expression } from './ast';\nimport { isWrappedByExpressionContainer } from './assert';\nexport function prototype2importDeclarationData(prototype, relativeFilepath) {\n let source = prototype.package;\n if (relativeFilepath && isFilepath(source)) {\n source = getRelativePath(relativeFilepath, source);\n }\n if (source.endsWith('.js')) {\n source = source.slice(0, -3);\n }\n const specifiers = [];\n if (prototype.exportType === 'defaultExport') {\n specifiers.push({\n localName: prototype.name,\n type: 'ImportDefaultSpecifier',\n });\n }\n else {\n [prototype.name, ...(prototype.relatedImports || [])].forEach((item) => {\n specifiers.push({\n localName: item,\n type: 'ImportSpecifier',\n });\n });\n }\n return {\n source,\n specifiers,\n };\n}\n/**\n * 根据组件的 prototype 生成 ImportDeclarationPayload\n * @deprecated\n */\nexport function getImportDeclarationPayloadByPrototype(prototype, relativeFilepath) {\n let defaultSpecifier;\n let specifiers;\n if (prototype.exportType === 'defaultExport') {\n defaultSpecifier = prototype.name;\n specifiers = prototype.relatedImports || [];\n }\n else {\n specifiers = [...(prototype.relatedImports || [])];\n if (prototype.type !== 'snippet') {\n specifiers.push(prototype.name);\n }\n }\n let sourcePath = prototype.package;\n if (relativeFilepath && isFilepath(sourcePath)) {\n sourcePath = getRelativePath(relativeFilepath, sourcePath);\n }\n if (sourcePath.endsWith('.js')) {\n sourcePath = sourcePath.slice(0, -3);\n }\n return {\n defaultSpecifier,\n specifiers,\n sourcePath,\n };\n}\n/**\n * 基于 key-value 生成 prop={value} 字符串\n * @param key\n * @param value\n * @returns\n */\nfunction getPropKeyValuePair(item, generateValue) {\n const key = item.name;\n let value = item.initValue;\n if (!value && item.autoInitValue) {\n value = generateValue(3);\n }\n if (isNil(value)) {\n return;\n }\n switch (typeof value) {\n case 'number':\n case 'boolean': {\n value = `{${value}}`;\n break;\n }\n case 'object': {\n // TIP: bugfix 如果 object 里有 jsx 或者 function 会失败\n try {\n value = `{${JSON.stringify(value)}}`;\n }\n catch (err) {\n logger.error(err);\n }\n break;\n }\n case 'function': {\n value = `{${value.toString()}}`;\n break;\n }\n case 'string': {\n if (!isWrappedByExpressionContainer(value)) {\n // 不是变量字符串\n value = `\"${value}\"`;\n }\n else {\n // 如果是变量字符串,无需处理\n }\n break;\n }\n default:\n break;\n }\n return `${key}=${value}`;\n}\n/**\n * prototype -> \n * @param prototype\n */\nexport function prototype2code(prototype) {\n var _a;\n let code;\n switch (prototype.type) {\n case 'snippet':\n code = prototype.initChildren || prototype.defaultChildren;\n break;\n default: {\n const keys = ((_a = prototype.props) === null || _a === void 0 ? void 0 : _a.reduce((acc, item) => {\n const pair = getPropKeyValuePair(item, (fractionDigits) => uuid(prototype.name, fractionDigits));\n return pair ? ` ${acc} ${pair}` : acc;\n }, '')) || '';\n if (prototype.hasChildren) {\n code = `<${prototype.name} ${keys}>${prototype.initChildren || prototype.defaultChildren || ''}`;\n }\n else {\n code = `<${prototype.name} ${keys.trim()} />`;\n }\n break;\n }\n }\n return code;\n}\n/**\n * 基于 prototype 信息生成 t.JSXElement\n * @example ButtonPrototype -> -> t.JSXElement\n * @param code\n */\nexport function prototype2jsxElement(prototype) {\n const code = prototype2code(prototype);\n return code2expression(code);\n}\n","/**\n * ID 生成器\n */\nexport class IdGenerator {\n constructor(options) {\n /**\n * 记录组件 ID 记录\n */\n this.map = new Map();\n this.prefix = (options === null || options === void 0 ? void 0 : options.prefix) ? encodeURIComponent(options.prefix) : undefined;\n }\n /**\n * 更新组件记录\n * @param component\n */\n setItem(component, id) {\n if (this.map.has(component)) {\n const record = this.map.get(component);\n if (id && !record.includes(id)) {\n record.push(id);\n }\n this.map.set(component, record);\n }\n else {\n this.map.set(component, []);\n }\n }\n /**\n * 获取组件 ID\n * @param component\n * @returns\n */\n generateId(component) {\n var _a;\n const size = ((_a = this.map.get(component)) === null || _a === void 0 ? void 0 : _a.length) + 1 || 1;\n let id = `${component}:${size}`;\n if (this.prefix) {\n id = `${this.prefix}:${id}`;\n }\n this.setItem(component, id);\n return id;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { getValue, isNil, logger, setValue } from '@music163/tango-helpers';\nimport { formatCode } from '../helpers';\n/**\n * 普通文件,不进行 AST 解析\n */\nexport class TangoFile {\n get code() {\n return this._code;\n }\n get cleanCode() {\n return this._cleanCode;\n }\n constructor(workspace, props, isSyncCode = true) {\n this.workspace = workspace;\n this.filename = props.filename;\n this.type = props.type;\n this.lastModified = Date.now();\n // 这里主要是为了解决 umi ts 编译错误的问题,@see https://github.com/umijs/umi/issues/7594\n if (isSyncCode) {\n this.update(props.code);\n }\n }\n /**\n * 更新文件内容\n */\n update(code) {\n if (!isNil(code)) {\n this.lastModified = Date.now();\n this._code = code;\n this._cleanCode = code;\n }\n this.workspace.onFilesChange([this.filename]);\n }\n}\nexport class TangoLessFile extends TangoFile {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n}\nexport class TangoJsonFile extends TangoFile {\n /**\n * @deprecated 使用 file.json 代替\n */\n get object() {\n return toJS(this._object);\n }\n get json() {\n return toJS(this._object);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this._object = {};\n this.update(props.code);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n _object: observable,\n code: computed,\n cleanCode: computed,\n object: computed,\n json: computed,\n update: action,\n setValue: action,\n });\n }\n update(code) {\n this.lastModified = Date.now();\n if (isNil(code)) {\n // 基于最新的 json 同步代码\n let newCode = JSON.stringify(this._object);\n try {\n newCode = formatCode(newCode, 'json');\n }\n catch (err) {\n logger.error(err);\n return;\n }\n this._code = newCode;\n this._cleanCode = newCode;\n }\n else {\n try {\n // 基于传入的代码,同步 json 对象\n code = formatCode(code, 'json');\n }\n catch (err) {\n logger.error(err);\n return;\n }\n this._code = code;\n this._cleanCode = code;\n try {\n const json = JSON.parse(code);\n this._object = json;\n }\n catch (err) {\n logger.error(err);\n }\n }\n this.workspace.onFilesChange([this.filename]);\n }\n /**\n * 根据路径取值\n * @param valuePath\n * @returns\n */\n getValue(valuePath) {\n return getValue(this.json, valuePath);\n }\n /**\n * 根据路径设置值\n * @param valuePath\n * @param visitor\n */\n setValue(valuePath, visitor) {\n const target = this.getValue(valuePath);\n let next;\n if (typeof visitor === 'function') {\n next = visitor === null || visitor === void 0 ? void 0 : visitor(target);\n }\n else {\n next = visitor;\n }\n if (next !== undefined) {\n setValue(this._object, valuePath, next);\n }\n return this;\n }\n /**\n * 根据路径删除值\n * @param valuePath\n * @param visitor\n */\n deleteValue(valuePath) {\n const pathList = valuePath.split('.');\n const lastPath = pathList.pop();\n const parentPath = pathList.join('.');\n let target;\n if (parentPath) {\n target = this.getValue(parentPath);\n }\n else {\n target = this.json;\n }\n if (!target) {\n return this;\n }\n delete target[lastPath];\n if (parentPath) {\n this.setValue(parentPath, target);\n }\n else {\n this._object = target;\n }\n return this;\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { isNil } from '@music163/tango-helpers';\nimport { code2ast, ast2code, formatCode, traverseFile, addImportDeclaration, updateImportDeclaration, } from '../helpers';\nimport { TangoFile } from './file';\n/**\n * JS 模块实现规范\n * - ast 操纵类方法,统一返回 this,支持外层链式调用\n * - observable state 统一用 _foo 格式,并提供 getter 方法\n */\nexport class TangoModule extends TangoFile {\n constructor(workspace, props, isSyncCode = true) {\n super(workspace, props, isSyncCode);\n }\n /**\n * 基于最新的 ast 进行同步\n * @param code 如果传入 code,则基于 code 进行同步\n * @param isFormatCode 是否格式化代码\n * @param refreshWorkspace 是否刷新 workspace\n */\n update(code, isFormatCode = true, refreshWorkspace = true) {\n this.lastModified = Date.now();\n if (isNil(code)) {\n this._syncByAst();\n }\n else {\n this._syncByCode(code, isFormatCode);\n }\n this._analysisAst();\n this.workspace.onFilesChange([this.filename]);\n if (refreshWorkspace) {\n this.workspace.refresh([this.filename]);\n }\n }\n addImportDeclaration(source, specifiers) {\n this.ast = addImportDeclaration(this.ast, source, specifiers);\n return this;\n }\n updateImportDeclaration(source, specifiers) {\n this.ast = updateImportDeclaration(this.ast, source, specifiers);\n return this;\n }\n /**\n * 基于最新的 ast 进行源码同步\n */\n _syncByAst() {\n const code = ast2code(this.ast);\n this._code = code;\n this._cleanCode = code;\n }\n /**\n * 基于输入的源码进行同步\n * @param code 源码\n * @param isFormatCode 是否格式化代码\n * @returns\n */\n _syncByCode(code, isFormatCode = true) {\n if (code === this._code) {\n return;\n }\n // 提前格式化代码\n if (isFormatCode) {\n code = formatCode(code);\n }\n this._code = code;\n this._cleanCode = code;\n this.ast = code2ast(code);\n }\n _analysisAst() {\n const { imports } = traverseFile(this.ast);\n this.importList = imports;\n }\n}\n/**\n * 普通 JS 文件\n */\nexport class TangoJsModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, false, false);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nexport class SelectSource {\n get start() {\n return toJS(this._start);\n }\n get first() {\n if (this._items.length)\n return this._items[0];\n return;\n }\n get firstNode() {\n if (!this.first)\n return;\n return this.workspace.getNode(this.first.id, this.first.filename);\n }\n get size() {\n return this._items.length;\n }\n /**\n * 选中的结点数据 NodeData\n */\n get selected() {\n return toJS(this._items);\n }\n /**\n * 是否选中了结点\n */\n get isSelected() {\n return !!this.selected.length;\n }\n /**\n * 选中结点位于的文件\n */\n get file() {\n var _a;\n return (_a = this.firstNode) === null || _a === void 0 ? void 0 : _a.file;\n }\n /**\n * 选中的结点 Nodes\n */\n get nodes() {\n return this._items\n .map((item) => this.workspace.getNode(item.id, item.filename))\n .filter((node) => !!node);\n }\n constructor(workspace) {\n /**\n * 选中元素列表\n */\n this._items = [];\n /**\n * 用户选择的起点\n */\n this._start = {\n point: {\n x: 0,\n y: 0,\n },\n element: null,\n };\n this.workspace = workspace;\n makeObservable(this, {\n _items: observable,\n _start: observable,\n select: action,\n setStart: action,\n clear: action,\n start: computed,\n selected: computed,\n first: computed,\n firstNode: computed,\n size: computed,\n isSelected: computed,\n file: computed,\n nodes: computed,\n });\n }\n // 增加一个选中项\n add() { }\n // 移除一个选中项\n remove() { }\n select(items) {\n if (!items) {\n this._items = [];\n }\n else {\n this._items = Array.isArray(items) ? items : [items];\n }\n // 选中后清空起点位置信息\n this._start = null;\n }\n setStart(data) {\n this._start = data;\n }\n clear() {\n this._items = [];\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { DropTarget } from './drop-target';\n/**\n * 拖拽来源类,被拖拽的物体\n */\nexport class DragSource {\n get node() {\n var _a, _b;\n return this.workspace.getNode((_a = this.data) === null || _a === void 0 ? void 0 : _a.id, (_b = this.data) === null || _b === void 0 ? void 0 : _b.filename);\n }\n /**\n * 获取对应的 prototype\n */\n get prototype() {\n var _a;\n return this.workspace.getPrototype((_a = this.data) === null || _a === void 0 ? void 0 : _a.name);\n }\n get id() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.id;\n }\n get name() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.name;\n }\n get bounding() {\n var _a;\n return (_a = this.data) === null || _a === void 0 ? void 0 : _a.bounding;\n }\n constructor(workspace) {\n this.workspace = workspace;\n this.data = null;\n this.isDragging = false;\n this.dropTarget = new DropTarget(workspace);\n makeObservable(this, {\n data: observable,\n isDragging: observable,\n set: action,\n clear: action,\n node: computed,\n prototype: computed,\n });\n }\n /**\n * 更新选中数据\n * @param props\n */\n set(data) {\n this.data = data;\n this.isDragging = !!data;\n }\n /**\n * 重置\n */\n clear() {\n this.data = null;\n this.isDragging = false;\n this.dropTarget.clear();\n }\n /**\n * 获取对应的 node\n * @deprecated\n */\n getNode() {\n return this.node;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { traverseRouteFile, addRouteToRouteFile, removeRouteFromRouteFile, updateRouteToRouteFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 路由配置模块\n */\nexport class TangoRouteModule extends TangoModule {\n get routes() {\n return toJS(this._routes);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, true, false);\n makeObservable(this, {\n _routes: observable,\n _code: observable,\n _cleanCode: observable,\n routes: computed,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n /**\n * 根据路由地址获取 route 对象\n */\n getRouteByRoutePath(route) {\n let record;\n for (const item of this.routes) {\n if (item.path === route) {\n record = item;\n break;\n }\n }\n return record;\n }\n /**\n * 添加一条新路由\n * @param name\n */\n addRoute(routePath, importFilePath) {\n this.ast = addRouteToRouteFile(this.ast, routePath, importFilePath);\n return this;\n }\n /**\n * 更新页面路由\n * @param oldRoutePath\n * @param newRoutePath\n * @returns\n */\n updateRoute(oldRoutePath, newRoutePath) {\n this.ast = updateRouteToRouteFile(this.ast, oldRoutePath, newRoutePath);\n return this;\n }\n /**\n * 删除一条路由\n * @param route 路由地址\n */\n removeRoute(route) {\n if (route === '/') {\n console.warn('index route should not be removed!');\n return;\n }\n const record = this.getRouteByRoutePath(route);\n this.ast = removeRouteFromRouteFile(this.ast, route, record.importPath);\n return this;\n }\n _analysisAst() {\n this._routes = traverseRouteFile(this.ast);\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { traverseStoreFile, traverseStoreEntryFile, addStoreToEntryFile, getModuleNameByFilename, addStoreState, updateStoreState, removeStoreState, removeStoreToEntryFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 入口配置模块\n */\nexport class TangoStoreEntryModule extends TangoModule {\n get stores() {\n return toJS(this._stores);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this._stores = [];\n this.update(props.code, true, false);\n makeObservable(this, {\n _stores: observable,\n _code: observable,\n _cleanCode: observable,\n stores: computed,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _analysisAst() {\n this._stores = traverseStoreEntryFile(this.ast);\n }\n /**\n * 新建模型\n * @param name\n */\n addStore(name) {\n this.ast = addStoreToEntryFile(this.ast, name);\n return this;\n }\n /**\n * 删除模型\n * @param name\n */\n removeStore(name) {\n this.ast = removeStoreToEntryFile(this.ast, name);\n return this;\n }\n}\n/**\n * 状态模型模块\n */\nexport class TangoStoreModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.name = getModuleNameByFilename(props.filename);\n this.update(props.code, true, false);\n makeObservable(this, {\n states: observable,\n actions: observable,\n _code: observable,\n _cleanCode: observable,\n cleanCode: computed,\n code: computed,\n update: action,\n });\n }\n /**\n * 添加状态属性\n * @param stateName\n * @param initValue\n */\n addState(stateName, initValue) {\n this.ast = addStoreState(this.ast, stateName, initValue);\n return this;\n }\n /**\n * 移除状态\n */\n removeState(stateName) {\n this.ast = removeStoreState(this.ast, stateName);\n return this;\n }\n /**\n * 更新状态代码\n * @param stateName 状态名\n * @param code 代码\n */\n updateState(stateName, code) {\n this.ast = updateStoreState(this.ast, stateName, code);\n return this;\n }\n _analysisAst() {\n const { namespace, states, actions } = traverseStoreFile(this.ast);\n this.namespace = namespace || this.name;\n this.states = states;\n this.actions = actions;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { clone, logger } from '@music163/tango-helpers';\nimport { traverseServiceFile, updateServiceConfigToServiceFile, getModuleNameByFilename, deleteServiceConfigFromServiceFile, updateBaseConfigToServiceFile, } from '../helpers';\nimport { TangoModule } from './module';\n/**\n * 数据服务模块\n */\nexport class TangoServiceModule extends TangoModule {\n get serviceFunctions() {\n return toJS(this._serviceFunctions);\n }\n get baseConfig() {\n return toJS(this._baseConfig);\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this.name = getModuleNameByFilename(props.filename);\n this.update(props.code, true, false);\n makeObservable(this, {\n _serviceFunctions: observable,\n _baseConfig: observable,\n _code: observable,\n _cleanCode: observable,\n serviceFunctions: computed,\n baseConfig: computed,\n cleanCode: computed,\n code: computed,\n update: action,\n });\n }\n _analysisAst() {\n const { imports, services, baseConfig } = traverseServiceFile(this.ast);\n this.importList = imports;\n this._serviceFunctions = services;\n this._baseConfig = baseConfig;\n if (baseConfig.namespace) {\n this.name = baseConfig.namespace;\n }\n }\n addServiceFunction(name, config) {\n this.ast = updateServiceConfigToServiceFile(this.ast, { [name]: clone(config, false) });\n return this;\n }\n /**\n * 批量添加服务函数\n * @param configs { [name: string]: object }\n * @returns\n */\n addServiceFunctions(configs) {\n this.ast = updateServiceConfigToServiceFile(this.ast, configs);\n return this;\n }\n updateServiceFunction(name, payload) {\n this.ast = updateServiceConfigToServiceFile(this.ast, { [name]: clone(payload, false) });\n return this;\n }\n deleteServiceFunction(serviceFunctionName) {\n try {\n this.ast = deleteServiceConfigFromServiceFile(this.ast, serviceFunctionName);\n }\n catch (e) {\n logger.error(e);\n }\n return this;\n }\n /**\n * 更新服务的基础配置\n */\n updateBaseConfig(data) {\n this.ast = updateBaseConfigToServiceFile(this.ast, data);\n return this;\n }\n}\n","import { cloneJSXElementWithoutTrackingData, getJSXElementAttributes } from '../helpers';\n/**\n * 视图节点类\n */\nexport class TangoNode {\n get loc() {\n var _a;\n return (_a = this.rawNode) === null || _a === void 0 ? void 0 : _a.loc;\n }\n constructor(props) {\n this.file = props.file;\n this.id = props.id;\n this.component = props.component;\n this.rawNode = props.rawNode;\n this.props = getJSXElementAttributes(cloneJSXElementWithoutTrackingData(props.rawNode));\n }\n /**\n * 返回克隆后的 ast 节点\n * @returns\n */\n cloneRawNode() {\n return cloneJSXElementWithoutTrackingData(this.rawNode);\n }\n /**\n * 清空节点的指向,交给 GC 去回收\n */\n destroy() {\n this.file = null;\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nimport { ast2code, traverseViewFile, removeJSXElement, insertSiblingAfterJSXElement, appendChildToJSXElement, addImportDeclaration, replaceJSXElement, removeUnusedImportSpecifiers, insertSiblingBeforeJSXElement, replaceRootJSXElementChildren, IdGenerator, updateJSXAttributes, queryXFormItemFields, prototype2importDeclarationData, insertImportSpecifiers, addImportDeclarationLegacy, updateImportDeclarationLegacy, } from '../helpers';\nimport { TangoNode } from './node';\nimport { TangoModule } from './module';\n/**\n * 导入信息转为 变量名->来源 的 map 结构\n * @param importedModules\n * @returns\n */\nfunction buildImportMap(importedModules) {\n const map = {};\n Object.keys(importedModules).forEach((source) => {\n const specifiers = importedModules[source];\n specifiers === null || specifiers === void 0 ? void 0 : specifiers.forEach((specifier) => {\n map[specifier.localName] = {\n source,\n isDefault: specifier.type === 'ImportDefaultSpecifier',\n };\n });\n });\n return map;\n}\n/**\n * 将节点列表转换为 tree data 嵌套数组\n * @param list\n */\nfunction nodeListToTreeData(list) {\n const map = {};\n list.forEach((item) => {\n // 如果不存在,则初始化\n if (!map[item.id]) {\n map[item.id] = Object.assign(Object.assign({}, item), { children: [] });\n }\n // 是否找到父节点,找到则塞进去\n if (item.parentId && map[item.parentId]) {\n map[item.parentId].children.push(map[item.id]);\n }\n });\n // 保留根节点\n const ret = Object.values(map).filter((item) => !item.parentId);\n return ret;\n}\n/**\n * 视图模块\n */\nexport class TangoViewModule extends TangoModule {\n get nodes() {\n return this._nodes;\n }\n get nodesTree() {\n return toJS(this._nodesTree);\n }\n get tree() {\n return this.ast;\n }\n constructor(workspace, props) {\n super(workspace, props, false);\n this._nodes = new Map();\n this._idGenerator = new IdGenerator({ prefix: props.filename });\n this.update(props.code, true, false);\n makeObservable(this, {\n _nodesTree: observable,\n _code: observable,\n _cleanCode: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _syncByAst() {\n // 空方法,逻辑合并到 this._analysisAst\n }\n _analysisAst() {\n const { ast: newAst, cleanAst, nodes, imports, importedModules, variables, } = traverseViewFile(this.ast, this._idGenerator);\n this.ast = newAst;\n this._code = ast2code(newAst);\n this._cleanCode = ast2code(cleanAst);\n this._importedModules = importedModules;\n this.importList = imports;\n this.importMap = buildImportMap(imports);\n this.variables = variables;\n this._nodes.clear();\n nodes.forEach((cur) => {\n const node = new TangoNode(Object.assign(Object.assign({}, cur), { file: this }));\n this._nodes.set(cur.id, node);\n });\n this._nodesTree = nodeListToTreeData(nodes);\n }\n /**\n * 依赖列表\n */\n listImportSources() {\n return Object.keys(this.importList);\n }\n /**\n * 弹窗列表\n */\n listModals() {\n const modals = [];\n const activeViewNodes = this.nodes || new Map();\n Array.from(activeViewNodes.values()).forEach((node) => {\n if (['Modal', 'Drawer'].includes(node.component) && node.props.id) {\n modals.push({\n label: `${node.component}(${node.props.id})`,\n value: node.props.id,\n });\n }\n });\n return modals;\n }\n /**\n * 表单列表\n */\n listForms() {\n const forms = {};\n const activeViewNodes = this.nodes;\n Array.from(activeViewNodes.values()).forEach((node) => {\n if (['XAction', 'XColumnAction', 'XForm', 'XStepForm', 'XSearchForm', 'XFormList'].includes(node.component)) {\n forms[node.id] = queryXFormItemFields(node.rawNode);\n }\n });\n return forms;\n }\n /**\n * 添加导入符号\n * @param source\n * @param newSpecifiers\n * @returns\n */\n addImportSpecifiers(source, newSpecifiers) {\n const existSpecifiers = this.importList[source];\n if (existSpecifiers) {\n const insertedSpecifiers = newSpecifiers.filter((item) => {\n return !existSpecifiers.find((existItem) => existItem.localName === item.localName);\n });\n this.ast = insertImportSpecifiers(this.ast, source, insertedSpecifiers);\n }\n else {\n // 不存在导入来源,直接添加新的导入语句\n this.ast = addImportDeclaration(this.ast, source, newSpecifiers);\n }\n return this;\n }\n /**\n * 更新导入的变量\n * @deprecated 使用 updateImportDeclaration 代替\n */\n updateImportSpecifiersLegacy(importDeclaration) {\n const mods = this._importedModules[importDeclaration.sourcePath];\n let ast;\n // 如果模块已存在,需要去重\n if (mods) {\n const targetMod = Array.isArray(mods) ? mods[0] : mods;\n const specifiers = Array.isArray(mods)\n ? mods.reduce((prev, cur) => prev.concat(cur.specifiers || []), [])\n : mods.specifiers;\n // 去掉已存在的导入声明\n const newSpecifiers = importDeclaration.specifiers.filter((name) => !specifiers.includes(name));\n ast = updateImportDeclarationLegacy(this.ast, Object.assign(Object.assign({}, importDeclaration), { specifiers: newSpecifiers.concat(targetMod.specifiers) }));\n }\n else {\n ast = addImportDeclarationLegacy(this.ast, importDeclaration);\n }\n this.ast = ast;\n return this;\n }\n /**\n * 清除无效的导入声明\n */\n removeUnusedImportSpecifiers() {\n this.ast = removeUnusedImportSpecifiers(this.ast);\n return this;\n }\n getNode(nodeId) {\n return this._nodes.get(nodeId);\n }\n /**\n * 删除节点\n * @param nodeId\n */\n removeNode(nodeId) {\n this.ast = removeJSXElement(this.ast, nodeId);\n return this;\n }\n /**\n * 更新节点的属性\n * @deprecated 使用 updateNodeAttributes 代替\n */\n updateNodeAttribute(nodeId, attrName, attrValue, relatedImports) {\n return this.updateNodeAttributes(nodeId, { [attrName]: attrValue }, relatedImports);\n }\n updateNodeAttributes(nodeId, config, relatedImports) {\n if (relatedImports && relatedImports.length) {\n // 导入依赖的组件\n const newImportData = relatedImports.reduce((prev, name) => {\n const proto = this.workspace.getPrototype(name);\n const { source, specifiers } = prototype2importDeclarationData(proto, this.filename);\n const existSpecifiers = prev[source];\n if (existSpecifiers) {\n // merge specifiers\n specifiers.forEach((item) => {\n if (!existSpecifiers.find((existItem) => existItem.localName === item.localName)) {\n existSpecifiers.push(item);\n }\n });\n }\n else {\n prev[source] = specifiers;\n }\n return prev;\n }, {});\n Object.keys(newImportData).forEach((source) => {\n this.addImportSpecifiers(source, newImportData[source]);\n });\n }\n this.ast = updateJSXAttributes(this.ast, nodeId, config);\n return this;\n }\n /**\n * 插入子节点的最后面\n * @param targetNodeId\n * @param newNode\n * @param position\n * @returns\n */\n insertChild(targetNodeId, newNode, position = 'last') {\n this.ast = appendChildToJSXElement(this.ast, targetNodeId, newNode, position);\n return this;\n }\n insertAfter(targetNodeId, newNode) {\n this.ast = insertSiblingAfterJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n insertBefore(targetNodeId, newNode) {\n this.ast = insertSiblingBeforeJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n /**\n * 替换目标节点为新节点\n * @param targetNodeId\n * @param newNode\n */\n replaceNode(targetNodeId, newNode) {\n this.ast = replaceJSXElement(this.ast, targetNodeId, newNode);\n return this;\n }\n /**\n * 替换 jsx 跟结点的子元素\n * @deprecated 不推荐使用\n */\n replaceViewChildren(childrenNodes, importDeclarations) {\n if (childrenNodes.length) {\n this.ast = replaceRootJSXElementChildren(this.ast, childrenNodes);\n }\n if (importDeclarations === null || importDeclarations === void 0 ? void 0 : importDeclarations.length) {\n importDeclarations.forEach((item) => {\n this.updateImportSpecifiersLegacy(item);\n });\n }\n return this;\n }\n}\n","import path from 'path';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { TangoModule } from './module';\nimport { traverseComponentsEntryFile } from '../helpers';\n/**\n * 本地组件目录的入口文件,例如 '/components/index.js' 或 `/blocks/index.js`\n */\nexport class TangoComponentsEntryModule extends TangoModule {\n constructor(workspace, props) {\n super(workspace, props, false);\n this.update(props.code, false, false);\n makeObservable(this, {\n _code: observable,\n _cleanCode: observable,\n exportList: observable,\n code: computed,\n cleanCode: computed,\n update: action,\n });\n }\n _analysisAst() {\n const baseDir = path.dirname(this.filename);\n const { exportMap } = traverseComponentsEntryFile(this.ast, baseDir);\n this.exportList = exportMap;\n Object.keys(this.exportList).forEach((key) => {\n this.workspace.componentPrototypes.set(key, {\n name: key,\n exportType: 'namedExport',\n package: baseDir,\n type: 'element',\n });\n });\n }\n}\n","import { action, computed, makeObservable, observable } from 'mobx';\nimport { hasFileExtension, isStoreVariablePath, isString, logger, parseServiceVariablePath, parseStoreVariablePath, uniq, } from '@music163/tango-helpers';\nimport { prototype2jsxElement, inferFileType, getFilepath, isPathnameMatchRoute, getJSXElementChildrenNames, namesToImportDeclarations, prototype2importDeclarationData, } from '../helpers';\nimport { DropMethod } from './drop-target';\nimport { HistoryMessage, TangoHistory } from './history';\nimport { TangoJsModule } from './module';\nimport { TangoFile, TangoJsonFile, TangoLessFile } from './file';\nimport { FileType } from '../types';\nimport { SelectSource } from './select-source';\nimport { DragSource } from './drag-source';\nimport { TangoRouteModule } from './route-module';\nimport { TangoStoreEntryModule, TangoStoreModule } from './store-module';\nimport { TangoServiceModule } from './service-module';\nimport { TangoViewModule } from './view-module';\nimport { TangoComponentsEntryModule } from './component-module';\n/**\n * 工作区\n */\nexport class Workspace extends EventTarget {\n /**\n * 当前激活的视图模块\n */\n get activeViewModule() {\n if (!this.activeViewFile) {\n this.setActiveViewFile(this.activeRoute);\n }\n return this.files.get(this.activeViewFile);\n }\n /**\n * 获取页面列表\n */\n get pages() {\n var _a;\n const ret = [];\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.routes.forEach((item) => {\n if (item.path !== '*') {\n ret.push({\n path: item.path,\n name: item.component,\n });\n }\n });\n return ret;\n }\n get bizComps() {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n let list = ((_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.getValue('bizDependencies')) || [];\n if (packages) {\n list = [\n ...new Set([\n ...list,\n ...Object.keys(packages).filter((e) => packages[e].type === 'bizDependency'),\n ]),\n ];\n }\n return list;\n }\n get baseComps() {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n let list = ((_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.getValue('baseDependencies')) || [];\n if (packages) {\n list = [\n ...new Set([\n ...list,\n ...Object.keys(packages).filter((e) => packages[e].type === 'baseDependency'),\n ]),\n ];\n }\n return list;\n }\n get localComps() {\n var _a;\n return Object.keys(((_a = this.componentsEntryModule) === null || _a === void 0 ? void 0 : _a.exportList) || {});\n }\n constructor(options) {\n super();\n this.storeModules = {};\n this.serviceModules = {};\n /**\n * 绑定事件\n * TODO: 是否需要自己来管理 listeners,并及时进行 gc\n */\n this.on = this.addEventListener;\n /**\n * 移除事件\n */\n this.off = this.removeEventListener;\n this.history = new TangoHistory(this);\n this.selectSource = new SelectSource(this);\n this.dragSource = new DragSource(this);\n this.componentPrototypes = new Map();\n this.entry = options === null || options === void 0 ? void 0 : options.entry;\n this.activeRoute = (options === null || options === void 0 ? void 0 : options.defaultActiveRoute) || '/';\n this.activeFile = options === null || options === void 0 ? void 0 : options.entry;\n this.activeViewFile = '';\n this.files = new Map();\n this.isReady = false;\n if (options === null || options === void 0 ? void 0 : options.onFilesChange) {\n // 使用用户提供的 onFilesChange\n this.onFilesChange = options.onFilesChange;\n }\n if (options === null || options === void 0 ? void 0 : options.files) {\n this.addFiles(options.files);\n }\n if (options === null || options === void 0 ? void 0 : options.prototypes) {\n this.setComponentPrototypes(options.prototypes);\n }\n makeObservable(this, {\n files: observable,\n activeRoute: observable,\n activeFile: observable,\n activeViewFile: observable,\n pages: computed,\n bizComps: computed,\n setActiveRoute: action,\n setActiveFile: action,\n addFile: action,\n removeFile: action,\n });\n }\n getPrototype(name) {\n if (isString(name)) {\n return this.componentPrototypes.get(name);\n }\n return name;\n }\n /**\n * 设置当前路由\n * @param routePath 路由路径\n */\n setActiveRoute(routePath) {\n if (routePath === this.activeRoute) {\n return;\n }\n this.selectSource.clear();\n this.activeRoute = routePath;\n this.setActiveViewFile(routePath);\n }\n /**\n * 设置当前选中的文件\n * @param filename\n */\n setActiveFile(filename, isViewFile = false) {\n this.activeFile = filename;\n if (isViewFile) {\n this.activeViewFile = filename;\n }\n }\n /**\n * 根据当前的路由计算当前的视图模块\n */\n setActiveViewFile(routePath) {\n let filename = this.getFilenameByRoutePath(routePath);\n if (!filename) {\n // 没有找到 route 对应的文件,使用默认的 entry\n for (const [key, file] of this.files) {\n if (file.type === FileType.JsxViewModule) {\n filename = file.filename;\n break;\n }\n }\n }\n if (filename) {\n this.setActiveFile(filename, true);\n }\n }\n setComponentPrototypes(prototypes) {\n Object.keys(prototypes).forEach((name) => {\n this.componentPrototypes.set(name, prototypes[name]);\n });\n }\n /**\n * 添加一组文件到工作区,如果文件同名,后面的文件会覆盖前面的文件\n * @param files\n */\n addFiles(files = []) {\n files.forEach((file) => {\n this.addFile(file.filename, file.code, file.type);\n });\n }\n /**\n * 添加文件到工作区\n * @param filename 文件名\n * @param code 代码片段\n * @param fileType 模块类型\n */\n addFile(filename, code, fileType) {\n var _a;\n const moduleType = fileType || inferFileType(filename);\n const props = {\n filename,\n code,\n type: moduleType,\n };\n let module;\n switch (moduleType) {\n case FileType.StoreEntryModule:\n module = new TangoStoreEntryModule(this, props);\n this.storeEntryModule = module;\n break;\n case FileType.ComponentsEntryModule:\n module = new TangoComponentsEntryModule(this, props);\n this.componentsEntryModule = module;\n break;\n case FileType.RouteModule: {\n module = new TangoRouteModule(this, props);\n this.routeModule = module;\n // check if activeRoute exists\n const route = module.routes.find((item) => item.path === this.activeRoute);\n if (!route) {\n this.setActiveRoute((_a = module.routes[0]) === null || _a === void 0 ? void 0 : _a.path);\n }\n break;\n }\n case FileType.JsxViewModule:\n module = new TangoViewModule(this, props);\n break;\n case FileType.ServiceModule:\n module = new TangoServiceModule(this, props);\n this.serviceModules[module.name] = module;\n break;\n case FileType.StoreModule:\n module = new TangoStoreModule(this, props);\n this.storeModules[module.name] = module;\n break;\n case FileType.Module:\n module = new TangoJsModule(this, props);\n break;\n case FileType.Less:\n module = new TangoLessFile(this, props);\n break;\n case FileType.PackageJson:\n module = new TangoJsonFile(this, props);\n this.packageJson = module;\n break;\n case FileType.TangoConfigJson:\n module = new TangoJsonFile(this, props);\n this.tangoConfigJson = module;\n break;\n case FileType.Json:\n module = new TangoJsonFile(this, props);\n break;\n default:\n module = new TangoFile(this, props);\n }\n this.files.set(filename, module);\n }\n addServiceFile(serviceName, code) {\n const filename = `/src/services/${serviceName}.js`;\n this.addFile(filename, code, FileType.ServiceModule);\n const indexServiceModule = this.serviceModules.index;\n indexServiceModule === null || indexServiceModule === void 0 ? void 0 : indexServiceModule.addImportDeclaration(`./${serviceName}`, []).update();\n }\n addStoreFile(storeName, code) {\n const filename = `/src/stores/${storeName}.js`;\n this.addFile(filename, code);\n if (!this.storeEntryModule) {\n this.addFile('/src/stores/index.js', '');\n }\n this.storeEntryModule.addStore(storeName).update();\n }\n /**\n * 添加视图文件\n * @param viewName 文件名\n * @param code 代码\n */\n addViewFile(viewName, code) {\n const viewRoute = viewName.startsWith('/') ? viewName : `/${viewName}`;\n const filename = `/src/pages/${viewName}.js`;\n this.addFile(filename, code);\n this.addRoute({\n name: viewName,\n path: viewRoute,\n }, filename);\n }\n updateFile(filename, code, shouldFormatCode = false) {\n const file = this.getFile(filename);\n file.update(code);\n if (shouldFormatCode && file instanceof TangoViewModule) {\n file.removeUnusedImportSpecifiers().update();\n }\n this.history.push({\n message: HistoryMessage.UpdateCode,\n data: {\n [filename]: code,\n },\n });\n }\n /**\n * 删除工作区的文件\n * @param filename\n */\n removeFile(filename) {\n // TODO: refactor visitFile to share this logic\n if (this.files.get(filename)) {\n // 如果是文件,直接删除\n this.files.delete(filename);\n }\n else {\n // 没有匹配到,就是一个目录,直接删除整个目录\n // FIXME: 可能存在风险,如果文件夹中的模块被复用,则会导致误删除\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${filename}/`)) {\n this.files.delete(key);\n }\n });\n }\n }\n /**\n * 重命名文件\n * @param oldFilename\n * @param newFilename\n */\n renameFile(oldFilename, newFilename) {\n const file = this.files.get(oldFilename);\n if (file) {\n this.removeFile(oldFilename);\n this.addFile(newFilename, file.code);\n }\n }\n /**\n * 重命名文件夹\n * @param oldFoldername 旧文件夹名\n * @param newFoldername 新文件夹名\n */\n renameFolder(oldFoldername, newFoldername) {\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${oldFoldername}/`)) {\n const newKey = key.replace(oldFoldername, newFoldername);\n this.renameFile(key, newKey);\n }\n });\n }\n /**\n * 根据文件名获取文件对象\n * @param filename\n * @returns\n */\n getFile(filename) {\n return this.files.get(filename);\n }\n /**\n * 获取文件列表\n * @returns { [filename]: fileCode }\n */\n listFiles() {\n const ret = {};\n this.files.forEach((file) => {\n ret[file.filename] = file.cleanCode;\n });\n return ret;\n }\n /**\n * 删除视图模块\n * @param route 路由名称\n */\n removeViewModule(routePath) {\n var _a;\n // get filename first\n const filename = this.getFilenameByRoutePath(routePath);\n if (this.routeModule) {\n this.routeModule.removeRoute(routePath).update();\n this.setActiveRoute(((_a = this.routeModule.routes[0]) === null || _a === void 0 ? void 0 : _a.path) || '/');\n }\n this.removeFile(filename);\n }\n /**\n * 添加新的路由\n */\n addRoute(routeData, importFilePath) {\n var _a;\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.addRoute(routeData.path, importFilePath).update();\n }\n /**\n * 更新页面路由配置\n * @param sourceRoutePath\n * @param targetPageData\n */\n updateRoute(sourceRoutePath, targetPageData) {\n var _a;\n if (sourceRoutePath !== targetPageData.path) {\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.updateRoute(sourceRoutePath, targetPageData.path).update();\n }\n }\n /**\n * 复制视图文件\n * @param sourceRoute\n * @param targetRouteConfig\n */\n copyViewPage(sourceRoutePath, targetPageData) {\n const sourceFilePath = this.getRealViewFilePath(this.getFilenameByRoutePath(sourceRoutePath));\n const targetFilePath = getFilepath(targetPageData.path, '/src/pages');\n this.copyFiles(sourceFilePath, targetFilePath);\n this.addRoute(targetPageData, targetFilePath);\n }\n getNode(id, filename) {\n const file = filename ? this.getFile(filename) : this.activeViewModule;\n if (file instanceof TangoViewModule) {\n return file.getNode(id);\n }\n }\n /**\n * 应用代码初始化完成\n */\n ready() {\n var _a, _b;\n if (!this.isReady) {\n this.isReady = true;\n this.history.push({\n message: HistoryMessage.InitView,\n data: {\n [(_a = this.activeViewModule) === null || _a === void 0 ? void 0 : _a.filename]: (_b = this.activeViewModule) === null || _b === void 0 ? void 0 : _b.code,\n },\n });\n }\n }\n /**\n * 添加新的模型文件\n * @deprecated 使用 addStoreFile 代替\n */\n addStoreModule(name, code) {\n this.addStoreFile(name, code);\n }\n /**\n * 删除模型文件\n * @param name\n */\n removeStoreModule(name) {\n const filename = getFilepath(name, '/src/stores', '.js');\n this.storeEntryModule.removeStore(name).update();\n this.removeFile(filename);\n }\n /**\n * 添加模型属性\n * @param storeName\n * @param stateName\n * @param initValue\n */\n addStoreState(storeName, stateName, initValue) {\n var _a;\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.addState(stateName, initValue).update();\n }\n /**\n * 删除模型属性\n * @param storeName\n * @param stateName\n */\n removeStoreState(storeName, stateName) {\n var _a;\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.removeState(stateName).update();\n }\n /**\n * 根据变量路径删除状态变量\n * @param variablePath\n */\n removeStoreVariable(variablePath) {\n const { storeName, variableName } = parseStoreVariablePath(variablePath);\n this.removeStoreState(storeName, variableName);\n }\n /**\n * 根据变量路径更新状态变量的值\n * @param variablePath 变量路径\n * @param code 变量代码\n */\n updateStoreVariable(variablePath, code) {\n var _a;\n if (isStoreVariablePath(variablePath)) {\n const { storeName, variableName } = parseStoreVariablePath(variablePath);\n (_a = this.storeModules[storeName]) === null || _a === void 0 ? void 0 : _a.updateState(variableName, code).update();\n }\n }\n /**\n * 获取服务函数的详情\n * TODO: 不要 services 前缀\n * @param serviceKey `services.list` 或 `services.sub.list`\n * @returns\n */\n getServiceFunction(serviceKey) {\n var _a;\n const { name, moduleName } = parseServiceVariablePath(serviceKey);\n if (!name) {\n return;\n }\n return {\n name,\n moduleName,\n config: (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.serviceFunctions[name],\n };\n }\n /**\n * 获取服务函数的列表\n * @returns 返回服务函数的列表 { [serviceKey: string]: Dict }\n */\n listServiceFunctions() {\n const ret = {};\n Object.keys(this.serviceModules).forEach((moduleName) => {\n const module = this.serviceModules[moduleName];\n Object.keys(module.serviceFunctions).forEach((name) => {\n const serviceKey = moduleName === 'index' ? name : [moduleName, name].join('.');\n ret[serviceKey] = module.serviceFunctions[name];\n });\n });\n return ret;\n }\n /**\n * 更新服务函数\n */\n updateServiceFunction(serviceName, payload, moduleName = 'index') {\n this.serviceModules[moduleName].updateServiceFunction(serviceName, payload).update();\n }\n /**\n * 新增服务函数,支持批量添加\n */\n addServiceFunction(name, config, moduleName = 'index') {\n var _a;\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.addServiceFunction(name, config).update();\n }\n addServiceFunctions(configs, modName = 'index') {\n var _a;\n (_a = this.serviceModules[modName]) === null || _a === void 0 ? void 0 : _a.addServiceFunctions(configs).update();\n }\n /**\n * 删除服务函数\n * @param name\n */\n removeServiceFunction(serviceKey) {\n var _a;\n const { moduleName, name } = parseServiceVariablePath(serviceKey);\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.deleteServiceFunction(name).update();\n }\n /**\n * 更新服务的基础配置\n */\n updateServiceBaseConfig(config, moduleName = 'index') {\n var _a;\n (_a = this.serviceModules[moduleName]) === null || _a === void 0 ? void 0 : _a.updateBaseConfig(config).update();\n }\n addDependency(data) {\n // TODO: implement it to replace addBizComp & addServiceComp\n }\n /**\n * 获取 package.json 中的依赖列表\n * @returns\n * TODO: fix this logic to merge dependencies from package.json and tango.config.json\n */\n listDependencies() {\n var _a;\n return (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.getValue('dependencies');\n }\n getDependency(pkgName) {\n var _a, _b;\n const packages = (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.getValue('packages');\n const dependencies = (_b = this.packageJson) === null || _b === void 0 ? void 0 : _b.getValue('dependencies'); // 兼容老版本\n const detail = Object.assign({ version: dependencies === null || dependencies === void 0 ? void 0 : dependencies[pkgName] }, ((packages === null || packages === void 0 ? void 0 : packages[pkgName]) || {}));\n return detail;\n }\n /**\n * 更新依赖,没有就添加\n * @param name\n * @param version\n */\n updateDependency(name, version, options) {\n var _a, _b;\n (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.setValue('dependencies', (deps = {}) => {\n deps[name] = version;\n return deps;\n }).update();\n (_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.setValue('packages', (packages) => {\n var _a;\n // 兼容以前的逻辑,只在拥有 package 参数时,才会更新 packages 字段\n if (!packages) {\n return undefined;\n }\n if ((options === null || options === void 0 ? void 0 : options.package) || packages[name]) {\n packages[name] = Object.assign(Object.assign({ type: (_a = packages[name]) === null || _a === void 0 ? void 0 : _a.type }, ((options === null || options === void 0 ? void 0 : options.package) || packages[name])), { version });\n }\n return packages;\n }).update();\n this.history.push({\n message: HistoryMessage.UpdateDependency,\n data: {\n [this.packageJson.filename]: this.packageJson.code,\n },\n });\n }\n /**\n * 移除依赖\n * @param name\n */\n removeDependency(name) {\n var _a, _b;\n (_a = this.packageJson) === null || _a === void 0 ? void 0 : _a.setValue('dependencies', (deps) => {\n if (deps[name]) {\n delete deps[name];\n }\n return deps;\n }).update();\n (_b = this.tangoConfigJson) === null || _b === void 0 ? void 0 : _b.setValue('packages', (packages = {}) => {\n if (packages === null || packages === void 0 ? void 0 : packages[name]) {\n delete packages[name];\n }\n return packages;\n }).update();\n this.history.push({\n message: HistoryMessage.RemoveDependency,\n data: {\n [this.packageJson.filename]: this.packageJson.code,\n },\n });\n }\n /**\n * 删除业务组件\n * @param name\n */\n removeBizComp(name) {\n var _a;\n (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.setValue('bizDependencies', (deps) => {\n if (!deps) {\n return undefined;\n }\n return deps.filter((dep) => dep !== name);\n }).update();\n this.removeDependency(name);\n }\n /**\n * 添加业务组件\n * @param name\n */\n addBizComp(name, version, options) {\n var _a;\n const packages = this.tangoConfigJson.getValue('packages');\n this.updateDependency(name, version, Object.assign(Object.assign({}, options), (!!packages && {\n package: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.package), { type: 'bizDependency' }),\n })));\n // 兼容以前的逻辑\n if (!(options === null || options === void 0 ? void 0 : options.package) && !packages) {\n // TODO: if tangoConfigJson not found, init this file\n (_a = this.tangoConfigJson) === null || _a === void 0 ? void 0 : _a.setValue('bizDependencies', (deps = []) => {\n if (!deps.includes(name)) {\n deps.push(name);\n }\n return deps;\n }).update();\n }\n this.tangoConfigJson &&\n this.history.push({\n message: HistoryMessage.UpdateDependency,\n data: {\n [this.tangoConfigJson.filename]: this.tangoConfigJson.code,\n },\n });\n }\n /**\n * 删除选中节点\n */\n removeSelectedNode() {\n const file = this.selectSource.file;\n if (!file)\n return;\n // 选中的结点一定位于相同的文件中\n this.selectSource.nodes.forEach((node) => {\n file.removeNode(node.id);\n });\n file.update();\n this.selectSource.clear();\n this.history.push({\n message: HistoryMessage.RemoveNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 复制选中结点\n */\n copySelectedNode() {\n this.copyTempNodes = this.selectSource.nodes;\n }\n /**\n * 粘贴选中结点\n * TODO: 重构该逻辑,抽离出公共的方法\n */\n pasteSelectedNode() {\n if (this.selectSource.size !== 1)\n return;\n if (!this.copyTempNodes)\n return;\n // TODO: 潜在隐患,如果跨页的话,代码里的逻辑调用也要处理\n const importDeclarations = this.getImportDeclarationByNodes(this.copyTempNodes.map((node) => node.rawNode));\n importDeclarations.forEach((importDeclaration) => {\n this.activeViewModule.updateImportSpecifiersLegacy(importDeclaration);\n });\n this.copyTempNodes.forEach((node) => {\n this.activeViewModule.insertAfter(this.selectSource.first.id, node.cloneRawNode());\n });\n this.activeViewModule.update();\n this.history.push({\n message: HistoryMessage.CloneNode,\n data: {\n [this.activeViewModule.filename]: this.activeViewModule.code,\n },\n });\n }\n /**\n * 克隆选中节点,追加到当前结点的后方\n */\n cloneSelectedNode() {\n const file = this.selectSource.file;\n file\n .insertAfter(this.selectSource.first.id, this.selectSource.firstNode.cloneRawNode())\n .update();\n this.history.push({\n message: HistoryMessage.CloneNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 在目标节点中插入子节点\n * @param targetNodeId 目标节点dnd-id\n * @param sourceName 插入的组件名称\n * @returns\n */\n insertToNode(targetNodeId, sourceName) {\n if (!targetNodeId || !sourceName) {\n return;\n }\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file\n .insertChild(targetNodeId, newNode, 'last')\n .addImportSpecifiers(source, specifiers)\n .update();\n this.history.push({\n message: HistoryMessage.InsertNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 替换目标节点\n */\n replaceNode(targetNodeId, sourceName) {\n if (!targetNodeId || !sourceName) {\n return;\n }\n const sourcePrototype = this.getPrototype(sourceName);\n const newNode = prototype2jsxElement(sourcePrototype);\n const file = this.getNode(targetNodeId).file;\n const { source, specifiers } = prototype2importDeclarationData(sourcePrototype, file.filename);\n file.replaceNode(targetNodeId, newNode).addImportSpecifiers(source, specifiers).update();\n this.history.push({\n message: HistoryMessage.ReplaceNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 在选中节点中插入子节点\n * @param childName 节点名\n */\n insertToSelectedNode(childName) {\n const insertedPrototype = this.getPrototype(childName);\n if (insertedPrototype) {\n const newNode = prototype2jsxElement(insertedPrototype);\n const file = this.selectSource.file;\n const { source, specifiers } = prototype2importDeclarationData(insertedPrototype, file.filename);\n file\n .insertChild(this.selectSource.first.id, newNode, 'last')\n .addImportSpecifiers(source, specifiers)\n .update();\n this.history.push({\n message: HistoryMessage.InsertNode,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n }\n updateSelectedNodeAttributes(attributes = {}, relatedImports = []) {\n const file = this.selectSource.file;\n file.updateNodeAttributes(this.selectSource.first.id, attributes, relatedImports).update();\n this.history.push({\n message: HistoryMessage.UpdateAttribute,\n data: {\n [file.filename]: file.code,\n },\n });\n }\n /**\n * 将节点拽入视图中\n */\n dropNode() {\n var _a, _b;\n const dragSource = this.dragSource;\n const dropTarget = dragSource.dropTarget;\n if (!dragSource.prototype || !dropTarget.id) {\n // 无效的 drag source 或 drop target,提前退出\n logger.error('invalid dragSource or dropTarget');\n return;\n }\n // TODO: 这里需要一个额外的信息,DropTarget 的最近容器节点,用于判断目标元素是否可以被置入容器中\n const dragSourcePrototype = dragSource.prototype;\n let newNode;\n if (dragSource.id) {\n // 来自画布,完整的克隆该节点\n newNode = dragSource.getNode().cloneRawNode();\n }\n else {\n // 来自物料面板,创建新的初始化节点\n newNode = prototype2jsxElement(dragSource.prototype);\n }\n if (!newNode) {\n return;\n }\n const targetFile = (_a = dropTarget.node) === null || _a === void 0 ? void 0 : _a.file;\n const sourceFile = (_b = dragSource.node) === null || _b === void 0 ? void 0 : _b.file;\n // dragSourcePrototype to importDeclarations\n const { source, specifiers } = prototype2importDeclarationData(dragSourcePrototype, targetFile.filename);\n let isValidOperation = true;\n switch (dropTarget.method) {\n // 直接往目标节点的 children 里添加一个节点\n case DropMethod.InsertChild: {\n targetFile\n .insertChild(dropTarget.id, newNode, 'last')\n .addImportSpecifiers(source, specifiers);\n break;\n }\n case DropMethod.InsertFirstChild: {\n targetFile\n .insertChild(dropTarget.id, newNode, 'first')\n .addImportSpecifiers(source, specifiers);\n break;\n }\n // 往目标节点的后边插入一个节点\n case DropMethod.InsertAfter: {\n targetFile.insertAfter(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n // 往目标节点的前方插入一个节点\n case DropMethod.InsertBefore: {\n targetFile.insertBefore(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n // 替换目标节点\n case DropMethod.ReplaceNode: {\n targetFile.replaceNode(dropTarget.id, newNode).addImportSpecifiers(source, specifiers);\n break;\n }\n default:\n isValidOperation = false;\n break;\n }\n // 如果拖拽来源有 ID,表示来自画布\n const isDraggingFromView = !!dragSource.id;\n if (isValidOperation) {\n if (isDraggingFromView) {\n sourceFile.removeNode(dragSource.id);\n }\n this.selectSource.clear();\n }\n targetFile.update();\n if (isDraggingFromView && sourceFile.filename !== targetFile.filename) {\n sourceFile.update();\n }\n dragSource.clear();\n if (isValidOperation) {\n this.history.push({\n message: HistoryMessage.DropNode,\n data: {\n [targetFile.filename]: targetFile.code,\n },\n });\n }\n }\n onFilesChange(filenams) {\n // do nothing\n }\n /**\n * 刷新目标文件\n * @param filenames\n */\n refresh(filenames) {\n this.dispatchEvent(new CustomEvent('refresh', {\n detail: {\n filenames,\n entry: this.entry,\n },\n }));\n }\n /**\n * 基于输入结点获得结点依赖的导入声明信息\n * @param nodes\n */\n getImportDeclarationByNodes(nodes) {\n let names = nodes.reduce((prev, cur) => {\n prev = prev.concat(getJSXElementChildrenNames(cur));\n return prev;\n }, []);\n names = uniq(names);\n const importDeclarations = namesToImportDeclarations(names, this.selectSource.file.importMap);\n return importDeclarations;\n }\n /**\n * 根据路由路径获取文件名\n * @param routePath\n * @returns\n */\n getFilenameByRoutePath(routePath) {\n var _a;\n let filename;\n (_a = this.routeModule) === null || _a === void 0 ? void 0 : _a.routes.forEach((route) => {\n if (isPathnameMatchRoute(routePath, route.path) && route.importPath) {\n const absolutePath = route.importPath.replace('.', '/src');\n filename = this.getRealViewFilePath(absolutePath);\n }\n });\n return filename;\n }\n getRealViewFilePath(filePath) {\n // 如果有后缀名直接返回\n if (hasFileExtension(filePath)) {\n return filePath;\n }\n const possiblePaths = [\n `${filePath}.js`,\n `${filePath}.jsx`,\n `${filePath}/index.js`,\n `${filePath}/index.jsx`,\n ];\n for (const filepath of possiblePaths) {\n if (this.files.has(filepath)) {\n return filepath;\n }\n }\n }\n /**\n * 文件拷贝\n * @param sourcePath\n * @param targetPath\n */\n copyFiles(sourceFilePath, targetFilePath) {\n if (this.files.has(sourceFilePath)) {\n // 来源是文件\n const file = this.files.get(sourceFilePath);\n this.addFile(`${targetFilePath}.js`, file.cleanCode, file.type);\n }\n else if (this.files.has(`${sourceFilePath}/index.js`)) {\n // 来源是目录\n Array.from(this.files.keys()).forEach((key) => {\n if (key.startsWith(`${sourceFilePath}/`)) {\n const sourceFile = this.getFile(key);\n this.addFile(targetFilePath + key.slice(sourceFilePath.length), sourceFile.cleanCode, sourceFile.type);\n }\n });\n }\n else {\n logger.error('copyFiles failed, source: %s, target: %s', sourceFilePath, targetFilePath);\n }\n }\n}\n","/**\n * 导入列表解析为导入声明对象\n * @param names\n * @param nameMap\n * @returns\n */\nexport function namesToImportDeclarations(names, nameMap) {\n const map = {};\n names.forEach((name) => {\n const mod = nameMap[name];\n if (mod) {\n updateMod(map, mod.source, name, mod.isDefault, !map[mod.source]);\n }\n });\n return Object.keys(map).map((sourcePath) => (Object.assign({ sourcePath }, map[sourcePath])));\n}\nfunction updateMod(map, fromPackage, specifier, isDefault = false, shouldInit = true) {\n if (shouldInit) {\n map[fromPackage] = {};\n }\n if (isDefault) {\n map[fromPackage].defaultSpecifier = specifier;\n }\n else if (map[fromPackage].specifiers) {\n map[fromPackage].specifiers.push(specifier);\n }\n else {\n map[fromPackage].specifiers = [specifier];\n }\n}\n","import { action, computed, makeObservable, observable, toJS } from 'mobx';\nconst ISimulatorTypes = {\n desktop: {\n name: 'desktop',\n width: 1366,\n height: 800,\n },\n phone: {\n name: 'phone',\n width: 375,\n height: 812,\n },\n};\nexport class Designer {\n get simulator() {\n return toJS(this._simulator);\n }\n get viewport() {\n return toJS(this._viewport);\n }\n get activeView() {\n return this._activeView;\n }\n get isPreview() {\n return this._isPreview;\n }\n get showSmartWizard() {\n return this._showSmartWizard;\n }\n get activeSidebarPanel() {\n return this._activeSidebarPanel;\n }\n get showRightPanel() {\n return this._showRightPanel;\n }\n constructor(options) {\n /**\n * 当前的沙箱模拟器类型\n */\n this._simulator = ISimulatorTypes.desktop;\n /**\n * 当前的视图尺寸\n */\n this._viewport = {\n width: 1366,\n height: 800,\n };\n /**\n * 当前激活的视图\n */\n this._activeView = 'design';\n /**\n * 当前选中的侧边栏面板\n */\n this._activeSidebarPanel = '';\n /**\n * 是否显示智能引导\n */\n this._showSmartWizard = false;\n /**\n * 是否显示右侧面板\n */\n this._showRightPanel = true;\n /**\n * 是否预览模式\n */\n this._isPreview = false;\n this.workspace = options.workspace;\n const { simulator, activeSidebarPanel: defaultActiveSidebarPanel } = options;\n // 默认设计器模式\n if (simulator) {\n this.setSimulator(simulator);\n }\n // 默认展开的侧边栏\n if (defaultActiveSidebarPanel) {\n this.setActiveSidebarPanel(defaultActiveSidebarPanel);\n }\n makeObservable(this, {\n _simulator: observable,\n _viewport: observable,\n _activeView: observable,\n _activeSidebarPanel: observable,\n _showSmartWizard: observable,\n _showRightPanel: observable,\n _isPreview: observable,\n simulator: computed,\n viewport: computed,\n activeView: computed,\n activeSidebarPanel: computed,\n isPreview: computed,\n showRightPanel: computed,\n showSmartWizard: computed,\n setSimulator: action,\n setViewport: action,\n setActiveView: action,\n setActiveSidebarPanel: action,\n closeSidebarPanel: action,\n toggleRightPanel: action,\n toggleSmartWizard: action,\n toggleIsPreview: action,\n });\n }\n setSimulator(value) {\n if (typeof value === 'string') {\n this._simulator = ISimulatorTypes[value];\n }\n else {\n this._simulator = value;\n }\n }\n setViewport(value) {\n this._viewport = value;\n }\n setActiveView(view) {\n this._activeView = view;\n }\n setActiveSidebarPanel(panel) {\n if (panel && panel !== this.activeSidebarPanel) {\n this._activeSidebarPanel = panel;\n }\n else {\n this._activeSidebarPanel = '';\n }\n }\n closeSidebarPanel() {\n this._activeSidebarPanel = '';\n }\n toggleSmartWizard(value) {\n this._showSmartWizard = value;\n }\n toggleRightPanel(value) {\n this._showRightPanel = value !== null && value !== void 0 ? value : !this._showRightPanel;\n }\n toggleIsPreview(value) {\n this._isPreview = value !== null && value !== void 0 ? value : !this._isPreview;\n if (value) {\n this.workspace.selectSource.clear();\n }\n }\n}\n","import { Designer, Engine } from './models';\n/**\n * Designer 实例化工厂函数\n * @param options\n * @returns\n */\nexport function createEngine({ workspace, defaultSimulatorMode = 'desktop', defaultActiveSidebarPanel = '', }) {\n const engine = new Engine({\n workspace,\n designer: new Designer({\n workspace,\n simulator: defaultSimulatorMode,\n activeSidebarPanel: defaultActiveSidebarPanel,\n }),\n });\n return engine;\n}\n","import React from 'react';\nexport { default as hoistNonReactStatics } from 'hoist-non-react-statics';\n/**\n * 创建一个命名的 Context 附赠 Provider, Hook\n * @param options\n */\nexport function createContext(options = {}) {\n const { strict = true, errorMessage = 'useContext: `context` is undefined. Seems you forgot to wrap component within the Provider', name, } = options;\n const Context = React.createContext(undefined);\n Context.displayName = name;\n function useContext() {\n const context = React.useContext(Context);\n if (!context && strict) {\n throw new Error(errorMessage);\n }\n return context;\n }\n return [Context.Provider, useContext, Context];\n}\n/**\n * 获取组件的 displayName\n * @param Component\n * @returns\n */\nexport const getDisplayName = (Component) => {\n if (typeof Component === 'string') {\n return Component;\n }\n if (!Component) {\n return undefined;\n }\n return Component.displayName || Component.name || 'Component';\n};\n/**\n * 包裹 DisplayName\n * @param Component\n * @param hocName\n * @returns\n */\nexport const wrapDisplayName = (Component, hocName) => `${hocName}(${getDisplayName(Component)})`;\n/**\n * 判断组件是否是函数组件\n * @returns 类组件和 forwardRef 返回 false,函数组件返回 true\n */\nexport const isFunctionComponent = (Comp) => {\n // class component\n if (Comp.prototype && Comp.prototype.isReactComponent) {\n return false;\n }\n // forwardRef component\n if (typeof Comp === 'object' && Comp.render) {\n return false;\n }\n // function component\n return typeof Comp === 'function';\n};\n","import { createContext } from '@music163/tango-helpers';\nconst [DesignerProvider, useDesigner] = createContext({\n name: 'DesignerContext',\n});\nexport { DesignerProvider };\nexport const useSandboxQuery = () => {\n var _a;\n return (_a = useDesigner()) === null || _a === void 0 ? void 0 : _a.sandboxQuery;\n};\nexport const useRemoteServices = () => {\n var _a;\n return (_a = useDesigner()) === null || _a === void 0 ? void 0 : _a.remoteServices;\n};\n","import { makeObservable } from \"mobx\";\nimport { useState } from \"react\";\nif (!useState) {\n throw new Error(\"mobx-react-lite requires React with Hooks support\");\n}\nif (!makeObservable) {\n throw new Error(\"mobx-react-lite@3 requires mobx at least version 6 to be available\");\n}\n//# sourceMappingURL=assertEnvironment.js.map","import { configure } from \"mobx\";\nexport function defaultNoopBatch(callback) {\n callback();\n}\nexport function observerBatching(reactionScheduler) {\n if (!reactionScheduler) {\n reactionScheduler = defaultNoopBatch;\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Failed to get unstable_batched updates from react-dom / react-native\");\n }\n }\n configure({ reactionScheduler: reactionScheduler });\n}\nexport var isObserverBatched = function () {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Deprecated\");\n }\n return true;\n};\n//# sourceMappingURL=observerBatching.js.map","import { getDependencyTree } from \"mobx\";\nexport function printDebugValue(v) {\n return getDependencyTree(v);\n}\n//# sourceMappingURL=printDebugValue.js.map","var globalIsUsingStaticRendering = false;\nexport function enableStaticRendering(enable) {\n globalIsUsingStaticRendering = enable;\n}\nexport function isUsingStaticRendering() {\n return globalIsUsingStaticRendering;\n}\n//# sourceMappingURL=staticRendering.js.map","export var REGISTRY_FINALIZE_AFTER = 10000;\nexport var REGISTRY_SWEEP_INTERVAL = 10000;\nvar TimerBasedFinalizationRegistry = /** @class */ (function () {\n function TimerBasedFinalizationRegistry(finalize) {\n var _this = this;\n Object.defineProperty(this, \"finalize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: finalize\n });\n Object.defineProperty(this, \"registrations\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"sweepTimeout\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // Bound so it can be used directly as setTimeout callback.\n Object.defineProperty(this, \"sweep\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (maxAge) {\n if (maxAge === void 0) { maxAge = REGISTRY_FINALIZE_AFTER; }\n // cancel timeout so we can force sweep anytime\n clearTimeout(_this.sweepTimeout);\n _this.sweepTimeout = undefined;\n var now = Date.now();\n _this.registrations.forEach(function (registration, token) {\n if (now - registration.registeredAt >= maxAge) {\n _this.finalize(registration.value);\n _this.registrations.delete(token);\n }\n });\n if (_this.registrations.size > 0) {\n _this.scheduleSweep();\n }\n }\n });\n // Bound so it can be exported directly as clearTimers test utility.\n Object.defineProperty(this, \"finalizeAllImmediately\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function () {\n _this.sweep(0);\n }\n });\n }\n // Token is actually required with this impl\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (target, value, token) {\n this.registrations.set(token, {\n value: value,\n registeredAt: Date.now()\n });\n this.scheduleSweep();\n }\n });\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (token) {\n this.registrations.delete(token);\n }\n });\n Object.defineProperty(TimerBasedFinalizationRegistry.prototype, \"scheduleSweep\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this.sweepTimeout === undefined) {\n this.sweepTimeout = setTimeout(this.sweep, REGISTRY_SWEEP_INTERVAL);\n }\n }\n });\n return TimerBasedFinalizationRegistry;\n}());\nexport { TimerBasedFinalizationRegistry };\nexport var UniversalFinalizationRegistry = typeof FinalizationRegistry !== \"undefined\"\n ? FinalizationRegistry\n : TimerBasedFinalizationRegistry;\n//# sourceMappingURL=UniversalFinalizationRegistry.js.map","import { UniversalFinalizationRegistry } from \"./UniversalFinalizationRegistry\";\nexport var observerFinalizationRegistry = new UniversalFinalizationRegistry(function (adm) {\n var _a;\n (_a = adm.reaction) === null || _a === void 0 ? void 0 : _a.dispose();\n adm.reaction = null;\n});\n//# sourceMappingURL=observerFinalizationRegistry.js.map","import { Reaction } from \"mobx\";\nimport React from \"react\";\nimport { printDebugValue } from \"./utils/printDebugValue\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { observerFinalizationRegistry } from \"./utils/observerFinalizationRegistry\";\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\n// Required by SSR when hydrating #3669\nvar getServerSnapshot = function () { };\nfunction createReaction(adm) {\n adm.reaction = new Reaction(\"observer\".concat(adm.name), function () {\n var _a;\n adm.stateVersion = Symbol();\n // onStoreChange won't be available until the component \"mounts\".\n // If state changes in between initial render and mount,\n // `useSyncExternalStore` should handle that by checking the state version and issuing update.\n (_a = adm.onStoreChange) === null || _a === void 0 ? void 0 : _a.call(adm);\n });\n}\nexport function useObserver(render, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (isUsingStaticRendering()) {\n return render();\n }\n var admRef = React.useRef(null);\n if (!admRef.current) {\n // First render\n var adm_1 = {\n reaction: null,\n onStoreChange: null,\n stateVersion: Symbol(),\n name: baseComponentName,\n subscribe: function (onStoreChange) {\n // Do NOT access admRef here!\n observerFinalizationRegistry.unregister(adm_1);\n adm_1.onStoreChange = onStoreChange;\n if (!adm_1.reaction) {\n // We've lost our reaction and therefore all subscriptions, occurs when:\n // 1. Timer based finalization registry disposed reaction before component mounted.\n // 2. React \"re-mounts\" same component without calling render in between (typically ).\n // We have to recreate reaction and schedule re-render to recreate subscriptions,\n // even if state did not change.\n createReaction(adm_1);\n // `onStoreChange` won't force update if subsequent `getSnapshot` returns same value.\n // So we make sure that is not the case\n adm_1.stateVersion = Symbol();\n }\n return function () {\n var _a;\n // Do NOT access admRef here!\n adm_1.onStoreChange = null;\n (_a = adm_1.reaction) === null || _a === void 0 ? void 0 : _a.dispose();\n adm_1.reaction = null;\n };\n },\n getSnapshot: function () {\n // Do NOT access admRef here!\n return adm_1.stateVersion;\n }\n };\n admRef.current = adm_1;\n }\n var adm = admRef.current;\n if (!adm.reaction) {\n // First render or reaction was disposed by registry before subscribe\n createReaction(adm);\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n observerFinalizationRegistry.register(admRef, adm, adm);\n }\n React.useDebugValue(adm.reaction, printDebugValue);\n useSyncExternalStore(\n // Both of these must be stable, otherwise it would keep resubscribing every render.\n adm.subscribe, adm.getSnapshot, getServerSnapshot);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var renderResult;\n var exception;\n adm.reaction.track(function () {\n try {\n renderResult = render();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return renderResult;\n}\n//# sourceMappingURL=useObserver.js.map","import { forwardRef, memo } from \"react\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useObserver } from \"./useObserver\";\nvar warnObserverOptionsDeprecated = true;\nvar hasSymbol = typeof Symbol === \"function\" && Symbol.for;\n// Using react-is had some issues (and operates on elements, not on types), see #608 / #609\nvar ReactForwardRefSymbol = hasSymbol\n ? Symbol.for(\"react.forward_ref\")\n : typeof forwardRef === \"function\" && forwardRef(function (props) { return null; })[\"$$typeof\"];\nvar ReactMemoSymbol = hasSymbol\n ? Symbol.for(\"react.memo\")\n : typeof memo === \"function\" && memo(function (props) { return null; })[\"$$typeof\"];\n// n.b. base case is not used for actual typings or exported in the typing files\nexport function observer(baseComponent, \n// TODO remove in next major\noptions) {\n var _a;\n if (process.env.NODE_ENV !== \"production\" && warnObserverOptionsDeprecated && options) {\n warnObserverOptionsDeprecated = false;\n console.warn(\"[mobx-react-lite] `observer(fn, { forwardRef: true })` is deprecated, use `observer(React.forwardRef(fn))`\");\n }\n if (ReactMemoSymbol && baseComponent[\"$$typeof\"] === ReactMemoSymbol) {\n throw new Error(\"[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.\");\n }\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if (isUsingStaticRendering()) {\n return baseComponent;\n }\n var useForwardRef = (_a = options === null || options === void 0 ? void 0 : options.forwardRef) !== null && _a !== void 0 ? _a : false;\n var render = baseComponent;\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n // If already wrapped with forwardRef, unwrap,\n // so we can patch render and apply memo\n if (ReactForwardRefSymbol && baseComponent[\"$$typeof\"] === ReactForwardRefSymbol) {\n useForwardRef = true;\n render = baseComponent[\"render\"];\n if (typeof render !== \"function\") {\n throw new Error(\"[mobx-react-lite] `render` property of ForwardRef was not a function\");\n }\n }\n var observerComponent = function (props, ref) {\n return useObserver(function () { return render(props, ref); }, baseComponentName);\n };\n observerComponent.displayName = baseComponent.displayName;\n Object.defineProperty(observerComponent, \"name\", {\n value: baseComponent.name,\n writable: true,\n configurable: true\n });\n // Support legacy context: `contextTypes` must be applied before `memo`\n if (baseComponent.contextTypes) {\n ;\n observerComponent.contextTypes = baseComponent.contextTypes;\n }\n if (useForwardRef) {\n // `forwardRef` must be applied prior `memo`\n // `forwardRef(observer(cmp))` throws:\n // \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))\"\n observerComponent = forwardRef(observerComponent);\n }\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n observerComponent = memo(observerComponent);\n copyStaticProperties(baseComponent, observerComponent);\n if (\"production\" !== process.env.NODE_ENV) {\n Object.defineProperty(observerComponent, \"contextTypes\", {\n set: function () {\n var _a, _b;\n throw new Error(\"[mobx-react-lite] `\".concat(this.displayName || ((_a = this.type) === null || _a === void 0 ? void 0 : _a.displayName) || ((_b = this.type) === null || _b === void 0 ? void 0 : _b.name) || \"Component\", \".contextTypes` must be set before applying `observer`.\"));\n }\n });\n }\n return observerComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true,\n // Don't redefine `displayName`,\n // it's defined as getter-setter pair on `memo` (see #3192).\n displayName: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useDeprecated } from \"./utils/utils\";\nimport { observable, runInAction } from \"mobx\";\nimport { useState } from \"react\";\nexport function useAsObservableSource(current) {\n if (\"production\" !== process.env.NODE_ENV)\n useDeprecated(\"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\");\n var _a = __read(useState(function () { return observable(current, {}, { deep: false }); }), 1), res = _a[0];\n runInAction(function () {\n Object.assign(res, current);\n });\n return res;\n}\n//# sourceMappingURL=useAsObservableSource.js.map","var _a;\nimport \"./utils/assertEnvironment\";\nimport { unstable_batchedUpdates as batch } from \"./utils/reactBatchedUpdates\";\nimport { observerBatching } from \"./utils/observerBatching\";\nimport { useDeprecated } from \"./utils/utils\";\nimport { useObserver as useObserverOriginal } from \"./useObserver\";\nimport { enableStaticRendering } from \"./staticRendering\";\nimport { observerFinalizationRegistry } from \"./utils/observerFinalizationRegistry\";\nobserverBatching(batch);\nexport { isUsingStaticRendering, enableStaticRendering } from \"./staticRendering\";\nexport { observer } from \"./observer\";\nexport { Observer } from \"./ObserverComponent\";\nexport { useLocalObservable } from \"./useLocalObservable\";\nexport { useLocalStore } from \"./useLocalStore\";\nexport { useAsObservableSource } from \"./useAsObservableSource\";\nexport { observerFinalizationRegistry as _observerFinalizationRegistry };\nexport var clearTimers = (_a = observerFinalizationRegistry[\"finalizeAllImmediately\"]) !== null && _a !== void 0 ? _a : (function () { });\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (\"production\" !== process.env.NODE_ENV) {\n useDeprecated(\"[mobx-react-lite] 'useObserver(fn)' is deprecated. Use `{fn}` instead, or wrap the entire component in `observer`.\");\n }\n return useObserverOriginal(fn, baseComponentName);\n}\nexport { isObserverBatched, observerBatching } from \"./utils/observerBatching\";\nexport function useStaticRendering(enable) {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[mobx-react-lite] 'useStaticRendering' is deprecated, use 'enableStaticRendering' instead\");\n }\n enableStaticRendering(enable);\n}\n//# sourceMappingURL=index.js.map","import { createContext } from '@music163/tango-helpers';\nconst [TangoEngineProvider, useTangoEngine] = createContext({\n name: 'TangoEngineContext',\n});\nexport { TangoEngineProvider };\nexport const useWorkspace = () => {\n var _a;\n return (_a = useTangoEngine()) === null || _a === void 0 ? void 0 : _a.engine.workspace;\n};\nexport const useDesigner = () => {\n var _a;\n return (_a = useTangoEngine()) === null || _a === void 0 ? void 0 : _a.engine.designer;\n};\nexport const useWorkspaceData = () => {\n var _a, _b, _c, _d, _e;\n const ctx = useTangoEngine();\n const workspace = useWorkspace();\n const modelVariables = []; // 绑定变量列表\n const storeActionVariables = []; // 模型中的所有 actions\n const storeVariables = []; // 模型中的所有变量\n const serviceVariables = []; // 服务中的所有变量\n Object.values(workspace.storeModules).forEach((file) => {\n const prefix = `stores.${file.name}`;\n const states = file.states.map((item) => ({\n title: item.name,\n key: `${prefix}.${item.name}`,\n raw: item.code,\n showRemoveButton: true,\n }));\n const actions = file.actions.map((item) => ({\n title: item.name,\n key: `${prefix}.${item.name}`,\n type: 'function',\n raw: item.code,\n showRemoveButton: true,\n }));\n modelVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: states,\n showAddButton: true,\n });\n storeActionVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: actions,\n });\n storeVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n children: [...states, ...actions],\n showAddButton: true,\n });\n });\n Object.values(workspace.serviceModules).forEach((file) => {\n const prefix = file.name !== 'index' ? `services.${file.name}` : 'services';\n serviceVariables.push({\n title: file.name,\n key: prefix,\n selectable: false,\n showAddButton: true,\n children: Object.keys(file.serviceFunctions || {}).map((key) => ({\n title: key,\n key: [prefix, key].join('.'),\n type: 'function',\n showRemoveButton: true,\n })),\n });\n });\n // 路由选项列表\n const routeOptions = (_a = workspace.pages) === null || _a === void 0 ? void 0 : _a.map((item) => ({\n label: `${item.name} (${item.path})`,\n value: item.path,\n }));\n let actionVariables = [\n buildVariableOptions('数据模型', '$stores', storeActionVariables),\n buildVariableOptions('服务函数', '$services', serviceVariables),\n ];\n if ((_b = ctx.config) === null || _b === void 0 ? void 0 : _b.customActionVariables) {\n actionVariables = actionVariables.concat((_c = ctx.config) === null || _c === void 0 ? void 0 : _c.customActionVariables);\n }\n let expressionVariables = [\n buildVariableOptions('数据模型', '$stores', storeVariables),\n buildVariableOptions('服务函数', '$services', serviceVariables),\n ];\n if ((_d = ctx.config) === null || _d === void 0 ? void 0 : _d.customExpressionVariables) {\n expressionVariables = expressionVariables.concat((_e = ctx.config) === null || _e === void 0 ? void 0 : _e.customExpressionVariables);\n }\n return {\n modelVariables: [buildVariableOptions('数据模型', 'stores', modelVariables)],\n actionVariables,\n storeVariables,\n serviceVariables,\n expressionVariables,\n routeOptions,\n };\n};\nfunction buildVariableOptions(title, key, children) {\n return {\n key,\n title,\n children,\n };\n}\n","import { extendTheme } from 'coral-system';\nexport default extendTheme({\n colors: {\n primary: {\n 10: '#e8f3ff',\n 20: '#bedaff',\n 30: '#94bfff',\n 40: '#6aa1ff',\n 50: '#4080ff',\n 60: '#165dff',\n 70: '#0e42d2',\n },\n line: {\n normal: '#e5e6eb',\n },\n background: {\n normal: '#f3f3f4',\n secondary: '#e5e6eb',\n },\n text: {\n title: '#1d2129',\n body: '#4e5969',\n note: '#86909c',\n placeholder: '#c9cdd4',\n },\n custom: {\n topNavBg: '#222',\n topNavColor: '#fff',\n topNavBorderColor: '#222',\n toolbarDividerColor: 'gray.60',\n toolbarButtonBg: 'rgba(223, 223, 223, 0.08)',\n toolbarButtonBgHover: '#4080ff',\n toolbarButtonBgDisabled: 'rgba(223,223,223, 0.08)',\n toolbarButtonBgActive: '#4080ff',\n toolbarButtonTextColor: '#FFF',\n toolbarButtonTextColorHover: '#FFF',\n toolbarButtonTextColorDisabled: 'hsla(0,0%,100%,0.3)',\n toolbarButtonTextColorActive: '#fff',\n sidebarBg: '#fff',\n sidebarExpandBg: '#fff',\n sidebarItemActiveBg: '#f2f3f5',\n sidebarItemHoverBg: '#f2f3f5',\n viewportBg: '#f0f2f5',\n },\n },\n radii: {\n s: '2px',\n m: '2px',\n l: '4px',\n xl: '8px',\n xxl: '16px',\n },\n});\n","import React, { useMemo } from 'react';\nimport { SystemProvider, extendTheme } from 'coral-system';\nimport { ConfigProvider } from 'antd';\nimport { TangoEngineProvider } from '@music163/tango-context';\nimport zhCN from 'antd/lib/locale/zh_CN';\nimport { DesignerProvider } from './context';\nimport defaultTheme from './themes/default';\n/**\n * 设计器状态和设置容器\n * @param props\n * @returns\n */\nexport function Designer(props) {\n const { engine, config, theme: themeProp, sandboxQuery, remoteServices = {}, children } = props;\n const theme = useMemo(() => extendTheme(themeProp, defaultTheme), [themeProp]);\n return (React.createElement(SystemProvider, { theme: theme, prefix: \"--tango\" },\n React.createElement(ConfigProvider, { locale: zhCN },\n React.createElement(TangoEngineProvider, { value: { engine, config } },\n React.createElement(DesignerProvider, { value: { sandboxQuery, remoteServices } }, children)))));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\n/**\n * 设计器面板\n */\nexport function DesignerPanel(props) {\n const { header, logo, description, actions, children } = props;\n return (React.createElement(Box, { height: \"100vh\", overflow: \"hidden\", className: \"DesignerPanel\" }, header !== null && header !== void 0 ? header : (React.createElement(Box, { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", height: \"48px\", bg: \"colors.custom.topNavBg\", color: \"colors.custom.topNavColor\", borderBottom: \"solid\", borderColor: \"colors.custom.topNavBorderColor\", className: \"DesignerPanelHeader\" },\n React.createElement(Box, { display: \"flex\", alignItems: \"center\" },\n logo,\n description),\n React.createElement(Box, { flex: \"1\" }, actions))),\n React.createElement(Box, { display: \"flex\", height: \"calc(100vh - 48px)\", overflow: \"hidden\", className: \"DesignerPanelBody\" }, children)));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\nexport function WorkspacePanel({ children }) {\n return (React.createElement(Box, { flex: \"1\", display: \"flex\", flexDirection: \"column\", overflow: \"hidden\", bg: \"colors.custom.viewportBg\", position: \"relative\", className: \"WorkspacePanel\" }, children));\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { useState, useCallback } from 'react';\nexport function useBoolean(initialState = false) {\n const [value, setValue] = useState(initialState);\n const on = useCallback(() => {\n setValue(true);\n }, []);\n const off = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((prev) => !prev);\n }, []);\n return [value, { on, off, toggle }];\n}\n","import React from 'react';\nimport Icon from '@ant-design/icons';\nexport function createIcon(component, displayName) {\n const CustomIcon = (props) => (React.createElement(Icon, Object.assign({ component: component }, props)));\n if (displayName) {\n CustomIcon.displayName = displayName;\n }\n return CustomIcon;\n}\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst CodeOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"m31 16-7 7-1.41-1.41 5.58-5.59-5.58-5.59 1.41-1.41z\" }),\n React.createElement(\"path\", { d: \"m1 16 7-7 1.41 1.41-5.58 5.59 5.58 5.59-1.41 1.41z\" }),\n React.createElement(\"path\", { d: \"m5.91 15h20.17v2h-20.17z\", transform: \"matrix(.25881905 -.96592583 .96592583 .25881905 -3.6 27.31)\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\", transform: \"matrix(0 -1 1 0 0 32)\" })));\nexport const CodeOutlined = createIcon(CodeOutlinedSvg, 'CodeOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst LineDashedOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 1025 1024\", version: \"1.1\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M212.8 468.8H43.2C17.6 468.8 0 486.4 0 512s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM980.8 468.8H811.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2zM596.8 468.8H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-25.6-19.2-43.2-44.8-43.2z\" })));\nexport const LineDashedOutlined = createIcon(LineDashedOutlinedSvg, 'LineSolidOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst LineSolidOutlinedSvg = () => (React.createElement(\"svg\", { viewBox: \"0 0 1024 1024\", version: \"1.1\", xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", fill: \"currentColor\" },\n React.createElement(\"path\", { d: \"M141.21142578 496.55047632h741.57714844v30.89904736H141.21142578z\" })));\nexport const LineSolidOutlined = createIcon(LineSolidOutlinedSvg, 'LineSolidOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelFilledLeftOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm0 22h-16v-20h16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelFilledLeftOutlined = createIcon(OpenPanelFilledLeftOutlinedSvg, 'OpenPanelFilledLeftOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelFilledRightOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelFilledRightOutlined = createIcon(OpenPanelFilledRightOutlinedSvg, 'OpenPanelFilledRightOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelLeftOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h6v20h-6zm24 20h-16v-20h16z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelLeftOutlined = createIcon(OpenPanelLeftOutlinedSvg, 'OpenPanelLeftOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst OpenPanelRightOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m28 4h-24a2 2 0 0 0 -2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2v-20a2 2 0 0 0 -2-2zm-24 2h16v20h-16zm24 20h-6v-20h6z\" }),\n React.createElement(\"path\", { d: \"m0 0h32v32h-32z\", fill: \"none\" })));\nexport const OpenPanelRightOutlined = createIcon(OpenPanelRightOutlinedSvg, 'OpenPanelRightOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst UndoOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m20 10h-12.1851l3.5874-3.5859-1.4023-1.4141-6 6 6 6 1.4023-1.4146-3.5844-3.5854h12.1821a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16z\" })));\nexport const UndoOutlined = createIcon(UndoOutlinedSvg, 'UndoOutlined');\n","import React from 'react';\nimport { createIcon } from './create-icon';\nconst RedoOutlinedSvg = () => (React.createElement(\"svg\", { width: \"1em\", height: \"1em\", fill: \"currentColor\", viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"path\", { d: \"m12 10h12.1851l-3.5874-3.5859 1.4023-1.4141 6 6-6 6-1.4023-1.4146 3.5844-3.5854h-12.1821a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16z\" })));\nexport const RedoOutlined = createIcon(RedoOutlinedSvg, 'RedoOutlined');\n","// This icon file is generated automatically.\nvar PlusSquareOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z\" } }] }, \"name\": \"plus-square\", \"theme\": \"outlined\" };\nexport default PlusSquareOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport PlusSquareOutlinedSvg from \"@ant-design/icons-svg/es/asn/PlusSquareOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar PlusSquareOutlined = function PlusSquareOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: PlusSquareOutlinedSvg\n }));\n};\nPlusSquareOutlined.displayName = 'PlusSquareOutlined';\nexport default /*#__PURE__*/React.forwardRef(PlusSquareOutlined);","// This icon file is generated automatically.\nvar DownOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z\" } }] }, \"name\": \"down\", \"theme\": \"outlined\" };\nexport default DownOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport DownOutlinedSvg from \"@ant-design/icons-svg/es/asn/DownOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar DownOutlined = function DownOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: DownOutlinedSvg\n }));\n};\nDownOutlined.displayName = 'DownOutlined';\nexport default /*#__PURE__*/React.forwardRef(DownOutlined);","import React from 'react';\nimport { Box, css, Text } from 'coral-system';\nimport { Button, Dropdown, Input, Menu } from 'antd';\nimport { DownOutlined, PlusSquareOutlined } from '@ant-design/icons';\nconst actionInputStyle = css `\n overflow: auto;\n font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n cursor: pointer;\n user-select: none;\n\n display: flex;\n align-items: center;\n\n .action-input-text {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .anticon-down {\n color: var(--tango-colors-text-placeholder);\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\nconst inputStyle = { width: 'calc(100% - 82px)' };\nexport function ActionSelect({ showInput = false, defaultInputValue, text, options = [], onSelect, onInputChange, }) {\n const menu = (React.createElement(Menu, { onClick: ({ key }) => onSelect(key) }, options.map((item) => (React.createElement(Menu.Item, { key: item.value },\n React.createElement(Box, { display: \"flex\", alignItems: \"center\", minWidth: 200, columnGap: \"m\" },\n React.createElement(Box, { flex: \"1\" }, item.label),\n React.createElement(Text, { fontSize: \"12px\", color: \"text.note\" }, item.value)))))));\n if (showInput) {\n return (React.createElement(Input.Group, { compact: true },\n React.createElement(Input, { placeholder: \"\\u8BF7\\u8F93\\u5165\\u6587\\u672C\", defaultValue: defaultInputValue, style: inputStyle, onBlur: (e) => {\n onInputChange && onInputChange(e.target.value);\n }, allowClear: true }),\n React.createElement(Dropdown, { overlay: menu },\n React.createElement(Button, { icon: React.createElement(PlusSquareOutlined, null) }, \"\\u9884\\u8BBE\"))));\n }\n return (React.createElement(Dropdown, { overlay: menu, trigger: ['click'] },\n React.createElement(Box, { border: \"solid\", borderColor: \"line.normal\", borderRadius: \"s\", height: \"32px\", lineHeight: \"32px\", px: \"m\", mb: \"m\", css: actionInputStyle },\n React.createElement(Box, { className: \"action-input-text\", color: \"text.body\" }, text),\n React.createElement(DownOutlined, null))));\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { SingleEditor } from 'react-monaco-editor-lite';\nimport { Box } from 'coral-system';\nexport function SingleMonacoEditor(props) {\n const { language, options: optionsProp = {}, height = '100%', width = '100%', hasBorder = false } = props, rest = __rest(props, [\"language\", \"options\", \"height\", \"width\", \"hasBorder\"]);\n const options = Object.assign({ language }, optionsProp);\n const boxProps = hasBorder\n ? {\n border: 'solid',\n borderColor: 'line.normal',\n borderRadius: 's',\n }\n : {};\n return (React.createElement(Box, Object.assign({ width: width, height: height }, boxProps),\n React.createElement(SingleEditor, Object.assign({ options: options }, rest))));\n}\nexport { MultiEditor } from 'react-monaco-editor-lite';\n","import { __awaiter } from \"tslib\";\nimport React, { useState } from 'react';\nimport { Button, Input } from 'antd';\nimport { Box, Text, css } from 'coral-system';\nimport { CloseOutlined, RobotOutlined } from '@ant-design/icons';\nconst chatBoxStyle = css `\n position: relative;\n .ant-btn {\n position: absolute;\n bottom: 6px;\n right: 6px;\n }\n textarea {\n border: 0;\n }\n`;\nexport function ChatInput({ title = '智能编程助手', showCloseIcon = true, placeholder = '请简单描述你要执行的动作', onGenerate, onApply, onClose, }) {\n const [text, setText] = useState('');\n const [preview, setPreview] = useState('');\n const [loading, setLoading] = useState(false);\n return (React.createElement(Box, { border: \"solid\", borderColor: \"line2\", borderRadius: \"m\", position: \"relative\" },\n React.createElement(Box, { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", bg: \"fill2\", px: \"m\", py: \"s\", borderBottom: \"solid\", borderBottomColor: \"line2\" },\n React.createElement(Box, { fontSize: \"14px\" },\n React.createElement(RobotOutlined, null),\n React.createElement(Text, { ml: \"m\", userSelect: \"none\" }, title)),\n showCloseIcon && React.createElement(CloseOutlined, { onClick: onClose })),\n React.createElement(Box, { css: chatBoxStyle },\n React.createElement(Input.TextArea, { rows: 3, value: text, onChange: (e) => setText(e.target.value), placeholder: placeholder }),\n React.createElement(Button, { disabled: !text, size: \"small\", loading: loading, onClick: () => __awaiter(this, void 0, void 0, function* () {\n setLoading(true);\n const ret = yield onGenerate(text);\n setLoading(false);\n ret && setPreview(ret);\n }) }, \"\\u751F\\u6210\")),\n React.createElement(Box, { minHeight: 48, background: \"fill2\", p: \"m\", fontSize: \"12px\", css: chatBoxStyle },\n React.createElement(Text, { as: \"code\" },\n \"\\u7ED3\\u679C\\uFF1A\",\n preview || '暂无'),\n React.createElement(Button, { size: \"small\", disabled: !preview, onClick: () => onApply(preview) }, \"\\u5E94\\u7528\"))));\n}\n","import React from 'react';\nimport { Box } from 'coral-system';\nexport class ErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n console.log(error);\n return { hasError: true };\n }\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n console.error(error, errorInfo);\n }\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return (React.createElement(Box, { as: \"h1\", color: \"red\" }, \"Something went wrong.\"));\n }\n return this.props.children;\n }\n}\n","// This icon file is generated automatically.\nvar FileOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z\" } }] }, \"name\": \"file\", \"theme\": \"outlined\" };\nexport default FileOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FileOutlinedSvg from \"@ant-design/icons-svg/es/asn/FileOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FileOutlined = function FileOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FileOutlinedSvg\n }));\n};\nFileOutlined.displayName = 'FileOutlined';\nexport default /*#__PURE__*/React.forwardRef(FileOutlined);","// This icon file is generated automatically.\nvar FolderOpenOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z\" } }] }, \"name\": \"folder-open\", \"theme\": \"outlined\" };\nexport default FolderOpenOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FolderOpenOutlinedSvg from \"@ant-design/icons-svg/es/asn/FolderOpenOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FolderOpenOutlined = function FolderOpenOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FolderOpenOutlinedSvg\n }));\n};\nFolderOpenOutlined.displayName = 'FolderOpenOutlined';\nexport default /*#__PURE__*/React.forwardRef(FolderOpenOutlined);","// This icon file is generated automatically.\nvar FolderOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z\" } }] }, \"name\": \"folder\", \"theme\": \"outlined\" };\nexport default FolderOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport FolderOutlinedSvg from \"@ant-design/icons-svg/es/asn/FolderOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar FolderOutlined = function FolderOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: FolderOutlinedSvg\n }));\n};\nFolderOutlined.displayName = 'FolderOutlined';\nexport default /*#__PURE__*/React.forwardRef(FolderOutlined);","import React from 'react';\nimport { css, Box } from 'coral-system';\nimport { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons';\nconst fileItemStyle = css `\n user-select: none;\n transition: all 0.15s ease-in-out;\n\n > .anticon {\n margin-right: 4px;\n }\n\n &:hover {\n background-color: var(--tango-colors-gray-10);\n }\n\n &[data-active='true'] {\n background-color: var(--tango-colors-gray-30);\n }\n`;\nexport class File extends React.PureComponent {\n constructor() {\n super(...arguments);\n this.selectFile = () => {\n if (this.props.selectFile) {\n this.props.selectFile(this.props.path);\n }\n };\n }\n render() {\n const fileName = this.props.path.split('/').filter(Boolean).pop();\n return (React.createElement(Box, { as: \"li\", \"data-active\": this.props.active, onClick: this.props.selectFile ? this.selectFile : this.props.onClick, display: \"flex\", alignItems: \"center\", height: \"28px\", py: \"4px\", pr: \"12px\", pl: 16 * this.props.depth, css: fileItemStyle },\n this.props.selectFile ? React.createElement(FileOutlined, null) : React.createElement(DirectoryIcon, { isOpen: this.props.isDirOpen }),\n fileName));\n }\n}\nfunction DirectoryIcon({ isOpen }) {\n return isOpen ? React.createElement(FolderOpenOutlined, null) : React.createElement(FolderOutlined, null);\n}\n","import React from 'react';\nimport { File } from './file';\nimport { ModuleList } from './module-list';\nexport class Directory extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n open: true,\n };\n this.toggleOpen = () => {\n this.setState((state) => ({ open: !state.open }));\n };\n }\n render() {\n const { prefixedPath, files, selectFile, activePath, depth } = this.props;\n return (React.createElement(\"div\", { key: prefixedPath },\n React.createElement(File, { depth: depth, isDirOpen: this.state.open, onClick: this.toggleOpen, path: prefixedPath + '/' }),\n this.state.open ? (React.createElement(ModuleList, { activePath: activePath, depth: depth, files: files, prefixedPath: prefixedPath, selectFile: selectFile })) : null));\n }\n}\n","import React from 'react';\nimport { Directory } from './directory';\nimport { File } from './file';\nexport class ModuleList extends React.PureComponent {\n render() {\n const { depth = 0, activePath, selectFile, prefixedPath, files } = this.props;\n const fileListWithoutPrefix = files\n .filter((file) => file.startsWith(prefixedPath))\n .map((file) => file.substring(prefixedPath.length));\n const directoriesToShow = new Set(fileListWithoutPrefix\n .filter((file) => file.includes('/'))\n .map((file) => `${prefixedPath}${file.split('/')[0]}/`));\n const filesToShow = fileListWithoutPrefix\n .filter((file) => !file.includes('/'))\n .map((file) => ({ path: `${prefixedPath}${file}` }));\n return (React.createElement(\"div\", null,\n Array.from(directoriesToShow).map((dir) => (React.createElement(Directory, { key: dir, activePath: activePath, depth: depth + 1, files: files, prefixedPath: dir, selectFile: selectFile }))),\n filesToShow.map((file) => (React.createElement(File, { key: file.path, active: activePath === file.path, depth: depth + 1, path: file.path, selectFile: this.props.selectFile })))));\n }\n}\n","// This icon file is generated automatically.\nvar UpOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" } }] }, \"name\": \"up\", \"theme\": \"outlined\" };\nexport default UpOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport UpOutlinedSvg from \"@ant-design/icons-svg/es/asn/UpOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar UpOutlined = function UpOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: UpOutlinedSvg\n }));\n};\nUpOutlined.displayName = 'UpOutlined';\nexport default /*#__PURE__*/React.forwardRef(UpOutlined);","import { useCallback, useEffect, useRef } from 'react';\n/**\n * @param callback\n * @param deps\n * @returns\n */\nexport function useCallbackRef(callback, deps = []) {\n const callbackRef = useRef(callback);\n useEffect(() => {\n callbackRef.current = callback;\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useCallback(((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), deps);\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Box, css } from 'coral-system';\nimport { UpOutlined } from '@ant-design/icons';\nimport { useControllableState } from '@music163/tango-helpers';\nconst headerStyle = css `\n user-select: none;\n\n .anticon-up {\n margin-right: 8px;\n color: var(--tango-colors-text2);\n transition: transform 0.2s ease 0s;\n }\n`;\nexport function CollapsePanel(props) {\n const { title, extra, children, collapsed: collapsedProp, defaultCollapsed = false, onCollapse, stickyHeader, showBottomBorder = true, headerProps, bodyProps } = props, rest = __rest(props, [\"title\", \"extra\", \"children\", \"collapsed\", \"defaultCollapsed\", \"onCollapse\", \"stickyHeader\", \"showBottomBorder\", \"headerProps\", \"bodyProps\"]);\n const [collapsed, setCollapsed] = useControllableState({\n value: collapsedProp,\n defaultValue: defaultCollapsed,\n onChange: onCollapse,\n });\n const iconStyle = {\n transform: collapsed ? undefined : 'rotate(-180deg)',\n };\n const stickHeaderProps = stickyHeader\n ? {\n position: 'sticky',\n top: '0px',\n zIndex: 1,\n bg: 'white',\n }\n : {};\n const CollapsePanelBorderStyle = showBottomBorder\n ? {\n borderBottom: 'solid',\n borderBottomColor: 'line2',\n }\n : {};\n return (React.createElement(Box, Object.assign({ className: \"CollapsePanel\" }, CollapsePanelBorderStyle, rest),\n React.createElement(Box, Object.assign({ display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\", className: \"CollapsePanelHeader\", onClick: () => setCollapsed(!collapsed), p: \"m\" }, stickHeaderProps, headerProps, { css: headerStyle }),\n React.createElement(Box, { display: \"flex\", alignItems: \"center\", fontSize: \"14px\", fontWeight: \"500\" },\n React.createElement(UpOutlined, { style: iconStyle }),\n title),\n React.createElement(Box, null, extra)),\n React.createElement(Box, Object.assign({ className: \"CollapsePanelBody\", display: collapsed ? 'none' : 'block' }, bodyProps), children)));\n}\n","import { useCallback, useMemo, useState } from 'react';\nimport { useCallbackRef } from './use-callback-ref';\nexport function useControllableProp(prop, state) {\n const controlled = typeof prop !== 'undefined';\n const value = controlled ? prop : state;\n return useMemo(() => [controlled, value], [controlled, value]);\n}\nexport function useControllableState(props) {\n const { value: valueProp, defaultValue, onChange, shouldUpdate = (prev, next) => prev !== next, } = props;\n const onChangeProp = useCallbackRef(onChange);\n const shouldUpdateProp = useCallbackRef(shouldUpdate);\n const [uncontrolledState, setUncontrolledState] = useState(defaultValue);\n const controlled = valueProp !== undefined;\n const value = controlled ? valueProp : uncontrolledState;\n const setValue = useCallback((next) => {\n const setter = next;\n const nextValue = typeof next === 'function' ? setter(value) : next;\n if (!shouldUpdateProp(value, nextValue)) {\n return;\n }\n if (!controlled) {\n setUncontrolledState(nextValue);\n }\n onChangeProp(nextValue);\n }, [controlled, onChangeProp, value, shouldUpdateProp]);\n return [value, setValue];\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport Icon from '@ant-design/icons';\n/**\n * 只能在 Designer 里面用,其他地方用不了,依赖 iconfont 脚本提前载入\n */\nexport function IconFont(props) {\n const { type, children } = props, restProps = __rest(props, [\"type\", \"children\"]);\n // children > type\n let content = null;\n if (props.type) {\n content = React.createElement(\"use\", { xlinkHref: `#${type}` });\n }\n if (children) {\n content = children;\n }\n return React.createElement(Icon, Object.assign({}, restProps), content);\n}\nIconFont.displayName = 'IconFont';\n","import React from 'react';\nimport cx from 'classnames';\nimport { css, Box, coral, Text } from 'coral-system';\nimport { EditOutlined, DeleteOutlined } from '@ant-design/icons';\nimport { noop } from '@music163/tango-helpers';\nimport { Popconfirm } from 'antd';\nconst menuStyle = css `\n font-family: Consolas, Menlo, Courier, monospace;\n font-size: 14px;\n`;\nconst MenuItem = coral('div', css `\n display: flex;\n justify-content: space-between;\n align-items: center;\n user-select: none;\n height: 28px;\n padding: 0 12px;\n cursor: pointer;\n\n button {\n display: none;\n background: transparent;\n border: 0;\n cursor: pointer;\n }\n\n .tango-menu-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 90%;\n }\n\n &:hover button {\n display: inline-block;\n }\n\n &:hover {\n background-color: var(--tango-colors-gray-10);\n }\n\n &.active {\n background-color: var(--tango-colors-primary-10);\n }\n `);\nexport function Menu({ items = [], activeKey, onItemClick = noop, onEdit = noop, onDelete = noop, }) {\n return (React.createElement(Box, { className: \"tango-menu\", css: menuStyle }, items.map((item) => (React.createElement(MenuItem, { key: item.key, className: cx({ active: activeKey === item.key }), onClick: () => onItemClick(item.key) },\n React.createElement(\"div\", { className: \"tango-menu-label\" },\n React.createElement(Text, { color: \"text.body\", title: item.label }, item.label),\n React.createElement(Text, { ml: \"m\", color: \"text.placeholder\" }, item.note)),\n React.createElement(\"div\", { className: \"tango-menu-actions\" },\n item.editable && (React.createElement(\"button\", { onClick: () => onEdit(item.key) },\n React.createElement(EditOutlined, null))),\n item.deletable && (React.createElement(Popconfirm, { title: item.deletableConfirm || '确定执行此操作吗?', okText: \"\\u786E\\u5B9A\", cancelText: \"\\u53D6\\u6D88\", onConfirm: (e) => {\n // 阻止冒泡,否则删除的时候会有 Bug\n e.stopPropagation();\n onDelete(item.key);\n } },\n React.createElement(\"button\", null,\n React.createElement(DeleteOutlined, null))))))))));\n}\n","import { __rest } from \"tslib\";\nimport React, { useMemo } from 'react';\nimport cx from 'classnames';\nimport { css, Box, Text } from 'coral-system';\nimport { merge } from '@music163/tango-helpers';\nconst headerStyle = css `\n user-select: none;\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\nexport function Panel(_a) {\n var { shape = 'light', title, subTitle: subTitleProp, extra, headerProps: headerPropsProp, bodyProps: bodyPropsProp, children, className } = _a, rest = __rest(_a, [\"shape\", \"title\", \"subTitle\", \"extra\", \"headerProps\", \"bodyProps\", \"children\", \"className\"]);\n const systemProps = useMemo(() => {\n let rootProps;\n let headerProps;\n let bodyProps;\n if (shape === 'solid') {\n rootProps = {\n border: 'solid',\n borderColor: 'line.normal',\n };\n headerProps = {\n borderBottom: 'solid',\n borderBottomColor: 'line.normal',\n p: 'm',\n lineHeight: '24px',\n };\n bodyProps = {\n p: 'm',\n };\n }\n return {\n rootProps,\n headerProps: merge(headerProps, headerPropsProp),\n bodyProps: merge(bodyProps, bodyPropsProp),\n };\n }, [shape, headerPropsProp, bodyPropsProp]);\n const subTitle = typeof subTitleProp === 'string' && subTitleProp ? (React.createElement(Text, { ml: \"m\", fontSize: \"note\" }, subTitleProp)) : (subTitleProp);\n const showHeader = !!(title || subTitle || extra);\n return (React.createElement(Box, Object.assign({ display: \"flex\", flexDirection: \"column\", overflow: \"auto\", bg: \"white\" }, systemProps.rootProps, { className: cx('Panel', className) }, rest),\n showHeader && (React.createElement(Box, Object.assign({ flex: \"0\", px: \"m\", py: \"s\" }, systemProps.headerProps, { css: headerStyle, className: \"PanelHeader\" }),\n React.createElement(Box, null,\n React.createElement(Text, { color: \"text.title\", fontWeight: \"500\" }, title),\n subTitle && React.createElement(Text, { ml: \"s\" }, subTitle)),\n extra)),\n React.createElement(Box, Object.assign({ flex: \"1\", overflowY: \"auto\" }, systemProps.bodyProps, { className: \"PanelBody\" }), children)));\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport cx from 'classnames';\nimport { css, Button, Box } from 'coral-system';\nimport { Dropdown, Tooltip } from 'antd';\nimport { DownOutlined } from '@ant-design/icons';\nconst buttonStyle = css `\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n user-select: none;\n cursor: pointer;\n color: var(--tango-colors-gray-50);\n padding: 0 8px;\n\n .anticon-down {\n font-size: 12px !important;\n margin-left: 4px;\n }\n\n &.size-s {\n height: 24px;\n font-size: 14px;\n }\n\n &.size-m {\n height: 32px;\n font-size: 14px;\n }\n\n &.size-l {\n height: 40px;\n font-size: 16px;\n }\n\n &.size-xl {\n height: 40px;\n font-size: 20px;\n }\n\n &.shape-text {\n padding: 0px 8px;\n border: 0;\n border-radius: var(--tango-radii-s);\n color: var(--tango-colors-gray-40);\n background: transparent;\n\n &.selected.type-normal {\n color: var(--tango-colors-white);\n }\n\n &.selected.type-primary {\n color: var(--tango-colors-brand);\n }\n\n &:hover {\n background-color: rgba(197, 197, 197, 0.16);\n }\n\n &.disabled {\n color: var(--tango-colors-gray-60);\n }\n }\n\n &.shape-outline {\n background-color: #fff;\n border: 1px solid var(--tango-colors-line2);\n border-radius: var(--tango-radii-s);\n\n &.disabled {\n color: var(--tango-colors-text4);\n background-color: var(--tango-colors-fill1);\n }\n\n &.selected.type-normal {\n color: var(--tango-colors-gray-100);\n background-color: var(--tango-colors-fill3);\n border-color: var(--tango-colors-line2);\n }\n\n &.selected.type-primary {\n color: #fff;\n background-color: var(--tango-colors-brand);\n border-color: var(--tango-colors-brand);\n }\n }\n\n &.shape-ghost {\n background-color: var(--tango-colors-custom-toolbarButtonBg, rgba(223, 223, 223, 0.08));\n color: var(--tango-colors-custom-toolbarButtonTextColor, #fff);\n border: 0;\n border-radius: var(--tango-radii-m);\n\n &:hover {\n color: var(--tango-colors-custom-toolbarButtonTextColorHover, #fff);\n background-color: var(--tango-colors-custom-toolbarButtonBgHover, rgba(197, 197, 197, 0.16));\n }\n\n &.disabled {\n color: var(--tango-colors-custom-toolbarButtonTextColorDisabled, rgb(201, 205, 212));\n background-color: var(--tango-colors-custom-toolbarButtonBgDisabled, rgb(247, 248, 250));\n }\n\n &.selected {\n color: var(--tango-colors-custom-toolbarButtonTextColorActive);\n background-color: var(--tango-colors-custom-toolbarButtonBgActive);\n }\n }\n\n &.disabled {\n pointer-events: none;\n }\n`;\nexport function ToggleButton(props) {\n const { size = 'm', shape = 'outline', type = 'normal', disabled, selected, children, icon, tip, tooltip = tip, tooltipPlacement = 'bottom', items, overlay, overlayStyle, onItemClick, dropdownProps = {} } = props, rest = __rest(props, [\"size\", \"shape\", \"type\", \"disabled\", \"selected\", \"children\", \"icon\", \"tip\", \"tooltip\", \"tooltipPlacement\", \"items\", \"overlay\", \"overlayStyle\", \"onItemClick\", \"dropdownProps\"]);\n const clazz = cx({\n [`size-${size}`]: size,\n [`shape-${shape}`]: shape,\n [`type-${type}`]: type,\n disabled,\n selected,\n });\n const showDropdown = !!items || !!overlay;\n let btn = (React.createElement(Button, Object.assign({ css: buttonStyle, className: clazz, type: \"button\" }, rest),\n React.createElement(Box, { as: \"span\" },\n icon && (React.createElement(Box, { as: \"span\", className: \"buttonIcon\", mr: \"s\" }, icon)),\n children),\n showDropdown ? React.createElement(DownOutlined, null) : null));\n if (tooltip) {\n btn = (React.createElement(Tooltip, { title: tooltip, placement: tooltipPlacement }, btn));\n }\n if (showDropdown) {\n btn = (React.createElement(Dropdown, Object.assign({}, dropdownProps, { overlay: overlay, overlayStyle: overlayStyle, menu: { items, onClick: onItemClick } }), btn));\n }\n return btn;\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Button, Link, css } from 'coral-system';\nimport { Tooltip } from 'antd';\nconst btnStyle = css `\n &:hover {\n color: var(--tango-colors-brand);\n }\n`;\nexport function IconButton(_a) {\n var { tooltip, icon, href, children } = _a, rest = __rest(_a, [\"tooltip\", \"icon\", \"href\", \"children\"]);\n const btn = href ? (React.createElement(Link, Object.assign({ href: href, target: \"_blank\", color: \"text2\", css: btnStyle }, rest), icon !== null && icon !== void 0 ? icon : children)) : (React.createElement(Button, Object.assign({ border: \"0\", bg: \"transparent\", color: \"text2\", px: \"s\", css: btnStyle }, rest), icon !== null && icon !== void 0 ? icon : children));\n if (tooltip) {\n return (React.createElement(Tooltip, { title: tooltip, placement: \"topRight\" }, btn));\n }\n return btn;\n}\n","/**\nThe data structure for documents. @nonabstract\n*/\nclass Text {\n /**\n Get the line description around the given position.\n */\n lineAt(pos) {\n if (pos < 0 || pos > this.length)\n throw new RangeError(`Invalid position ${pos} in document of length ${this.length}`);\n return this.lineInner(pos, false, 1, 0);\n }\n /**\n Get the description for the given (1-based) line number.\n */\n line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }\n /**\n Replace a range of the text with the given content.\n */\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(0, from, parts, 2 /* Open.To */);\n if (text.length)\n text.decompose(0, text.length, parts, 1 /* Open.From */ | 2 /* Open.To */);\n this.decompose(to, this.length, parts, 1 /* Open.From */);\n return TextNode.from(parts, this.length - (to - from) + text.length);\n }\n /**\n Append another document to this one.\n */\n append(other) {\n return this.replace(this.length, this.length, other);\n }\n /**\n Retrieve the text between the given points.\n */\n slice(from, to = this.length) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(from, to, parts, 0);\n return TextNode.from(parts, to - from);\n }\n /**\n Test whether this text is equal to another instance.\n */\n eq(other) {\n if (other == this)\n return true;\n if (other.length != this.length || other.lines != this.lines)\n return false;\n let start = this.scanIdentical(other, 1), end = this.length - this.scanIdentical(other, -1);\n let a = new RawTextCursor(this), b = new RawTextCursor(other);\n for (let skip = start, pos = start;;) {\n a.next(skip);\n b.next(skip);\n skip = 0;\n if (a.lineBreak != b.lineBreak || a.done != b.done || a.value != b.value)\n return false;\n pos += a.value.length;\n if (a.done || pos >= end)\n return true;\n }\n }\n /**\n Iterate over the text. When `dir` is `-1`, iteration happens\n from end to start. This will return lines and the breaks between\n them as separate strings.\n */\n iter(dir = 1) { return new RawTextCursor(this, dir); }\n /**\n Iterate over a range of the text. When `from` > `to`, the\n iterator will run in reverse.\n */\n iterRange(from, to = this.length) { return new PartialTextCursor(this, from, to); }\n /**\n Return a cursor that iterates over the given range of lines,\n _without_ returning the line breaks between, and yielding empty\n strings for empty lines.\n \n When `from` and `to` are given, they should be 1-based line numbers.\n */\n iterLines(from, to) {\n let inner;\n if (from == null) {\n inner = this.iter();\n }\n else {\n if (to == null)\n to = this.lines + 1;\n let start = this.line(from).from;\n inner = this.iterRange(start, Math.max(start, to == this.lines + 1 ? this.length : to <= 1 ? 0 : this.line(to - 1).to));\n }\n return new LineCursor(inner);\n }\n /**\n Return the document as a string, using newline characters to\n separate lines.\n */\n toString() { return this.sliceString(0); }\n /**\n Convert the document to an array of lines (which can be\n deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).\n */\n toJSON() {\n let lines = [];\n this.flatten(lines);\n return lines;\n }\n /**\n @internal\n */\n constructor() { }\n /**\n Create a `Text` instance for the given array of lines.\n */\n static of(text) {\n if (text.length == 0)\n throw new RangeError(\"A document must have at least one line\");\n if (text.length == 1 && !text[0])\n return Text.empty;\n return text.length <= 32 /* Tree.Branch */ ? new TextLeaf(text) : TextNode.from(TextLeaf.split(text, []));\n }\n}\n// Leaves store an array of line strings. There are always line breaks\n// between these strings. Leaves are limited in size and have to be\n// contained in TextNode instances for bigger documents.\nclass TextLeaf extends Text {\n constructor(text, length = textLength(text)) {\n super();\n this.text = text;\n this.length = length;\n }\n get lines() { return this.text.length; }\n get children() { return null; }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let string = this.text[i], end = offset + string.length;\n if ((isLine ? line : end) >= target)\n return new Line(offset, end, line, string);\n offset = end + 1;\n line++;\n }\n }\n decompose(from, to, target, open) {\n let text = from <= 0 && to >= this.length ? this\n : new TextLeaf(sliceText(this.text, from, to), Math.min(to, this.length) - Math.max(0, from));\n if (open & 1 /* Open.From */) {\n let prev = target.pop();\n let joined = appendText(text.text, prev.text.slice(), 0, text.length);\n if (joined.length <= 32 /* Tree.Branch */) {\n target.push(new TextLeaf(joined, prev.length + text.length));\n }\n else {\n let mid = joined.length >> 1;\n target.push(new TextLeaf(joined.slice(0, mid)), new TextLeaf(joined.slice(mid)));\n }\n }\n else {\n target.push(text);\n }\n }\n replace(from, to, text) {\n if (!(text instanceof TextLeaf))\n return super.replace(from, to, text);\n [from, to] = clip(this, from, to);\n let lines = appendText(this.text, appendText(text.text, sliceText(this.text, 0, from)), to);\n let newLen = this.length + text.length - (to - from);\n if (lines.length <= 32 /* Tree.Branch */)\n return new TextLeaf(lines, newLen);\n return TextNode.from(TextLeaf.split(lines, []), newLen);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {\n let line = this.text[i], end = pos + line.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += line.slice(Math.max(0, from - pos), to - pos);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let line of this.text)\n target.push(line);\n }\n scanIdentical() { return 0; }\n static split(text, target) {\n let part = [], len = -1;\n for (let line of text) {\n part.push(line);\n len += line.length + 1;\n if (part.length == 32 /* Tree.Branch */) {\n target.push(new TextLeaf(part, len));\n part = [];\n len = -1;\n }\n }\n if (len > -1)\n target.push(new TextLeaf(part, len));\n return target;\n }\n}\n// Nodes provide the tree structure of the `Text` type. They store a\n// number of other nodes or leaves, taking care to balance themselves\n// on changes. There are implied line breaks _between_ the children of\n// a node (but not before the first or after the last child).\nclass TextNode extends Text {\n constructor(children, length) {\n super();\n this.children = children;\n this.length = length;\n this.lines = 0;\n for (let child of children)\n this.lines += child.lines;\n }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let child = this.children[i], end = offset + child.length, endLine = line + child.lines - 1;\n if ((isLine ? endLine : end) >= target)\n return child.lineInner(target, isLine, line, offset);\n offset = end + 1;\n line = endLine + 1;\n }\n }\n decompose(from, to, target, open) {\n for (let i = 0, pos = 0; pos <= to && i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n if (from <= end && to >= pos) {\n let childOpen = open & ((pos <= from ? 1 /* Open.From */ : 0) | (end >= to ? 2 /* Open.To */ : 0));\n if (pos >= from && end <= to && !childOpen)\n target.push(child);\n else\n child.decompose(from - pos, to - pos, target, childOpen);\n }\n pos = end + 1;\n }\n }\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n if (text.lines < this.lines)\n for (let i = 0, pos = 0; i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n // Fast path: if the change only affects one child and the\n // child's size remains in the acceptable range, only update\n // that child\n if (from >= pos && to <= end) {\n let updated = child.replace(from - pos, to - pos, text);\n let totalLines = this.lines - child.lines + updated.lines;\n if (updated.lines < (totalLines >> (5 /* Tree.BranchShift */ - 1)) &&\n updated.lines > (totalLines >> (5 /* Tree.BranchShift */ + 1))) {\n let copy = this.children.slice();\n copy[i] = updated;\n return new TextNode(copy, this.length - (to - from) + text.length);\n }\n return super.replace(pos, end, updated);\n }\n pos = end + 1;\n }\n return super.replace(from, to, text);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {\n let child = this.children[i], end = pos + child.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += child.sliceString(from - pos, to - pos, lineSep);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let child of this.children)\n child.flatten(target);\n }\n scanIdentical(other, dir) {\n if (!(other instanceof TextNode))\n return 0;\n let length = 0;\n let [iA, iB, eA, eB] = dir > 0 ? [0, 0, this.children.length, other.children.length]\n : [this.children.length - 1, other.children.length - 1, -1, -1];\n for (;; iA += dir, iB += dir) {\n if (iA == eA || iB == eB)\n return length;\n let chA = this.children[iA], chB = other.children[iB];\n if (chA != chB)\n return length + chA.scanIdentical(chB, dir);\n length += chA.length + 1;\n }\n }\n static from(children, length = children.reduce((l, ch) => l + ch.length + 1, -1)) {\n let lines = 0;\n for (let ch of children)\n lines += ch.lines;\n if (lines < 32 /* Tree.Branch */) {\n let flat = [];\n for (let ch of children)\n ch.flatten(flat);\n return new TextLeaf(flat, length);\n }\n let chunk = Math.max(32 /* Tree.Branch */, lines >> 5 /* Tree.BranchShift */), maxChunk = chunk << 1, minChunk = chunk >> 1;\n let chunked = [], currentLines = 0, currentLen = -1, currentChunk = [];\n function add(child) {\n let last;\n if (child.lines > maxChunk && child instanceof TextNode) {\n for (let node of child.children)\n add(node);\n }\n else if (child.lines > minChunk && (currentLines > minChunk || !currentLines)) {\n flush();\n chunked.push(child);\n }\n else if (child instanceof TextLeaf && currentLines &&\n (last = currentChunk[currentChunk.length - 1]) instanceof TextLeaf &&\n child.lines + last.lines <= 32 /* Tree.Branch */) {\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk[currentChunk.length - 1] = new TextLeaf(last.text.concat(child.text), last.length + 1 + child.length);\n }\n else {\n if (currentLines + child.lines > chunk)\n flush();\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk.push(child);\n }\n }\n function flush() {\n if (currentLines == 0)\n return;\n chunked.push(currentChunk.length == 1 ? currentChunk[0] : TextNode.from(currentChunk, currentLen));\n currentLen = -1;\n currentLines = currentChunk.length = 0;\n }\n for (let child of children)\n add(child);\n flush();\n return chunked.length == 1 ? chunked[0] : new TextNode(chunked, length);\n }\n}\nText.empty = /*@__PURE__*/new TextLeaf([\"\"], 0);\nfunction textLength(text) {\n let length = -1;\n for (let line of text)\n length += line.length + 1;\n return length;\n}\nfunction appendText(text, target, from = 0, to = 1e9) {\n for (let pos = 0, i = 0, first = true; i < text.length && pos <= to; i++) {\n let line = text[i], end = pos + line.length;\n if (end >= from) {\n if (end > to)\n line = line.slice(0, to - pos);\n if (pos < from)\n line = line.slice(from - pos);\n if (first) {\n target[target.length - 1] += line;\n first = false;\n }\n else\n target.push(line);\n }\n pos = end + 1;\n }\n return target;\n}\nfunction sliceText(text, from, to) {\n return appendText(text, [\"\"], from, to);\n}\nclass RawTextCursor {\n constructor(text, dir = 1) {\n this.dir = dir;\n this.done = false;\n this.lineBreak = false;\n this.value = \"\";\n this.nodes = [text];\n this.offsets = [dir > 0 ? 1 : (text instanceof TextLeaf ? text.text.length : text.children.length) << 1];\n }\n nextInner(skip, dir) {\n this.done = this.lineBreak = false;\n for (;;) {\n let last = this.nodes.length - 1;\n let top = this.nodes[last], offsetValue = this.offsets[last], offset = offsetValue >> 1;\n let size = top instanceof TextLeaf ? top.text.length : top.children.length;\n if (offset == (dir > 0 ? size : 0)) {\n if (last == 0) {\n this.done = true;\n this.value = \"\";\n return this;\n }\n if (dir > 0)\n this.offsets[last - 1]++;\n this.nodes.pop();\n this.offsets.pop();\n }\n else if ((offsetValue & 1) == (dir > 0 ? 0 : 1)) {\n this.offsets[last] += dir;\n if (skip == 0) {\n this.lineBreak = true;\n this.value = \"\\n\";\n return this;\n }\n skip--;\n }\n else if (top instanceof TextLeaf) {\n // Move to the next string\n let next = top.text[offset + (dir < 0 ? -1 : 0)];\n this.offsets[last] += dir;\n if (next.length > Math.max(0, skip)) {\n this.value = skip == 0 ? next : dir > 0 ? next.slice(skip) : next.slice(0, next.length - skip);\n return this;\n }\n skip -= next.length;\n }\n else {\n let next = top.children[offset + (dir < 0 ? -1 : 0)];\n if (skip > next.length) {\n skip -= next.length;\n this.offsets[last] += dir;\n }\n else {\n if (dir < 0)\n this.offsets[last]--;\n this.nodes.push(next);\n this.offsets.push(dir > 0 ? 1 : (next instanceof TextLeaf ? next.text.length : next.children.length) << 1);\n }\n }\n }\n }\n next(skip = 0) {\n if (skip < 0) {\n this.nextInner(-skip, (-this.dir));\n skip = this.value.length;\n }\n return this.nextInner(skip, this.dir);\n }\n}\nclass PartialTextCursor {\n constructor(text, start, end) {\n this.value = \"\";\n this.done = false;\n this.cursor = new RawTextCursor(text, start > end ? -1 : 1);\n this.pos = start > end ? text.length : 0;\n this.from = Math.min(start, end);\n this.to = Math.max(start, end);\n }\n nextInner(skip, dir) {\n if (dir < 0 ? this.pos <= this.from : this.pos >= this.to) {\n this.value = \"\";\n this.done = true;\n return this;\n }\n skip += Math.max(0, dir < 0 ? this.pos - this.to : this.from - this.pos);\n let limit = dir < 0 ? this.pos - this.from : this.to - this.pos;\n if (skip > limit)\n skip = limit;\n limit -= skip;\n let { value } = this.cursor.next(skip);\n this.pos += (value.length + skip) * dir;\n this.value = value.length <= limit ? value : dir < 0 ? value.slice(value.length - limit) : value.slice(0, limit);\n this.done = !this.value;\n return this;\n }\n next(skip = 0) {\n if (skip < 0)\n skip = Math.max(skip, this.from - this.pos);\n else if (skip > 0)\n skip = Math.min(skip, this.to - this.pos);\n return this.nextInner(skip, this.cursor.dir);\n }\n get lineBreak() { return this.cursor.lineBreak && this.value != \"\"; }\n}\nclass LineCursor {\n constructor(inner) {\n this.inner = inner;\n this.afterBreak = true;\n this.value = \"\";\n this.done = false;\n }\n next(skip = 0) {\n let { done, lineBreak, value } = this.inner.next(skip);\n if (done && this.afterBreak) {\n this.value = \"\";\n this.afterBreak = false;\n }\n else if (done) {\n this.done = true;\n this.value = \"\";\n }\n else if (lineBreak) {\n if (this.afterBreak) {\n this.value = \"\";\n }\n else {\n this.afterBreak = true;\n this.next();\n }\n }\n else {\n this.value = value;\n this.afterBreak = false;\n }\n return this;\n }\n get lineBreak() { return false; }\n}\nif (typeof Symbol != \"undefined\") {\n Text.prototype[Symbol.iterator] = function () { return this.iter(); };\n RawTextCursor.prototype[Symbol.iterator] = PartialTextCursor.prototype[Symbol.iterator] =\n LineCursor.prototype[Symbol.iterator] = function () { return this; };\n}\n/**\nThis type describes a line in the document. It is created\non-demand when lines are [queried](https://codemirror.net/6/docs/ref/#state.Text.lineAt).\n*/\nclass Line {\n /**\n @internal\n */\n constructor(\n /**\n The position of the start of the line.\n */\n from, \n /**\n The position at the end of the line (_before_ the line break,\n or at the end of document for the last line).\n */\n to, \n /**\n This line's line number (1-based).\n */\n number, \n /**\n The line's content.\n */\n text) {\n this.from = from;\n this.to = to;\n this.number = number;\n this.text = text;\n }\n /**\n The length of the line (not including any line break after it).\n */\n get length() { return this.to - this.from; }\n}\nfunction clip(text, from, to) {\n from = Math.max(0, Math.min(text.length, from));\n return [from, Math.max(from, Math.min(text.length, to))];\n}\n\n// Compressed representation of the Grapheme_Cluster_Break=Extend\n// information from\n// http://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n// Each pair of elements represents a range, as an offet from the\n// previous range and a length. Numbers are in base-36, with the empty\n// string being a shorthand for 1.\nlet extend = /*@__PURE__*/\"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1);\n// Convert offsets into absolute values\nfor (let i = 1; i < extend.length; i++)\n extend[i] += extend[i - 1];\nfunction isExtendingChar(code) {\n for (let i = 1; i < extend.length; i += 2)\n if (extend[i] > code)\n return extend[i - 1] <= code;\n return false;\n}\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF;\n}\nconst ZWJ = 0x200d;\n/**\nReturns a next grapheme cluster break _after_ (not equal to)\n`pos`, if `forward` is true, or before otherwise. Returns `pos`\nitself if no further cluster break is available in the string.\nMoves across surrogate pairs, extending characters (when\n`includeExtending` is true), characters joined with zero-width\njoiners, and flag emoji.\n*/\nfunction findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending);\n}\nfunction nextClusterBreak(str, pos, includeExtending) {\n if (pos == str.length)\n return pos;\n // If pos is in the middle of a surrogate pair, move to its start\n if (pos && surrogateLow(str.charCodeAt(pos)) && surrogateHigh(str.charCodeAt(pos - 1)))\n pos--;\n let prev = codePointAt(str, pos);\n pos += codePointSize(prev);\n while (pos < str.length) {\n let next = codePointAt(str, pos);\n if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) {\n pos += codePointSize(next);\n prev = next;\n }\n else if (isRegionalIndicator(next)) {\n let countBefore = 0, i = pos - 2;\n while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) {\n countBefore++;\n i -= 2;\n }\n if (countBefore % 2 == 0)\n break;\n else\n pos += 2;\n }\n else {\n break;\n }\n }\n return pos;\n}\nfunction prevClusterBreak(str, pos, includeExtending) {\n while (pos > 0) {\n let found = nextClusterBreak(str, pos - 2, includeExtending);\n if (found < pos)\n return found;\n pos--;\n }\n return 0;\n}\nfunction surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000; }\nfunction surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00; }\n/**\nFind the code point at the given position in a string (like the\n[`codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)\nstring method).\n*/\nfunction codePointAt(str, pos) {\n let code0 = str.charCodeAt(pos);\n if (!surrogateHigh(code0) || pos + 1 == str.length)\n return code0;\n let code1 = str.charCodeAt(pos + 1);\n if (!surrogateLow(code1))\n return code0;\n return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000;\n}\n/**\nGiven a Unicode codepoint, return the JavaScript string that\nrespresents it (like\n[`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)).\n*/\nfunction fromCodePoint(code) {\n if (code <= 0xffff)\n return String.fromCharCode(code);\n code -= 0x10000;\n return String.fromCharCode((code >> 10) + 0xd800, (code & 1023) + 0xdc00);\n}\n/**\nThe amount of positions a character takes up a JavaScript string.\n*/\nfunction codePointSize(code) { return code < 0x10000 ? 1 : 2; }\n\nconst DefaultSplit = /\\r\\n?|\\n/;\n/**\nDistinguishes different ways in which positions can be mapped.\n*/\nvar MapMode = /*@__PURE__*/(function (MapMode) {\n /**\n Map a position to a valid new position, even when its context\n was deleted.\n */\n MapMode[MapMode[\"Simple\"] = 0] = \"Simple\";\n /**\n Return null if deletion happens across the position.\n */\n MapMode[MapMode[\"TrackDel\"] = 1] = \"TrackDel\";\n /**\n Return null if the character _before_ the position is deleted.\n */\n MapMode[MapMode[\"TrackBefore\"] = 2] = \"TrackBefore\";\n /**\n Return null if the character _after_ the position is deleted.\n */\n MapMode[MapMode[\"TrackAfter\"] = 3] = \"TrackAfter\";\nreturn MapMode})(MapMode || (MapMode = {}));\n/**\nA change description is a variant of [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet)\nthat doesn't store the inserted text. As such, it can't be\napplied, but is cheaper to store and manipulate.\n*/\nclass ChangeDesc {\n // Sections are encoded as pairs of integers. The first is the\n // length in the current document, and the second is -1 for\n // unaffected sections, and the length of the replacement content\n // otherwise. So an insertion would be (0, n>0), a deletion (n>0,\n // 0), and a replacement two positive numbers.\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n sections) {\n this.sections = sections;\n }\n /**\n The length of the document before the change.\n */\n get length() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2)\n result += this.sections[i];\n return result;\n }\n /**\n The length of the document after the change.\n */\n get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n return result;\n }\n /**\n False when there are actual changes in this set.\n */\n get empty() { return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0; }\n /**\n Iterate over the unchanged parts left by these changes. `posA`\n provides the position of the range in the old document, `posB`\n the new position in the changed document.\n */\n iterGaps(f) {\n for (let i = 0, posA = 0, posB = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0) {\n f(posA, posB, len);\n posB += len;\n }\n else {\n posB += ins;\n }\n posA += len;\n }\n }\n /**\n Iterate over the ranges changed by these changes. (See\n [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a\n variant that also provides you with the inserted text.)\n `fromA`/`toA` provides the extent of the change in the starting\n document, `fromB`/`toB` the extent of the replacement in the\n changed document.\n \n When `individual` is true, adjacent changes (which are kept\n separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are\n reported separately.\n */\n iterChangedRanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a description of the inverted form of these changes.\n */\n get invertedDesc() {\n let sections = [];\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0)\n sections.push(len, ins);\n else\n sections.push(ins, len);\n }\n return new ChangeDesc(sections);\n }\n /**\n Compute the combined effect of applying another set of changes\n after this one. The length of the document after this set should\n match the length before `other`.\n */\n composeDesc(other) { return this.empty ? other : other.empty ? this : composeSets(this, other); }\n /**\n Map this description, which should start with the same document\n as `other`, over another set of changes, so that it can be\n applied after it. When `before` is true, map as if the changes\n in `other` happened before the ones in `this`.\n */\n mapDesc(other, before = false) { return other.empty ? this : mapSet(this, other, before); }\n mapPos(pos, assoc = -1, mode = MapMode.Simple) {\n let posA = 0, posB = 0;\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++], endA = posA + len;\n if (ins < 0) {\n if (endA > pos)\n return posB + (pos - posA);\n posB += len;\n }\n else {\n if (mode != MapMode.Simple && endA >= pos &&\n (mode == MapMode.TrackDel && posA < pos && endA > pos ||\n mode == MapMode.TrackBefore && posA < pos ||\n mode == MapMode.TrackAfter && endA > pos))\n return null;\n if (endA > pos || endA == pos && assoc < 0 && !len)\n return pos == posA || assoc < 0 ? posB : posB + ins;\n posB += ins;\n }\n posA = endA;\n }\n if (pos > posA)\n throw new RangeError(`Position ${pos} is out of range for changeset of length ${posA}`);\n return posB;\n }\n /**\n Check whether these changes touch a given range. When one of the\n changes entirely covers the range, the string `\"cover\"` is\n returned.\n */\n touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to;) {\n let len = this.sections[i++], ins = this.sections[i++], end = pos + len;\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? \"cover\" : true;\n pos = end;\n }\n return false;\n }\n /**\n @internal\n */\n toString() {\n let result = \"\";\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n result += (result ? \" \" : \"\") + len + (ins >= 0 ? \":\" + ins : \"\");\n }\n return result;\n }\n /**\n Serialize this change desc to a JSON-representable value.\n */\n toJSON() { return this.sections; }\n /**\n Create a change desc from its JSON representation (as produced\n by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json) || json.length % 2 || json.some(a => typeof a != \"number\"))\n throw new RangeError(\"Invalid JSON representation of ChangeDesc\");\n return new ChangeDesc(json);\n }\n /**\n @internal\n */\n static create(sections) { return new ChangeDesc(sections); }\n}\n/**\nA change set represents a group of modifications to a document. It\nstores the document length, and can only be applied to documents\nwith exactly that length.\n*/\nclass ChangeSet extends ChangeDesc {\n constructor(sections, \n /**\n @internal\n */\n inserted) {\n super(sections);\n this.inserted = inserted;\n }\n /**\n Apply the changes to a document, returning the modified\n document.\n */\n apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }\n mapDesc(other, before = false) { return mapSet(this, other, before, true); }\n /**\n Given the document as it existed _before_ the changes, return a\n change set that represents the inverse of this set, which could\n be used to go from the document created by the changes back to\n the document as it existed before the changes.\n */\n invert(doc) {\n let sections = this.sections.slice(), inserted = [];\n for (let i = 0, pos = 0; i < sections.length; i += 2) {\n let len = sections[i], ins = sections[i + 1];\n if (ins >= 0) {\n sections[i] = ins;\n sections[i + 1] = len;\n let index = i >> 1;\n while (inserted.length < index)\n inserted.push(Text.empty);\n inserted.push(len ? doc.slice(pos, pos + len) : Text.empty);\n }\n pos += len;\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n Combine two subsequent change sets into a single set. `other`\n must start in the document produced by `this`. If `this` goes\n `docA` → `docB` and `other` represents `docB` → `docC`, the\n returned value will represent the change `docA` → `docC`.\n */\n compose(other) { return this.empty ? other : other.empty ? this : composeSets(this, other, true); }\n /**\n Given another change set starting in the same document, maps this\n change set over the other, producing a new change set that can be\n applied to the document produced by applying `other`. When\n `before` is `true`, order changes as if `this` comes before\n `other`, otherwise (the default) treat `other` as coming first.\n \n Given two changes `A` and `B`, `A.compose(B.map(A))` and\n `B.compose(A.map(B, true))` will produce the same document. This\n provides a basic form of [operational\n transformation](https://en.wikipedia.org/wiki/Operational_transformation),\n and can be used for collaborative editing.\n */\n map(other, before = false) { return other.empty ? this : mapSet(this, other, before, true); }\n /**\n Iterate over the changed ranges in the document, calling `f` for\n each, with the range in the original document (`fromA`-`toA`)\n and the range that replaces it in the new document\n (`fromB`-`toB`).\n \n When `individual` is true, adjacent changes are reported\n separately.\n */\n iterChanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change\n set.\n */\n get desc() { return ChangeDesc.create(this.sections); }\n /**\n @internal\n */\n filter(ranges) {\n let resultSections = [], resultInserted = [], filteredSections = [];\n let iter = new SectionIter(this);\n done: for (let i = 0, pos = 0;;) {\n let next = i == ranges.length ? 1e9 : ranges[i++];\n while (pos < next || pos == next && iter.len == 0) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, next - pos);\n addSection(filteredSections, len, -1);\n let ins = iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0;\n addSection(resultSections, len, ins);\n if (ins > 0)\n addInsert(resultInserted, resultSections, iter.text);\n iter.forward(len);\n pos += len;\n }\n let end = ranges[i++];\n while (pos < end) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, end - pos);\n addSection(resultSections, len, -1);\n addSection(filteredSections, len, iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0);\n iter.forward(len);\n pos += len;\n }\n }\n return { changes: new ChangeSet(resultSections, resultInserted),\n filtered: ChangeDesc.create(filteredSections) };\n }\n /**\n Serialize this change set to a JSON-representable value.\n */\n toJSON() {\n let parts = [];\n for (let i = 0; i < this.sections.length; i += 2) {\n let len = this.sections[i], ins = this.sections[i + 1];\n if (ins < 0)\n parts.push(len);\n else if (ins == 0)\n parts.push([len]);\n else\n parts.push([len].concat(this.inserted[i >> 1].toJSON()));\n }\n return parts;\n }\n /**\n Create a change set for the given changes, for a document of the\n given length, using `lineSep` as line separator.\n */\n static of(changes, length, lineSep) {\n let sections = [], inserted = [], pos = 0;\n let total = null;\n function flush(force = false) {\n if (!force && !sections.length)\n return;\n if (pos < length)\n addSection(sections, length - pos, -1);\n let set = new ChangeSet(sections, inserted);\n total = total ? total.compose(set.map(total)) : set;\n sections = [];\n inserted = [];\n pos = 0;\n }\n function process(spec) {\n if (Array.isArray(spec)) {\n for (let sub of spec)\n process(sub);\n }\n else if (spec instanceof ChangeSet) {\n if (spec.length != length)\n throw new RangeError(`Mismatched change set length (got ${spec.length}, expected ${length})`);\n flush();\n total = total ? total.compose(spec.map(total)) : spec;\n }\n else {\n let { from, to = from, insert } = spec;\n if (from > to || from < 0 || to > length)\n throw new RangeError(`Invalid change range ${from} to ${to} (in doc of length ${length})`);\n let insText = !insert ? Text.empty : typeof insert == \"string\" ? Text.of(insert.split(lineSep || DefaultSplit)) : insert;\n let insLen = insText.length;\n if (from == to && insLen == 0)\n return;\n if (from < pos)\n flush();\n if (from > pos)\n addSection(sections, from - pos, -1);\n addSection(sections, to - from, insLen);\n addInsert(inserted, sections, insText);\n pos = to;\n }\n }\n process(changes);\n flush(!total);\n return total;\n }\n /**\n Create an empty changeset of the given length.\n */\n static empty(length) {\n return new ChangeSet(length ? [length, -1] : [], []);\n }\n /**\n Create a changeset from its JSON representation (as produced by\n [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json))\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n let sections = [], inserted = [];\n for (let i = 0; i < json.length; i++) {\n let part = json[i];\n if (typeof part == \"number\") {\n sections.push(part, -1);\n }\n else if (!Array.isArray(part) || typeof part[0] != \"number\" || part.some((e, i) => i && typeof e != \"string\")) {\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n }\n else if (part.length == 1) {\n sections.push(part[0], 0);\n }\n else {\n while (inserted.length < i)\n inserted.push(Text.empty);\n inserted[i] = Text.of(part.slice(1));\n sections.push(part[0], inserted[i].length);\n }\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n @internal\n */\n static createSet(sections, inserted) {\n return new ChangeSet(sections, inserted);\n }\n}\nfunction addSection(sections, len, ins, forceJoin = false) {\n if (len == 0 && ins <= 0)\n return;\n let last = sections.length - 2;\n if (last >= 0 && ins <= 0 && ins == sections[last + 1])\n sections[last] += len;\n else if (len == 0 && sections[last] == 0)\n sections[last + 1] += ins;\n else if (forceJoin) {\n sections[last] += len;\n sections[last + 1] += ins;\n }\n else\n sections.push(len, ins);\n}\nfunction addInsert(values, sections, value) {\n if (value.length == 0)\n return;\n let index = (sections.length - 2) >> 1;\n if (index < values.length) {\n values[values.length - 1] = values[values.length - 1].append(value);\n }\n else {\n while (values.length < index)\n values.push(Text.empty);\n values.push(value);\n }\n}\nfunction iterChanges(desc, f, individual) {\n let inserted = desc.inserted;\n for (let posA = 0, posB = 0, i = 0; i < desc.sections.length;) {\n let len = desc.sections[i++], ins = desc.sections[i++];\n if (ins < 0) {\n posA += len;\n posB += len;\n }\n else {\n let endA = posA, endB = posB, text = Text.empty;\n for (;;) {\n endA += len;\n endB += ins;\n if (ins && inserted)\n text = text.append(inserted[(i - 2) >> 1]);\n if (individual || i == desc.sections.length || desc.sections[i + 1] < 0)\n break;\n len = desc.sections[i++];\n ins = desc.sections[i++];\n }\n f(posA, endA, posB, endB, text);\n posA = endA;\n posB = endB;\n }\n }\n}\nfunction mapSet(setA, setB, before, mkSet = false) {\n // Produce a copy of setA that applies to the document after setB\n // has been applied (assuming both start at the same document).\n let sections = [], insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n // Iterate over both sets in parallel. inserted tracks, for changes\n // in A that have to be processed piece-by-piece, whether their\n // content has been inserted already, and refers to the section\n // index.\n for (let inserted = -1;;) {\n if (a.ins == -1 && b.ins == -1) {\n // Move across ranges skipped by both sets.\n let len = Math.min(a.len, b.len);\n addSection(sections, len, -1);\n a.forward(len);\n b.forward(len);\n }\n else if (b.ins >= 0 && (a.ins < 0 || inserted == a.i || a.off == 0 && (b.len < a.len || b.len == a.len && !before))) {\n // If there's a change in B that comes before the next change in\n // A (ordered by start pos, then len, then before flag), skip\n // that (and process any changes in A it covers).\n let len = b.len;\n addSection(sections, b.ins, -1);\n while (len) {\n let piece = Math.min(a.len, len);\n if (a.ins >= 0 && inserted < a.i && a.len <= piece) {\n addSection(sections, 0, a.ins);\n if (insert)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n }\n a.forward(piece);\n len -= piece;\n }\n b.next();\n }\n else if (a.ins >= 0) {\n // Process the part of a change in A up to the start of the next\n // non-deletion change in B (if overlapping).\n let len = 0, left = a.len;\n while (left) {\n if (b.ins == -1) {\n let piece = Math.min(left, b.len);\n len += piece;\n left -= piece;\n b.forward(piece);\n }\n else if (b.ins == 0 && b.len < left) {\n left -= b.len;\n b.next();\n }\n else {\n break;\n }\n }\n addSection(sections, len, inserted < a.i ? a.ins : 0);\n if (insert && inserted < a.i)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n a.forward(a.len - left);\n }\n else if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else {\n throw new Error(\"Mismatched change set lengths\");\n }\n }\n}\nfunction composeSets(setA, setB, mkSet = false) {\n let sections = [];\n let insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n for (let open = false;;) {\n if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else if (a.ins == 0) { // Deletion in A\n addSection(sections, a.len, 0, open);\n a.next();\n }\n else if (b.len == 0 && !b.done) { // Insertion in B\n addSection(sections, 0, b.ins, open);\n if (insert)\n addInsert(insert, sections, b.text);\n b.next();\n }\n else if (a.done || b.done) {\n throw new Error(\"Mismatched change set lengths\");\n }\n else {\n let len = Math.min(a.len2, b.len), sectionLen = sections.length;\n if (a.ins == -1) {\n let insB = b.ins == -1 ? -1 : b.off ? 0 : b.ins;\n addSection(sections, len, insB, open);\n if (insert && insB)\n addInsert(insert, sections, b.text);\n }\n else if (b.ins == -1) {\n addSection(sections, a.off ? 0 : a.len, len, open);\n if (insert)\n addInsert(insert, sections, a.textBit(len));\n }\n else {\n addSection(sections, a.off ? 0 : a.len, b.off ? 0 : b.ins, open);\n if (insert && !b.off)\n addInsert(insert, sections, b.text);\n }\n open = (a.ins > len || b.ins >= 0 && b.len > len) && (open || sections.length > sectionLen);\n a.forward2(len);\n b.forward(len);\n }\n }\n}\nclass SectionIter {\n constructor(set) {\n this.set = set;\n this.i = 0;\n this.next();\n }\n next() {\n let { sections } = this.set;\n if (this.i < sections.length) {\n this.len = sections[this.i++];\n this.ins = sections[this.i++];\n }\n else {\n this.len = 0;\n this.ins = -2;\n }\n this.off = 0;\n }\n get done() { return this.ins == -2; }\n get len2() { return this.ins < 0 ? this.len : this.ins; }\n get text() {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length ? Text.empty : inserted[index];\n }\n textBit(len) {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length && !len ? Text.empty\n : inserted[index].slice(this.off, len == null ? undefined : this.off + len);\n }\n forward(len) {\n if (len == this.len)\n this.next();\n else {\n this.len -= len;\n this.off += len;\n }\n }\n forward2(len) {\n if (this.ins == -1)\n this.forward(len);\n else if (len == this.ins)\n this.next();\n else {\n this.ins -= len;\n this.off += len;\n }\n }\n}\n\n/**\nA single selection range. When\n[`allowMultipleSelections`](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)\nis enabled, a [selection](https://codemirror.net/6/docs/ref/#state.EditorSelection) may hold\nmultiple ranges. By default, selections hold exactly one range.\n*/\nclass SelectionRange {\n constructor(\n /**\n The lower boundary of the range.\n */\n from, \n /**\n The upper boundary of the range.\n */\n to, flags) {\n this.from = from;\n this.to = to;\n this.flags = flags;\n }\n /**\n The anchor of the range—the side that doesn't move when you\n extend it.\n */\n get anchor() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.to : this.from; }\n /**\n The head of the range, which is moved when the range is\n [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).\n */\n get head() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.from : this.to; }\n /**\n True when `anchor` and `head` are at the same position.\n */\n get empty() { return this.from == this.to; }\n /**\n If this is a cursor that is explicitly associated with the\n character on one of its sides, this returns the side. -1 means\n the character before its position, 1 the character after, and 0\n means no association.\n */\n get assoc() { return this.flags & 8 /* RangeFlag.AssocBefore */ ? -1 : this.flags & 16 /* RangeFlag.AssocAfter */ ? 1 : 0; }\n /**\n The bidirectional text level associated with this cursor, if\n any.\n */\n get bidiLevel() {\n let level = this.flags & 7 /* RangeFlag.BidiLevelMask */;\n return level == 7 ? null : level;\n }\n /**\n The goal column (stored vertical offset) associated with a\n cursor. This is used to preserve the vertical position when\n [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across\n lines of different length.\n */\n get goalColumn() {\n let value = this.flags >> 6 /* RangeFlag.GoalColumnOffset */;\n return value == 16777215 /* RangeFlag.NoGoalColumn */ ? undefined : value;\n }\n /**\n Map this range through a change, producing a valid range in the\n updated document.\n */\n map(change, assoc = -1) {\n let from, to;\n if (this.empty) {\n from = to = change.mapPos(this.from, assoc);\n }\n else {\n from = change.mapPos(this.from, 1);\n to = change.mapPos(this.to, -1);\n }\n return from == this.from && to == this.to ? this : new SelectionRange(from, to, this.flags);\n }\n /**\n Extend this range to cover at least `from` to `to`.\n */\n extend(from, to = from) {\n if (from <= this.anchor && to >= this.anchor)\n return EditorSelection.range(from, to);\n let head = Math.abs(from - this.anchor) > Math.abs(to - this.anchor) ? from : to;\n return EditorSelection.range(this.anchor, head);\n }\n /**\n Compare this range to another range.\n */\n eq(other, includeAssoc = false) {\n return this.anchor == other.anchor && this.head == other.head &&\n (!includeAssoc || !this.empty || this.assoc == other.assoc);\n }\n /**\n Return a JSON-serializable object representing the range.\n */\n toJSON() { return { anchor: this.anchor, head: this.head }; }\n /**\n Convert a JSON representation of a range to a `SelectionRange`\n instance.\n */\n static fromJSON(json) {\n if (!json || typeof json.anchor != \"number\" || typeof json.head != \"number\")\n throw new RangeError(\"Invalid JSON representation for SelectionRange\");\n return EditorSelection.range(json.anchor, json.head);\n }\n /**\n @internal\n */\n static create(from, to, flags) {\n return new SelectionRange(from, to, flags);\n }\n}\n/**\nAn editor selection holds one or more selection ranges.\n*/\nclass EditorSelection {\n constructor(\n /**\n The ranges in the selection, sorted by position. Ranges cannot\n overlap (but they may touch, if they aren't empty).\n */\n ranges, \n /**\n The index of the _main_ range in the selection (which is\n usually the range that was added last).\n */\n mainIndex) {\n this.ranges = ranges;\n this.mainIndex = mainIndex;\n }\n /**\n Map a selection through a change. Used to adjust the selection\n position for changes.\n */\n map(change, assoc = -1) {\n if (change.empty)\n return this;\n return EditorSelection.create(this.ranges.map(r => r.map(change, assoc)), this.mainIndex);\n }\n /**\n Compare this selection to another selection. By default, ranges\n are compared only by position. When `includeAssoc` is true,\n cursor ranges must also have the same\n [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.\n */\n eq(other, includeAssoc = false) {\n if (this.ranges.length != other.ranges.length ||\n this.mainIndex != other.mainIndex)\n return false;\n for (let i = 0; i < this.ranges.length; i++)\n if (!this.ranges[i].eq(other.ranges[i], includeAssoc))\n return false;\n return true;\n }\n /**\n Get the primary selection range. Usually, you should make sure\n your code applies to _all_ ranges, by using methods like\n [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).\n */\n get main() { return this.ranges[this.mainIndex]; }\n /**\n Make sure the selection only has one range. Returns a selection\n holding only the main range from this selection.\n */\n asSingle() {\n return this.ranges.length == 1 ? this : new EditorSelection([this.main], 0);\n }\n /**\n Extend this selection with an extra range.\n */\n addRange(range, main = true) {\n return EditorSelection.create([range].concat(this.ranges), main ? 0 : this.mainIndex + 1);\n }\n /**\n Replace a given range with another range, and then normalize the\n selection to merge and sort ranges if necessary.\n */\n replaceRange(range, which = this.mainIndex) {\n let ranges = this.ranges.slice();\n ranges[which] = range;\n return EditorSelection.create(ranges, this.mainIndex);\n }\n /**\n Convert this selection to an object that can be serialized to\n JSON.\n */\n toJSON() {\n return { ranges: this.ranges.map(r => r.toJSON()), main: this.mainIndex };\n }\n /**\n Create a selection from a JSON representation.\n */\n static fromJSON(json) {\n if (!json || !Array.isArray(json.ranges) || typeof json.main != \"number\" || json.main >= json.ranges.length)\n throw new RangeError(\"Invalid JSON representation for EditorSelection\");\n return new EditorSelection(json.ranges.map((r) => SelectionRange.fromJSON(r)), json.main);\n }\n /**\n Create a selection holding a single range.\n */\n static single(anchor, head = anchor) {\n return new EditorSelection([EditorSelection.range(anchor, head)], 0);\n }\n /**\n Sort and merge the given set of ranges, creating a valid\n selection.\n */\n static create(ranges, mainIndex = 0) {\n if (ranges.length == 0)\n throw new RangeError(\"A selection needs at least one range\");\n for (let pos = 0, i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n if (range.empty ? range.from <= pos : range.from < pos)\n return EditorSelection.normalized(ranges.slice(), mainIndex);\n pos = range.to;\n }\n return new EditorSelection(ranges, mainIndex);\n }\n /**\n Create a cursor selection range at the given position. You can\n safely ignore the optional arguments in most situations.\n */\n static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return SelectionRange.create(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 8 /* RangeFlag.AssocBefore */ : 16 /* RangeFlag.AssocAfter */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */));\n }\n /**\n Create a selection range.\n */\n static range(anchor, head, goalColumn, bidiLevel) {\n let flags = ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel));\n return head < anchor ? SelectionRange.create(head, anchor, 32 /* RangeFlag.Inverted */ | 16 /* RangeFlag.AssocAfter */ | flags)\n : SelectionRange.create(anchor, head, (head > anchor ? 8 /* RangeFlag.AssocBefore */ : 0) | flags);\n }\n /**\n @internal\n */\n static normalized(ranges, mainIndex = 0) {\n let main = ranges[mainIndex];\n ranges.sort((a, b) => a.from - b.from);\n mainIndex = ranges.indexOf(main);\n for (let i = 1; i < ranges.length; i++) {\n let range = ranges[i], prev = ranges[i - 1];\n if (range.empty ? range.from <= prev.to : range.from < prev.to) {\n let from = prev.from, to = Math.max(range.to, prev.to);\n if (i <= mainIndex)\n mainIndex--;\n ranges.splice(--i, 2, range.anchor > range.head ? EditorSelection.range(to, from) : EditorSelection.range(from, to));\n }\n }\n return new EditorSelection(ranges, mainIndex);\n }\n}\nfunction checkSelection(selection, docLength) {\n for (let range of selection.ranges)\n if (range.to > docLength)\n throw new RangeError(\"Selection points outside of document\");\n}\n\nlet nextID = 0;\n/**\nA facet is a labeled value that is associated with an editor\nstate. It takes inputs from any number of extensions, and combines\nthose into a single output value.\n\nExamples of uses of facets are the [tab\nsize](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize), [editor\nattributes](https://codemirror.net/6/docs/ref/#view.EditorView^editorAttributes), and [update\nlisteners](https://codemirror.net/6/docs/ref/#view.EditorView^updateListener).\n\nNote that `Facet` instances can be used anywhere where\n[`FacetReader`](https://codemirror.net/6/docs/ref/#state.FacetReader) is expected.\n*/\nclass Facet {\n constructor(\n /**\n @internal\n */\n combine, \n /**\n @internal\n */\n compareInput, \n /**\n @internal\n */\n compare, isStatic, enables) {\n this.combine = combine;\n this.compareInput = compareInput;\n this.compare = compare;\n this.isStatic = isStatic;\n /**\n @internal\n */\n this.id = nextID++;\n this.default = combine([]);\n this.extensions = typeof enables == \"function\" ? enables(this) : enables;\n }\n /**\n Returns a facet reader for this facet, which can be used to\n [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.\n */\n get reader() { return this; }\n /**\n Define a new facet.\n */\n static define(config = {}) {\n return new Facet(config.combine || ((a) => a), config.compareInput || ((a, b) => a === b), config.compare || (!config.combine ? sameArray : (a, b) => a === b), !!config.static, config.enables);\n }\n /**\n Returns an extension that adds the given value to this facet.\n */\n of(value) {\n return new FacetProvider([], this, 0 /* Provider.Static */, value);\n }\n /**\n Create an extension that computes a value for the facet from a\n state. You must take care to declare the parts of the state that\n this value depends on, since your function is only called again\n for a new state when one of those parts changed.\n \n In cases where your value depends only on a single field, you'll\n want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.\n */\n compute(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 1 /* Provider.Single */, get);\n }\n /**\n Create an extension that computes zero or more values for this\n facet from a state.\n */\n computeN(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 2 /* Provider.Multi */, get);\n }\n from(field, get) {\n if (!get)\n get = x => x;\n return this.compute([field], state => get(state.field(field)));\n }\n}\nfunction sameArray(a, b) {\n return a == b || a.length == b.length && a.every((e, i) => e === b[i]);\n}\nclass FacetProvider {\n constructor(dependencies, facet, type, value) {\n this.dependencies = dependencies;\n this.facet = facet;\n this.type = type;\n this.value = value;\n this.id = nextID++;\n }\n dynamicSlot(addresses) {\n var _a;\n let getter = this.value;\n let compare = this.facet.compareInput;\n let id = this.id, idx = addresses[id] >> 1, multi = this.type == 2 /* Provider.Multi */;\n let depDoc = false, depSel = false, depAddrs = [];\n for (let dep of this.dependencies) {\n if (dep == \"doc\")\n depDoc = true;\n else if (dep == \"selection\")\n depSel = true;\n else if ((((_a = addresses[dep.id]) !== null && _a !== void 0 ? _a : 1) & 1) == 0)\n depAddrs.push(addresses[dep.id]);\n }\n return {\n create(state) {\n state.values[idx] = getter(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if ((depDoc && tr.docChanged) || (depSel && (tr.docChanged || tr.selection)) || ensureAll(state, depAddrs)) {\n let newVal = getter(state);\n if (multi ? !compareArray(newVal, state.values[idx], compare) : !compare(newVal, state.values[idx])) {\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n }\n return 0;\n },\n reconfigure: (state, oldState) => {\n let newVal, oldAddr = oldState.config.address[id];\n if (oldAddr != null) {\n let oldVal = getAddr(oldState, oldAddr);\n if (this.dependencies.every(dep => {\n return dep instanceof Facet ? oldState.facet(dep) === state.facet(dep) :\n dep instanceof StateField ? oldState.field(dep, false) == state.field(dep, false) : true;\n }) || (multi ? compareArray(newVal = getter(state), oldVal, compare) : compare(newVal = getter(state), oldVal))) {\n state.values[idx] = oldVal;\n return 0;\n }\n }\n else {\n newVal = getter(state);\n }\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n}\nfunction compareArray(a, b, compare) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compare(a[i], b[i]))\n return false;\n return true;\n}\nfunction ensureAll(state, addrs) {\n let changed = false;\n for (let addr of addrs)\n if (ensureAddr(state, addr) & 1 /* SlotStatus.Changed */)\n changed = true;\n return changed;\n}\nfunction dynamicFacetSlot(addresses, facet, providers) {\n let providerAddrs = providers.map(p => addresses[p.id]);\n let providerTypes = providers.map(p => p.type);\n let dynamic = providerAddrs.filter(p => !(p & 1));\n let idx = addresses[facet.id] >> 1;\n function get(state) {\n let values = [];\n for (let i = 0; i < providerAddrs.length; i++) {\n let value = getAddr(state, providerAddrs[i]);\n if (providerTypes[i] == 2 /* Provider.Multi */)\n for (let val of value)\n values.push(val);\n else\n values.push(value);\n }\n return facet.combine(values);\n }\n return {\n create(state) {\n for (let addr of providerAddrs)\n ensureAddr(state, addr);\n state.values[idx] = get(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if (!ensureAll(state, dynamic))\n return 0;\n let value = get(state);\n if (facet.compare(value, state.values[idx]))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure(state, oldState) {\n let depChanged = ensureAll(state, providerAddrs);\n let oldProviders = oldState.config.facets[facet.id], oldValue = oldState.facet(facet);\n if (oldProviders && !depChanged && sameArray(providers, oldProviders)) {\n state.values[idx] = oldValue;\n return 0;\n }\n let value = get(state);\n if (facet.compare(value, oldValue)) {\n state.values[idx] = oldValue;\n return 0;\n }\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n }\n };\n}\nconst initField = /*@__PURE__*/Facet.define({ static: true });\n/**\nFields can store additional information in an editor state, and\nkeep it in sync with the rest of the state.\n*/\nclass StateField {\n constructor(\n /**\n @internal\n */\n id, createF, updateF, compareF, \n /**\n @internal\n */\n spec) {\n this.id = id;\n this.createF = createF;\n this.updateF = updateF;\n this.compareF = compareF;\n this.spec = spec;\n /**\n @internal\n */\n this.provides = undefined;\n }\n /**\n Define a state field.\n */\n static define(config) {\n let field = new StateField(nextID++, config.create, config.update, config.compare || ((a, b) => a === b), config);\n if (config.provide)\n field.provides = config.provide(field);\n return field;\n }\n create(state) {\n let init = state.facet(initField).find(i => i.field == this);\n return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);\n }\n /**\n @internal\n */\n slot(addresses) {\n let idx = addresses[this.id] >> 1;\n return {\n create: (state) => {\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n },\n update: (state, tr) => {\n let oldVal = state.values[idx];\n let value = this.updateF(oldVal, tr);\n if (this.compareF(oldVal, value))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure: (state, oldState) => {\n if (oldState.config.address[this.id] != null) {\n state.values[idx] = oldState.field(this);\n return 0;\n }\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n /**\n Returns an extension that enables this field and overrides the\n way it is initialized. Can be useful when you need to provide a\n non-default starting value for the field.\n */\n init(create) {\n return [this, initField.of({ field: this, create })];\n }\n /**\n State field instances can be used as\n [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a\n given state.\n */\n get extension() { return this; }\n}\nconst Prec_ = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };\nfunction prec(value) {\n return (ext) => new PrecExtension(ext, value);\n}\n/**\nBy default extensions are registered in the order they are found\nin the flattened form of nested array that was provided.\nIndividual extension values can be assigned a precedence to\noverride this. Extensions that do not have a precedence set get\nthe precedence of the nearest parent with a precedence, or\n[`default`](https://codemirror.net/6/docs/ref/#state.Prec.default) if there is no such parent. The\nfinal ordering of extensions is determined by first sorting by\nprecedence and then by order within each precedence.\n*/\nconst Prec = {\n /**\n The highest precedence level, for extensions that should end up\n near the start of the precedence ordering.\n */\n highest: /*@__PURE__*/prec(Prec_.highest),\n /**\n A higher-than-default precedence, for extensions that should\n come before those with default precedence.\n */\n high: /*@__PURE__*/prec(Prec_.high),\n /**\n The default precedence, which is also used for extensions\n without an explicit precedence.\n */\n default: /*@__PURE__*/prec(Prec_.default),\n /**\n A lower-than-default precedence.\n */\n low: /*@__PURE__*/prec(Prec_.low),\n /**\n The lowest precedence level. Meant for things that should end up\n near the end of the extension order.\n */\n lowest: /*@__PURE__*/prec(Prec_.lowest)\n};\nclass PrecExtension {\n constructor(inner, prec) {\n this.inner = inner;\n this.prec = prec;\n }\n}\n/**\nExtension compartments can be used to make a configuration\ndynamic. By [wrapping](https://codemirror.net/6/docs/ref/#state.Compartment.of) part of your\nconfiguration in a compartment, you can later\n[replace](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure) that part through a\ntransaction.\n*/\nclass Compartment {\n /**\n Create an instance of this compartment to add to your [state\n configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).\n */\n of(ext) { return new CompartmentInstance(this, ext); }\n /**\n Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that\n reconfigures this compartment.\n */\n reconfigure(content) {\n return Compartment.reconfigure.of({ compartment: this, extension: content });\n }\n /**\n Get the current content of the compartment in the state, or\n `undefined` if it isn't present.\n */\n get(state) {\n return state.config.compartments.get(this);\n }\n}\nclass CompartmentInstance {\n constructor(compartment, inner) {\n this.compartment = compartment;\n this.inner = inner;\n }\n}\nclass Configuration {\n constructor(base, compartments, dynamicSlots, address, staticValues, facets) {\n this.base = base;\n this.compartments = compartments;\n this.dynamicSlots = dynamicSlots;\n this.address = address;\n this.staticValues = staticValues;\n this.facets = facets;\n this.statusTemplate = [];\n while (this.statusTemplate.length < dynamicSlots.length)\n this.statusTemplate.push(0 /* SlotStatus.Unresolved */);\n }\n staticFacet(facet) {\n let addr = this.address[facet.id];\n return addr == null ? facet.default : this.staticValues[addr >> 1];\n }\n static resolve(base, compartments, oldState) {\n let fields = [];\n let facets = Object.create(null);\n let newCompartments = new Map();\n for (let ext of flatten(base, compartments, newCompartments)) {\n if (ext instanceof StateField)\n fields.push(ext);\n else\n (facets[ext.facet.id] || (facets[ext.facet.id] = [])).push(ext);\n }\n let address = Object.create(null);\n let staticValues = [];\n let dynamicSlots = [];\n for (let field of fields) {\n address[field.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => field.slot(a));\n }\n let oldFacets = oldState === null || oldState === void 0 ? void 0 : oldState.config.facets;\n for (let id in facets) {\n let providers = facets[id], facet = providers[0].facet;\n let oldProviders = oldFacets && oldFacets[id] || [];\n if (providers.every(p => p.type == 0 /* Provider.Static */)) {\n address[facet.id] = (staticValues.length << 1) | 1;\n if (sameArray(oldProviders, providers)) {\n staticValues.push(oldState.facet(facet));\n }\n else {\n let value = facet.combine(providers.map(p => p.value));\n staticValues.push(oldState && facet.compare(value, oldState.facet(facet)) ? oldState.facet(facet) : value);\n }\n }\n else {\n for (let p of providers) {\n if (p.type == 0 /* Provider.Static */) {\n address[p.id] = (staticValues.length << 1) | 1;\n staticValues.push(p.value);\n }\n else {\n address[p.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => p.dynamicSlot(a));\n }\n }\n address[facet.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => dynamicFacetSlot(a, facet, providers));\n }\n }\n let dynamic = dynamicSlots.map(f => f(address));\n return new Configuration(base, newCompartments, dynamic, address, staticValues, facets);\n }\n}\nfunction flatten(extension, compartments, newCompartments) {\n let result = [[], [], [], [], []];\n let seen = new Map();\n function inner(ext, prec) {\n let known = seen.get(ext);\n if (known != null) {\n if (known <= prec)\n return;\n let found = result[known].indexOf(ext);\n if (found > -1)\n result[known].splice(found, 1);\n if (ext instanceof CompartmentInstance)\n newCompartments.delete(ext.compartment);\n }\n seen.set(ext, prec);\n if (Array.isArray(ext)) {\n for (let e of ext)\n inner(e, prec);\n }\n else if (ext instanceof CompartmentInstance) {\n if (newCompartments.has(ext.compartment))\n throw new RangeError(`Duplicate use of compartment in extensions`);\n let content = compartments.get(ext.compartment) || ext.inner;\n newCompartments.set(ext.compartment, content);\n inner(content, prec);\n }\n else if (ext instanceof PrecExtension) {\n inner(ext.inner, ext.prec);\n }\n else if (ext instanceof StateField) {\n result[prec].push(ext);\n if (ext.provides)\n inner(ext.provides, prec);\n }\n else if (ext instanceof FacetProvider) {\n result[prec].push(ext);\n if (ext.facet.extensions)\n inner(ext.facet.extensions, Prec_.default);\n }\n else {\n let content = ext.extension;\n if (!content)\n throw new Error(`Unrecognized extension value in extension set (${ext}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);\n inner(content, prec);\n }\n }\n inner(extension, Prec_.default);\n return result.reduce((a, b) => a.concat(b));\n}\nfunction ensureAddr(state, addr) {\n if (addr & 1)\n return 2 /* SlotStatus.Computed */;\n let idx = addr >> 1;\n let status = state.status[idx];\n if (status == 4 /* SlotStatus.Computing */)\n throw new Error(\"Cyclic dependency between fields and/or facets\");\n if (status & 2 /* SlotStatus.Computed */)\n return status;\n state.status[idx] = 4 /* SlotStatus.Computing */;\n let changed = state.computeSlot(state, state.config.dynamicSlots[idx]);\n return state.status[idx] = 2 /* SlotStatus.Computed */ | changed;\n}\nfunction getAddr(state, addr) {\n return addr & 1 ? state.config.staticValues[addr >> 1] : state.values[addr >> 1];\n}\n\nconst languageData = /*@__PURE__*/Facet.define();\nconst allowMultipleSelections = /*@__PURE__*/Facet.define({\n combine: values => values.some(v => v),\n static: true\n});\nconst lineSeparator = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : undefined,\n static: true\n});\nconst changeFilter = /*@__PURE__*/Facet.define();\nconst transactionFilter = /*@__PURE__*/Facet.define();\nconst transactionExtender = /*@__PURE__*/Facet.define();\nconst readOnly = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : false\n});\n\n/**\nAnnotations are tagged values that are used to add metadata to\ntransactions in an extensible way. They should be used to model\nthings that effect the entire transaction (such as its [time\nstamp](https://codemirror.net/6/docs/ref/#state.Transaction^time) or information about its\n[origin](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent)). For effects that happen\n_alongside_ the other changes made by the transaction, [state\neffects](https://codemirror.net/6/docs/ref/#state.StateEffect) are more appropriate.\n*/\nclass Annotation {\n /**\n @internal\n */\n constructor(\n /**\n The annotation type.\n */\n type, \n /**\n The value of this annotation.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Define a new type of annotation.\n */\n static define() { return new AnnotationType(); }\n}\n/**\nMarker that identifies a type of [annotation](https://codemirror.net/6/docs/ref/#state.Annotation).\n*/\nclass AnnotationType {\n /**\n Create an instance of this annotation.\n */\n of(value) { return new Annotation(this, value); }\n}\n/**\nRepresentation of a type of state effect. Defined with\n[`StateEffect.define`](https://codemirror.net/6/docs/ref/#state.StateEffect^define).\n*/\nclass StateEffectType {\n /**\n @internal\n */\n constructor(\n // The `any` types in these function types are there to work\n // around TypeScript issue #37631, where the type guard on\n // `StateEffect.is` mysteriously stops working when these properly\n // have type `Value`.\n /**\n @internal\n */\n map) {\n this.map = map;\n }\n /**\n Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this\n type.\n */\n of(value) { return new StateEffect(this, value); }\n}\n/**\nState effects can be used to represent additional effects\nassociated with a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction.effects). They\nare often useful to model changes to custom [state\nfields](https://codemirror.net/6/docs/ref/#state.StateField), when those changes aren't implicit in\ndocument or selection changes.\n*/\nclass StateEffect {\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n type, \n /**\n The value of this effect.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Map this effect through a position mapping. Will return\n `undefined` when that ends up deleting the effect.\n */\n map(mapping) {\n let mapped = this.type.map(this.value, mapping);\n return mapped === undefined ? undefined : mapped == this.value ? this : new StateEffect(this.type, mapped);\n }\n /**\n Tells you whether this effect object is of a given\n [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).\n */\n is(type) { return this.type == type; }\n /**\n Define a new effect type. The type parameter indicates the type\n of values that his effect holds. It should be a type that\n doesn't include `undefined`, since that is used in\n [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is\n removed.\n */\n static define(spec = {}) {\n return new StateEffectType(spec.map || (v => v));\n }\n /**\n Map an array of effects through a change set.\n */\n static mapEffects(effects, mapping) {\n if (!effects.length)\n return effects;\n let result = [];\n for (let effect of effects) {\n let mapped = effect.map(mapping);\n if (mapped)\n result.push(mapped);\n }\n return result;\n }\n}\n/**\nThis effect can be used to reconfigure the root extensions of\nthe editor. Doing this will discard any extensions\n[appended](https://codemirror.net/6/docs/ref/#state.StateEffect^appendConfig), but does not reset\nthe content of [reconfigured](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure)\ncompartments.\n*/\nStateEffect.reconfigure = /*@__PURE__*/StateEffect.define();\n/**\nAppend extensions to the top-level configuration of the editor.\n*/\nStateEffect.appendConfig = /*@__PURE__*/StateEffect.define();\n/**\nChanges to the editor state are grouped into transactions.\nTypically, a user action creates a single transaction, which may\ncontain any number of document changes, may change the selection,\nor have other effects. Create a transaction by calling\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update), or immediately\ndispatch one by calling\n[`EditorView.dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch).\n*/\nclass Transaction {\n constructor(\n /**\n The state from which the transaction starts.\n */\n startState, \n /**\n The document changes made by this transaction.\n */\n changes, \n /**\n The selection set by this transaction, or undefined if it\n doesn't explicitly set a selection.\n */\n selection, \n /**\n The effects added to the transaction.\n */\n effects, \n /**\n @internal\n */\n annotations, \n /**\n Whether the selection should be scrolled into view after this\n transaction is dispatched.\n */\n scrollIntoView) {\n this.startState = startState;\n this.changes = changes;\n this.selection = selection;\n this.effects = effects;\n this.annotations = annotations;\n this.scrollIntoView = scrollIntoView;\n /**\n @internal\n */\n this._doc = null;\n /**\n @internal\n */\n this._state = null;\n if (selection)\n checkSelection(selection, changes.newLength);\n if (!annotations.some((a) => a.type == Transaction.time))\n this.annotations = annotations.concat(Transaction.time.of(Date.now()));\n }\n /**\n @internal\n */\n static create(startState, changes, selection, effects, annotations, scrollIntoView) {\n return new Transaction(startState, changes, selection, effects, annotations, scrollIntoView);\n }\n /**\n The new document produced by the transaction. Contrary to\n [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't\n force the entire new state to be computed right away, so it is\n recommended that [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter\n when they need to look at the new document.\n */\n get newDoc() {\n return this._doc || (this._doc = this.changes.apply(this.startState.doc));\n }\n /**\n The new selection produced by the transaction. If\n [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,\n this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's\n current selection through the changes made by the transaction.\n */\n get newSelection() {\n return this.selection || this.startState.selection.map(this.changes);\n }\n /**\n The new state created by the transaction. Computed on demand\n (but retained for subsequent access), so it is recommended not to\n access it in [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.\n */\n get state() {\n if (!this._state)\n this.startState.applyTransaction(this);\n return this._state;\n }\n /**\n Get the value of the given annotation type, if any.\n */\n annotation(type) {\n for (let ann of this.annotations)\n if (ann.type == type)\n return ann.value;\n return undefined;\n }\n /**\n Indicates whether the transaction changed the document.\n */\n get docChanged() { return !this.changes.empty; }\n /**\n Indicates whether this transaction reconfigures the state\n (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or\n with a top-level configuration\n [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).\n */\n get reconfigured() { return this.startState.config != this.state.config; }\n /**\n Returns true if the transaction has a [user\n event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to\n or more specific than `event`. For example, if the transaction\n has `\"select.pointer\"` as user event, `\"select\"` and\n `\"select.pointer\"` will match it.\n */\n isUserEvent(event) {\n let e = this.annotation(Transaction.userEvent);\n return !!(e && (e == event || e.length > event.length && e.slice(0, event.length) == event && e[event.length] == \".\"));\n }\n}\n/**\nAnnotation used to store transaction timestamps. Automatically\nadded to every transaction, holding `Date.now()`.\n*/\nTransaction.time = /*@__PURE__*/Annotation.define();\n/**\nAnnotation used to associate a transaction with a user interface\nevent. Holds a string identifying the event, using a\ndot-separated format to support attaching more specific\ninformation. The events used by the core libraries are:\n\n - `\"input\"` when content is entered\n - `\"input.type\"` for typed input\n - `\"input.type.compose\"` for composition\n - `\"input.paste\"` for pasted input\n - `\"input.drop\"` when adding content with drag-and-drop\n - `\"input.complete\"` when autocompleting\n - `\"delete\"` when the user deletes content\n - `\"delete.selection\"` when deleting the selection\n - `\"delete.forward\"` when deleting forward from the selection\n - `\"delete.backward\"` when deleting backward from the selection\n - `\"delete.cut\"` when cutting to the clipboard\n - `\"move\"` when content is moved\n - `\"move.drop\"` when content is moved within the editor through drag-and-drop\n - `\"select\"` when explicitly changing the selection\n - `\"select.pointer\"` when selecting with a mouse or other pointing device\n - `\"undo\"` and `\"redo\"` for history actions\n\nUse [`isUserEvent`](https://codemirror.net/6/docs/ref/#state.Transaction.isUserEvent) to check\nwhether the annotation matches a given event.\n*/\nTransaction.userEvent = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating whether a transaction should be added to\nthe undo history or not.\n*/\nTransaction.addToHistory = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating (when present and true) that a transaction\nrepresents a change made by some other actor, not the user. This\nis used, for example, to tag other people's changes in\ncollaborative editing.\n*/\nTransaction.remote = /*@__PURE__*/Annotation.define();\nfunction joinRanges(a, b) {\n let result = [];\n for (let iA = 0, iB = 0;;) {\n let from, to;\n if (iA < a.length && (iB == b.length || b[iB] >= a[iA])) {\n from = a[iA++];\n to = a[iA++];\n }\n else if (iB < b.length) {\n from = b[iB++];\n to = b[iB++];\n }\n else\n return result;\n if (!result.length || result[result.length - 1] < from)\n result.push(from, to);\n else if (result[result.length - 1] < to)\n result[result.length - 1] = to;\n }\n}\nfunction mergeTransaction(a, b, sequential) {\n var _a;\n let mapForA, mapForB, changes;\n if (sequential) {\n mapForA = b.changes;\n mapForB = ChangeSet.empty(b.changes.length);\n changes = a.changes.compose(b.changes);\n }\n else {\n mapForA = b.changes.map(a.changes);\n mapForB = a.changes.mapDesc(b.changes, true);\n changes = a.changes.compose(mapForA);\n }\n return {\n changes,\n selection: b.selection ? b.selection.map(mapForB) : (_a = a.selection) === null || _a === void 0 ? void 0 : _a.map(mapForA),\n effects: StateEffect.mapEffects(a.effects, mapForA).concat(StateEffect.mapEffects(b.effects, mapForB)),\n annotations: a.annotations.length ? a.annotations.concat(b.annotations) : b.annotations,\n scrollIntoView: a.scrollIntoView || b.scrollIntoView\n };\n}\nfunction resolveTransactionInner(state, spec, docSize) {\n let sel = spec.selection, annotations = asArray(spec.annotations);\n if (spec.userEvent)\n annotations = annotations.concat(Transaction.userEvent.of(spec.userEvent));\n return {\n changes: spec.changes instanceof ChangeSet ? spec.changes\n : ChangeSet.of(spec.changes || [], docSize, state.facet(lineSeparator)),\n selection: sel && (sel instanceof EditorSelection ? sel : EditorSelection.single(sel.anchor, sel.head)),\n effects: asArray(spec.effects),\n annotations,\n scrollIntoView: !!spec.scrollIntoView\n };\n}\nfunction resolveTransaction(state, specs, filter) {\n let s = resolveTransactionInner(state, specs.length ? specs[0] : {}, state.doc.length);\n if (specs.length && specs[0].filter === false)\n filter = false;\n for (let i = 1; i < specs.length; i++) {\n if (specs[i].filter === false)\n filter = false;\n let seq = !!specs[i].sequential;\n s = mergeTransaction(s, resolveTransactionInner(state, specs[i], seq ? s.changes.newLength : state.doc.length), seq);\n }\n let tr = Transaction.create(state, s.changes, s.selection, s.effects, s.annotations, s.scrollIntoView);\n return extendTransaction(filter ? filterTransaction(tr) : tr);\n}\n// Finish a transaction by applying filters if necessary.\nfunction filterTransaction(tr) {\n let state = tr.startState;\n // Change filters\n let result = true;\n for (let filter of state.facet(changeFilter)) {\n let value = filter(tr);\n if (value === false) {\n result = false;\n break;\n }\n if (Array.isArray(value))\n result = result === true ? value : joinRanges(result, value);\n }\n if (result !== true) {\n let changes, back;\n if (result === false) {\n back = tr.changes.invertedDesc;\n changes = ChangeSet.empty(state.doc.length);\n }\n else {\n let filtered = tr.changes.filter(result);\n changes = filtered.changes;\n back = filtered.filtered.mapDesc(filtered.changes).invertedDesc;\n }\n tr = Transaction.create(state, changes, tr.selection && tr.selection.map(back), StateEffect.mapEffects(tr.effects, back), tr.annotations, tr.scrollIntoView);\n }\n // Transaction filters\n let filters = state.facet(transactionFilter);\n for (let i = filters.length - 1; i >= 0; i--) {\n let filtered = filters[i](tr);\n if (filtered instanceof Transaction)\n tr = filtered;\n else if (Array.isArray(filtered) && filtered.length == 1 && filtered[0] instanceof Transaction)\n tr = filtered[0];\n else\n tr = resolveTransaction(state, asArray(filtered), false);\n }\n return tr;\n}\nfunction extendTransaction(tr) {\n let state = tr.startState, extenders = state.facet(transactionExtender), spec = tr;\n for (let i = extenders.length - 1; i >= 0; i--) {\n let extension = extenders[i](tr);\n if (extension && Object.keys(extension).length)\n spec = mergeTransaction(spec, resolveTransactionInner(state, extension, tr.changes.newLength), true);\n }\n return spec == tr ? tr : Transaction.create(state, tr.changes, tr.selection, spec.effects, spec.annotations, spec.scrollIntoView);\n}\nconst none = [];\nfunction asArray(value) {\n return value == null ? none : Array.isArray(value) ? value : [value];\n}\n\n/**\nThe categories produced by a [character\ncategorizer](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer). These are used\ndo things like selecting by word.\n*/\nvar CharCategory = /*@__PURE__*/(function (CharCategory) {\n /**\n Word characters.\n */\n CharCategory[CharCategory[\"Word\"] = 0] = \"Word\";\n /**\n Whitespace.\n */\n CharCategory[CharCategory[\"Space\"] = 1] = \"Space\";\n /**\n Anything else.\n */\n CharCategory[CharCategory[\"Other\"] = 2] = \"Other\";\nreturn CharCategory})(CharCategory || (CharCategory = {}));\nconst nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nlet wordChar;\ntry {\n wordChar = /*@__PURE__*/new RegExp(\"[\\\\p{Alphabetic}\\\\p{Number}_]\", \"u\");\n}\ncatch (_) { }\nfunction hasWordChar(str) {\n if (wordChar)\n return wordChar.test(str);\n for (let i = 0; i < str.length; i++) {\n let ch = str[i];\n if (/\\w/.test(ch) || ch > \"\\x80\" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)))\n return true;\n }\n return false;\n}\nfunction makeCategorizer(wordChars) {\n return (char) => {\n if (!/\\S/.test(char))\n return CharCategory.Space;\n if (hasWordChar(char))\n return CharCategory.Word;\n for (let i = 0; i < wordChars.length; i++)\n if (char.indexOf(wordChars[i]) > -1)\n return CharCategory.Word;\n return CharCategory.Other;\n };\n}\n\n/**\nThe editor state class is a persistent (immutable) data structure.\nTo update a state, you [create](https://codemirror.net/6/docs/ref/#state.EditorState.update) a\n[transaction](https://codemirror.net/6/docs/ref/#state.Transaction), which produces a _new_ state\ninstance, without modifying the original object.\n\nAs such, _never_ mutate properties of a state directly. That'll\njust break things.\n*/\nclass EditorState {\n constructor(\n /**\n @internal\n */\n config, \n /**\n The current document.\n */\n doc, \n /**\n The current selection.\n */\n selection, \n /**\n @internal\n */\n values, computeSlot, tr) {\n this.config = config;\n this.doc = doc;\n this.selection = selection;\n this.values = values;\n this.status = config.statusTemplate.slice();\n this.computeSlot = computeSlot;\n // Fill in the computed state immediately, so that further queries\n // for it made during the update return this state\n if (tr)\n tr._state = this;\n for (let i = 0; i < this.config.dynamicSlots.length; i++)\n ensureAddr(this, i << 1);\n this.computeSlot = null;\n }\n field(field, require = true) {\n let addr = this.config.address[field.id];\n if (addr == null) {\n if (require)\n throw new RangeError(\"Field is not present in this state\");\n return undefined;\n }\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this\n state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)\n can be passed. Unless\n [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the\n [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec\n are assumed to start in the _current_ document (not the document\n produced by previous specs), and its\n [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and\n [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer\n to the document created by its _own_ changes. The resulting\n transaction contains the combined effect of all the different\n specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later\n specs take precedence over earlier ones.\n */\n update(...specs) {\n return resolveTransaction(this, specs, true);\n }\n /**\n @internal\n */\n applyTransaction(tr) {\n let conf = this.config, { base, compartments } = conf;\n for (let effect of tr.effects) {\n if (effect.is(Compartment.reconfigure)) {\n if (conf) {\n compartments = new Map;\n conf.compartments.forEach((val, key) => compartments.set(key, val));\n conf = null;\n }\n compartments.set(effect.value.compartment, effect.value.extension);\n }\n else if (effect.is(StateEffect.reconfigure)) {\n conf = null;\n base = effect.value;\n }\n else if (effect.is(StateEffect.appendConfig)) {\n conf = null;\n base = asArray(base).concat(effect.value);\n }\n }\n let startValues;\n if (!conf) {\n conf = Configuration.resolve(base, compartments, this);\n let intermediateState = new EditorState(conf, this.doc, this.selection, conf.dynamicSlots.map(() => null), (state, slot) => slot.reconfigure(state, this), null);\n startValues = intermediateState.values;\n }\n else {\n startValues = tr.startState.values.slice();\n }\n let selection = tr.startState.facet(allowMultipleSelections) ? tr.newSelection : tr.newSelection.asSingle();\n new EditorState(conf, tr.newDoc, selection, startValues, (state, slot) => slot.update(state, tr), tr);\n }\n /**\n Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that\n replaces every selection range with the given content.\n */\n replaceSelection(text) {\n if (typeof text == \"string\")\n text = this.toText(text);\n return this.changeByRange(range => ({ changes: { from: range.from, to: range.to, insert: text },\n range: EditorSelection.cursor(range.from + text.length) }));\n }\n /**\n Create a set of changes and a new selection by running the given\n function for each range in the active selection. The function\n can return an optional set of changes (in the coordinate space\n of the start document), plus an updated range (in the coordinate\n space of the document produced by the call's own changes). This\n method will merge all the changes and ranges into a single\n changeset and selection, and return it as a [transaction\n spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to\n [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).\n */\n changeByRange(f) {\n let sel = this.selection;\n let result1 = f(sel.ranges[0]);\n let changes = this.changes(result1.changes), ranges = [result1.range];\n let effects = asArray(result1.effects);\n for (let i = 1; i < sel.ranges.length; i++) {\n let result = f(sel.ranges[i]);\n let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);\n for (let j = 0; j < i; j++)\n ranges[j] = ranges[j].map(newMapped);\n let mapBy = changes.mapDesc(newChanges, true);\n ranges.push(result.range.map(mapBy));\n changes = changes.compose(newMapped);\n effects = StateEffect.mapEffects(effects, newMapped).concat(StateEffect.mapEffects(asArray(result.effects), mapBy));\n }\n return {\n changes,\n selection: EditorSelection.create(ranges, sel.mainIndex),\n effects\n };\n }\n /**\n Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change\n description, taking the state's document length and line\n separator into account.\n */\n changes(spec = []) {\n if (spec instanceof ChangeSet)\n return spec;\n return ChangeSet.of(spec, this.doc.length, this.facet(EditorState.lineSeparator));\n }\n /**\n Using the state's [line\n separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a\n [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.\n */\n toText(string) {\n return Text.of(string.split(this.facet(EditorState.lineSeparator) || DefaultSplit));\n }\n /**\n Return the given range of the document as a string.\n */\n sliceDoc(from = 0, to = this.doc.length) {\n return this.doc.sliceString(from, to, this.lineBreak);\n }\n /**\n Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).\n */\n facet(facet) {\n let addr = this.config.address[facet.id];\n if (addr == null)\n return facet.default;\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Convert this state to a JSON-serializable object. When custom\n fields should be serialized, you can pass them in as an object\n mapping property names (in the resulting object, which should\n not use `doc` or `selection`) to fields.\n */\n toJSON(fields) {\n let result = {\n doc: this.sliceDoc(),\n selection: this.selection.toJSON()\n };\n if (fields)\n for (let prop in fields) {\n let value = fields[prop];\n if (value instanceof StateField && this.config.address[value.id] != null)\n result[prop] = value.spec.toJSON(this.field(fields[prop]), this);\n }\n return result;\n }\n /**\n Deserialize a state from its JSON representation. When custom\n fields should be deserialized, pass the same object you passed\n to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as\n third argument.\n */\n static fromJSON(json, config = {}, fields) {\n if (!json || typeof json.doc != \"string\")\n throw new RangeError(\"Invalid JSON representation for EditorState\");\n let fieldInit = [];\n if (fields)\n for (let prop in fields) {\n if (Object.prototype.hasOwnProperty.call(json, prop)) {\n let field = fields[prop], value = json[prop];\n fieldInit.push(field.init(state => field.spec.fromJSON(value, state)));\n }\n }\n return EditorState.create({\n doc: json.doc,\n selection: EditorSelection.fromJSON(json.selection),\n extensions: config.extensions ? fieldInit.concat([config.extensions]) : fieldInit\n });\n }\n /**\n Create a new state. You'll usually only need this when\n initializing an editor—updated states are created by applying\n transactions.\n */\n static create(config = {}) {\n let configuration = Configuration.resolve(config.extensions || [], new Map);\n let doc = config.doc instanceof Text ? config.doc\n : Text.of((config.doc || \"\").split(configuration.staticFacet(EditorState.lineSeparator) || DefaultSplit));\n let selection = !config.selection ? EditorSelection.single(0)\n : config.selection instanceof EditorSelection ? config.selection\n : EditorSelection.single(config.selection.anchor, config.selection.head);\n checkSelection(selection, doc.length);\n if (!configuration.staticFacet(allowMultipleSelections))\n selection = selection.asSingle();\n return new EditorState(configuration, doc, selection, configuration.dynamicSlots.map(() => null), (state, slot) => slot.create(state), null);\n }\n /**\n The size (in columns) of a tab in the document, determined by\n the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.\n */\n get tabSize() { return this.facet(EditorState.tabSize); }\n /**\n Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)\n string for this state.\n */\n get lineBreak() { return this.facet(EditorState.lineSeparator) || \"\\n\"; }\n /**\n Returns true when the editor is\n [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.\n */\n get readOnly() { return this.facet(readOnly); }\n /**\n Look up a translation for the given phrase (via the\n [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the\n original string if no translation is found.\n \n If additional arguments are passed, they will be inserted in\n place of markers like `$1` (for the first value) and `$2`, etc.\n A single `$` is equivalent to `$1`, and `$$` will produce a\n literal dollar sign.\n */\n phrase(phrase, ...insert) {\n for (let map of this.facet(EditorState.phrases))\n if (Object.prototype.hasOwnProperty.call(map, phrase)) {\n phrase = map[phrase];\n break;\n }\n if (insert.length)\n phrase = phrase.replace(/\\$(\\$|\\d*)/g, (m, i) => {\n if (i == \"$\")\n return \"$\";\n let n = +(i || 1);\n return !n || n > insert.length ? m : insert[n - 1];\n });\n return phrase;\n }\n /**\n Find the values for a given language data field, provided by the\n the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.\n \n Examples of language data fields are...\n \n - [`\"commentTokens\"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying\n comment syntax.\n - [`\"autocomplete\"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)\n for providing language-specific completion sources.\n - [`\"wordChars\"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding\n characters that should be considered part of words in this\n language.\n - [`\"closeBrackets\"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls\n bracket closing behavior.\n */\n languageDataAt(name, pos, side = -1) {\n let values = [];\n for (let provider of this.facet(languageData)) {\n for (let result of provider(this, pos, side)) {\n if (Object.prototype.hasOwnProperty.call(result, name))\n values.push(result[name]);\n }\n }\n return values;\n }\n /**\n Return a function that can categorize strings (expected to\n represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))\n into one of:\n \n - Word (contains an alphanumeric character or a character\n explicitly listed in the local language's `\"wordChars\"`\n language data, which should be a string)\n - Space (contains only whitespace)\n - Other (anything else)\n */\n charCategorizer(at) {\n return makeCategorizer(this.languageDataAt(\"wordChars\", at).join(\"\"));\n }\n /**\n Find the word at the given position, meaning the range\n containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters\n around it. If no word characters are adjacent to the position,\n this returns null.\n */\n wordAt(pos) {\n let { text, from, length } = this.doc.lineAt(pos);\n let cat = this.charCategorizer(pos);\n let start = pos - from, end = pos - from;\n while (start > 0) {\n let prev = findClusterBreak(text, start, false);\n if (cat(text.slice(prev, start)) != CharCategory.Word)\n break;\n start = prev;\n }\n while (end < length) {\n let next = findClusterBreak(text, end);\n if (cat(text.slice(end, next)) != CharCategory.Word)\n break;\n end = next;\n }\n return start == end ? null : EditorSelection.range(start + from, end + from);\n }\n}\n/**\nA facet that, when enabled, causes the editor to allow multiple\nranges to be selected. Be careful though, because by default the\neditor relies on the native DOM selection, which cannot handle\nmultiple selections. An extension like\n[`drawSelection`](https://codemirror.net/6/docs/ref/#view.drawSelection) can be used to make\nsecondary selections visible to the user.\n*/\nEditorState.allowMultipleSelections = allowMultipleSelections;\n/**\nConfigures the tab size to use in this state. The first\n(highest-precedence) value of the facet is used. If no value is\ngiven, this defaults to 4.\n*/\nEditorState.tabSize = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : 4\n});\n/**\nThe line separator to use. By default, any of `\"\\n\"`, `\"\\r\\n\"`\nand `\"\\r\"` is treated as a separator when splitting lines, and\nlines are joined with `\"\\n\"`.\n\nWhen you configure a value here, only that precise separator\nwill be used, allowing you to round-trip documents through the\neditor without normalizing line separators.\n*/\nEditorState.lineSeparator = lineSeparator;\n/**\nThis facet controls the value of the\n[`readOnly`](https://codemirror.net/6/docs/ref/#state.EditorState.readOnly) getter, which is\nconsulted by commands and extensions that implement editing\nfunctionality to determine whether they should apply. It\ndefaults to false, but when its highest-precedence value is\n`true`, such functionality disables itself.\n\nNot to be confused with\n[`EditorView.editable`](https://codemirror.net/6/docs/ref/#view.EditorView^editable), which\ncontrols whether the editor's DOM is set to be editable (and\nthus focusable).\n*/\nEditorState.readOnly = readOnly;\n/**\nRegisters translation phrases. The\n[`phrase`](https://codemirror.net/6/docs/ref/#state.EditorState.phrase) method will look through\nall objects registered with this facet to find translations for\nits argument.\n*/\nEditorState.phrases = /*@__PURE__*/Facet.define({\n compare(a, b) {\n let kA = Object.keys(a), kB = Object.keys(b);\n return kA.length == kB.length && kA.every(k => a[k] == b[k]);\n }\n});\n/**\nA facet used to register [language\ndata](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt) providers.\n*/\nEditorState.languageData = languageData;\n/**\nFacet used to register change filters, which are called for each\ntransaction (unless explicitly\n[disabled](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter)), and can suppress\npart of the transaction's changes.\n\nSuch a function can return `true` to indicate that it doesn't\nwant to do anything, `false` to completely stop the changes in\nthe transaction, or a set of ranges in which changes should be\nsuppressed. Such ranges are represented as an array of numbers,\nwith each pair of two numbers indicating the start and end of a\nrange. So for example `[10, 20, 100, 110]` suppresses changes\nbetween 10 and 20, and between 100 and 110.\n*/\nEditorState.changeFilter = changeFilter;\n/**\nFacet used to register a hook that gets a chance to update or\nreplace transaction specs before they are applied. This will\nonly be applied for transactions that don't have\n[`filter`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter) set to `false`. You\ncan either return a single transaction spec (possibly the input\ntransaction), or an array of specs (which will be combined in\nthe same way as the arguments to\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update)).\n\nWhen possible, it is recommended to avoid accessing\n[`Transaction.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state) in a filter,\nsince it will force creation of a state that will then be\ndiscarded again, if the transaction is actually filtered.\n\n(This functionality should be used with care. Indiscriminately\nmodifying transaction is likely to break something or degrade\nthe user experience.)\n*/\nEditorState.transactionFilter = transactionFilter;\n/**\nThis is a more limited form of\n[`transactionFilter`](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter),\nwhich can only add\n[annotations](https://codemirror.net/6/docs/ref/#state.TransactionSpec.annotations) and\n[effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects). _But_, this type\nof filter runs even if the transaction has disabled regular\n[filtering](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter), making it suitable\nfor effects that don't need to touch the changes or selection,\nbut do want to process every transaction.\n\nExtenders run _after_ filters, when both are present.\n*/\nEditorState.transactionExtender = transactionExtender;\nCompartment.reconfigure = /*@__PURE__*/StateEffect.define();\n\n/**\nUtility function for combining behaviors to fill in a config\nobject from an array of provided configs. `defaults` should hold\ndefault values for all optional fields in `Config`.\n\nThe function will, by default, error\nwhen a field gets two values that aren't `===`-equal, but you can\nprovide combine functions per field to do something else.\n*/\nfunction combineConfig(configs, defaults, // Should hold only the optional properties of Config, but I haven't managed to express that\ncombine = {}) {\n let result = {};\n for (let config of configs)\n for (let key of Object.keys(config)) {\n let value = config[key], current = result[key];\n if (current === undefined)\n result[key] = value;\n else if (current === value || value === undefined) ; // No conflict\n else if (Object.hasOwnProperty.call(combine, key))\n result[key] = combine[key](current, value);\n else\n throw new Error(\"Config merge conflict for field \" + key);\n }\n for (let key in defaults)\n if (result[key] === undefined)\n result[key] = defaults[key];\n return result;\n}\n\n/**\nEach range is associated with a value, which must inherit from\nthis class.\n*/\nclass RangeValue {\n /**\n Compare this value with another value. Used when comparing\n rangesets. The default implementation compares by identity.\n Unless you are only creating a fixed number of unique instances\n of your value type, it is a good idea to implement this\n properly.\n */\n eq(other) { return this == other; }\n /**\n Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.\n */\n range(from, to = from) { return Range.create(from, to, this); }\n}\nRangeValue.prototype.startSide = RangeValue.prototype.endSide = 0;\nRangeValue.prototype.point = false;\nRangeValue.prototype.mapMode = MapMode.TrackDel;\n/**\nA range associates a value with a range of positions.\n*/\nclass Range {\n constructor(\n /**\n The range's start position.\n */\n from, \n /**\n Its end position.\n */\n to, \n /**\n The value associated with this range.\n */\n value) {\n this.from = from;\n this.to = to;\n this.value = value;\n }\n /**\n @internal\n */\n static create(from, to, value) {\n return new Range(from, to, value);\n }\n}\nfunction cmpRange(a, b) {\n return a.from - b.from || a.value.startSide - b.value.startSide;\n}\nclass Chunk {\n constructor(from, to, value, \n // Chunks are marked with the largest point that occurs\n // in them (or -1 for no points), so that scans that are\n // only interested in points (such as the\n // heightmap-related logic) can skip range-only chunks.\n maxPoint) {\n this.from = from;\n this.to = to;\n this.value = value;\n this.maxPoint = maxPoint;\n }\n get length() { return this.to[this.to.length - 1]; }\n // Find the index of the given position and side. Use the ranges'\n // `from` pos when `end == false`, `to` when `end == true`.\n findIndex(pos, side, end, startAt = 0) {\n let arr = end ? this.to : this.from;\n for (let lo = startAt, hi = arr.length;;) {\n if (lo == hi)\n return lo;\n let mid = (lo + hi) >> 1;\n let diff = arr[mid] - pos || (end ? this.value[mid].endSide : this.value[mid].startSide) - side;\n if (mid == lo)\n return diff >= 0 ? lo : hi;\n if (diff >= 0)\n hi = mid;\n else\n lo = mid + 1;\n }\n }\n between(offset, from, to, f) {\n for (let i = this.findIndex(from, -1000000000 /* C.Far */, true), e = this.findIndex(to, 1000000000 /* C.Far */, false, i); i < e; i++)\n if (f(this.from[i] + offset, this.to[i] + offset, this.value[i]) === false)\n return false;\n }\n map(offset, changes) {\n let value = [], from = [], to = [], newPos = -1, maxPoint = -1;\n for (let i = 0; i < this.value.length; i++) {\n let val = this.value[i], curFrom = this.from[i] + offset, curTo = this.to[i] + offset, newFrom, newTo;\n if (curFrom == curTo) {\n let mapped = changes.mapPos(curFrom, val.startSide, val.mapMode);\n if (mapped == null)\n continue;\n newFrom = newTo = mapped;\n if (val.startSide != val.endSide) {\n newTo = changes.mapPos(curFrom, val.endSide);\n if (newTo < newFrom)\n continue;\n }\n }\n else {\n newFrom = changes.mapPos(curFrom, val.startSide);\n newTo = changes.mapPos(curTo, val.endSide);\n if (newFrom > newTo || newFrom == newTo && val.startSide > 0 && val.endSide <= 0)\n continue;\n }\n if ((newTo - newFrom || val.endSide - val.startSide) < 0)\n continue;\n if (newPos < 0)\n newPos = newFrom;\n if (val.point)\n maxPoint = Math.max(maxPoint, newTo - newFrom);\n value.push(val);\n from.push(newFrom - newPos);\n to.push(newTo - newPos);\n }\n return { mapped: value.length ? new Chunk(from, to, value, maxPoint) : null, pos: newPos };\n }\n}\n/**\nA range set stores a collection of [ranges](https://codemirror.net/6/docs/ref/#state.Range) in a\nway that makes them efficient to [map](https://codemirror.net/6/docs/ref/#state.RangeSet.map) and\n[update](https://codemirror.net/6/docs/ref/#state.RangeSet.update). This is an immutable data\nstructure.\n*/\nclass RangeSet {\n constructor(\n /**\n @internal\n */\n chunkPos, \n /**\n @internal\n */\n chunk, \n /**\n @internal\n */\n nextLayer, \n /**\n @internal\n */\n maxPoint) {\n this.chunkPos = chunkPos;\n this.chunk = chunk;\n this.nextLayer = nextLayer;\n this.maxPoint = maxPoint;\n }\n /**\n @internal\n */\n static create(chunkPos, chunk, nextLayer, maxPoint) {\n return new RangeSet(chunkPos, chunk, nextLayer, maxPoint);\n }\n /**\n @internal\n */\n get length() {\n let last = this.chunk.length - 1;\n return last < 0 ? 0 : Math.max(this.chunkEnd(last), this.nextLayer.length);\n }\n /**\n The number of ranges in the set.\n */\n get size() {\n if (this.isEmpty)\n return 0;\n let size = this.nextLayer.size;\n for (let chunk of this.chunk)\n size += chunk.value.length;\n return size;\n }\n /**\n @internal\n */\n chunkEnd(index) {\n return this.chunkPos[index] + this.chunk[index].length;\n }\n /**\n Update the range set, optionally adding new ranges or filtering\n out existing ones.\n \n (Note: The type parameter is just there as a kludge to work\n around TypeScript variance issues that prevented `RangeSet`\n from being a subtype of `RangeSet` when `X` is a subtype of\n `Y`.)\n */\n update(updateSpec) {\n let { add = [], sort = false, filterFrom = 0, filterTo = this.length } = updateSpec;\n let filter = updateSpec.filter;\n if (add.length == 0 && !filter)\n return this;\n if (sort)\n add = add.slice().sort(cmpRange);\n if (this.isEmpty)\n return add.length ? RangeSet.of(add) : this;\n let cur = new LayerCursor(this, null, -1).goto(0), i = 0, spill = [];\n let builder = new RangeSetBuilder();\n while (cur.value || i < add.length) {\n if (i < add.length && (cur.from - add[i].from || cur.startSide - add[i].value.startSide) >= 0) {\n let range = add[i++];\n if (!builder.addInner(range.from, range.to, range.value))\n spill.push(range);\n }\n else if (cur.rangeIndex == 1 && cur.chunkIndex < this.chunk.length &&\n (i == add.length || this.chunkEnd(cur.chunkIndex) < add[i].from) &&\n (!filter || filterFrom > this.chunkEnd(cur.chunkIndex) || filterTo < this.chunkPos[cur.chunkIndex]) &&\n builder.addChunk(this.chunkPos[cur.chunkIndex], this.chunk[cur.chunkIndex])) {\n cur.nextChunk();\n }\n else {\n if (!filter || filterFrom > cur.to || filterTo < cur.from || filter(cur.from, cur.to, cur.value)) {\n if (!builder.addInner(cur.from, cur.to, cur.value))\n spill.push(Range.create(cur.from, cur.to, cur.value));\n }\n cur.next();\n }\n }\n return builder.finishInner(this.nextLayer.isEmpty && !spill.length ? RangeSet.empty\n : this.nextLayer.update({ add: spill, filter, filterFrom, filterTo }));\n }\n /**\n Map this range set through a set of changes, return the new set.\n */\n map(changes) {\n if (changes.empty || this.isEmpty)\n return this;\n let chunks = [], chunkPos = [], maxPoint = -1;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n let touch = changes.touchesRange(start, start + chunk.length);\n if (touch === false) {\n maxPoint = Math.max(maxPoint, chunk.maxPoint);\n chunks.push(chunk);\n chunkPos.push(changes.mapPos(start));\n }\n else if (touch === true) {\n let { mapped, pos } = chunk.map(start, changes);\n if (mapped) {\n maxPoint = Math.max(maxPoint, mapped.maxPoint);\n chunks.push(mapped);\n chunkPos.push(pos);\n }\n }\n }\n let next = this.nextLayer.map(changes);\n return chunks.length == 0 ? next : new RangeSet(chunkPos, chunks, next || RangeSet.empty, maxPoint);\n }\n /**\n Iterate over the ranges that touch the region `from` to `to`,\n calling `f` for each. There is no guarantee that the ranges will\n be reported in any specific order. When the callback returns\n `false`, iteration stops.\n */\n between(from, to, f) {\n if (this.isEmpty)\n return;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n if (to >= start && from <= start + chunk.length &&\n chunk.between(start, from - start, to - start, f) === false)\n return;\n }\n this.nextLayer.between(from, to, f);\n }\n /**\n Iterate over the ranges in this set, in order, including all\n ranges that end at or after `from`.\n */\n iter(from = 0) {\n return HeapCursor.from([this]).goto(from);\n }\n /**\n @internal\n */\n get isEmpty() { return this.nextLayer == this; }\n /**\n Iterate over the ranges in a collection of sets, in order,\n starting from `from`.\n */\n static iter(sets, from = 0) {\n return HeapCursor.from(sets).goto(from);\n }\n /**\n Iterate over two groups of sets, calling methods on `comparator`\n to notify it of possible differences.\n */\n static compare(oldSets, newSets, \n /**\n This indicates how the underlying data changed between these\n ranges, and is needed to synchronize the iteration.\n */\n textDiff, comparator, \n /**\n Can be used to ignore all non-point ranges, and points below\n the given size. When -1, all ranges are compared.\n */\n minPointSize = -1) {\n let a = oldSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let b = newSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let sharedChunks = findSharedChunks(a, b, textDiff);\n let sideA = new SpanCursor(a, sharedChunks, minPointSize);\n let sideB = new SpanCursor(b, sharedChunks, minPointSize);\n textDiff.iterGaps((fromA, fromB, length) => compare(sideA, fromA, sideB, fromB, length, comparator));\n if (textDiff.empty && textDiff.length == 0)\n compare(sideA, 0, sideB, 0, 0, comparator);\n }\n /**\n Compare the contents of two groups of range sets, returning true\n if they are equivalent in the given range.\n */\n static eq(oldSets, newSets, from = 0, to) {\n if (to == null)\n to = 1000000000 /* C.Far */ - 1;\n let a = oldSets.filter(set => !set.isEmpty && newSets.indexOf(set) < 0);\n let b = newSets.filter(set => !set.isEmpty && oldSets.indexOf(set) < 0);\n if (a.length != b.length)\n return false;\n if (!a.length)\n return true;\n let sharedChunks = findSharedChunks(a, b);\n let sideA = new SpanCursor(a, sharedChunks, 0).goto(from), sideB = new SpanCursor(b, sharedChunks, 0).goto(from);\n for (;;) {\n if (sideA.to != sideB.to ||\n !sameValues(sideA.active, sideB.active) ||\n sideA.point && (!sideB.point || !sideA.point.eq(sideB.point)))\n return false;\n if (sideA.to > to)\n return true;\n sideA.next();\n sideB.next();\n }\n }\n /**\n Iterate over a group of range sets at the same time, notifying\n the iterator about the ranges covering every given piece of\n content. Returns the open count (see\n [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end\n of the iteration.\n */\n static spans(sets, from, to, iterator, \n /**\n When given and greater than -1, only points of at least this\n size are taken into account.\n */\n minPointSize = -1) {\n let cursor = new SpanCursor(sets, null, minPointSize).goto(from), pos = from;\n let openRanges = cursor.openStart;\n for (;;) {\n let curTo = Math.min(cursor.to, to);\n if (cursor.point) {\n let active = cursor.activeForPoint(cursor.to);\n let openCount = cursor.pointFrom < from ? active.length + 1 : Math.min(active.length, openRanges);\n iterator.point(pos, curTo, cursor.point, active, openCount, cursor.pointRank);\n openRanges = Math.min(cursor.openEnd(curTo), active.length);\n }\n else if (curTo > pos) {\n iterator.span(pos, curTo, cursor.active, openRanges);\n openRanges = cursor.openEnd(curTo);\n }\n if (cursor.to > to)\n return openRanges + (cursor.point && cursor.to > to ? 1 : 0);\n pos = cursor.to;\n cursor.next();\n }\n }\n /**\n Create a range set for the given range or array of ranges. By\n default, this expects the ranges to be _sorted_ (by start\n position and, if two start at the same position,\n `value.startSide`). You can pass `true` as second argument to\n cause the method to sort them.\n */\n static of(ranges, sort = false) {\n let build = new RangeSetBuilder();\n for (let range of ranges instanceof Range ? [ranges] : sort ? lazySort(ranges) : ranges)\n build.add(range.from, range.to, range.value);\n return build.finish();\n }\n /**\n Join an array of range sets into a single set.\n */\n static join(sets) {\n if (!sets.length)\n return RangeSet.empty;\n let result = sets[sets.length - 1];\n for (let i = sets.length - 2; i >= 0; i--) {\n for (let layer = sets[i]; layer != RangeSet.empty; layer = layer.nextLayer)\n result = new RangeSet(layer.chunkPos, layer.chunk, result, Math.max(layer.maxPoint, result.maxPoint));\n }\n return result;\n }\n}\n/**\nThe empty set of ranges.\n*/\nRangeSet.empty = /*@__PURE__*/new RangeSet([], [], null, -1);\nfunction lazySort(ranges) {\n if (ranges.length > 1)\n for (let prev = ranges[0], i = 1; i < ranges.length; i++) {\n let cur = ranges[i];\n if (cmpRange(prev, cur) > 0)\n return ranges.slice().sort(cmpRange);\n prev = cur;\n }\n return ranges;\n}\nRangeSet.empty.nextLayer = RangeSet.empty;\n/**\nA range set builder is a data structure that helps build up a\n[range set](https://codemirror.net/6/docs/ref/#state.RangeSet) directly, without first allocating\nan array of [`Range`](https://codemirror.net/6/docs/ref/#state.Range) objects.\n*/\nclass RangeSetBuilder {\n finishChunk(newArrays) {\n this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));\n this.chunkPos.push(this.chunkStart);\n this.chunkStart = -1;\n this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);\n this.maxPoint = -1;\n if (newArrays) {\n this.from = [];\n this.to = [];\n this.value = [];\n }\n }\n /**\n Create an empty builder.\n */\n constructor() {\n this.chunks = [];\n this.chunkPos = [];\n this.chunkStart = -1;\n this.last = null;\n this.lastFrom = -1000000000 /* C.Far */;\n this.lastTo = -1000000000 /* C.Far */;\n this.from = [];\n this.to = [];\n this.value = [];\n this.maxPoint = -1;\n this.setMaxPoint = -1;\n this.nextLayer = null;\n }\n /**\n Add a range. Ranges should be added in sorted (by `from` and\n `value.startSide`) order.\n */\n add(from, to, value) {\n if (!this.addInner(from, to, value))\n (this.nextLayer || (this.nextLayer = new RangeSetBuilder)).add(from, to, value);\n }\n /**\n @internal\n */\n addInner(from, to, value) {\n let diff = from - this.lastTo || value.startSide - this.last.endSide;\n if (diff <= 0 && (from - this.lastFrom || value.startSide - this.last.startSide) < 0)\n throw new Error(\"Ranges must be added sorted by `from` position and `startSide`\");\n if (diff < 0)\n return false;\n if (this.from.length == 250 /* C.ChunkSize */)\n this.finishChunk(true);\n if (this.chunkStart < 0)\n this.chunkStart = from;\n this.from.push(from - this.chunkStart);\n this.to.push(to - this.chunkStart);\n this.last = value;\n this.lastFrom = from;\n this.lastTo = to;\n this.value.push(value);\n if (value.point)\n this.maxPoint = Math.max(this.maxPoint, to - from);\n return true;\n }\n /**\n @internal\n */\n addChunk(from, chunk) {\n if ((from - this.lastTo || chunk.value[0].startSide - this.last.endSide) < 0)\n return false;\n if (this.from.length)\n this.finishChunk(true);\n this.setMaxPoint = Math.max(this.setMaxPoint, chunk.maxPoint);\n this.chunks.push(chunk);\n this.chunkPos.push(from);\n let last = chunk.value.length - 1;\n this.last = chunk.value[last];\n this.lastFrom = chunk.from[last] + from;\n this.lastTo = chunk.to[last] + from;\n return true;\n }\n /**\n Finish the range set. Returns the new set. The builder can't be\n used anymore after this has been called.\n */\n finish() { return this.finishInner(RangeSet.empty); }\n /**\n @internal\n */\n finishInner(next) {\n if (this.from.length)\n this.finishChunk(false);\n if (this.chunks.length == 0)\n return next;\n let result = RangeSet.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(next) : next, this.setMaxPoint);\n this.from = null; // Make sure further `add` calls produce errors\n return result;\n }\n}\nfunction findSharedChunks(a, b, textDiff) {\n let inA = new Map();\n for (let set of a)\n for (let i = 0; i < set.chunk.length; i++)\n if (set.chunk[i].maxPoint <= 0)\n inA.set(set.chunk[i], set.chunkPos[i]);\n let shared = new Set();\n for (let set of b)\n for (let i = 0; i < set.chunk.length; i++) {\n let known = inA.get(set.chunk[i]);\n if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] &&\n !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i].length)))\n shared.add(set.chunk[i]);\n }\n return shared;\n}\nclass LayerCursor {\n constructor(layer, skip, minPoint, rank = 0) {\n this.layer = layer;\n this.skip = skip;\n this.minPoint = minPoint;\n this.rank = rank;\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n get endSide() { return this.value ? this.value.endSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.chunkIndex = this.rangeIndex = 0;\n this.gotoInner(pos, side, false);\n return this;\n }\n gotoInner(pos, side, forward) {\n while (this.chunkIndex < this.layer.chunk.length) {\n let next = this.layer.chunk[this.chunkIndex];\n if (!(this.skip && this.skip.has(next) ||\n this.layer.chunkEnd(this.chunkIndex) < pos ||\n next.maxPoint < this.minPoint))\n break;\n this.chunkIndex++;\n forward = false;\n }\n if (this.chunkIndex < this.layer.chunk.length) {\n let rangeIndex = this.layer.chunk[this.chunkIndex].findIndex(pos - this.layer.chunkPos[this.chunkIndex], side, true);\n if (!forward || this.rangeIndex < rangeIndex)\n this.setRangeIndex(rangeIndex);\n }\n this.next();\n }\n forward(pos, side) {\n if ((this.to - pos || this.endSide - side) < 0)\n this.gotoInner(pos, side, true);\n }\n next() {\n for (;;) {\n if (this.chunkIndex == this.layer.chunk.length) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n break;\n }\n else {\n let chunkPos = this.layer.chunkPos[this.chunkIndex], chunk = this.layer.chunk[this.chunkIndex];\n let from = chunkPos + chunk.from[this.rangeIndex];\n this.from = from;\n this.to = chunkPos + chunk.to[this.rangeIndex];\n this.value = chunk.value[this.rangeIndex];\n this.setRangeIndex(this.rangeIndex + 1);\n if (this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)\n break;\n }\n }\n }\n setRangeIndex(index) {\n if (index == this.layer.chunk[this.chunkIndex].value.length) {\n this.chunkIndex++;\n if (this.skip) {\n while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))\n this.chunkIndex++;\n }\n this.rangeIndex = 0;\n }\n else {\n this.rangeIndex = index;\n }\n }\n nextChunk() {\n this.chunkIndex++;\n this.rangeIndex = 0;\n this.next();\n }\n compare(other) {\n return this.from - other.from || this.startSide - other.startSide || this.rank - other.rank ||\n this.to - other.to || this.endSide - other.endSide;\n }\n}\nclass HeapCursor {\n constructor(heap) {\n this.heap = heap;\n }\n static from(sets, skip = null, minPoint = -1) {\n let heap = [];\n for (let i = 0; i < sets.length; i++) {\n for (let cur = sets[i]; !cur.isEmpty; cur = cur.nextLayer) {\n if (cur.maxPoint >= minPoint)\n heap.push(new LayerCursor(cur, skip, minPoint, i));\n }\n }\n return heap.length == 1 ? heap[0] : new HeapCursor(heap);\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n for (let cur of this.heap)\n cur.goto(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n this.next();\n return this;\n }\n forward(pos, side) {\n for (let cur of this.heap)\n cur.forward(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n if ((this.to - pos || this.value.endSide - side) < 0)\n this.next();\n }\n next() {\n if (this.heap.length == 0) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n this.rank = -1;\n }\n else {\n let top = this.heap[0];\n this.from = top.from;\n this.to = top.to;\n this.value = top.value;\n this.rank = top.rank;\n if (top.value)\n top.next();\n heapBubble(this.heap, 0);\n }\n }\n}\nfunction heapBubble(heap, index) {\n for (let cur = heap[index];;) {\n let childIndex = (index << 1) + 1;\n if (childIndex >= heap.length)\n break;\n let child = heap[childIndex];\n if (childIndex + 1 < heap.length && child.compare(heap[childIndex + 1]) >= 0) {\n child = heap[childIndex + 1];\n childIndex++;\n }\n if (cur.compare(child) < 0)\n break;\n heap[childIndex] = cur;\n heap[index] = child;\n index = childIndex;\n }\n}\nclass SpanCursor {\n constructor(sets, skip, minPoint) {\n this.minPoint = minPoint;\n this.active = [];\n this.activeTo = [];\n this.activeRank = [];\n this.minActive = -1;\n // A currently active point range, if any\n this.point = null;\n this.pointFrom = 0;\n this.pointRank = 0;\n this.to = -1000000000 /* C.Far */;\n this.endSide = 0;\n // The amount of open active ranges at the start of the iterator.\n // Not including points.\n this.openStart = -1;\n this.cursor = HeapCursor.from(sets, skip, minPoint);\n }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.cursor.goto(pos, side);\n this.active.length = this.activeTo.length = this.activeRank.length = 0;\n this.minActive = -1;\n this.to = pos;\n this.endSide = side;\n this.openStart = -1;\n this.next();\n return this;\n }\n forward(pos, side) {\n while (this.minActive > -1 && (this.activeTo[this.minActive] - pos || this.active[this.minActive].endSide - side) < 0)\n this.removeActive(this.minActive);\n this.cursor.forward(pos, side);\n }\n removeActive(index) {\n remove(this.active, index);\n remove(this.activeTo, index);\n remove(this.activeRank, index);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n addActive(trackOpen) {\n let i = 0, { value, to, rank } = this.cursor;\n // Organize active marks by rank first, then by size\n while (i < this.activeRank.length && (rank - this.activeRank[i] || to - this.activeTo[i]) > 0)\n i++;\n insert(this.active, i, value);\n insert(this.activeTo, i, to);\n insert(this.activeRank, i, rank);\n if (trackOpen)\n insert(trackOpen, i, this.cursor.from);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n // After calling this, if `this.point` != null, the next range is a\n // point. Otherwise, it's a regular range, covered by `this.active`.\n next() {\n let from = this.to, wasPoint = this.point;\n this.point = null;\n let trackOpen = this.openStart < 0 ? [] : null;\n for (;;) {\n let a = this.minActive;\n if (a > -1 && (this.activeTo[a] - this.cursor.from || this.active[a].endSide - this.cursor.startSide) < 0) {\n if (this.activeTo[a] > from) {\n this.to = this.activeTo[a];\n this.endSide = this.active[a].endSide;\n break;\n }\n this.removeActive(a);\n if (trackOpen)\n remove(trackOpen, a);\n }\n else if (!this.cursor.value) {\n this.to = this.endSide = 1000000000 /* C.Far */;\n break;\n }\n else if (this.cursor.from > from) {\n this.to = this.cursor.from;\n this.endSide = this.cursor.startSide;\n break;\n }\n else {\n let nextVal = this.cursor.value;\n if (!nextVal.point) { // Opening a range\n this.addActive(trackOpen);\n this.cursor.next();\n }\n else if (wasPoint && this.cursor.to == this.to && this.cursor.from < this.cursor.to) {\n // Ignore any non-empty points that end precisely at the end of the prev point\n this.cursor.next();\n }\n else { // New point\n this.point = nextVal;\n this.pointFrom = this.cursor.from;\n this.pointRank = this.cursor.rank;\n this.to = this.cursor.to;\n this.endSide = nextVal.endSide;\n this.cursor.next();\n this.forward(this.to, this.endSide);\n break;\n }\n }\n }\n if (trackOpen) {\n this.openStart = 0;\n for (let i = trackOpen.length - 1; i >= 0 && trackOpen[i] < from; i--)\n this.openStart++;\n }\n }\n activeForPoint(to) {\n if (!this.active.length)\n return this.active;\n let active = [];\n for (let i = this.active.length - 1; i >= 0; i--) {\n if (this.activeRank[i] < this.pointRank)\n break;\n if (this.activeTo[i] > to || this.activeTo[i] == to && this.active[i].endSide >= this.point.endSide)\n active.push(this.active[i]);\n }\n return active.reverse();\n }\n openEnd(to) {\n let open = 0;\n for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > to; i--)\n open++;\n return open;\n }\n}\nfunction compare(a, startA, b, startB, length, comparator) {\n a.goto(startA);\n b.goto(startB);\n let endB = startB + length;\n let pos = startB, dPos = startB - startA;\n for (;;) {\n let diff = (a.to + dPos) - b.to || a.endSide - b.endSide;\n let end = diff < 0 ? a.to + dPos : b.to, clipEnd = Math.min(end, endB);\n if (a.point || b.point) {\n if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) &&\n sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to))))\n comparator.comparePoint(pos, clipEnd, a.point, b.point);\n }\n else {\n if (clipEnd > pos && !sameValues(a.active, b.active))\n comparator.compareRange(pos, clipEnd, a.active, b.active);\n }\n if (end > endB)\n break;\n pos = end;\n if (diff <= 0)\n a.next();\n if (diff >= 0)\n b.next();\n }\n}\nfunction sameValues(a, b) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (a[i] != b[i] && !a[i].eq(b[i]))\n return false;\n return true;\n}\nfunction remove(array, index) {\n for (let i = index, e = array.length - 1; i < e; i++)\n array[i] = array[i + 1];\n array.pop();\n}\nfunction insert(array, index, value) {\n for (let i = array.length - 1; i >= index; i--)\n array[i + 1] = array[i];\n array[index] = value;\n}\nfunction findMinIndex(value, array) {\n let found = -1, foundPos = 1000000000 /* C.Far */;\n for (let i = 0; i < array.length; i++)\n if ((array[i] - foundPos || value[i].endSide - value[found].endSide) < 0) {\n found = i;\n foundPos = array[i];\n }\n return found;\n}\n\n/**\nCount the column position at the given offset into the string,\ntaking extending characters and tab size into account.\n*/\nfunction countColumn(string, tabSize, to = string.length) {\n let n = 0;\n for (let i = 0; i < to;) {\n if (string.charCodeAt(i) == 9) {\n n += tabSize - (n % tabSize);\n i++;\n }\n else {\n n++;\n i = findClusterBreak(string, i);\n }\n }\n return n;\n}\n/**\nFind the offset that corresponds to the given column position in a\nstring, taking extending characters and tab size into account. By\ndefault, the string length is returned when it is too short to\nreach the column. Pass `strict` true to make it return -1 in that\nsituation.\n*/\nfunction findColumn(string, col, tabSize, strict) {\n for (let i = 0, n = 0;;) {\n if (n >= col)\n return i;\n if (i == string.length)\n break;\n n += string.charCodeAt(i) == 9 ? tabSize - (n % tabSize) : 1;\n i = findClusterBreak(string, i);\n }\n return strict === true ? -1 : string.length;\n}\n\nexport { Annotation, AnnotationType, ChangeDesc, ChangeSet, CharCategory, Compartment, EditorSelection, EditorState, Facet, Line, MapMode, Prec, Range, RangeSet, RangeSetBuilder, RangeValue, SelectionRange, StateEffect, StateEffectType, StateField, Text, Transaction, codePointAt, codePointSize, combineConfig, countColumn, findClusterBreak, findColumn, fromCodePoint };\n","const C = \"\\u037c\"\nconst COUNT = typeof Symbol == \"undefined\" ? \"__\" + C : Symbol.for(C)\nconst SET = typeof Symbol == \"undefined\" ? \"__styleSet\" + Math.floor(Math.random() * 1e8) : Symbol(\"styleSet\")\nconst top = typeof globalThis != \"undefined\" ? globalThis : typeof window != \"undefined\" ? window : {}\n\n// :: - Style modules encapsulate a set of CSS rules defined from\n// JavaScript. Their definitions are only available in a given DOM\n// root after it has been _mounted_ there with `StyleModule.mount`.\n//\n// Style modules should be created once and stored somewhere, as\n// opposed to re-creating them every time you need them. The amount of\n// CSS rules generated for a given DOM root is bounded by the amount\n// of style modules that were used. So to avoid leaking rules, don't\n// create these dynamically, but treat them as one-time allocations.\nexport class StyleModule {\n // :: (Object