likec4 1.55.1 → 1.57.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.
- package/__app__/chunks/AIChat2.mjs +2 -0
- package/__app__/chunks/DiagramActorProvider.mjs +10 -0
- package/__app__/chunks/EmbedPage.mjs +1 -0
- package/__app__/chunks/ExportPage.mjs +2 -0
- package/__app__/chunks/LikeC4Diagram.mjs +19 -0
- package/__app__/chunks/LikeC4Styles.mjs +48 -0
- package/__app__/chunks/Markdown.mjs +1 -0
- package/__app__/chunks/NavigationPanel.mjs +1 -0
- package/__app__/chunks/ViewReact.mjs +1 -0
- package/__app__/chunks/adhoc-editor.mjs +1 -0
- package/__app__/chunks/aichat.mjs +1 -0
- package/__app__/chunks/box.mjs +1 -0
- package/__app__/chunks/create-style-context.mjs +1 -0
- package/__app__/chunks/css.mjs +1 -0
- package/__app__/chunks/factory.mjs +1 -0
- package/__app__/chunks/hooks.mjs +1 -0
- package/__app__/chunks/hstack.mjs +1 -0
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/core.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/dom.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/react.mjs +1 -0
- package/__app__/chunks/libs/@mantine/core.mjs +41 -0
- package/__app__/chunks/libs/@mantine/hooks.mjs +1 -0
- package/__app__/chunks/libs/@nanostores/react.mjs +1 -0
- package/__app__/chunks/libs/@react-hookz/web.mjs +1 -0
- package/__app__/chunks/libs/@tabler/icons-react.mjs +358 -0
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/history.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/react-router.mjs +3 -0
- package/__app__/chunks/libs/@tanstack/router-core.mjs +1 -0
- package/__app__/chunks/libs/@xstate/react.mjs +1 -0
- package/__app__/chunks/libs/@xstate/store.mjs +1 -0
- package/__app__/chunks/libs/@xyflow/react.mjs +7 -0
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/collection.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/core.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/react.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +1 -0
- package/__app__/chunks/libs/bezier-js.mjs +1 -0
- package/__app__/chunks/libs/copy-anything.mjs +1 -0
- package/__app__/chunks/libs/d3-path.mjs +1 -0
- package/__app__/chunks/libs/d3-shape.mjs +1 -0
- package/__app__/chunks/libs/fast-equals.mjs +1 -0
- package/__app__/chunks/libs/framer-motion.mjs +9 -0
- package/__app__/chunks/libs/html-to-image.mjs +2 -0
- package/__app__/chunks/libs/motion-dom.mjs +1 -0
- package/__app__/chunks/libs/nanostores.mjs +1 -0
- package/__app__/chunks/libs/react-error-boundary.mjs +1 -0
- package/__app__/chunks/libs/react-resizable-panels.mjs +1 -0
- package/__app__/chunks/libs/remeda.mjs +1 -0
- package/__app__/chunks/libs/superjson.mjs +1 -0
- package/__app__/chunks/libs/zod.mjs +64 -0
- package/__app__/chunks/rolldown-runtime.mjs +1 -0
- package/__app__/chunks/styles.css.mjs +1 -0
- package/__app__/chunks/txt.mjs +1 -0
- package/__app__/chunks/useLikeC4Project.mjs +1 -0
- package/__app__/codegen/react.mjs +11 -0
- package/__app__/codegen/webcomponent.mjs +942 -0
- package/__app__/src/aichat/index.mjs +1 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +45 -0
- package/__app__/src/pages/AdHocViewEditor.mjs +1 -0
- package/__app__/src/pages/EmbedPage.mjs +1 -0
- package/__app__/src/pages/ExportPage.mjs +1 -0
- package/__app__/src/pages/ProjectsOverview.mjs +1 -0
- package/__app__/src/pages/ViewAsD2.mjs +1 -0
- package/__app__/src/pages/ViewAsDot.mjs +1 -0
- package/__app__/src/pages/ViewAsMmd.mjs +1 -0
- package/__app__/src/pages/ViewAsPuml.mjs +1 -0
- package/__app__/src/pages/ViewEditor.mjs +1 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -41
- package/dist/chunks/enableServer.mjs +1 -0
- package/dist/chunks/filenames.mjs +17 -0
- package/dist/{_chunks → chunks}/index.d.mts +2 -1
- package/dist/{_chunks → chunks}/index2.d.mts +639 -388
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -0
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/utils.mjs +1 -0
- package/dist/chunks/libs/@hono/mcp.mjs +70 -0
- package/dist/chunks/libs/@hono/node-server.mjs +1 -0
- package/dist/{_chunks → chunks}/libs/@logtape/logtape.d.mts +2 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -0
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -0
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
- package/dist/chunks/libs/ajv.mjs +1 -0
- package/dist/chunks/libs/ansi-align.mjs +2 -0
- package/dist/chunks/libs/ansi-regex.mjs +1 -0
- package/dist/chunks/libs/ansi-styles.mjs +1 -0
- package/dist/chunks/libs/atomically.mjs +1 -0
- package/dist/chunks/libs/birpc.mjs +1 -0
- package/dist/chunks/libs/boxen.mjs +22 -0
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -0
- package/dist/chunks/libs/chevrotain.mjs +58 -0
- package/dist/chunks/libs/conf.mjs +1 -0
- package/dist/chunks/libs/defu.mjs +1 -0
- package/dist/chunks/libs/destr.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -0
- package/dist/chunks/libs/find-up-simple.mjs +1 -0
- package/dist/chunks/libs/get-port.mjs +1 -0
- package/dist/chunks/libs/hono.mjs +1 -0
- package/dist/chunks/libs/is-docker.mjs +1 -0
- package/dist/chunks/libs/is-error-instance.mjs +1 -0
- package/dist/chunks/libs/is-inside-container.mjs +1 -0
- package/dist/chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/chunks/libs/isexe.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +14 -0
- package/dist/chunks/libs/khroma.mjs +1 -0
- package/dist/chunks/libs/ky.mjs +3 -0
- package/dist/{_chunks → chunks}/libs/langium.d.mts +9 -9
- package/dist/chunks/libs/langium.mjs +32 -0
- package/dist/chunks/libs/merge-error-cause.mjs +2 -0
- package/dist/chunks/libs/p-debounce.mjs +1 -0
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -0
- package/dist/chunks/libs/p-timeout.mjs +1 -0
- package/dist/chunks/libs/package-manager-detector.mjs +1 -0
- package/dist/chunks/libs/package-up.mjs +1 -0
- package/dist/chunks/libs/pako.mjs +3 -0
- package/dist/chunks/libs/parse-ms.mjs +1 -0
- package/dist/chunks/libs/pathe.mjs +1 -0
- package/dist/chunks/libs/picomatch.mjs +1 -0
- package/dist/chunks/libs/pretty-ms.mjs +1 -0
- package/dist/chunks/libs/remeda.mjs +1 -0
- package/dist/chunks/libs/safe-stringify.mjs +1 -0
- package/dist/chunks/libs/strip-indent.mjs +1 -0
- package/dist/chunks/libs/tinyrainbow.mjs +1 -0
- package/dist/chunks/libs/ts-graphviz.mjs +1 -0
- package/dist/chunks/libs/ufo.mjs +1 -0
- package/dist/chunks/libs/unctx.mjs +1 -0
- package/dist/chunks/libs/unstorage.mjs +1 -0
- package/dist/chunks/libs/vscode-languageserver.mjs +1 -0
- package/dist/chunks/libs/which.mjs +1 -0
- package/dist/chunks/libs/word-wrap.mjs +12 -0
- package/dist/{_chunks → chunks}/libs/zod.d.mts +62 -25
- package/dist/chunks/node.mjs +93 -0
- package/dist/chunks/plugin.mjs +593 -0
- package/dist/chunks/rolldown-runtime.mjs +1 -0
- package/dist/chunks/sequence-view.mjs +1 -0
- package/dist/cli/index.mjs +188 -59
- package/dist/config/index.d.mts +1 -2
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +2 -135
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +3 -2
- package/dist/model/index.mjs +1 -1
- package/dist/vite-plugin/index.d.mts +90 -9
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -0
- package/dist/{_chunks/libs/@nanostores/react.d.mts → vite-plugin/internal/index.d.mts} +103 -45
- package/dist/vite-plugin/internal/index.mjs +1 -0
- package/package.json +74 -80
- package/react/index.d.mts +84 -78
- package/react/index.mjs +51954 -53701
- package/vite-plugin/internal/package.json +2 -2
- package/vite-plugin-modules.d.ts +18 -0
- package/__app__/react/likec4.tsx +0 -25
- package/__app__/src/ProjectsOverview.js +0 -16
- package/__app__/src/const.js +0 -19
- package/__app__/src/likec4.js +0 -21254
- package/__app__/src/main.js +0 -7
- package/__app__/src/routes/index.js +0 -324
- package/__app__/src/routes/projects.js +0 -193
- package/__app__/src/routes/single.js +0 -1983
- package/__app__/src/vendors.js +0 -52683
- package/__app__/src/webcomponent.js +0 -68
- package/dist/THIRD-PARTY-LICENSES.md +0 -1609
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -30
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
- package/dist/_chunks/libs/@chevrotain/types.d.mts +0 -1
- package/dist/_chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/_chunks/libs/@hono/mcp.mjs +0 -45
- package/dist/_chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/_chunks/libs/@logtape/logtape.mjs +0 -4
- package/dist/_chunks/libs/@lume/kiwi.mjs +0 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/_chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/_chunks/libs/ajv.mjs +0 -1
- package/dist/_chunks/libs/ansi-align.mjs +0 -2
- package/dist/_chunks/libs/ansi-regex.mjs +0 -1
- package/dist/_chunks/libs/ansi-styles.mjs +0 -1
- package/dist/_chunks/libs/atomically.mjs +0 -1
- package/dist/_chunks/libs/birpc.mjs +0 -1
- package/dist/_chunks/libs/boxen.mjs +0 -22
- package/dist/_chunks/libs/chevrotain-allstar.mjs +0 -2
- package/dist/_chunks/libs/chevrotain.mjs +0 -58
- package/dist/_chunks/libs/conf.mjs +0 -1
- package/dist/_chunks/libs/defu.mjs +0 -1
- package/dist/_chunks/libs/destr.mjs +0 -1
- package/dist/_chunks/libs/esm-env.mjs +0 -1
- package/dist/_chunks/libs/eventemitter3.mjs +0 -1
- package/dist/_chunks/libs/fast-equals.mjs +0 -1
- package/dist/_chunks/libs/find-up-simple.mjs +0 -1
- package/dist/_chunks/libs/get-port.mjs +0 -1
- package/dist/_chunks/libs/is-docker.mjs +0 -1
- package/dist/_chunks/libs/is-error-instance.mjs +0 -1
- package/dist/_chunks/libs/is-inside-container.mjs +0 -1
- package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/_chunks/libs/isexe.mjs +0 -1
- package/dist/_chunks/libs/json5.mjs +0 -14
- package/dist/_chunks/libs/khroma.mjs +0 -1
- package/dist/_chunks/libs/ky.mjs +0 -3
- package/dist/_chunks/libs/langium.mjs +0 -33
- package/dist/_chunks/libs/merge-error-cause.mjs +0 -2
- package/dist/_chunks/libs/p-limit.mjs +0 -1
- package/dist/_chunks/libs/p-queue.mjs +0 -1
- package/dist/_chunks/libs/p-timeout.mjs +0 -1
- package/dist/_chunks/libs/package-manager-detector.mjs +0 -1
- package/dist/_chunks/libs/package-up.mjs +0 -1
- package/dist/_chunks/libs/pako.mjs +0 -1
- package/dist/_chunks/libs/parse-ms.mjs +0 -1
- package/dist/_chunks/libs/pathe.mjs +0 -1
- package/dist/_chunks/libs/picomatch.mjs +0 -1
- package/dist/_chunks/libs/pretty-ms.mjs +0 -1
- package/dist/_chunks/libs/remeda.mjs +0 -2
- package/dist/_chunks/libs/safe-stringify.mjs +0 -1
- package/dist/_chunks/libs/strip-indent.mjs +0 -1
- package/dist/_chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/_chunks/libs/ts-graphviz.d.mts +0 -10
- package/dist/_chunks/libs/ts-graphviz.mjs +0 -4
- package/dist/_chunks/libs/ufo.mjs +0 -1
- package/dist/_chunks/libs/unstorage.mjs +0 -1
- package/dist/_chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/_chunks/libs/which.mjs +0 -1
- package/dist/_chunks/libs/word-wrap.mjs +0 -12
- package/dist/_chunks/node.mjs +0 -76
- package/dist/_chunks/rolldown-runtime.mjs +0 -1
- package/dist/_chunks/sequence.mjs +0 -1
- package/dist/_chunks/src.mjs +0 -17
- package/dist/_chunks/src2.mjs +0 -499
- package/dist/vite-plugin/internal.d.mts +0 -44
- package/dist/vite-plugin/internal.mjs +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import"../../rolldown-runtime.mjs";function isForwardRefNode(e){return typeof e==`object`&&!!e&&typeof e.id==`string`}function isNodeModel(e){return typeof e==`object`&&!!e&&e.$$type===`Node`&&typeof e.id==`string`}function isNodeRef(e){return isNodeModel(e)||isForwardRefNode(e)}function isNodeRefLike(e){return typeof e==`string`||isNodeRef(e)}function isNodeRefGroupLike(e){return Array.isArray(e)&&e.every(isNodeRefLike)}function isCompass(e){return[`n`,`ne`,`e`,`se`,`s`,`sw`,`w`,`nw`,`c`].includes(e)}function toNodeRef(e){if(isNodeRef(e))return e;let[t,n,r]=e.split(`:`);return isCompass(r)?{id:t,port:n,compass:r}:{id:t,port:n}}function toNodeRefGroup(e){if(e.length<1)throw Error(`EdgeTargets must have at least 1 elements.`);if(!e.every(e=>isNodeRefLike(e)))throw Error(`The element of Edge target is missing or not satisfied as Edge target.`);return e.map(e=>toNodeRef(e))}const e=Object.seal({Graph:null,Digraph:null,Subgraph:null,Node:null,Edge:null});function createModelsContext(t){return Object.assign(Object.seal(Object.assign({},e)),t)}var ASTNodeCountExceededError=class extends Error{constructor(e,t){super(`AST node count (${e}) exceeds maximum allowed (${t}). Consider increasing 'maxASTNodes' option or simplifying the input.`),this.nodeCount=e,this.maxNodes=t,this.name=`ASTNodeCountExceededError`}},Builder=class{constructor(e){this.options=e,this.maxNodes=e?.maxASTNodes??1e5}nodeCount=0;maxNodes;getLocation(){return this.options?.locationFunction?.()??null}createElement(e,t,n=[]){if(this.nodeCount++,this.maxNodes>0&&this.nodeCount>this.maxNodes)throw new ASTNodeCountExceededError(this.nodeCount,this.maxNodes);return{location:this.getLocation(),...t,type:e,children:n}}resetNodeCount(){this.nodeCount=0}};function createElementFactory(e){let t=new Builder(e);return t.createElement.bind(t)}createElementFactory();const t={match(e){return e.type===`AttributeList`},*print(e,t){t.children.length===0?yield`${t.kind.toLocaleLowerCase()} [];`:(yield`${t.kind.toLocaleLowerCase()} [`,yield*e.printChildren(t.children),yield`];`)}},n={match(e){return e.type===`Attribute`},*print(e,t){yield*e.print(t.key),yield` = `,yield*e.print(t.value),yield`;`}};function escapeComment(e,t){let n=e.replace(/\0/g,``);return t===`Block`&&(n=n.replace(/\*\//g,`*/`)),n}const r=/\r?\n/,i={Block:` * `,Macro:`# `,Slash:`// `},a={match(e){return e.type===`Comment`},*print(e,t){let n=i[t.kind];t.kind===`Block`&&(yield*[`/**`,e.EOL]);let a=escapeComment(t.value,t.kind).split(r),o=a.length;for(let t=0;t<o;t++)yield n,yield a[t],t<o-1&&(yield e.EOL);t.kind===`Block`&&(yield*[e.EOL,` */`])}},o={match(e){return e.type===`Dot`},*print(e,t){yield*e.join(t.children,e.EOL)}},s={match(e){return e.type===`Edge`},*print(e,t){yield*e.join(t.targets,e.directed?` -> `:` -- `),t.children.length===0?yield`;`:(yield` [`,yield*e.printChildren(t.children),yield`];`)}},c={match(e){return e.type===`Graph`},*print(e,t){e.directed=t.directed,t.strict&&(yield`strict `),yield t.directed?`digraph `:`graph `,t.id&&(yield*e.print(t.id),yield` `),yield`{`,t.children.length>=1&&(yield*e.printChildren(t.children)),yield`}`}},escape=e=>e.replace(/\0/g,``).replace(/(?<!\\)"|[\r\n]/g,escapeReplacer),l={"\r":String.raw`\r`,"\n":String.raw`\n`,'"':String.raw`\"`};function escapeReplacer(e){return l[e]}const u=[t,n,a,o,s,c,{match(e){return e.type===`Literal`},*print(e,t){switch(t.quoted){case`html`:yield`<`,yield t.value,yield`>`;return;case!0:yield`"`,yield escape(t.value),yield`"`;return;default:yield t.value;return}}},{match(e){return e.type===`Node`},*print(e,t){yield*e.print(t.id),t.children.length>=1&&(yield` [`,yield*e.printChildren(t.children),yield`]`),yield`;`}},{match(e){return e.type===`NodeRefGroup`},*print(e,t){yield`{`,yield*e.join(t.children,` `),yield`}`}},{match(e){return e.type===`NodeRef`},*print(e,t){yield*e.print(t.id),t.port&&(yield`:`,yield*e.print(t.port)),t.compass&&(yield`:`,yield*e.print(t.compass))}},{match(e){return e.type===`Subgraph`},*print(e,t){yield`subgraph`,t.id&&(yield` `,yield*e.print(t.id)),yield` {`,t.children.length>=1&&(yield*e.printChildren(t.children)),yield`}`}}];var Printer=class{constructor(e={}){this.options=e}#e=[...u];print(e){return Array.from(this.toChunks(e)).join(``)}toChunks(e){let t=[...this.#e],{indentSize:n=2,indentStyle:r=`space`,endOfLine:i=`lf`}=this.options,a=i===`crlf`?`\r
|
|
2
|
+
`:`
|
|
3
|
+
`,o=r===`space`?` `.repeat(n):` `,s={directed:!0,EOL:a,*printChildren(e){yield*indent(function*(){yield a,yield*s.join(e,a)}),yield a},*print(e){for(let n of t)if(n.match(e)){yield*n.print(this,e);return}throw Error(`No matching plugin found for AST node: ${JSON.stringify(e)}`)},*join(e,t){let n=e.length;for(let r=0;r<n;r++)yield*s.print(e[r]),r<n-1&&(yield t)}};return{[Symbol.iterator]:function*(){yield*s.print(e)}};function*indent(e){for(let t of e())yield t,t===a&&(yield o)}}};function stringify(e,t){let n=new Printer(t).print(e);if(!n)throw Error();return n}function convertAttribute(e,t,n){if(typeof n==`string`){let r=n.trim();return/^<.+>$/ms.test(r)?e(`Attribute`,{key:e(`Literal`,{value:t,quoted:!1},[]),value:e(`Literal`,{value:r.slice(1,-1),quoted:`html`},[])},[]):e(`Attribute`,{key:e(`Literal`,{value:t,quoted:!1},[]),value:e(`Literal`,{value:n,quoted:!0},[])},[])}return e(`Attribute`,{key:e(`Literal`,{value:t,quoted:!1},[]),value:e(`Literal`,{value:String(n),quoted:!1},[])},[])}function convertComment(e,t,n){return e(`Comment`,{kind:n,value:t},[])}function convertClusterChildren(e,t){let{createElement:n}=e;return Array.from((function*(){for(let[e,r]of t.values)yield convertAttribute(n,e,r);for(let r of Object.values(t.attributes))r.size>0&&(r.comment&&(yield convertComment(n,r.comment,e.commentKind)),yield e.convert(r));for(let r of t.nodes)r.comment&&(yield convertComment(n,r.comment,e.commentKind)),yield e.convert(r);for(let r of t.subgraphs)r.comment&&(yield convertComment(n,r.comment,e.commentKind)),yield e.convert(r);for(let r of t.edges)r.comment&&(yield convertComment(n,r.comment,e.commentKind)),yield e.convert(r)})())}const d=[{match(e){return e.$$type===`AttributeList`},convert(e,t){let{createElement:n}=e;return n(`AttributeList`,{kind:t.$$kind},t.values.map(([e,t])=>convertAttribute(n,e,t)))}},{match(e){return e.$$type===`Edge`},convert(e,t){let{createElement:n}=e;return n(`Edge`,{targets:t.targets.map(e=>isNodeModel(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[])},[]):isForwardRefNode(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[]),port:e.port?n(`Literal`,{value:e.port,quoted:!0},[]):void 0,compass:e.compass?n(`Literal`,{value:e.compass,quoted:!0},[]):void 0},[]):n(`NodeRefGroup`,{},e.map(e=>isNodeModel(e)?n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[])},[]):n(`NodeRef`,{id:n(`Literal`,{value:e.id,quoted:!0},[]),port:e.port?n(`Literal`,{value:e.port,quoted:!0},[]):void 0,compass:e.compass?n(`Literal`,{value:e.compass,quoted:!0},[]):void 0},[]))))},[...t.attributes.comment?[convertComment(n,t.attributes.comment,e.commentKind)]:[],...t.attributes.values.map(([e,t])=>convertAttribute(n,e,t))])}},{match(e){return e.$$type===`Node`},convert(e,t){let{createElement:n}=e;return n(`Node`,{id:n(`Literal`,{value:t.id,quoted:!0},[])},[...t.attributes.comment?[convertComment(n,t.attributes.comment,e.commentKind)]:[],...t.attributes.values.map(([e,t])=>convertAttribute(n,e,t))])}},{match(e){return e.$$type===`Graph`},convert(e,t){let{createElement:n}=e;return n(`Dot`,{},[...t.comment?[convertComment(n,t.comment,e.commentKind)]:[],n(`Graph`,{directed:t.directed,strict:t.strict,id:t.id?n(`Literal`,{value:t.id,quoted:!0},[]):void 0},convertClusterChildren(e,t))])}},{match(e){return e.$$type===`Subgraph`},convert(e,t){let{createElement:n}=e;return n(`Subgraph`,{id:t.id?n(`Literal`,{value:t.id,quoted:!0},[]):void 0},convertClusterChildren(e,t))}}];var FromModelConverter=class{constructor(e={}){this.options=e}#e=[...d];convert(e){let t=[...this.#e],{commentKind:n=`Slash`,maxASTNodes:r}=this.options,i={commentKind:n,createElement:createElementFactory({maxASTNodes:r}),convert(e){for(let n of t)if(n.match(e))return n.convert(i,e);throw Error()}};return i.convert(e)}};function fromModel(e,t){return new FromModelConverter(t).convert(e)}export{isNodeRefGroupLike as a,toNodeRefGroup as c,createModelsContext as i,stringify as n,isNodeRefLike as o,e as r,toNodeRef as s,fromModel as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { i as __name } from "../../rolldown-runtime.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@ts-graphviz+common@3.0.5/node_modules/@ts-graphviz/common/lib/common.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
declare type $keywords<T extends string> = { [key in T]: key };
|
|
8
|
+
//#endregion
|
|
9
|
+
export { $keywords as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../rolldown-runtime.mjs";import{a as e,c as t,i as n,o as r,r as i,s as a}from"./ast.mjs";var DotObject=class{},AttributesBase=class extends DotObject{#e=new Map;constructor(e){super(),e!==void 0&&this.apply(e)}get values(){return Array.from(this.#e.entries())}get size(){return this.#e.size}get(e){return this.#e.get(e)}set(e,t){t!=null&&this.#e.set(e,t)}delete(e){this.#e.delete(e)}apply(e){let t=Array.isArray(e)?e:Object.entries(e);for(let[e,n]of t)this.set(e,n)}clear(){this.#e.clear()}},AttributeList=class extends AttributesBase{constructor(e,t){super(t),this.$$kind=e}get $$type(){return`AttributeList`}comment},AttributesGroup=class extends AttributesBase{comment},GraphBase=class extends AttributesBase{#e=i;id;comment;attributes=Object.freeze({graph:new AttributeList(`Graph`),edge:new AttributeList(`Edge`),node:new AttributeList(`Node`)});get nodes(){return Array.from(this.#t.nodes.values())}get edges(){return Array.from(this.#t.edges.values())}get subgraphs(){return Array.from(this.#t.subgraphs.values())}#t={nodes:new Map,edges:new Set,subgraphs:new Set};with(e){this.#e=n(e)}addNode(e){this.#t.nodes.set(e.id,e)}addEdge(e){this.#t.edges.add(e)}addSubgraph(e){this.#t.subgraphs.add(e)}existNode(e){return this.#t.nodes.has(e)}existEdge(e){return this.#t.edges.has(e)}existSubgraph(e){return this.#t.subgraphs.has(e)}createSubgraph(...e){let t=new this.#e.Subgraph(...e);return t.with(this.#e),this.addSubgraph(t),t}removeNode(e){this.#t.nodes.delete(typeof e==`string`?e:e.id)}removeEdge(e){this.#t.edges.delete(e)}removeSubgraph(e){this.#t.subgraphs.delete(e)}createNode(e,t){let n=new this.#e.Node(e,t);return this.addNode(n),n}getSubgraph(e){return Array.from(this.#t.subgraphs.values()).find(t=>t.id===e)}getNode(e){return this.#t.nodes.get(e)}createEdge(n,r){let i=n.map(n=>e(n)?t(n):a(n)),o=new this.#e.Edge(i,r);return this.addEdge(o),o}subgraph(...e){let t=e.find(e=>typeof e==`string`),n=e.find(e=>typeof e==`object`&&!!e),r=e.find(e=>typeof e==`function`),i=t?this.getSubgraph(t)??this.createSubgraph(t):this.createSubgraph();return n!==void 0&&i.apply(n),r!==void 0&&r(i),i}node(e,...t){if(typeof e==`string`){let n=e,r=t.find(e=>typeof e==`object`&&!!e),i=t.find(e=>typeof e==`function`),a=this.getNode(n)??this.createNode(n);return r!==void 0&&a.attributes.apply(r),i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.node.apply(e)}edge(e,...t){if(Array.isArray(e)){let n=e,r=t.find(e=>typeof e==`object`),i=t.find(e=>typeof e==`function`),a=this.createEdge(n,r);return i!==void 0&&i(a),a}typeof e==`object`&&e&&this.attributes.edge.apply(e)}graph(e){this.attributes.graph.apply(e)}},RootGraph=class extends GraphBase{get $$type(){return`Graph`}id;strict;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`),this.strict=e.find(e=>typeof e==`boolean`)??!1;let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}},Digraph=class extends RootGraph{get directed(){return!0}},Edge=class extends DotObject{constructor(e,t){if(super(),this.targets=e,e.length<2&&(r(e[0])&&r(e[1]))===!1)throw Error(`The element of Edge target is missing or not satisfied as Edge target.`);this.attributes=new AttributesGroup(t)}get $$type(){return`Edge`}comment;attributes},Graph=class extends RootGraph{get directed(){return!1}},Node=class extends DotObject{constructor(e,t){super(),this.id=e,this.attributes=new AttributesGroup(t)}get $$type(){return`Node`}comment;attributes;port(e){return typeof e==`string`?{id:this.id,port:e}:{id:this.id,...e}}},Subgraph=class extends GraphBase{get $$type(){return`Subgraph`}id;constructor(...e){super(),this.id=e.find(e=>typeof e==`string`);let t=e.find(e=>typeof e==`object`&&!!e);t!==void 0&&this.apply(t)}isSubgraphCluster(){return typeof this.id==`string`?this.id.startsWith(`cluster`):!1}};function registerDefault(){Object.assign(i,{Graph,Digraph,Subgraph,Node,Edge})}export{registerDefault as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";import{A as t,C as n,D as r,E as i,M as a,O as o,S as s,T as c,_ as l,b as u,j as d,k as f,v as p,w as m,x as h,y as g}from"./@modelcontextprotocol/sdk.mjs";var _=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let n=a(),r=t(),o=i(),s=m(),c={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>dynamicAnchor(e,e.schema)};function dynamicAnchor(e,t){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;let o=(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(t)}`,s=a.errSchemaPath===`#`?a.validateName:_getValidate(e);i.if((0,n._)`!${o}`,()=>i.assign(o,s))}e.dynamicAnchor=dynamicAnchor;function _getValidate(e){let{schemaEnv:t,schema:n,self:r}=e.it,{root:i,baseId:a,localRefs:c,meta:l}=t.root,{schemaId:u}=r.opts,d=new o.SchemaEnv({schema:n,schemaId:u,root:i,baseId:a,localRefs:c,meta:l});return o.compileSchema.call(r,d),(0,s.getValidate)(e,d)}e.default=c})),v=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let n=a(),r=t(),i=m(),o={keyword:`$dynamicRef`,schemaType:`string`,code:e=>dynamicRef(e,e.schema)};function dynamicRef(e,t){let{gen:a,keyword:o,it:s}=e;if(t[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=t.slice(1);if(s.allErrors)_dynamicRef();else{let t=a.let(`valid`,!1);_dynamicRef(t),e.ok(t)}function _dynamicRef(e){if(s.schemaEnv.root.dynamicAnchors[c]){let t=a.let(`_v`,(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(c)}`);a.if(t,_callRef(t,e),_callRef(s.validateName,e))}else _callRef(s.validateName,e)()}function _callRef(t,n){return n?()=>a.block(()=>{(0,i.callRef)(e,t),a.let(n,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=dynamicRef,e.default=o})),y=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_(),n=d();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),b=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=v();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),x=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_(),n=v(),r=y(),i=b();e.default=[t.default,n.default,r.default,i.default]})),S=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=h();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),C=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=h();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),w=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=d();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),T=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=S(),n=C(),r=w();e.default=[t.default,n.default,r.default]})),E=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let n=a(),r=d(),i=t();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,n._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:t,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof n.Name?t.if((0,n._)`${u} !== true`,()=>t.forIn(`key`,o,e=>t.if(unevaluatedDynamic(u,e),()=>unevaluatedPropCode(e)))):u!==!0&&t.forIn(`key`,o,e=>u===void 0?unevaluatedPropCode(e):t.if(unevaluatedStatic(u,e),()=>unevaluatedPropCode(e))),c.props=!0,e.ok((0,n._)`${s} === ${i.default.errors}`);function unevaluatedPropCode(i){if(a===!1){e.setParams({unevaluatedProperty:i}),e.error(),l||t.break();return}if(!(0,r.alwaysValidSchema)(c,a)){let a=t.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:i,dataPropType:r.Type.Str},a),l||t.if((0,n.not)(a),()=>t.break())}}function unevaluatedDynamic(e,t){return(0,n._)`!${e} || !${e}[${t}]`}function unevaluatedStatic(e,t){let r=[];for(let i in e)e[i]===!0&&r.push((0,n._)`${t} !== ${i}`);return(0,n.and)(...r)}}}})),D=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=a(),n=d();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=r.const(`len`,(0,t._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,t._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,n.alwaysValidSchema)(o,i)){let n=r.var(`valid`,(0,t._)`${c} <= ${s}`);r.if((0,t.not)(n),()=>validateItems(n,s)),e.ok(n)}o.items=!0;function validateItems(i,a){r.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:n.Type.Num},i),o.allErrors||r.if((0,t.not)(i),()=>r.break())})}}}})),O=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=E(),n=D();e.default=[t.default,n.default]})),k=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=n(),r=s(),i=u(),a=x(),o=T(),c=O(),l=g(),d=p();e.default=[a.default,t.default,r.default,(0,i.default)(!0),l.default,d.metadataVocabulary,d.contentVocabulary,o.default,c.default]})),A=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/schema`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Core and Validation specifications meta-schema`,allOf:[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],type:[`object`,`boolean`],$comment:`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,properties:{definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}}}})),j=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/applicator`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:`meta`,title:`Applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},$defs:{schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}}}})),M=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/unevaluated`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:`meta`,title:`Unevaluated applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}}}})),N=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/content`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Content vocabulary meta-schema`,type:[`object`,`boolean`],properties:{contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}}}})),P=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/core`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:`meta`,title:`Core vocabulary meta-schema`,type:[`object`,`boolean`],properties:{$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},$defs:{anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}}}})),F=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/format-annotation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:`meta`,title:`Format vocabulary meta-schema for annotation results`,type:[`object`,`boolean`],properties:{format:{type:`string`}}}})),I=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/meta-data`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:`meta`,title:`Meta-data vocabulary meta-schema`,type:[`object`,`boolean`],properties:{title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}}}})),L=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/validation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:`meta`,title:`Validation vocabulary meta-schema`,type:[`object`,`boolean`],properties:{type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},$defs:{nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}}}})),R=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=A(),n=j(),r=M(),i=N(),a=P(),o=F(),s=I(),c=L(),l=[`/properties`];function addMetaSchema2020(e){return[t,n,r,i,a,with$data(this,o),s,with$data(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function with$data(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=addMetaSchema2020})),z=e(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=c(),i=k(),s=l(),u=R(),d=`https://json-schema.org/draft/2020-12/schema`;var Ajv2020=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(u.default.call(this,e),this.refs[`http://json-schema.org/schema`]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}};e.Ajv2020=Ajv2020,t.exports=e=Ajv2020,t.exports.Ajv2020=Ajv2020,Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ajv2020;var p=f();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var m=a();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var h=o();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var g=r();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return g.default}})}));export{z as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";var t=e(((e,t)=>{t.exports=({onlyFirst:e=!1}={})=>{let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}})),n=e(((e,n)=>{let r=t();n.exports=e=>typeof e==`string`?e.replace(r(),``):e})),r=e(((e,t)=>{let isFullwidthCodePoint=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);t.exports=isFullwidthCodePoint,t.exports.default=isFullwidthCodePoint})),i=e(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),a=e(((e,t)=>{let a=n(),o=r(),s=i(),stringWidth=e=>{if(typeof e!=`string`||e.length===0||(e=a(e),e.length===0))return 0;e=e.replace(s(),` `);let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=o(r)?2:1)}return t};t.exports=stringWidth,t.exports.default=stringWidth})),o=e(((e,t)=>{let n=a();function ansiAlign(e,t){if(!e)return e;t||={};let r=t.align||`center`;if(r===`left`)return e;let i=t.split||`
|
|
2
|
+
`,a=t.pad||` `,o=r===`right`?fullDiff:halfDiff,s=!1;Array.isArray(e)||(s=!0,e=String(e).split(i));let c,l=0;return e=e.map(function(e){return e=String(e),c=n(e),l=Math.max(c,l),{str:e,width:c}}).map(function(e){return Array(o(l,e.width)+1).join(a)+e.str}),s?e.join(i):e}ansiAlign.left=function left(e){return ansiAlign(e,{align:`left`})},ansiAlign.center=function center(e){return ansiAlign(e,{align:`center`})},ansiAlign.right=function right(e){return ansiAlign(e,{align:`right`})},t.exports=ansiAlign;function halfDiff(e,t){return Math.floor((e-t)/2)}function fullDiff(e,t){return e-t}}));export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function ansiRegex({onlyFirst:e=!1}={}){let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`);return new RegExp(t,e?void 0:`g`)}export{ansiRegex as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";const wrapAnsi16=(e=0)=>t=>`\u001B[${t+e}m`,wrapAnsi256=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,wrapAnsi16m=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(e.modifier);const t=Object.keys(e.color),n=Object.keys(e.bgColor);[...t,...n];function assembleStyles(){let t=new Map;for(let[n,r]of Object.entries(e)){for(let[n,i]of Object.entries(r))e[n]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},r[n]=e[n],t.set(i[0],i[1]);Object.defineProperty(e,n,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close=`\x1B[39m`,e.bgColor.close=`\x1B[49m`,e.color.ansi=wrapAnsi16(),e.color.ansi256=wrapAnsi256(),e.color.ansi16m=wrapAnsi16m(),e.bgColor.ansi=wrapAnsi16(10),e.bgColor.ansi256=wrapAnsi256(10),e.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(e,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>e.ansi256ToAnsi(e.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>e.ansi256ToAnsi(e.hexToAnsi256(t)),enumerable:!1}}),e}const r=assembleStyles();export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";import{promisify as e}from"node:util";import t from"node:path";import n from"node:os";import r from"node:fs";import i from"node:process";const attemptifyAsync=(e,t)=>function attemptified(...n){return e.apply(void 0,n).catch(t)},attemptifySync=(e,t)=>function attemptified(...n){try{return e.apply(void 0,n)}catch(e){return t(e)}},a=i.getuid?!i.getuid():!1,NOOP=()=>void 0,o={isChangeErrorOk:e=>{if(!o.isNodeError(e))return!1;let{code:t}=e;return t===`ENOSYS`||!a&&(t===`EINVAL`||t===`EPERM`)},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!o.isNodeError(e))return!1;let{code:t}=e;return t===`EMFILE`||t===`ENFILE`||t===`EAGAIN`||t===`EBUSY`||t===`EACCESS`||t===`EACCES`||t===`EACCS`||t===`EPERM`},onChangeError:e=>{if(!o.isNodeError(e)||!o.isChangeErrorOk(e))throw e}};var RetryfyQueue=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=1e4,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||=setInterval(this.tick,this.interval)},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{let cleanup=()=>this.remove(resolver),resolver=()=>e(cleanup);this.add(resolver)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(let e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}},s=new RetryfyQueue;const retryifyAsync=(e,t)=>function retrified(n){return function attempt(...r){return s.schedule().then(i=>{let onResolve=e=>(i(),e),onReject=e=>{if(i(),Date.now()>=n)throw e;if(t(e)){let e=Math.round(100*Math.random());return new Promise(t=>setTimeout(t,e)).then(()=>attempt.apply(void 0,r))}throw e};return e.apply(void 0,r).then(onResolve,onReject)})}},retryifySync=(e,t)=>function retrified(n){return function attempt(...r){try{return e.apply(void 0,r)}catch(e){if(Date.now()>n)throw e;if(t(e))return attempt.apply(void 0,r);throw e}}},c={attempt:{chmod:attemptifyAsync(e(r.chmod),o.onChangeError),chown:attemptifyAsync(e(r.chown),o.onChangeError),close:attemptifyAsync(e(r.close),NOOP),fsync:attemptifyAsync(e(r.fsync),NOOP),mkdir:attemptifyAsync(e(r.mkdir),NOOP),realpath:attemptifyAsync(e(r.realpath),NOOP),stat:attemptifyAsync(e(r.stat),NOOP),unlink:attemptifyAsync(e(r.unlink),NOOP),chmodSync:attemptifySync(r.chmodSync,o.onChangeError),chownSync:attemptifySync(r.chownSync,o.onChangeError),closeSync:attemptifySync(r.closeSync,NOOP),existsSync:attemptifySync(r.existsSync,NOOP),fsyncSync:attemptifySync(r.fsync,NOOP),mkdirSync:attemptifySync(r.mkdirSync,NOOP),realpathSync:attemptifySync(r.realpathSync,NOOP),statSync:attemptifySync(r.statSync,NOOP),unlinkSync:attemptifySync(r.unlinkSync,NOOP)},retry:{close:retryifyAsync(e(r.close),o.isRetriableError),fsync:retryifyAsync(e(r.fsync),o.isRetriableError),open:retryifyAsync(e(r.open),o.isRetriableError),readFile:retryifyAsync(e(r.readFile),o.isRetriableError),rename:retryifyAsync(e(r.rename),o.isRetriableError),stat:retryifyAsync(e(r.stat),o.isRetriableError),write:retryifyAsync(e(r.write),o.isRetriableError),writeFile:retryifyAsync(e(r.writeFile),o.isRetriableError),closeSync:retryifySync(r.closeSync,o.isRetriableError),fsyncSync:retryifySync(r.fsyncSync,o.isRetriableError),openSync:retryifySync(r.openSync,o.isRetriableError),readFileSync:retryifySync(r.readFileSync,o.isRetriableError),renameSync:retryifySync(r.renameSync,o.isRetriableError),statSync:retryifySync(r.statSync,o.isRetriableError),writeSync:retryifySync(r.writeSync,o.isRetriableError),writeFileSync:retryifySync(r.writeFileSync,o.isRetriableError)}},l={},u=n.userInfo().uid,d=n.userInfo().gid,f=!!i.getuid;i.getuid&&i.getuid();const isException=e=>e instanceof Error&&`code`in e,isString=e=>typeof e==`string`,isUndefined=e=>e===void 0,p=i.platform===`linux`,m=i.platform===`win32`,h=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`];m||h.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),p&&h.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`);var Interceptor=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let e of this.callbacks)e();e&&(m&&e!==`SIGINT`&&e!==`SIGTERM`&&e!==`SIGKILL`?i.kill(i.pid,`SIGTERM`):i.kill(i.pid,e))}},this.hook=()=>{i.once(`exit`,()=>this.exit());for(let e of h)try{i.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}};const g=new Interceptor().register,_={store:{},create:e=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);return`${e}${`.tmp-${Date.now().toString().slice(-10)}${t}`}`},get:(e,t,n=!0)=>{let r=_.truncate(t(e));if(r in _.store)return _.get(e,t,n);_.store[r]=n;let disposer=()=>delete _.store[r];return[r,disposer]},purge:e=>{_.store[e]&&(delete _.store[e],c.attempt.unlink(e))},purgeSync:e=>{_.store[e]&&(delete _.store[e],c.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(let e in _.store)_.purgeSync(e)},truncate:e=>{let n=t.basename(e);if(n.length<=128)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(n);if(!r)return e;let i=n.length-128;return`${e.slice(0,-n.length)}${r[1]}${r[2].slice(0,-i)}${r[3]}`}};g(_.purgeSyncAll);function writeFileSync(e,n,r=l){if(isString(r))return writeFileSync(e,n,{encoding:r});let i=Date.now()+((r.timeout??1e3)||-1),a=null,o=null,s=null;try{let l=c.attempt.realpathSync(e),p=!!l;e=l||e,[o,a]=_.get(e,r.tmpCreate||_.create,r.tmpPurge!==!1);let m=f&&isUndefined(r.chown),h=isUndefined(r.mode);if(p&&(m||h)){let t=c.attempt.statSync(e);t&&(r={...r},m&&(r.chown={uid:t.uid,gid:t.gid}),h&&(r.mode=t.mode))}if(!p){let n=t.dirname(e);c.attempt.mkdirSync(n,{mode:511,recursive:!0})}s=c.retry.openSync(i)(o,`w`,r.mode||438),r.tmpCreated&&r.tmpCreated(o),isString(n)?c.retry.writeSync(i)(s,n,0,r.encoding||`utf8`):isUndefined(n)||c.retry.writeSync(i)(s,n,0,n.length,0),r.fsync!==!1&&(r.fsyncWait===!1?c.attempt.fsync(s):c.retry.fsyncSync(i)(s)),c.retry.closeSync(i)(s),s=null,r.chown&&(r.chown.uid!==u||r.chown.gid!==d)&&c.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==438&&c.attempt.chmodSync(o,r.mode);try{c.retry.renameSync(i)(o,e)}catch(t){if(!isException(t)||t.code!==`ENAMETOOLONG`)throw t;c.retry.renameSync(i)(o,_.truncate(e))}a(),o=null}finally{s&&c.attempt.closeSync(s),o&&_.purge(o)}}export{writeFileSync as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";function createPromiseWithResolvers(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const e=Math.random.bind(Math);function nanoid(t=21){let n=``,r=t;for(;r--;)n+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[e()*64|0];return n}const defaultSerialize=e=>e,t=defaultSerialize,{clearTimeout:n,setTimeout:r}=globalThis;function createBirpc(e,i){let{post:a,on:o,off=()=>{},eventNames:s=[],serialize:c=defaultSerialize,deserialize:l=t,resolver:u,bind:d=`rpc`,timeout:f=6e4,proxify:p=!0}=i,m=!1,h=new Map,g,_;async function _call(e,t,o,s){if(m)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let l={m:e,a:t,t:`q`};s&&(l.o=!0);let send=async e=>a(c(e));if(o){await send(l);return}if(g)try{await g}finally{g=void 0}let{promise:u,resolve:d,reject:p}=createPromiseWithResolvers(),v=nanoid();l.i=v;let y;async function handler(n=l){return f>=0&&(y=r(()=>{try{if(i.onTimeoutError?.call(_,e,t)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){p(e)}h.delete(v)},f),typeof y==`object`&&(y=y.unref?.())),h.set(v,{resolve:d,reject:p,timeoutId:y,method:e}),await send(n),u}try{i.onRequest?await i.onRequest.call(_,l,handler,d):await handler()}catch(e){if(i.onGeneralError?.call(_,e)!==!0)throw e;return}finally{n(y),h.delete(v)}return u}let v={$call:(e,...t)=>_call(e,t,!1),$callOptional:(e,...t)=>_call(e,t,!1,!0),$callEvent:(e,...t)=>_call(e,t,!0),$callRaw:e=>_call(e.method,e.args,e.event,e.optional),$rejectPendingCalls,get $closed(){return m},get $meta(){return i.meta},$close,$functions:e};_=p?new Proxy({},{get(t,n){if(Object.prototype.hasOwnProperty.call(v,n))return v[n];if(n===`then`&&!s.includes(`then`)&&!(`then`in e))return;let sendEvent=(...e)=>_call(n,e,!0);if(s.includes(n))return sendEvent.asEvent=sendEvent,sendEvent;let sendCall=(...e)=>_call(n,e,!1);return sendCall.asEvent=sendEvent,sendCall}}):v;function $close(e){m=!0,h.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),h.clear(),off(onMessage)}function $rejectPendingCalls(e){let t=Array.from(h.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return h.clear(),t}async function onMessage(t,...r){let o;try{o=l(t)}catch(e){if(i.onGeneralError?.call(_,e)!==!0)throw e;return}if(o.t===`q`){let{m:t,a:n,o:s}=o,l,f,fn=await(u?u.call(_,t,e[t]):e[t]);if(s&&(fn||=()=>void 0),!fn)f=Error(`[birpc] function "${t}" not found`);else try{l=await fn.apply(d===`rpc`?_:e,n)}catch(e){f=e}if(o.i){if(f&&i.onFunctionError&&i.onFunctionError.call(_,f,t,n)===!0)return;if(!f)try{await a(c({t:`s`,i:o.i,r:l}),...r);return}catch(e){if(f=e,i.onGeneralError?.call(_,e,t,n)!==!0)throw e}try{await a(c({t:`s`,i:o.i,e:f}),...r)}catch(e){if(i.onGeneralError?.call(_,e,t,n)!==!0)throw e}}}else{let{i:e,r:t,e:r}=o,i=h.get(e);i&&(n(i.timeoutId),r?i.reject(r):i.resolve(t)),h.delete(e)}}return g=o(onMessage),_}export{createBirpc as t};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{c as e,i as t,t as n}from"../rolldown-runtime.mjs";import{t as r}from"./ansi-regex.mjs";import{t as i}from"./ansi-align.mjs";import{t as a}from"./ansi-styles.mjs";import o from"node:os";import s from"node:process";import c from"node:tty";const l=r();function stripAnsi(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(l,``)}function isAmbiguous(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function isFullWidth(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function isWide(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function validate(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function eastAsianWidth(e,{ambiguousAsWide:t=!1}={}){return validate(e),isFullWidth(e)||isWide(e)||t&&isAmbiguous(e)?2:1}var u=t(()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,`default`);const d=new Intl.Segmenter,f=/^\p{Default_Ignorable_Code_Point}$/u;function stringWidth(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=stripAnsi(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of d.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!f.test(t)){if(u().test(t)){i+=2;continue}i+=eastAsianWidth(e,a)}}return i}const wrapAnsi16=(e=0)=>t=>`\u001B[${t+e}m`,wrapAnsi256=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,wrapAnsi16m=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,p={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(p.modifier);const m=Object.keys(p.color),h=Object.keys(p.bgColor);[...m,...h];function assembleStyles(){let e=new Map;for(let[t,n]of Object.entries(p)){for(let[t,r]of Object.entries(n))p[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=p[t],e.set(r[0],r[1]);Object.defineProperty(p,t,{value:n,enumerable:!1})}return Object.defineProperty(p,"codes",{value:e,enumerable:!1}),p.color.close=`\x1B[39m`,p.bgColor.close=`\x1B[49m`,p.color.ansi=wrapAnsi16(),p.color.ansi256=wrapAnsi256(),p.color.ansi16m=wrapAnsi16m(),p.bgColor.ansi=wrapAnsi16(10),p.bgColor.ansi256=wrapAnsi256(10),p.bgColor.ansi16m=wrapAnsi16m(10),Object.defineProperties(p,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>p.rgbToAnsi256(...p.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>p.ansi256ToAnsi(p.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>p.ansi256ToAnsi(p.hexToAnsi256(e)),enumerable:!1}}),p}const g=assembleStyles();function hasFlag(e,t=globalThis.Deno?globalThis.Deno.args:s.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:_}=s;let v;hasFlag(`no-color`)||hasFlag(`no-colors`)||hasFlag(`color=false`)||hasFlag(`color=never`)?v=0:(hasFlag(`color`)||hasFlag(`colors`)||hasFlag(`color=true`)||hasFlag(`color=always`))&&(v=1);function envForceColor(){if(`FORCE_COLOR`in _)return _.FORCE_COLOR===`true`?1:_.FORCE_COLOR===`false`?0:_.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(_.FORCE_COLOR,10),3)}function translateLevel(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function _supportsColor(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=envForceColor();r!==void 0&&(v=r);let i=n?v:r;if(i===0)return 0;if(n){if(hasFlag(`color=16m`)||hasFlag(`color=full`)||hasFlag(`color=truecolor`))return 3;if(hasFlag(`color=256`))return 2}if(`TF_BUILD`in _&&`AGENT_NAME`in _)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(_.TERM===`dumb`)return a;if(s.platform===`win32`){let e=o.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in _)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in _)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in _)||_.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in _)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION);if(_.COLORTERM===`truecolor`||_.TERM===`xterm-kitty`)return 3;if(`TERM_PROGRAM`in _){let e=Number.parseInt((_.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(_.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||`COLORTERM`in _?1:a}function createSupportsColor(e,t={}){return translateLevel(_supportsColor(e,{streamIsTTY:e&&e.isTTY,...t}))}const y={stdout:createSupportsColor({isTTY:c.isatty(1)}),stderr:createSupportsColor({isTTY:c.isatty(2)})};function stringReplaceAll(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function stringEncaseCRLFWithFirstIndex(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
|
|
2
|
+
`:`
|
|
3
|
+
`)+n,i=r+1,r=e.indexOf(`
|
|
4
|
+
`,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:b,stderr:x}=y,S=Symbol(`GENERATOR`),C=Symbol(`STYLER`),w=Symbol(`IS_EMPTY`),T=[`ansi`,`ansi`,`ansi256`,`ansi16m`],E=Object.create(null),applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=b?b.level:0;e.level=t.level===void 0?n:t.level},chalkFactory=e=>{let chalk=(...e)=>e.join(` `);return applyOptions(chalk,e),Object.setPrototypeOf(chalk,createChalk.prototype),chalk};function createChalk(e){return chalkFactory(e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(let[e,t]of Object.entries(g))E[e]={get(){let n=createBuilder(this,createStyler(t.open,t.close,this[C]),this[w]);return Object.defineProperty(this,e,{value:n}),n}};E.visible={get(){let e=createBuilder(this,this[C],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const getModelAnsi=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?g[n].ansi16m(...r):t===`ansi256`?g[n].ansi256(g.rgbToAnsi256(...r)):g[n].ansi(g.rgbToAnsi(...r)):e===`hex`?getModelAnsi(`rgb`,t,n,...g.hexToRgb(...r)):g[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){E[e]={get(){let{level:t}=this;return function(...n){let r=createStyler(getModelAnsi(e,T[t],`color`,...n),g.color.close,this[C]);return createBuilder(this,r,this[w])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);E[t]={get(){let{level:t}=this;return function(...n){let r=createStyler(getModelAnsi(e,T[t],`bgColor`,...n),g.bgColor.close,this[C]);return createBuilder(this,r,this[w])}}}}const D=Object.defineProperties(()=>{},{...E,level:{enumerable:!0,get(){return this[S].level},set(e){this[S].level=e}}}),createStyler=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},createBuilder=(e,t,n)=>{let builder=(...e)=>applyStyle(builder,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(builder,D),builder[S]=e,builder[C]=t,builder[w]=n,builder},applyStyle=(e,t)=>{if(e.level<=0||!t)return e[w]?``:t;let n=e[C];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=stringReplaceAll(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
5
|
+
`);return a!==-1&&(t=stringEncaseCRLFWithFirstIndex(t,i,r,a)),r+t+i};Object.defineProperties(createChalk.prototype,E);const O=createChalk();createChalk({level:x?x.level:0});function widestLine(e){let t=0;for(let n of e.split(`
|
|
6
|
+
`))t=Math.max(t,stringWidth(n));return t}var k=n(((e,t)=>{t.exports={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}})),A=e(n(((e,t)=>{let n=k();t.exports=n,t.exports.default=n}))(),1);const j=/[\p{Lu}]/u,M=/[\p{Ll}]/u,N=/^[\p{Lu}](?![\p{Lu}])/gu,P=/([\p{Alpha}\p{N}_]|$)/u,F=/[_.\- ]+/,I=RegExp(`^`+F.source),L=new RegExp(F.source+P.source,`gu`),R=RegExp(`\\d+`+P.source,`gu`),preserveCamelCase=(e,t,n,r)=>{let i=!1,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c++){let l=e[c];s=c>2?e[c-3]===`-`:!0,i&&j.test(l)?(e=e.slice(0,c)+`-`+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&M.test(l)&&(!s||r)?(e=e.slice(0,c-1)+`-`+e.slice(c-1),o=a,a=!1,i=!0):(i=t(l)===l&&n(l)!==l,o=a,a=n(l)===l&&t(l)!==l)}return e},preserveConsecutiveUppercase=(e,t)=>(N.lastIndex=0,e.replaceAll(N,e=>t(e))),postProcess=(e,t)=>(L.lastIndex=0,R.lastIndex=0,e.replaceAll(R,(n,r,i)=>[`_`,`-`].includes(e.charAt(i+n.length))?n:t(n)).replaceAll(L,(e,n)=>t(n)));function camelCase(e,t){if(!(typeof e==`string`||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join(`-`):e.trim(),e.length===0)return``;let n=t.locale===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),r=t.locale===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);return e.length===1?F.test(e)?``:t.pascalCase?r(e):n(e):(e!==n(e)&&(e=preserveCamelCase(e,n,r,t.preserveConsecutiveUppercase)),e=e.replace(I,``),e=t.preserveConsecutiveUppercase?preserveConsecutiveUppercase(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),postProcess(e,r))}var z=e(i(),1);const B=new Set([`\x1B`,``]),V=`]8;;`,wrapAnsiCode=e=>`${B.values().next().value}[${e}m`,wrapAnsiHyperlink=e=>`${B.values().next().value}${V}${e}`,wordLengths=e=>e.split(` `).map(e=>stringWidth(e)),wrapWord=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=stringWidth(stripAnsi(e.at(-1)));for(let[t,s]of r.entries()){let c=stringWidth(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),B.has(s)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===V),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},stringVisibleTrimSpacesRight=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(stringWidth(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},exec=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,o,s=wordLengths(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c.at(-1).trimStart());let e=stringWidth(c.at(-1));if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),wrapWord(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){wrapWord(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){wrapWord(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>stringVisibleTrimSpacesRight(e)));let l=c.join(`
|
|
7
|
+
`),u=[...l],d=0;for(let[e,t]of u.entries()){if(r+=t,B.has(t)){let{groups:e}=RegExp(`(?:\\[(?<code>\\d+)m|\\${V}(?<uri>.*))`).exec(l.slice(d))||{groups:{}};if(e.code!==void 0){let t=Number.parseFloat(e.code);i=t===39?void 0:t}else e.uri!==void 0&&(o=e.uri.length===0?void 0:e.uri)}let n=a.codes.get(Number(i));u[e+1]===`
|
|
8
|
+
`?(o&&(r+=wrapAnsiHyperlink(``)),i&&n&&(r+=wrapAnsiCode(n))):t===`
|
|
9
|
+
`&&(i&&n&&(r+=wrapAnsiCode(i)),o&&(r+=wrapAnsiHyperlink(o))),d+=t.length}return r};function wrapAnsi(e,t,n){return String(e).normalize().replaceAll(`\r
|
|
10
|
+
`,`
|
|
11
|
+
`).split(`
|
|
12
|
+
`).map(e=>exec(e,t,n)).join(`
|
|
13
|
+
`)}const H=`none`,terminalColumns=()=>{let{env:e,stdout:t,stderr:n}=s;return t?.columns?t.columns:n?.columns?n.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},getObject=e=>typeof e==`number`?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},getBorderWidth=e=>e===H?0:2,getBorderChars=e=>{let t=[`topLeft`,`topRight`,`bottomRight`,`bottomLeft`,`left`,`right`,`top`,`bottom`],n;if(e===H){e={};for(let n of t)e[n]=``}if(typeof e==`string`){if(n=A.default[e],!n)throw TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical==`string`&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal==`string`&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let n of t)if(e[n]===null||typeof e[n]!=`string`)throw TypeError(`Invalid border style: ${n}`);n=e}return n},makeTitle=(e,t,n)=>{let r=``,i=stringWidth(e);switch(n){case`left`:r=e+t.slice(i);break;case`right`:r=t.slice(i)+e;break;default:t=t.slice(i),t.length%2==1?(t=t.slice(Math.floor(t.length/2)),r=t.slice(1)+e+t):(t=t.slice(t.length/2),r=t+e+t);break}return r},makeContentText=(e,{padding:t,width:n,textAlignment:r,height:i})=>{e=(0,z.default)(e,{align:r});let a=e.split(`
|
|
14
|
+
`),o=widestLine(e),s=n-t.left-t.right;if(o>s){let e=[];for(let t of a){let n=(0,z.default)(wrapAnsi(t,s,{hard:!0}),{align:r}).split(`
|
|
15
|
+
`),i=Math.max(...n.map(e=>stringWidth(e)));for(let t of n){let n;switch(r){case`center`:n=` `.repeat((s-i)/2)+t;break;case`right`:n=` `.repeat(s-i)+t;break;default:n=t;break}e.push(n)}}a=e}r===`center`&&o<s?a=a.map(e=>` `.repeat((s-o)/2)+e):r===`right`&&o<s&&(a=a.map(e=>` `.repeat(s-o)+e));let c=` `.repeat(t.left),l=` `.repeat(t.right);return a=a.map(e=>{let t=c+e+l;return t+` `.repeat(n-stringWidth(t))}),t.top>0&&(a=[...Array.from({length:t.top}).fill(` `.repeat(n)),...a]),t.bottom>0&&(a=[...a,...Array.from({length:t.bottom}).fill(` `.repeat(n))]),i&&a.length>i?a=a.slice(0,i):i&&a.length<i&&(a=[...a,...Array.from({length:i-a.length}).fill(` `.repeat(n))]),a.join(`
|
|
16
|
+
`)},boxContent=(e,t,n)=>{let colorizeBorder=e=>{let t=n.borderColor?getColorFunction(n.borderColor)(e):e;return n.dimBorder?O.dim(t):t},colorizeContent=e=>n.backgroundColor?getBGColorFunction(n.backgroundColor)(e):e,r=getBorderChars(n.borderStyle),i=terminalColumns(),a=` `.repeat(n.margin.left);if(n.float===`center`){let e=Math.max((i-t-getBorderWidth(n.borderStyle))/2,0);a=` `.repeat(e)}else if(n.float===`right`){let e=Math.max(i-t-n.margin.right-getBorderWidth(n.borderStyle),0);a=` `.repeat(e)}let o=``;n.margin.top&&(o+=`
|
|
17
|
+
`.repeat(n.margin.top)),(n.borderStyle!==H||n.title)&&(o+=colorizeBorder(a+r.topLeft+(n.title?makeTitle(n.title,r.top.repeat(t),n.titleAlignment):r.top.repeat(t))+r.topRight)+`
|
|
18
|
+
`);let s=e.split(`
|
|
19
|
+
`);return o+=s.map(e=>a+colorizeBorder(r.left)+colorizeContent(e)+colorizeBorder(r.right)).join(`
|
|
20
|
+
`),n.borderStyle!==H&&(o+=`
|
|
21
|
+
`+colorizeBorder(a+r.bottomLeft+r.bottom.repeat(t)+r.bottomRight)),n.margin.bottom&&(o+=`
|
|
22
|
+
`.repeat(n.margin.bottom)),o},sanitizeOptions=e=>{if(e.fullscreen&&s?.stdout){let t=[s.stdout.columns,s.stdout.rows];typeof e.fullscreen==`function`&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-getBorderWidth(e.borderStyle)),e.height&&=Math.max(1,e.height-getBorderWidth(e.borderStyle)),e},formatTitle=(e,t)=>t===H?e:` ${e} `,determineDimensions=(e,t)=>{t=sanitizeOptions(t);let n=t.width!==void 0,r=terminalColumns(),i=getBorderWidth(t.borderStyle),a=r-t.margin.left-t.margin.right-i,o=widestLine(wrapAnsi(e,r-i,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&n?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=formatTitle(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,a-2)),t.title&&(t.title=formatTitle(t.title,t.borderStyle),stringWidth(t.title)>o&&(t.width=stringWidth(t.title)))),t.width||=o,!n){if(t.margin.left&&t.margin.right&&t.width>a){let e=(r-t.width-i)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*e)),t.margin.right=Math.max(0,Math.floor(t.margin.right*e))}t.width=Math.min(t.width,r-i-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},isHex=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),isColorValid=e=>typeof e==`string`&&(O[e]??isHex(e)),getColorFunction=e=>isHex(e)?O.hex(e):O[e],getBGColorFunction=e=>isHex(e)?O.bgHex(e):O[camelCase([`bg`,e])];function boxen(e,t){if(t={padding:0,borderStyle:`single`,dimBorder:!1,textAlignment:`left`,float:`left`,titleAlignment:`left`,...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!isColorValid(t.borderColor))throw Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!isColorValid(t.backgroundColor))throw Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=getObject(t.padding),t.margin=getObject(t.margin),t=determineDimensions(e,t),e=makeContentText(e,t),boxContent(e,t.width,t)}export{boxen as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../rolldown-runtime.mjs";import{C as e,D as t,T as n,c as r,d as i,f as a,h as o,ht as s,l as c,o as l,p as u,u as d,ut as f}from"./@chevrotain/gast.mjs";import{c as p,d as m,f as h,g,h as _,i as v,m as y,p as b,r as x,s as S}from"./chevrotain.mjs";function baseLt(e,t){return e<t}function baseExtremum(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(c===void 0?o===o&&!s(o):n(o,c)))var c=o,l=a}return l}function min(e){return e&&e.length?baseExtremum(e,f,baseLt):void 0}function uniqBy(e,n){return e&&e.length?m(e,t(n,2)):[]}function buildATNKey(e,t,n){return`${e.name}_${t}_${n}`}var AbstractTransition=class{constructor(e){this.target=e}isEpsilon(){return!1}},AtomTransition=class extends AbstractTransition{constructor(e,t){super(e),this.tokenType=t}},EpsilonTransition=class extends AbstractTransition{constructor(e){super(e)}isEpsilon(){return!0}},RuleTransition=class extends AbstractTransition{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}};function createATN(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};createRuleStartAndStopATNStates(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=block(t,n,n);i!==void 0&&buildRuleHandle(t,n,i)}return t}function createRuleStartAndStopATNStates(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=newState(e,n,void 0,{type:2}),a=newState(e,n,void 0,{type:7});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}function atom(e,t,n){return n instanceof o?tokenRef(e,t,n.terminalType,n):n instanceof r?ruleRef(e,t,n):n instanceof l?alternation(e,t,n):n instanceof c?option(e,t,n):n instanceof d?repetition(e,t,n):n instanceof u?repetitionSep(e,t,n):n instanceof i?repetitionMandatory(e,t,n):n instanceof a?repetitionMandatorySep(e,t,n):block(e,t,n)}function repetition(e,t,n){let r=newState(e,t,n,{type:5});return defineDecisionState(e,r),star(e,t,n,makeAlts(e,t,r,n,block(e,t,n)))}function repetitionSep(e,t,n){let r=newState(e,t,n,{type:5});return defineDecisionState(e,r),star(e,t,n,makeAlts(e,t,r,n,block(e,t,n)),tokenRef(e,t,n.separator,n))}function repetitionMandatory(e,t,n){let r=newState(e,t,n,{type:4});return defineDecisionState(e,r),plus(e,t,n,makeAlts(e,t,r,n,block(e,t,n)))}function repetitionMandatorySep(e,t,n){let r=newState(e,t,n,{type:4});return defineDecisionState(e,r),plus(e,t,n,makeAlts(e,t,r,n,block(e,t,n)),tokenRef(e,t,n.separator,n))}function alternation(t,n,r){let i=newState(t,n,r,{type:1});return defineDecisionState(t,i),makeAlts(t,n,i,r,...e(r.definition,e=>atom(t,n,e)))}function option(e,t,n){let r=newState(e,t,n,{type:1});return defineDecisionState(e,r),optional(e,t,n,makeAlts(e,t,r,n,block(e,t,n)))}function block(t,n,r){let i=_(e(r.definition,e=>atom(t,n,e)),e=>e!==void 0);return i.length===1?i[0]:i.length===0?void 0:makeBlock(t,i)}function plus(e,t,n,r,i){let a=r.left,o=r.right,s=newState(e,t,n,{type:11});defineDecisionState(e,s);let c=newState(e,t,n,{type:12});return a.loopback=s,c.loopback=s,e.decisionMap[buildATNKey(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,epsilon(o,s),i===void 0?(epsilon(s,a),epsilon(s,c)):(epsilon(s,c),epsilon(s,i.left),epsilon(i.right,a)),{left:a,right:c}}function star(e,t,n,r,i){let a=r.left,o=r.right,s=newState(e,t,n,{type:10});defineDecisionState(e,s);let c=newState(e,t,n,{type:12}),l=newState(e,t,n,{type:9});return s.loopback=l,c.loopback=l,epsilon(s,a),epsilon(s,c),epsilon(o,l),i===void 0?epsilon(l,s):(epsilon(l,c),epsilon(l,i.left),epsilon(i.right,a)),e.decisionMap[buildATNKey(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}function optional(e,t,n,r){let i=r.left,a=r.right;return epsilon(i,a),e.decisionMap[buildATNKey(t,`Option`,n.idx)]=i,r}function defineDecisionState(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function makeAlts(e,t,n,r,...i){let a=newState(e,t,r,{type:8,start:n});n.end=a;for(let e of i)e===void 0?epsilon(n,a):(epsilon(n,e.left),epsilon(e.right,a));let o={left:n,right:a};return e.decisionMap[buildATNKey(t,getProdType(r),r.idx)]=n,o}function getProdType(e){if(e instanceof l)return`Alternation`;if(e instanceof c)return`Option`;if(e instanceof d)return`Repetition`;if(e instanceof u)return`RepetitionWithSeparator`;if(e instanceof i)return`RepetitionMandatory`;if(e instanceof a)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}function makeBlock(e,t){let n=t.length;for(let r=0;r<n-1;r++){let n=t[r],i;n.left.transitions.length===1&&(i=n.left.transitions[0]);let a=i instanceof RuleTransition,o=i,s=t[r+1].left;n.left.type===1&&n.right.type===1&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,removeState(e,n.right)):epsilon(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}function tokenRef(e,t,n,r){let i=newState(e,t,r,{type:1}),a=newState(e,t,r,{type:1});return addTransition(i,new AtomTransition(a,n)),{left:i,right:a}}function ruleRef(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=newState(e,t,n,{type:1}),o=newState(e,t,n,{type:1});return addTransition(a,new RuleTransition(i,r,o)),{left:a,right:o}}function buildRuleHandle(e,t,n){let r=e.ruleToStartState.get(t);epsilon(r,n.left);let i=e.ruleToStopState.get(t);return epsilon(n.right,i),{left:r,right:i}}function epsilon(e,t){addTransition(e,new EpsilonTransition(t))}function newState(e,t,n,r){let i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function addTransition(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function removeState(e,t){e.states.splice(e.states.indexOf(t),1)}const C={};var ATNConfigSet=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=getATNConfigKey(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return e(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function getATNConfigKey(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}function createDFACache(e,t){let n={};return r=>{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}var PredicateSet=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;n<t;n++)e+=this.predicates[n]===!0?`1`:`0`;return e}};const w=new PredicateSet;var LLStarLookaheadStrategy=class extends x{constructor(e){super(),this.logging=e?.logging??(e=>console.log(e))}initialize(e){this.atn=createATN(e.rules),this.dfas=initATNSimulator(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:i,hasPredicates:a,dynamicTokensEnabled:o}=t,s=this.dfas,c=this.logging,l=buildATNKey(i,`Alternation`,r),u=this.atn.decisionMap[l].decision,d=e(v({maxLookahead:1,occurrence:r,prodType:`Alternation`,rule:i}),t=>e(t,e=>e[0]));if(isLL1Sequence(d,!1)&&!o){let e=h(d,(e,t,r)=>(n(t,t=>{t&&(e[t.tokenTypeIdx]=r,n(t.categoryMatches,t=>{e[t]=r}))}),e),{});return a?function(t){let n=e[this.LA(1).tokenTypeIdx];if(t!==void 0&&n!==void 0){let e=t[n]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return n}:function(){return e[this.LA(1).tokenTypeIdx]}}else if(a)return function(e){let t=new PredicateSet,n=e===void 0?0:e.length;for(let r=0;r<n;r++){let n=e?.[r].GATE;t.set(r,n===void 0||n.call(this))}let r=adaptivePredict.call(this,s,u,t,c);return typeof r==`number`?r:void 0};else return function(){let e=adaptivePredict.call(this,s,u,w,c);return typeof e==`number`?e:void 0}}buildLookaheadForOptional(t){let{prodOccurrence:r,rule:i,prodType:a,dynamicTokensEnabled:o}=t,s=this.dfas,c=this.logging,l=buildATNKey(i,a,r),u=this.atn.decisionMap[l].decision,d=e(v({maxLookahead:1,occurrence:r,prodType:a,rule:i}),t=>e(t,e=>e[0]));if(isLL1Sequence(d)&&d[0][0]&&!o){let e=d[0],t=g(e);if(t.length===1&&b(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}else{let e=h(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,n(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){return e[this.LA(1).tokenTypeIdx]===!0}}}return function(){let e=adaptivePredict.call(this,s,u,w,c);return typeof e==`object`?!1:e===0}}};function isLL1Sequence(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function initATNSimulator(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=createDFACache(e.decisionStates[r],r);return n}function adaptivePredict(e,t,n,r){let i=e[t](n),a=i.start;return a===void 0&&(a=addDFAState(i,newDFAState(computeStartState(i.atnStartState))),i.start=a),performLookahead.apply(this,[i,a,n,r])}function performLookahead(e,t,n,r){let i=t,a=1,o=[],s=this.LA(a++);for(;;){let t=getExistingTargetState(i,s);if(t===void 0&&(t=computeLookaheadTarget.apply(this,[e,i,s,a,n,r])),t===C)return buildAdaptivePredictError(o,i,s);if(t.isAcceptState===!0)return t.prediction;i=t,o.push(s),s=this.LA(a++)}}function computeLookaheadTarget(e,t,n,r,i,a){let o=computeReachSet(t.configs,n,i);if(o.size===0)return addDFAEdge(e,t,n,C),C;let s=newDFAState(o),c=getUniqueAlt(o,i);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(hasConflictTerminatingPrediction(o)){let t=min(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,reportLookaheadAmbiguity.apply(this,[e,r,o.alts,a])}return s=addDFAEdge(e,t,n,s),s}function reportLookaheadAmbiguity(e,t,n,r){let i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);let a=e.atnStartState,o=a.rule,s=a.production;r(buildAmbiguityError({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}function buildAmbiguityError(t){let n=e(t.prefixPath,e=>S(e)).join(`, `),r=t.production.idx===0?``:t.production.idx,i=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(`, `)}> in <${getProductionDslName(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,\n<${n}> may appears as a prefix path in all these alternatives.\n`;return i+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
2
|
+
For Further details.`,i}function getProductionDslName(e){if(e instanceof r)return`SUBRULE`;if(e instanceof c)return`OPTION`;if(e instanceof l)return`OR`;if(e instanceof i)return`AT_LEAST_ONE`;if(e instanceof a)return`AT_LEAST_ONE_SEP`;if(e instanceof u)return`MANY_SEP`;if(e instanceof d)return`MANY`;if(e instanceof o)return`CONSUME`;throw Error(`non exhaustive match`)}function buildAdaptivePredictError(e,t,n){return{actualToken:n,possibleTokenTypes:uniqBy(y(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof AtomTransition).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function getExistingTargetState(e,t){return e.edges[t.tokenTypeIdx]}function computeReachSet(e,t,n){let r=new ATNConfigSet,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===7){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=getReachableTarget(e,t);i!==void 0&&r.add({state:i,alt:a.alt,stack:a.stack})}}let a;if(i.length===0&&r.size===1&&(a=r),a===void 0){a=new ATNConfigSet;for(let e of r.elements)closure(e,a)}if(i.length>0&&!hasConfigInRuleStopState(a))for(let e of i)a.add(e);return a}function getReachableTarget(e,t){if(e instanceof AtomTransition&&p(t,e.tokenType))return e.target}function getUniqueAlt(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function newDFAState(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function addDFAEdge(e,t,n,r){return r=addDFAState(e,r),t.edges[n.tokenTypeIdx]=r,r}function addDFAState(e,t){if(t===C)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}function computeStartState(e){let t=new ATNConfigSet,n=e.transitions.length;for(let r=0;r<n;r++)closure({state:e.transitions[r].target,alt:r,stack:[]},t);return t}function closure(e,t){let n=e.state;if(n.type===7){if(e.stack.length>0){let n=[...e.stack];closure({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i<r;i++){let r=n.transitions[i],a=getEpsilonTarget(e,r);a!==void 0&&closure(a,t)}}function getEpsilonTarget(e,t){if(t instanceof EpsilonTransition)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof RuleTransition){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}function hasConfigInRuleStopState(e){for(let t of e.elements)if(t.state.type===7)return!0;return!1}function allConfigsInRuleStopStates(e){for(let t of e.elements)if(t.state.type!==7)return!1;return!0}function hasConflictTerminatingPrediction(e){if(allConfigsInRuleStopStates(e))return!0;let t=getConflictingAltSets(e.elements);return hasConflictingAltSet(t)&&!hasStateAssociatedWithOneAlt(t)}function getConflictingAltSets(e){let t=new Map;for(let n of e){let e=getATNConfigKey(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}function hasConflictingAltSet(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function hasStateAssociatedWithOneAlt(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}export{LLStarLookaheadStrategy as t};
|