likec4 1.57.0 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/__app__/codegen/react.mjs +7 -8
  2. package/__app__/codegen/webcomponent.mjs +78 -889
  3. package/__app__/src/aichat/index.mjs +8 -1
  4. package/__app__/src/chunks/AIChat.mjs +956 -0
  5. package/__app__/src/chunks/LikeC4Styles.mjs +2164 -0
  6. package/__app__/src/chunks/ProjectsOverview.mjs +537 -0
  7. package/__app__/src/chunks/es.mjs +439 -0
  8. package/__app__/src/chunks/hooks.mjs +458 -0
  9. package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
  10. package/__app__/src/chunks/libs/@mantine.mjs +12974 -0
  11. package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
  12. package/__app__/src/chunks/libs/@tanstack.mjs +2693 -0
  13. package/__app__/src/chunks/libs/@xstate/react.mjs +1996 -0
  14. package/__app__/src/chunks/libs/@xyflow/react.mjs +5280 -0
  15. package/__app__/src/chunks/libs/bezier-js.mjs +1006 -0
  16. package/__app__/src/chunks/libs/d3.mjs +2842 -0
  17. package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
  18. package/__app__/src/chunks/libs/framer.mjs +5905 -0
  19. package/__app__/src/chunks/libs/zod.mjs +3173 -0
  20. package/__app__/src/chunks/rolldown-runtime.mjs +30 -0
  21. package/__app__/src/chunks/styled-system.mjs +1047 -0
  22. package/__app__/src/fonts.css +1 -1
  23. package/__app__/src/main.mjs +27659 -14
  24. package/__app__/src/style.css +1 -1
  25. package/dist/chunks/dist.mjs +10 -0
  26. package/dist/chunks/enableServer.mjs +1 -1
  27. package/dist/chunks/filenames.mjs +2 -2
  28. package/dist/chunks/index.d.mts +9 -9
  29. package/dist/chunks/index2.d.mts +2167 -867
  30. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  31. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  32. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  33. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  34. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  35. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  36. package/dist/chunks/libs/chevrotain.mjs +25 -25
  37. package/dist/chunks/libs/json5.mjs +1 -1
  38. package/dist/chunks/libs/langium.d.mts +2940 -2914
  39. package/dist/chunks/libs/langium.mjs +9 -9
  40. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  41. package/dist/chunks/libs/p-queue.mjs +1 -1
  42. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  43. package/dist/chunks/libs/pako.mjs +1 -1
  44. package/dist/chunks/libs/picomatch.mjs +1 -1
  45. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  46. package/dist/chunks/libs/remeda.mjs +1 -1
  47. package/dist/chunks/libs/ufo.mjs +1 -1
  48. package/dist/chunks/libs/unstorage.d.mts +1 -0
  49. package/dist/chunks/libs/unstorage.mjs +1 -1
  50. package/dist/chunks/libs/which.mjs +1 -1
  51. package/dist/chunks/libs/zod.d.mts +48 -36
  52. package/dist/chunks/libs/zod.mjs +65 -0
  53. package/dist/chunks/logger.mjs +1 -0
  54. package/dist/chunks/node.mjs +65 -63
  55. package/dist/chunks/rolldown-runtime.mjs +1 -1
  56. package/dist/chunks/sequence-view.mjs +1 -1
  57. package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
  58. package/dist/cli/index.mjs +186 -144
  59. package/dist/index.d.mts +3 -4
  60. package/dist/index.mjs +1 -1
  61. package/dist/model/index.d.mts +6 -5
  62. package/dist/vite-plugin/index.d.mts +6 -9
  63. package/dist/vite-plugin/index.mjs +1 -1
  64. package/dist/vite-plugin/internal/index.d.mts +64 -64
  65. package/dist/vite-plugin/internal/index.mjs +946 -1
  66. package/package.json +51 -52
  67. package/react/index.d.mts +853 -134
  68. package/react/index.mjs +49718 -44030
  69. package/__app__/chunks/AIChat2.mjs +0 -2
  70. package/__app__/chunks/DiagramActorProvider.mjs +0 -10
  71. package/__app__/chunks/EmbedPage.mjs +0 -1
  72. package/__app__/chunks/ExportPage.mjs +0 -2
  73. package/__app__/chunks/LikeC4Diagram.mjs +0 -19
  74. package/__app__/chunks/LikeC4Styles.mjs +0 -48
  75. package/__app__/chunks/Markdown.mjs +0 -1
  76. package/__app__/chunks/NavigationPanel.mjs +0 -1
  77. package/__app__/chunks/ViewReact.mjs +0 -1
  78. package/__app__/chunks/adhoc-editor.mjs +0 -1
  79. package/__app__/chunks/aichat.mjs +0 -1
  80. package/__app__/chunks/box.mjs +0 -1
  81. package/__app__/chunks/create-style-context.mjs +0 -1
  82. package/__app__/chunks/css.mjs +0 -1
  83. package/__app__/chunks/factory.mjs +0 -1
  84. package/__app__/chunks/hooks.mjs +0 -1
  85. package/__app__/chunks/hstack.mjs +0 -1
  86. package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
  87. package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
  88. package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
  89. package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
  90. package/__app__/chunks/libs/@mantine/core.mjs +0 -41
  91. package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
  92. package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
  93. package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
  94. package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
  95. package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
  96. package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
  97. package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
  98. package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
  99. package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
  100. package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
  101. package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
  102. package/__app__/chunks/libs/@xstate/react.mjs +0 -1
  103. package/__app__/chunks/libs/@xstate/store.mjs +0 -1
  104. package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
  105. package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
  106. package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
  107. package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
  108. package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
  109. package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
  110. package/__app__/chunks/libs/bezier-js.mjs +0 -1
  111. package/__app__/chunks/libs/copy-anything.mjs +0 -1
  112. package/__app__/chunks/libs/d3-path.mjs +0 -1
  113. package/__app__/chunks/libs/d3-shape.mjs +0 -1
  114. package/__app__/chunks/libs/fast-equals.mjs +0 -1
  115. package/__app__/chunks/libs/framer-motion.mjs +0 -9
  116. package/__app__/chunks/libs/html-to-image.mjs +0 -2
  117. package/__app__/chunks/libs/motion-dom.mjs +0 -1
  118. package/__app__/chunks/libs/nanostores.mjs +0 -1
  119. package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
  120. package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
  121. package/__app__/chunks/libs/remeda.mjs +0 -1
  122. package/__app__/chunks/libs/superjson.mjs +0 -1
  123. package/__app__/chunks/libs/zod.mjs +0 -64
  124. package/__app__/chunks/rolldown-runtime.mjs +0 -1
  125. package/__app__/chunks/styles.css.mjs +0 -1
  126. package/__app__/chunks/txt.mjs +0 -1
  127. package/__app__/chunks/useLikeC4Project.mjs +0 -1
  128. package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
  129. package/__app__/src/pages/EmbedPage.mjs +0 -1
  130. package/__app__/src/pages/ExportPage.mjs +0 -1
  131. package/__app__/src/pages/ProjectsOverview.mjs +0 -1
  132. package/__app__/src/pages/ViewAsD2.mjs +0 -1
  133. package/__app__/src/pages/ViewAsDot.mjs +0 -1
  134. package/__app__/src/pages/ViewAsMmd.mjs +0 -1
  135. package/__app__/src/pages/ViewAsPuml.mjs +0 -1
  136. package/__app__/src/pages/ViewEditor.mjs +0 -1
  137. package/__app__/src/pages/ViewReact.mjs +0 -1
  138. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  139. package/dist/chunks/libs/@hono/mcp.mjs +0 -70
  140. package/dist/chunks/libs/@hono/node-server.mjs +0 -1
  141. package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
  142. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  143. package/dist/chunks/libs/ajv.mjs +0 -1
  144. package/dist/chunks/libs/ansi-align.mjs +0 -2
  145. package/dist/chunks/libs/ansi-regex.mjs +0 -1
  146. package/dist/chunks/libs/ansi-styles.mjs +0 -1
  147. package/dist/chunks/libs/atomically.mjs +0 -1
  148. package/dist/chunks/libs/boxen.mjs +0 -22
  149. package/dist/chunks/libs/conf.mjs +0 -1
  150. package/dist/chunks/libs/defu.mjs +0 -1
  151. package/dist/chunks/libs/destr.mjs +0 -1
  152. package/dist/chunks/libs/find-up-simple.mjs +0 -1
  153. package/dist/chunks/libs/get-port.mjs +0 -1
  154. package/dist/chunks/libs/hono.mjs +0 -1
  155. package/dist/chunks/libs/is-docker.mjs +0 -1
  156. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  157. package/dist/chunks/libs/is-inside-container.mjs +0 -1
  158. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  159. package/dist/chunks/libs/isexe.mjs +0 -1
  160. package/dist/chunks/libs/ky.mjs +0 -3
  161. package/dist/chunks/libs/p-debounce.mjs +0 -1
  162. package/dist/chunks/libs/p-limit.mjs +0 -1
  163. package/dist/chunks/libs/p-timeout.mjs +0 -1
  164. package/dist/chunks/libs/package-up.mjs +0 -1
  165. package/dist/chunks/libs/parse-ms.mjs +0 -1
  166. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  167. package/dist/chunks/libs/strip-indent.mjs +0 -1
  168. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  169. package/dist/chunks/libs/ts-graphviz.mjs +0 -1
  170. package/dist/chunks/libs/unctx.mjs +0 -1
  171. package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
  172. package/dist/chunks/libs/word-wrap.mjs +0 -12
  173. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
  174. package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
  175. package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
  176. package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
  177. package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
  178. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
@@ -5,7 +5,7 @@ import"../rolldown-runtime.mjs";var e={Space_Separator:/[\u1680\u2000-\u200A\u20
5
5
  `:case`\r`:throw invalidChar(read());case`\u2028`:case`\u2029`:separatorChar(g);break;case void 0:throw invalidChar(read())}p+=read()},start(){switch(g){case`{`:case`[`:return newToken(`punctuator`,read())}f=`value`},beforePropertyName(){switch(g){case`$`:case`_`:p=read(),f=`identifierName`;return;case`\\`:read(),f=`identifierNameStartEscape`;return;case`}`:return newToken(`punctuator`,read());case`"`:case`'`:m=read()===`"`,f=`string`;return}if(t.isIdStartChar(g)){p+=read(),f=`identifierName`;return}throw invalidChar(read())},afterPropertyName(){if(g===`:`)return newToken(`punctuator`,read());throw invalidChar(read())},beforePropertyValue(){f=`value`},afterPropertyValue(){switch(g){case`,`:case`}`:return newToken(`punctuator`,read())}throw invalidChar(read())},beforeArrayValue(){if(g===`]`)return newToken(`punctuator`,read());f=`value`},afterArrayValue(){switch(g){case`,`:case`]`:return newToken(`punctuator`,read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(e,t){return{type:e,value:t,line:o,column:s}}function literal(e){for(let t of e){if(peek()!==t)throw invalidChar(read());read()}}function escape(){switch(peek()){case`b`:return read(),`\b`;case`f`:return read(),`\f`;case`n`:return read(),`
6
6
  `;case`r`:return read(),`\r`;case`t`:return read(),` `;case`v`:return read(),`\v`;case`0`:if(read(),t.isDigit(peek()))throw invalidChar(read());return`\0`;case`x`:return read(),hexEscape();case`u`:return read(),unicodeEscape();case`
7
7
  `:case`\u2028`:case`\u2029`:return read(),``;case`\r`:return read(),peek()===`
8
- `&&read(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw invalidChar(read());case void 0:throw invalidChar(read())}return read()}function hexEscape(){let e=``,n=peek();if(!t.isHexDigit(n)||(e+=read(),n=peek(),!t.isHexDigit(n)))throw invalidChar(read());return e+=read(),String.fromCodePoint(parseInt(e,16))}function unicodeEscape(){let e=``,n=4;for(;n-- >0;){let n=peek();if(!t.isHexDigit(n))throw invalidChar(read());e+=read()}return String.fromCodePoint(parseInt(e,16))}const v={start(){if(c.type===`eof`)throw invalidEOF();push()},beforePropertyName(){switch(c.type){case`identifier`:case`string`:l=c.value,r=`afterPropertyName`;return;case`punctuator`:pop();return;case`eof`:throw invalidEOF()}},afterPropertyName(){if(c.type===`eof`)throw invalidEOF();r=`beforePropertyValue`},beforePropertyValue(){if(c.type===`eof`)throw invalidEOF();push()},beforeArrayValue(){if(c.type===`eof`)throw invalidEOF();if(c.type===`punctuator`&&c.value===`]`){pop();return}push()},afterPropertyValue(){if(c.type===`eof`)throw invalidEOF();switch(c.value){case`,`:r=`beforePropertyName`;return;case`}`:pop()}},afterArrayValue(){if(c.type===`eof`)throw invalidEOF();switch(c.value){case`,`:r=`beforeArrayValue`;return;case`]`:pop()}},end(){}};function push(){let e;switch(c.type){case`punctuator`:switch(c.value){case`{`:e={};break;case`[`:e=[];break}break;case`null`:case`boolean`:case`numeric`:case`string`:e=c.value;break}if(u===void 0)u=e;else{let t=i[i.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,l,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)i.push(e),r=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}}function pop(){i.pop();let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function invalidChar(e){return syntaxError(e===void 0?`JSON5: invalid end of input at ${o}:${s}`:`JSON5: invalid character '${formatChar(e)}' at ${o}:${s}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${s}`)}function invalidIdentifier(){return s-=5,syntaxError(`JSON5: invalid identifier character at ${o}:${s}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){let t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){let t=e.charCodeAt(0).toString(16);return`\\x`+(`00`+t).substring(t.length)}return e}function syntaxError(e){let t=SyntaxError(e);return t.lineNumber=o,t.columnNumber=s,t}var y={parse:d,stringify:function stringify(e,n,r){let i=[],a=``,o,s,c=``,l;if(typeof n==`object`&&n&&!Array.isArray(n)&&(r=n.space,l=n.quote,n=n.replacer),typeof n==`function`)s=n;else if(Array.isArray(n)){o=[];for(let e of n){let t;typeof e==`string`?t=e:(typeof e==`number`||e instanceof String||e instanceof Number)&&(t=String(e)),t!==void 0&&o.indexOf(t)<0&&o.push(t)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r==`number`?r>0&&(r=Math.min(10,Math.floor(r)),c=` `.substr(0,r)):typeof r==`string`&&(c=r.substr(0,10)),serializeProperty(``,{"":e});function serializeProperty(e,t){let n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),s&&(n=s.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return quoteString(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?serializeArray(n):serializeObject(n)}function quoteString(e){let n={"'":.1,'"':.2},r={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},i=``;for(let a=0;a<e.length;a++){let o=e[a];switch(o){case`'`:case`"`:n[o]++,i+=o;continue;case`\0`:if(t.isDigit(e[a+1])){i+=`\\x00`;continue}}if(r[o]){i+=r[o];continue}if(o<` `){let e=o.charCodeAt(0).toString(16);i+=`\\x`+(`00`+e).substring(e.length);continue}i+=o}let a=l||Object.keys(n).reduce((e,t)=>n[e]<n[t]?e:t);return i=i.replace(new RegExp(a,`g`),r[a]),a+i+a}function serializeObject(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=o||Object.keys(e),r=[];for(let t of n){let n=serializeProperty(t,e);if(n!==void 0){let e=serializeKey(t)+`:`;c!==``&&(e+=` `),e+=n,r.push(e)}}let s;if(r.length===0)s=`{}`;else{let e;if(c===``)e=r.join(`,`),s=`{`+e+`}`;else{let n=`,
8
+ `&&read(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw invalidChar(read());case void 0:throw invalidChar(read())}return read()}function hexEscape(){let e=``,n=peek();if(!t.isHexDigit(n)||(e+=read(),n=peek(),!t.isHexDigit(n)))throw invalidChar(read());return e+=read(),String.fromCodePoint(parseInt(e,16))}function unicodeEscape(){let e=``,n=4;for(;n-->0;){let n=peek();if(!t.isHexDigit(n))throw invalidChar(read());e+=read()}return String.fromCodePoint(parseInt(e,16))}const v={start(){if(c.type===`eof`)throw invalidEOF();push()},beforePropertyName(){switch(c.type){case`identifier`:case`string`:l=c.value,r=`afterPropertyName`;return;case`punctuator`:pop();return;case`eof`:throw invalidEOF()}},afterPropertyName(){if(c.type===`eof`)throw invalidEOF();r=`beforePropertyValue`},beforePropertyValue(){if(c.type===`eof`)throw invalidEOF();push()},beforeArrayValue(){if(c.type===`eof`)throw invalidEOF();if(c.type===`punctuator`&&c.value===`]`){pop();return}push()},afterPropertyValue(){if(c.type===`eof`)throw invalidEOF();switch(c.value){case`,`:r=`beforePropertyName`;return;case`}`:pop()}},afterArrayValue(){if(c.type===`eof`)throw invalidEOF();switch(c.value){case`,`:r=`beforeArrayValue`;return;case`]`:pop()}},end(){}};function push(){let e;switch(c.type){case`punctuator`:switch(c.value){case`{`:e={};break;case`[`:e=[];break}break;case`null`:case`boolean`:case`numeric`:case`string`:e=c.value;break}if(u===void 0)u=e;else{let t=i[i.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,l,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)i.push(e),r=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}}function pop(){i.pop();let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function invalidChar(e){return syntaxError(e===void 0?`JSON5: invalid end of input at ${o}:${s}`:`JSON5: invalid character '${formatChar(e)}' at ${o}:${s}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${s}`)}function invalidIdentifier(){return s-=5,syntaxError(`JSON5: invalid identifier character at ${o}:${s}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){let t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){let t=e.charCodeAt(0).toString(16);return`\\x`+(`00`+t).substring(t.length)}return e}function syntaxError(e){let t=SyntaxError(e);return t.lineNumber=o,t.columnNumber=s,t}var y={parse:d,stringify:function stringify(e,n,r){let i=[],a=``,o,s,c=``,l;if(typeof n==`object`&&n&&!Array.isArray(n)&&(r=n.space,l=n.quote,n=n.replacer),typeof n==`function`)s=n;else if(Array.isArray(n)){o=[];for(let e of n){let t;typeof e==`string`?t=e:(typeof e==`number`||e instanceof String||e instanceof Number)&&(t=String(e)),t!==void 0&&o.indexOf(t)<0&&o.push(t)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r==`number`?r>0&&(r=Math.min(10,Math.floor(r)),c=` `.substr(0,r)):typeof r==`string`&&(c=r.substr(0,10)),serializeProperty(``,{"":e});function serializeProperty(e,t){let n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),s&&(n=s.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return quoteString(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?serializeArray(n):serializeObject(n)}function quoteString(e){let n={"'":.1,'"':.2},r={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},i=``;for(let a=0;a<e.length;a++){let o=e[a];switch(o){case`'`:case`"`:n[o]++,i+=o;continue;case`\0`:if(t.isDigit(e[a+1])){i+=`\\x00`;continue}}if(r[o]){i+=r[o];continue}if(o<` `){let e=o.charCodeAt(0).toString(16);i+=`\\x`+(`00`+e).substring(e.length);continue}i+=o}let a=l||Object.keys(n).reduce((e,t)=>n[e]<n[t]?e:t);return i=i.replace(new RegExp(a,`g`),r[a]),a+i+a}function serializeObject(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=o||Object.keys(e),r=[];for(let t of n){let n=serializeProperty(t,e);if(n!==void 0){let e=serializeKey(t)+`:`;c!==``&&(e+=` `),e+=n,r.push(e)}}let s;if(r.length===0)s=`{}`;else{let e;if(c===``)e=r.join(`,`),s=`{`+e+`}`;else{let n=`,
9
9
  `+a;e=r.join(n),s=`{
10
10
  `+a+e+`,
11
11
  `+t+`}`}}return i.pop(),a=t,s}function serializeKey(e){if(e.length===0)return quoteString(e,!0);let n=String.fromCodePoint(e.codePointAt(0));if(!t.isIdStartChar(n))return quoteString(e,!0);for(let r=n.length;r<e.length;r++)if(!t.isIdContinueChar(String.fromCodePoint(e.codePointAt(r))))return quoteString(e,!0);return e}function serializeArray(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=[];for(let t=0;t<e.length;t++){let r=serializeProperty(String(t),e);n.push(r===void 0?`null`:r)}let r;if(n.length===0)r=`[]`;else if(c===``)r=`[`+n.join(`,`)+`]`;else{let e=`,