likec4 1.10.0 → 1.10.1
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/dist/__app__/src/chunks/{-index-overview-DZ3H7kDb.js → -index-overview-CR08x_EG.js} +5 -5
- package/dist/__app__/src/chunks/{likec4-BqIZe8Y0.js → likec4-BFZn233G.js} +165 -117
- package/dist/__app__/src/chunks/{main-KEhBGhZ8.js → main-D12NE066.js} +2491 -2496
- package/dist/__app__/src/chunks/{tanstack-router-Bc_WYOzY.js → tanstack-router-DKnF_3kP.js} +1 -1
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +2651 -2608
- package/dist/cli/index.mjs +20 -20
- package/dist/index.d.mts +827 -707
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.DKLo7EEm.mjs +1221 -0
- package/package.json +19 -19
- package/react/index.d.ts +2 -1
- package/react/index.mjs +2633 -2588
- package/dist/shared/likec4.BaYahRry.mjs +0 -1221
package/dist/cli/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{l as Ke,n as Mu,o as Ju,N as qe,p as zu,r as Ye,s as Wu,u as Hu,v as Xe,y as Qe,z as Gu,A as a,B as Ku,D as x,G as qu,I as Yu,J as R,M as Xu,O as Qu,P as Zu,Q as Ze,R as eu,L as W,d as et,S as ut,V as le,q as uu,T as be,X as tu,Y as tt,Z as nu,$ as iu,a0 as ru,a1 as nt}from"../shared/likec4.BaYahRry.mjs";import{DEV as it}from"esm-env";import{hrtime as rt,cwd as ou,argv as ot,stdout as at,exit as st}from"node:process";import Dt from"yargs";import{hideBin as ct}from"yargs/helpers";import{resolve as y,dirname as ne,join as ie,extname as pe,relative as Q,isAbsolute as au,basename as ke}from"node:path";import{existsSync as K,copyFileSync as su,rmSync as Du}from"node:fs";import{mkdtemp as fe,writeFile as Z,mkdir as H,stat as cu,copyFile as dt,rm as lt}from"node:fs/promises";import pt,{tmpdir as me}from"node:os";import{fileURLToPath as ft}from"node:url";import{build as re,createServer as mt,preview as Ct}from"vite";import{chromium as du}from"playwright";import gt from"node:net";import{setTimeout as Ft}from"node:timers/promises";import{resolve as oe}from"path";import Et from"@vitejs/plugin-react";import"tty";import"node:util";import"node:child_process";import"node:string_decoder";import"node:tty";import"child_process";import"fs";import"node:events";import"node:v8";import"node:stream";import"node:buffer";import"node:stream/promises";import"node:worker_threads";import"util";import"os";import"crypto";import"net";import"url";import"buffer";import"@hpcc-js/wasm-graphviz";const Ce={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:y},V={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},lu={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},ge={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:y},Se={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},pu={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},fu={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1};function At(e){var u,n;if(e){if("astNode"in e)return vt(e);if(Array.isArray(e))return e.reduce(mu,void 0);{const t=e,i=ht(t)?wt((n=(u=t?.root)===null||u===void 0?void 0:u.astNode)!==null&&n!==void 0?n:t?.astNode):void 0;return ee(t,i)}}else return}function ht(e){return typeof e<"u"&&"element"in e&&"text"in e}function wt(e){try{return Ke(e).uri.toString()}catch{return}}function vt(e){var u,n;const{astNode:t,property:i,index:r}=e??{},o=(u=t?.$cstNode)!==null&&u!==void 0?u:t?.$textRegion;if(!(t===void 0||o===void 0)){if(i===void 0)return ee(o,$e(t));{const c=D=>r!==void 0&&r>-1&&Array.isArray(t[i])?r<D.length?D[r]:void 0:D.reduce(mu,void 0);if(!((n=o.assignments)===null||n===void 0)&&n[i]){const D=c(o.assignments[i]);return D&&ee(D,$e(t))}else if(t.$cstNode){const D=c(Mu(t.$cstNode,i));return D&&ee(D,$e(t))}else return}}}function $e(e){var u,n,t,i;return e.$cstNode?(n=(u=Ke(e))===null||u===void 0?void 0:u.uri)===null||n===void 0?void 0:n.toString():e.$textRegion?e.$textRegion.documentURI||((i=(t=new Ju(e,r=>r.$container?[r.$container]:[]).find(r=>{var o;return(o=r.$textRegion)===null||o===void 0?void 0:o.documentURI}))===null||t===void 0?void 0:t.$textRegion)===null||i===void 0?void 0:i.documentURI):void 0}function ee(e,u){var n,t;const i={offset:e.offset,end:(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,length:(t=e.length)!==null&&t!==void 0?t:e.end-e.offset};return e.range&&(i.range=e.range),u??(u=e.fileURI),u&&(i.fileURI=u),i}function mu(e,u){var n,t;if(e){if(!u)return e&&ee(e)}else return u&&ee(u);const i=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,r=(t=u.end)!==null&&t!==void 0?t:u.offset+u.length,o=Math.min(e.offset,u.offset),c=Math.max(i,r),D=c-o,l={offset:o,end:c,length:D};if(e.range&&u.range&&(l.range={start:u.range.start.line<e.range.start.line||u.range.start.line===e.range.start.line&&u.range.start.character<e.range.start.character?u.range.start:e.range.start,end:u.range.end.line>e.range.end.line||u.range.end.line===e.range.end.line&&u.range.end.character>e.range.end.character?u.range.end:e.range.end}),e.fileURI||u.fileURI){const d=e.fileURI,f=u.fileURI,p=d&&f&&d!==f?`<unmergable text regions of ${d}, ${f}>`:d??f;l.fileURI=p}return l}class Bt{constructor(u){this.defaultIndentation=" ",this.pendingIndent=!0,this.currentIndents=[],this.recentNonImmediateIndents=[],this.traceData=[],this.lines=[[]],this.length=0,typeof u=="string"?this.defaultIndentation=u:typeof u=="number"&&(this.defaultIndentation="".padStart(u))}get content(){return this.lines.map(u=>u.join("")).join("")}get contentLength(){return this.length}get currentLineNumber(){return this.lines.length-1}get currentLineContent(){return this.lines[this.currentLineNumber].join("")}get currentPosition(){return{offset:this.contentLength,line:this.currentLineNumber,character:this.currentLineContent.length}}append(u,n){if(u.length>0){const t=n&&this.currentPosition;this.lines[this.currentLineNumber].push(u),this.length+=u.length,t&&this.indentPendingTraceRegions(t)}}indentPendingTraceRegions(u){for(let n=this.traceData.length-1;n>=0;n--){const t=this.traceData[n];t.targetStart&&t.targetStart.offset===u.offset&&(t.targetStart=this.currentPosition)}}increaseIndent(u){this.currentIndents.push(u),u.indentImmediately||this.recentNonImmediateIndents.push(u)}decreaseIndent(){this.currentIndents.pop()}get relevantIndents(){return this.currentIndents.filter(u=>!this.recentNonImmediateIndents.includes(u))}resetCurrentLine(){this.length-=this.lines[this.currentLineNumber].join("").length,this.lines[this.currentLineNumber]=[],this.pendingIndent=!0}addNewLine(){this.pendingIndent=!0,this.lines.push([]),this.recentNonImmediateIndents.length=0}pushTraceRegion(u){const n=yt(u,this.currentPosition,t=>{var i,r;return(r=(i=this.traceData[this.traceData.length-1])===null||i===void 0?void 0:i.children)===null||r===void 0?void 0:r.push(t)});return this.traceData.push(n),n}popTraceRegion(u){const n=this.traceData.pop();return this.assertTrue(n===u,"Trace region mismatch!"),n}getParentTraceSourceFileURI(){var u;for(let n=this.traceData.length-1;n>-1;n--){const t=(u=this.traceData[n].sourceRegion)===null||u===void 0?void 0:u.fileURI;if(t)return t}}assertTrue(u,n){if(!u)throw new Error(n)}}function yt(e,u,n){const t={sourceRegion:e,targetRegion:void 0,children:[],targetStart:u,complete:i=>{var r,o;return t.targetRegion={offset:t.targetStart.offset,end:i.offset,length:i.offset-t.targetStart.offset,range:{start:{line:t.targetStart.line,character:t.targetStart.character},end:{line:i.line,character:i.character}}},delete t.targetStart,((r=t.children)===null||r===void 0?void 0:r.length)===0&&delete t.children,!((o=t.targetRegion)===null||o===void 0)&&o.length&&n(t),delete t.complete,t}};return t}function bt(e,u){const n=new Bt(u),t=n.pushTraceRegion(void 0);Cu(e,n),n.popTraceRegion(t),t.complete&&t.complete(n.currentPosition);const i=t.children&&t.children.length===1?t.children[0]:void 0,r=i?.targetRegion,o=t.targetRegion;return r&&i.sourceRegion&&r.offset===o.offset&&r.length===o.length?{text:n.content,trace:i}:{text:n.content,trace:t}}function Cu(e,u){typeof e=="string"?kt(e,u):e instanceof Ne?St(e,u):e instanceof I?Eu(e,u):e instanceof se&&$t(e,u)}function gu(e,u){return typeof e=="string"?e.length!==0:e instanceof I?e.contents.some(n=>gu(n,u)):e instanceof se?!(e.ifNotEmpty&&u.currentLineContent.length===0):!1}function kt(e,u){e&&(u.pendingIndent&&Fu(u,!1),u.append(e))}function Fu(e,u){var n;let t="";for(const i of e.relevantIndents.filter(r=>r.indentEmptyLines||!u))t+=(n=i.indentation)!==null&&n!==void 0?n:e.defaultIndentation;e.append(t,!0),e.pendingIndent=!1}function Eu(e,u){let n;const t=At(e.tracedSource);t&&(n=u.pushTraceRegion(t));for(const i of e.contents)Cu(i,u);if(n){u.popTraceRegion(n);const i=u.getParentTraceSourceFileURI();i&&t?.fileURI===i&&delete t.fileURI,n.complete&&n.complete(u.currentPosition)}}function St(e,u){var n;if(gu(e,u)){e.indentImmediately&&!u.pendingIndent&&u.append((n=e.indentation)!==null&&n!==void 0?n:u.defaultIndentation,!0);try{u.increaseIndent(e),Eu(e,u)}finally{u.decreaseIndent()}}}function $t(e,u){e.ifNotEmpty&&!It(u.currentLineContent)?u.resetCurrentLine():(u.pendingIndent&&Fu(u,!0),u.append(e.lineDelimiter),u.addNewLine())}function It(e){return e.trimStart()!==""}Object.freeze("__\xABSKIP^NEW^LINE^IF^EMPTY\xBB__");const Nt=/\S|$/;function Lt(e){const u=e.filter(t=>t.length>0).map(t=>t.search(Nt)),n=u.length===0?0:Math.min(...u);return Math.max(0,n)}function _(e,...u){const n=Pt(e),t=Tt(e,u,n);return jt(t)}function xt(e,u,n){return(t,...i)=>Vt(e,u,n)(_(t,...i))}function Pt(e){const u=e.join("_").split(qe),n=u.length>1&&u[0].trim().length===0,t=n&&u.length>1&&u[u.length-1].trim().length===0;if(u.length===1||u.length!==0&&u[0].trim().length!==0||u.length===2&&u[1].trim().length===0)return{indentation:0,omitFirstLine:n,omitLastLine:t,trimLastLine:u.length!==1&&u[u.length-1].trim().length===0};{let i=n?u.slice(1):u;i=t?i.slice(0,i.length-1):i,i=i.filter(o=>o.length!==0);const r=Lt(i);return{indentation:r,omitFirstLine:n,omitLastLine:t&&(u[u.length-1].length<r||!u[u.length-1].startsWith(i[0].substring(0,r)))}}}function Tt(e,u,{indentation:n,omitFirstLine:t,omitLastLine:i,trimLastLine:r}){const o=[];e.forEach((l,d)=>{o.push(...l.split(qe).map((f,p)=>p===0||f.length<n?f:f.substring(n)).reduce(d===0?(f,p,h)=>h===0?t?[]:[p]:h===1&&f.length===0?[p]:f.concat(Fe,p):(f,p,h)=>h===0?[p]:f.concat(Fe,p),[]).filter(f=>!(typeof f=="string"&&f.length===0)).concat(ae(u[d])?u[d]:u[d]!==void 0?{content:String(u[d])}:d<u.length?Au:[]))});const c=o.length,D=c!==0?o[c-1]:void 0;return(i||r)&&typeof D=="string"&&D.trim().length===0?t&&c!==1&&o[c-2]===Fe?o.slice(0,c-2):o.slice(0,c-1):o}const Fe={isNewLine:!0},Au={isUndefinedSegment:!0},hu=e=>e===Fe,Ie=e=>e===Au,Ot=e=>e.content!==void 0;function jt(e){return e.reduce((n,t,i)=>Ie(t)?n:hu(t)?{node:i!==0&&(Ie(e[i-1])||ae(e[i-1]))||i>1&&typeof e[i-1]=="string"&&(Ie(e[i-2])||ae(e[i-2]))?n.node.appendNewLineIfNotEmpty():n.node.appendNewLine()}:(()=>{var r;const o=(i===0||hu(e[i-1]))&&typeof t=="string"&&t.length!==0?"".padStart(t.length-t.trimStart().length):"",c=Ot(t)?t.content:t;let D;return{node:n.indented?n.node:o.length!==0?n.node.indent({indentation:o,indentImmediately:!1,indentedChildren:l=>D=l.append(c)}):n.node.append(c),indented:D??((r=n.indented)===null||r===void 0?void 0:r.append(c))}})(),{node:new I}).node}const Rt=typeof process>"u"?`
|
|
2
|
+
import{l as Ke,m as Mu,n as Ju,o as qe,p as Wu,r as Ye,w as zu,y as Hu,z as Xe,A as Ze,D as Gu,E as a,G as Ku,_ as x,H as qu,I as Yu,J as R,K as Xu,M as Zu,O as Qu,P as Qe,S as eu,k as z,C as et,U as ut,V as le,q as uu,T as be,W as tu,X as tt,Z as nu,$ as iu,a0 as ru,a1 as nt}from"../shared/likec4.DKLo7EEm.mjs";import{DEV as it}from"esm-env";import{hrtime as rt,cwd as ou,argv as ot,stdout as at,exit as st}from"node:process";import Dt from"yargs";import{hideBin as ct}from"yargs/helpers";import{resolve as y,dirname as ne,join as ie,extname as pe,relative as Z,isAbsolute as au,basename as ke}from"node:path";import{existsSync as K,copyFileSync as su,rmSync as Du}from"node:fs";import{mkdtemp as fe,writeFile as Q,mkdir as H,stat as cu,copyFile as dt,rm as lt}from"node:fs/promises";import pt,{tmpdir as me}from"node:os";import{fileURLToPath as ft}from"node:url";import{build as re,createServer as mt,preview as Ct}from"vite";import{chromium as du}from"playwright";import gt from"node:net";import{setTimeout as Ft}from"node:timers/promises";import{resolve as oe}from"path";import Et from"@vitejs/plugin-react";import"tty";import"node:util";import"node:child_process";import"node:string_decoder";import"node:tty";import"child_process";import"fs";import"node:events";import"node:v8";import"node:stream";import"node:buffer";import"node:stream/promises";import"buffer";import"util";import"os";import"crypto";import"net";import"url";import"@hpcc-js/wasm-graphviz";const Ce={type:"string",desc:"<directory> with LikeC4 sources (default is current directory)",normalize:!0,default:".",coerce:y},V={alias:"use-dot-bin",boolean:!0,type:"boolean",desc:'use graphviz binaries ("dot" should be on PATH)',default:!1},lu={boolean:!0,type:"boolean",desc:'use hash history for navigation, e.g. "/#/view" instead of "/view"'},ge={alias:"o",type:"string",desc:"<directory> output directory",normalize:!0,coerce:y},Se={alias:"w",type:"string",desc:'prefix for Webcomponents, e.g "c4" generates <c4-view ../>',default:"likec4"},pu={alias:["base-url"],type:"string",desc:'base url the app is being served from, e.g. "/" or "/pages/"'},fu={boolean:!0,type:"boolean",desc:"overview all diagrams as graph [experimental]",default:!1};function At(e){var u,n;if(e){if("astNode"in e)return vt(e);if(Array.isArray(e))return e.reduce(mu,void 0);{const t=e,i=ht(t)?wt((n=(u=t?.root)===null||u===void 0?void 0:u.astNode)!==null&&n!==void 0?n:t?.astNode):void 0;return ee(t,i)}}else return}function ht(e){return typeof e<"u"&&"element"in e&&"text"in e}function wt(e){try{return Ke(e).uri.toString()}catch{return}}function vt(e){var u,n;const{astNode:t,property:i,index:r}=e??{},o=(u=t?.$cstNode)!==null&&u!==void 0?u:t?.$textRegion;if(!(t===void 0||o===void 0)){if(i===void 0)return ee(o,$e(t));{const c=D=>r!==void 0&&r>-1&&Array.isArray(t[i])?r<D.length?D[r]:void 0:D.reduce(mu,void 0);if(!((n=o.assignments)===null||n===void 0)&&n[i]){const D=c(o.assignments[i]);return D&&ee(D,$e(t))}else if(t.$cstNode){const D=c(Mu(t.$cstNode,i));return D&&ee(D,$e(t))}else return}}}function $e(e){var u,n,t,i;return e.$cstNode?(n=(u=Ke(e))===null||u===void 0?void 0:u.uri)===null||n===void 0?void 0:n.toString():e.$textRegion?e.$textRegion.documentURI||((i=(t=new Ju(e,r=>r.$container?[r.$container]:[]).find(r=>{var o;return(o=r.$textRegion)===null||o===void 0?void 0:o.documentURI}))===null||t===void 0?void 0:t.$textRegion)===null||i===void 0?void 0:i.documentURI):void 0}function ee(e,u){var n,t;const i={offset:e.offset,end:(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,length:(t=e.length)!==null&&t!==void 0?t:e.end-e.offset};return e.range&&(i.range=e.range),u??(u=e.fileURI),u&&(i.fileURI=u),i}function mu(e,u){var n,t;if(e){if(!u)return e&&ee(e)}else return u&&ee(u);const i=(n=e.end)!==null&&n!==void 0?n:e.offset+e.length,r=(t=u.end)!==null&&t!==void 0?t:u.offset+u.length,o=Math.min(e.offset,u.offset),c=Math.max(i,r),D=c-o,l={offset:o,end:c,length:D};if(e.range&&u.range&&(l.range={start:u.range.start.line<e.range.start.line||u.range.start.line===e.range.start.line&&u.range.start.character<e.range.start.character?u.range.start:e.range.start,end:u.range.end.line>e.range.end.line||u.range.end.line===e.range.end.line&&u.range.end.character>e.range.end.character?u.range.end:e.range.end}),e.fileURI||u.fileURI){const d=e.fileURI,f=u.fileURI,p=d&&f&&d!==f?`<unmergable text regions of ${d}, ${f}>`:d??f;l.fileURI=p}return l}class Bt{constructor(u){this.defaultIndentation=" ",this.pendingIndent=!0,this.currentIndents=[],this.recentNonImmediateIndents=[],this.traceData=[],this.lines=[[]],this.length=0,typeof u=="string"?this.defaultIndentation=u:typeof u=="number"&&(this.defaultIndentation="".padStart(u))}get content(){return this.lines.map(u=>u.join("")).join("")}get contentLength(){return this.length}get currentLineNumber(){return this.lines.length-1}get currentLineContent(){return this.lines[this.currentLineNumber].join("")}get currentPosition(){return{offset:this.contentLength,line:this.currentLineNumber,character:this.currentLineContent.length}}append(u,n){if(u.length>0){const t=n&&this.currentPosition;this.lines[this.currentLineNumber].push(u),this.length+=u.length,t&&this.indentPendingTraceRegions(t)}}indentPendingTraceRegions(u){for(let n=this.traceData.length-1;n>=0;n--){const t=this.traceData[n];t.targetStart&&t.targetStart.offset===u.offset&&(t.targetStart=this.currentPosition)}}increaseIndent(u){this.currentIndents.push(u),u.indentImmediately||this.recentNonImmediateIndents.push(u)}decreaseIndent(){this.currentIndents.pop()}get relevantIndents(){return this.currentIndents.filter(u=>!this.recentNonImmediateIndents.includes(u))}resetCurrentLine(){this.length-=this.lines[this.currentLineNumber].join("").length,this.lines[this.currentLineNumber]=[],this.pendingIndent=!0}addNewLine(){this.pendingIndent=!0,this.lines.push([]),this.recentNonImmediateIndents.length=0}pushTraceRegion(u){const n=yt(u,this.currentPosition,t=>{var i,r;return(r=(i=this.traceData[this.traceData.length-1])===null||i===void 0?void 0:i.children)===null||r===void 0?void 0:r.push(t)});return this.traceData.push(n),n}popTraceRegion(u){const n=this.traceData.pop();return this.assertTrue(n===u,"Trace region mismatch!"),n}getParentTraceSourceFileURI(){var u;for(let n=this.traceData.length-1;n>-1;n--){const t=(u=this.traceData[n].sourceRegion)===null||u===void 0?void 0:u.fileURI;if(t)return t}}assertTrue(u,n){if(!u)throw new Error(n)}}function yt(e,u,n){const t={sourceRegion:e,targetRegion:void 0,children:[],targetStart:u,complete:i=>{var r,o;return t.targetRegion={offset:t.targetStart.offset,end:i.offset,length:i.offset-t.targetStart.offset,range:{start:{line:t.targetStart.line,character:t.targetStart.character},end:{line:i.line,character:i.character}}},delete t.targetStart,((r=t.children)===null||r===void 0?void 0:r.length)===0&&delete t.children,!((o=t.targetRegion)===null||o===void 0)&&o.length&&n(t),delete t.complete,t}};return t}function bt(e,u){const n=new Bt(u),t=n.pushTraceRegion(void 0);Cu(e,n),n.popTraceRegion(t),t.complete&&t.complete(n.currentPosition);const i=t.children&&t.children.length===1?t.children[0]:void 0,r=i?.targetRegion,o=t.targetRegion;return r&&i.sourceRegion&&r.offset===o.offset&&r.length===o.length?{text:n.content,trace:i}:{text:n.content,trace:t}}function Cu(e,u){typeof e=="string"?kt(e,u):e instanceof Ne?St(e,u):e instanceof I?Eu(e,u):e instanceof se&&$t(e,u)}function gu(e,u){return typeof e=="string"?e.length!==0:e instanceof I?e.contents.some(n=>gu(n,u)):e instanceof se?!(e.ifNotEmpty&&u.currentLineContent.length===0):!1}function kt(e,u){e&&(u.pendingIndent&&Fu(u,!1),u.append(e))}function Fu(e,u){var n;let t="";for(const i of e.relevantIndents.filter(r=>r.indentEmptyLines||!u))t+=(n=i.indentation)!==null&&n!==void 0?n:e.defaultIndentation;e.append(t,!0),e.pendingIndent=!1}function Eu(e,u){let n;const t=At(e.tracedSource);t&&(n=u.pushTraceRegion(t));for(const i of e.contents)Cu(i,u);if(n){u.popTraceRegion(n);const i=u.getParentTraceSourceFileURI();i&&t?.fileURI===i&&delete t.fileURI,n.complete&&n.complete(u.currentPosition)}}function St(e,u){var n;if(gu(e,u)){e.indentImmediately&&!u.pendingIndent&&u.append((n=e.indentation)!==null&&n!==void 0?n:u.defaultIndentation,!0);try{u.increaseIndent(e),Eu(e,u)}finally{u.decreaseIndent()}}}function $t(e,u){e.ifNotEmpty&&!It(u.currentLineContent)?u.resetCurrentLine():(u.pendingIndent&&Fu(u,!0),u.append(e.lineDelimiter),u.addNewLine())}function It(e){return e.trimStart()!==""}Object.freeze("__\xABSKIP^NEW^LINE^IF^EMPTY\xBB__");const Nt=/\S|$/;function Lt(e){const u=e.filter(t=>t.length>0).map(t=>t.search(Nt)),n=u.length===0?0:Math.min(...u);return Math.max(0,n)}function _(e,...u){const n=Pt(e),t=Tt(e,u,n);return jt(t)}function xt(e,u,n){return(t,...i)=>Vt(e,u,n)(_(t,...i))}function Pt(e){const u=e.join("_").split(qe),n=u.length>1&&u[0].trim().length===0,t=n&&u.length>1&&u[u.length-1].trim().length===0;if(u.length===1||u.length!==0&&u[0].trim().length!==0||u.length===2&&u[1].trim().length===0)return{indentation:0,omitFirstLine:n,omitLastLine:t,trimLastLine:u.length!==1&&u[u.length-1].trim().length===0};{let i=n?u.slice(1):u;i=t?i.slice(0,i.length-1):i,i=i.filter(o=>o.length!==0);const r=Lt(i);return{indentation:r,omitFirstLine:n,omitLastLine:t&&(u[u.length-1].length<r||!u[u.length-1].startsWith(i[0].substring(0,r)))}}}function Tt(e,u,{indentation:n,omitFirstLine:t,omitLastLine:i,trimLastLine:r}){const o=[];e.forEach((l,d)=>{o.push(...l.split(qe).map((f,p)=>p===0||f.length<n?f:f.substring(n)).reduce(d===0?(f,p,h)=>h===0?t?[]:[p]:h===1&&f.length===0?[p]:f.concat(Fe,p):(f,p,h)=>h===0?[p]:f.concat(Fe,p),[]).filter(f=>!(typeof f=="string"&&f.length===0)).concat(ae(u[d])?u[d]:u[d]!==void 0?{content:String(u[d])}:d<u.length?Au:[]))});const c=o.length,D=c!==0?o[c-1]:void 0;return(i||r)&&typeof D=="string"&&D.trim().length===0?t&&c!==1&&o[c-2]===Fe?o.slice(0,c-2):o.slice(0,c-1):o}const Fe={isNewLine:!0},Au={isUndefinedSegment:!0},hu=e=>e===Fe,Ie=e=>e===Au,Ot=e=>e.content!==void 0;function jt(e){return e.reduce((n,t,i)=>Ie(t)?n:hu(t)?{node:i!==0&&(Ie(e[i-1])||ae(e[i-1]))||i>1&&typeof e[i-1]=="string"&&(Ie(e[i-2])||ae(e[i-2]))?n.node.appendNewLineIfNotEmpty():n.node.appendNewLine()}:(()=>{var r;const o=(i===0||hu(e[i-1]))&&typeof t=="string"&&t.length!==0?"".padStart(t.length-t.trimStart().length):"",c=Ot(t)?t.content:t;let D;return{node:n.indented?n.node:o.length!==0?n.node.indent({indentation:o,indentImmediately:!1,indentedChildren:l=>D=l.append(c)}):n.node.append(c),indented:D??((r=n.indented)===null||r===void 0?void 0:r.append(c))}})(),{node:new I}).node}const Rt=typeof process>"u"?`
|
|
3
3
|
`:process.platform==="win32"?`\r
|
|
4
4
|
`:`
|
|
5
|
-
`;function ae(e){return e instanceof I||e instanceof Ne||e instanceof se}function U(e,u){return ae(e)?bt(e,u).text:String(e)}class I{constructor(...u){this.contents=[],this.append(...u)}isEmpty(){return this.contents.length===0}trace(u,n,t){if(
|
|
5
|
+
`;function ae(e){return e instanceof I||e instanceof Ne||e instanceof se}function U(e,u){return ae(e)?bt(e,u).text:String(e)}class I{constructor(...u){this.contents=[],this.append(...u)}isEmpty(){return this.contents.length===0}trace(u,n,t){if(Wu(u)){if(this.tracedSource={astNode:u,property:n,index:t},this.tracedSource.property===void 0&&this.tracedSource.index!==void 0&&this.tracedSource.index>-1)throw new Error("Generation support: 'property' argument must not be 'undefined' if a non-negative value is assigned to 'index' in 'CompositeGeneratorNode.trace(...)'.")}else this.tracedSource=u;return this}append(...u){for(const n of u)typeof n=="function"?n(this):n&&this.contents.push(n);return this}appendIf(u,...n){return u?this.append(...n):this}appendNewLine(){return this.append(E)}appendNewLineIf(u){return u?this.append(E):this}appendNewLineIfNotEmpty(){return this.append(_t)}appendNewLineIfNotEmptyIf(u){return u?this.appendNewLineIfNotEmpty():this}appendTemplate(u,...n){return this.append(_(u,...n))}appendTemplateIf(u){return u?(n,...t)=>this.appendTemplate(n,...t):()=>this}indent(u){const{indentedChildren:n,indentation:t,indentEmptyLines:i,indentImmediately:r}=Array.isArray(u)||typeof u=="function"?{indentedChildren:u}:typeof u=="object"?u:{},o=new Ne(t,r,i);return this.contents.push(o),Array.isArray(n)?o.append(...n):n&&o.append(n),this}appendTraced(u,n,t){return i=>this.append(new I().trace(u,n,t).append(i))}appendTracedIf(u,n,t,i){return u?this.appendTraced(typeof n=="function"?n():n,t,i):()=>this}appendTracedTemplate(u,n,t){return(i,...r)=>this.append(xt(u,n,t)(i,...r))}appendTracedTemplateIf(u,n,t,i){return u?this.appendTracedTemplate(typeof n=="function"?n():n,t,i):()=>this}}function Vt(e,u,n){return t=>t instanceof I&&t.tracedSource===void 0?t.trace(e,u,n):new I().trace(e,u,n).append(t)}class Ne extends I{constructor(u,n=!0,t=!1){super(),this.indentImmediately=!0,this.indentEmptyLines=!1,typeof u=="string"?this.indentation=u:typeof u=="number"&&(this.indentation="".padStart(u)),this.indentImmediately=n,this.indentEmptyLines=t}}class se{constructor(u,n=!1){this.ifNotEmpty=!1,this.lineDelimiter=u??Rt,this.ifNotEmpty=n}}const E=new se,_t=new se(void 0,!0),wu=e=>e===void 0||typeof e=="string"||ae(e)?e:String(e);function O(e,u=wu,n={}){const t=typeof u=="function"?u:wu,{filter:i,prefix:r,suffix:o,separator:c,appendNewLineIfNotEmpty:D,skipNewLineAfterLastItem:l}=typeof u=="object"?u:n,d=typeof r=="function"?r:()=>r,f=typeof o=="function"?o:()=>o;return Ut(e,(p,h,v,m)=>{if(i&&!i(h,v,m))return p;const g=t(h,v,m);return g===void 0?p:(p??(p=new I)).append(d(h,v,m)).append(g).append(f(h,v,m)).appendIf(!m,c).appendNewLineIfNotEmptyIf(!p.isEmpty()&&!!D&&(!m||!l))})}function Ut(e,u,n){const t=e[Symbol.iterator]();let i=t.next(),r=0,o=n;for(;!i.done;){const c=t.next();o=u(o,i.value,r,!!c.done),i=c,r++}return o}const Mt=e=>e.charAt(0).toLocaleUpperCase()+e.slice(1),Jt=e=>e.split(".").map(Mt).join(""),Wt=e=>Jt(e.parent?e.id.slice(e.parent.length+1):e.id),zt=({autoLayout:e})=>{switch(e){case"TB":return"down";case"BT":return"up";case"LR":return"right";case"RL":return"left"}},Ht=({shape:e})=>{switch(e){case"queue":case"cylinder":case"rectangle":case"person":return e;case"storage":return"stored_data";case"mobile":case"browser":return"rectangle"}};function vu(e){const{nodes:u,edges:n}=e,t=new Map,i=(o,c)=>{const D=Wt(o),l=(c?c+".":"")+D;t.set(o.id,l);const d=JSON.stringify(o.title),f=Ht(o);return new I().append(D,": {",E).indent({indentedChildren:p=>p.append("label: ",d,E).appendIf(f!=="rectangle","shape: ",f,E).appendIf(o.children.length>0,E,O(u.filter(h=>h.parent===o.id),h=>i(h,l))),indentation:2}).append("}",E)},r=o=>new I().append(t.get(o.source)," -> ",t.get(o.target)).append(c=>o.label&&c.append(": ",JSON.stringify(o.label)));return U(new I().append("direction: ",zt(e),E,E).append(O(u.filter(o=>Ye(o.parent)),o=>i(o),{appendNewLineIfNotEmpty:!0})).appendIf(n.length>0,E,O(n,o=>r(o),{appendNewLineIfNotEmpty:!0})))}const Gt=e=>e.charAt(0).toLocaleUpperCase()+e.slice(1),Kt=e=>e.split(".").map(Gt).join(""),qt=e=>Kt(e.parent?e.id.slice(e.parent.length+1):e.id),Yt=({shape:e})=>{switch(e){case"queue":case"cylinder":return["[(",")]"];case"person":return["[fa:fa-user ","]"];case"storage":return["([","])"];case"mobile":case"browser":case"rectangle":return["[","]"]}};function Bu(e){const{nodes:u,edges:n}=e,t=new Map,i=(o,c)=>{const D=qt(o),l=(c?c+".":"")+D;t.set(o.id,l);const d=o.title.replaceAll(`
|
|
6
6
|
`,"\\n"),f=Yt(o),p=new I;return o.children.length>0?p.append("subgraph ",l,"[",JSON.stringify(o.title),"]",E).indent({indentedChildren:[O(u.filter(h=>h.parent===o.id),h=>i(h,l),{appendNewLineIfNotEmpty:!0})],indentation:2}).append("end",E):p.append(l,f[0],d,f[1]),p},r=o=>new I().append(t.get(o.source)," -.",o.label?' "'+o.label.replaceAll(`
|
|
7
|
-
`,"\\n")+'" .-':"-","> ",t.get(o.target));return U(new I().appendIf(e.title!==null&&e.title.length>0,"---",E,`title: ${JSON.stringify(e.title)}`,E,"---",E).append("graph ",e.autoLayout,E).indent({indentedChildren:o=>{o.append(O(u.filter(c=>Ye(c.parent)),c=>i(c),{appendNewLineIfNotEmpty:!0})).appendIf(n.length>0,O(n,c=>r(c),{appendNewLineIfNotEmpty:!0}))},indentation:2}))}var Xt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Qt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800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F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Zt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-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\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA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CD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Le={Space_Separator:Xt,ID_Start:Qt,ID_Continue:Zt},$={isSpaceSeparator(e){return typeof e=="string"&&Le.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Le.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Le.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let xe,T,M,Ee,G,j,L,Pe,De;var en=function(u,n){xe=String(u),T="start",M=[],Ee=0,G=1,j=0,L=void 0,Pe=void 0,De=void 0;do L=un(),rn[T]();while(L.type!=="eof");return typeof n=="function"?Te({"":De},"",n):De};function Te(e,u,n){const t=e[u];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let i=0;i<t.length;i++){const r=String(i),o=Te(t,r,n);o===void 0?delete t[r]:Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const i in t){const r=Te(t,i,n);r===void 0?delete t[i]:Object.defineProperty(t,i,{value:r,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,u,t)}let A,F,ce,J,w;function un(){for(A="default",F="",ce=!1,J=1;;){w=z();const e=yu[A]();if(e)return e}}function z(){if(xe[Ee])return String.fromCodePoint(xe.codePointAt(Ee))}function s(){const e=z();return e===`
|
|
7
|
+
`,"\\n")+'" .-':"-","> ",t.get(o.target));return U(new I().appendIf(e.title!==null&&e.title.length>0,"---",E,`title: ${JSON.stringify(e.title)}`,E,"---",E).append("graph ",e.autoLayout,E).indent({indentedChildren:o=>{o.append(O(u.filter(c=>Ye(c.parent)),c=>i(c),{appendNewLineIfNotEmpty:!0})).appendIf(n.length>0,O(n,c=>r(c),{appendNewLineIfNotEmpty:!0}))},indentation:2}))}var Xt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Zt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\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uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Qt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0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-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92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DDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\u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C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Le={Space_Separator:Xt,ID_Start:Zt,ID_Continue:Qt},$={isSpaceSeparator(e){return typeof e=="string"&&Le.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Le.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Le.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let xe,T,M,Ee,G,j,L,Pe,De;var en=function(u,n){xe=String(u),T="start",M=[],Ee=0,G=1,j=0,L=void 0,Pe=void 0,De=void 0;do L=un(),rn[T]();while(L.type!=="eof");return typeof n=="function"?Te({"":De},"",n):De};function Te(e,u,n){const t=e[u];if(t!=null&&typeof t=="object")if(Array.isArray(t))for(let i=0;i<t.length;i++){const r=String(i),o=Te(t,r,n);o===void 0?delete t[r]:Object.defineProperty(t,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const i in t){const r=Te(t,i,n);r===void 0?delete t[i]:Object.defineProperty(t,i,{value:r,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,u,t)}let A,F,ce,J,w;function un(){for(A="default",F="",ce=!1,J=1;;){w=W();const e=yu[A]();if(e)return e}}function W(){if(xe[Ee])return String.fromCodePoint(xe.codePointAt(Ee))}function s(){const e=W();return e===`
|
|
8
8
|
`?(G++,j=0):e?j+=e.length:j++,e&&(Ee+=e.length),e}const yu={default(){switch(w){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
9
9
|
`:case"\r":case"\u2028":case"\u2029":s();return;case"/":s(),A="comment";return;case void 0:return s(),b("eof")}if($.isSpaceSeparator(w)){s();return}return yu[T]()},comment(){switch(w){case"*":s(),A="multiLineComment";return;case"/":s(),A="singleLineComment";return}throw k(s())},multiLineComment(){switch(w){case"*":s(),A="multiLineCommentAsterisk";return;case void 0:throw k(s())}s()},multiLineCommentAsterisk(){switch(w){case"*":s();return;case"/":s(),A="default";return;case void 0:throw k(s())}s(),A="multiLineComment"},singleLineComment(){switch(w){case`
|
|
10
10
|
`:case"\r":case"\u2028":case"\u2029":s(),A="default";return;case void 0:return s(),b("eof")}s()},value(){switch(w){case"{":case"[":return b("punctuator",s());case"n":return s(),q("ull"),b("null",null);case"t":return s(),q("rue"),b("boolean",!0);case"f":return s(),q("alse"),b("boolean",!1);case"-":case"+":s()==="-"&&(J=-1),A="sign";return;case".":F=s(),A="decimalPointLeading";return;case"0":F=s(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":F=s(),A="decimalInteger";return;case"I":return s(),q("nfinity"),b("numeric",1/0);case"N":return s(),q("aN"),b("numeric",NaN);case'"':case"'":ce=s()==='"',F="",A="string";return}throw k(s())},identifierNameStartEscape(){if(w!=="u")throw k(s());s();const e=Oe();switch(e){case"$":case"_":break;default:if(!$.isIdStartChar(e))throw bu();break}F+=e,A="identifierName"},identifierName(){switch(w){case"$":case"_":case"\u200C":case"\u200D":F+=s();return;case"\\":s(),A="identifierNameEscape";return}if($.isIdContinueChar(w)){F+=s();return}return b("identifier",F)},identifierNameEscape(){if(w!=="u")throw k(s());s();const e=Oe();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!$.isIdContinueChar(e))throw bu();break}F+=e,A="identifierName"},sign(){switch(w){case".":F=s(),A="decimalPointLeading";return;case"0":F=s(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":F=s(),A="decimalInteger";return;case"I":return s(),q("nfinity"),b("numeric",J*(1/0));case"N":return s(),q("aN"),b("numeric",NaN)}throw k(s())},zero(){switch(w){case".":F+=s(),A="decimalPoint";return;case"e":case"E":F+=s(),A="decimalExponent";return;case"x":case"X":F+=s(),A="hexadecimal";return}return b("numeric",J*0)},decimalInteger(){switch(w){case".":F+=s(),A="decimalPoint";return;case"e":case"E":F+=s(),A="decimalExponent";return}if($.isDigit(w)){F+=s();return}return b("numeric",J*Number(F))},decimalPointLeading(){if($.isDigit(w)){F+=s(),A="decimalFraction";return}throw k(s())},decimalPoint(){switch(w){case"e":case"E":F+=s(),A="decimalExponent";return}if($.isDigit(w)){F+=s(),A="decimalFraction";return}return b("numeric",J*Number(F))},decimalFraction(){switch(w){case"e":case"E":F+=s(),A="decimalExponent";return}if($.isDigit(w)){F+=s();return}return b("numeric",J*Number(F))},decimalExponent(){switch(w){case"+":case"-":F+=s(),A="decimalExponentSign";return}if($.isDigit(w)){F+=s(),A="decimalExponentInteger";return}throw k(s())},decimalExponentSign(){if($.isDigit(w)){F+=s(),A="decimalExponentInteger";return}throw k(s())},decimalExponentInteger(){if($.isDigit(w)){F+=s();return}return b("numeric",J*Number(F))},hexadecimal(){if($.isHexDigit(w)){F+=s(),A="hexadecimalInteger";return}throw k(s())},hexadecimalInteger(){if($.isHexDigit(w)){F+=s();return}return b("numeric",J*Number(F))},string(){switch(w){case"\\":s(),F+=tn();return;case'"':if(ce)return s(),b("string",F);F+=s();return;case"'":if(!ce)return s(),b("string",F);F+=s();return;case`
|
|
11
|
-
`:case"\r":throw k(s());case"\u2028":case"\u2029":on(w);break;case void 0:throw k(s())}F+=s()},start(){switch(w){case"{":case"[":return b("punctuator",s())}A="value"},beforePropertyName(){switch(w){case"$":case"_":F=s(),A="identifierName";return;case"\\":s(),A="identifierNameStartEscape";return;case"}":return b("punctuator",s());case'"':case"'":ce=s()==='"',A="string";return}if($.isIdStartChar(w)){F+=s(),A="identifierName";return}throw k(s())},afterPropertyName(){if(w===":")return b("punctuator",s());throw k(s())},beforePropertyValue(){A="value"},afterPropertyValue(){switch(w){case",":case"}":return b("punctuator",s())}throw k(s())},beforeArrayValue(){if(w==="]")return b("punctuator",s());A="value"},afterArrayValue(){switch(w){case",":case"]":return b("punctuator",s())}throw k(s())},end(){throw k(s())}};function b(e,u){return{type:e,value:u,line:G,column:j}}function q(e){for(const u of e){if(
|
|
12
|
-
`;case"r":return s(),"\r";case"t":return s()," ";case"v":return s(),"\v";case"0":if(s(),$.isDigit(
|
|
13
|
-
`:case"\u2028":case"\u2029":return s(),"";case"\r":return s(),
|
|
14
|
-
`&&s(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw k(s());case void 0:throw k(s())}return s()}function nn(){let e="",u=
|
|
11
|
+
`:case"\r":throw k(s());case"\u2028":case"\u2029":on(w);break;case void 0:throw k(s())}F+=s()},start(){switch(w){case"{":case"[":return b("punctuator",s())}A="value"},beforePropertyName(){switch(w){case"$":case"_":F=s(),A="identifierName";return;case"\\":s(),A="identifierNameStartEscape";return;case"}":return b("punctuator",s());case'"':case"'":ce=s()==='"',A="string";return}if($.isIdStartChar(w)){F+=s(),A="identifierName";return}throw k(s())},afterPropertyName(){if(w===":")return b("punctuator",s());throw k(s())},beforePropertyValue(){A="value"},afterPropertyValue(){switch(w){case",":case"}":return b("punctuator",s())}throw k(s())},beforeArrayValue(){if(w==="]")return b("punctuator",s());A="value"},afterArrayValue(){switch(w){case",":case"]":return b("punctuator",s())}throw k(s())},end(){throw k(s())}};function b(e,u){return{type:e,value:u,line:G,column:j}}function q(e){for(const u of e){if(W()!==u)throw k(s());s()}}function tn(){switch(W()){case"b":return s(),"\b";case"f":return s(),"\f";case"n":return s(),`
|
|
12
|
+
`;case"r":return s(),"\r";case"t":return s()," ";case"v":return s(),"\v";case"0":if(s(),$.isDigit(W()))throw k(s());return"\0";case"x":return s(),nn();case"u":return s(),Oe();case`
|
|
13
|
+
`:case"\u2028":case"\u2029":return s(),"";case"\r":return s(),W()===`
|
|
14
|
+
`&&s(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw k(s());case void 0:throw k(s())}return s()}function nn(){let e="",u=W();if(!$.isHexDigit(u)||(e+=s(),u=W(),!$.isHexDigit(u)))throw k(s());return e+=s(),String.fromCodePoint(parseInt(e,16))}function Oe(){let e="",u=4;for(;u-- >0;){const n=W();if(!$.isHexDigit(n))throw k(s());e+=s()}return String.fromCodePoint(parseInt(e,16))}const rn={start(){if(L.type==="eof")throw Y();je()},beforePropertyName(){switch(L.type){case"identifier":case"string":Pe=L.value,T="afterPropertyName";return;case"punctuator":Ae();return;case"eof":throw Y()}},afterPropertyName(){if(L.type==="eof")throw Y();T="beforePropertyValue"},beforePropertyValue(){if(L.type==="eof")throw Y();je()},beforeArrayValue(){if(L.type==="eof")throw Y();if(L.type==="punctuator"&&L.value==="]"){Ae();return}je()},afterPropertyValue(){if(L.type==="eof")throw Y();switch(L.value){case",":T="beforePropertyName";return;case"}":Ae()}},afterArrayValue(){if(L.type==="eof")throw Y();switch(L.value){case",":T="beforeArrayValue";return;case"]":Ae()}},end(){}};function je(){let e;switch(L.type){case"punctuator":switch(L.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=L.value;break}if(De===void 0)De=e;else{const u=M[M.length-1];Array.isArray(u)?u.push(e):Object.defineProperty(u,Pe,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")M.push(e),Array.isArray(e)?T="beforeArrayValue":T="beforePropertyName";else{const u=M[M.length-1];u==null?T="end":Array.isArray(u)?T="afterArrayValue":T="afterPropertyValue"}}function Ae(){M.pop();const e=M[M.length-1];e==null?T="end":Array.isArray(e)?T="afterArrayValue":T="afterPropertyValue"}function k(e){return he(e===void 0?`JSON5: invalid end of input at ${G}:${j}`:`JSON5: invalid character '${ku(e)}' at ${G}:${j}`)}function Y(){return he(`JSON5: invalid end of input at ${G}:${j}`)}function bu(){return j-=5,he(`JSON5: invalid identifier character at ${G}:${j}`)}function on(e){console.warn(`JSON5: '${ku(e)}' in strings is not valid ECMAScript; consider escaping`)}function ku(e){const u={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(u[e])return u[e];if(e<" "){const n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function he(e){const u=new SyntaxError(e);return u.lineNumber=G,u.columnNumber=j,u}var an=function(u,n,t){const i=[];let r="",o,c,D="",l;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(t=n.space,l=n.quote,n=n.replacer),typeof n=="function")c=n;else if(Array.isArray(n)){o=[];for(const m of n){let g;typeof m=="string"?g=m:(typeof m=="number"||m instanceof String||m instanceof Number)&&(g=String(m)),g!==void 0&&o.indexOf(g)<0&&o.push(g)}}return t instanceof Number?t=Number(t):t instanceof String&&(t=String(t)),typeof t=="number"?t>0&&(t=Math.min(10,Math.floor(t)),D=" ".substr(0,t)):typeof t=="string"&&(D=t.substr(0,10)),d("",{"":u});function d(m,g){let C=g[m];switch(C!=null&&(typeof C.toJSON5=="function"?C=C.toJSON5(m):typeof C.toJSON=="function"&&(C=C.toJSON(m))),c&&(C=c.call(g,m,C)),C instanceof Number?C=Number(C):C instanceof String?C=String(C):C instanceof Boolean&&(C=C.valueOf()),C){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof C=="string")return f(C);if(typeof C=="number")return String(C);if(typeof C=="object")return Array.isArray(C)?v(C):p(C)}function f(m){const g={"'":.1,'"':.2},C={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let B="";for(let N=0;N<m.length;N++){const P=m[N];switch(P){case"'":case'"':g[P]++,B+=P;continue;case"\0":if($.isDigit(m[N+1])){B+="\\x00";continue}}if(C[P]){B+=C[P];continue}if(P<" "){let X=P.charCodeAt(0).toString(16);B+="\\x"+("00"+X).substring(X.length);continue}B+=P}const S=l||Object.keys(g).reduce((N,P)=>g[N]<g[P]?N:P);return B=B.replace(new RegExp(S,"g"),C[S]),S+B+S}function p(m){if(i.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");i.push(m);let g=r;r=r+D;let C=o||Object.keys(m),B=[];for(const N of C){const P=d(N,m);if(P!==void 0){let X=h(N)+":";D!==""&&(X+=" "),X+=P,B.push(X)}}let S;if(B.length===0)S="{}";else{let N;if(D==="")N=B.join(","),S="{"+N+"}";else{let P=`,
|
|
15
15
|
`+r;N=B.join(P),S=`{
|
|
16
16
|
`+r+N+`,
|
|
17
17
|
`+g+"}"}}return i.pop(),r=g,S}function h(m){if(m.length===0)return f(m);const g=String.fromCodePoint(m.codePointAt(0));if(!$.isIdStartChar(g))return f(m);for(let C=g.length;C<m.length;C++)if(!$.isIdContinueChar(String.fromCodePoint(m.codePointAt(C))))return f(m);return m}function v(m){if(i.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");i.push(m);let g=r;r=r+D;let C=[];for(let S=0;S<m.length;S++){const N=d(String(S),m);C.push(N!==void 0?N:"null")}let B;if(C.length===0)B="[]";else if(D==="")B="["+C.join(",")+"]";else{let S=`,
|
|
@@ -113,7 +113,7 @@ import{l as Ke,n as Mu,o as Ju,N as qe,p as zu,r as Ye,s as Wu,u as Hu,v as Xe,y
|
|
|
113
113
|
default: {
|
|
114
114
|
throw new Error('Unknown viewId: ' + viewId)
|
|
115
115
|
}
|
|
116
|
-
`}}).append(E," }",E,"}",E,E),U(u)}function fn(e){const u=
|
|
116
|
+
`}}).append(E," }",E,"}",E,E),U(u)}function fn(e){const u=zu(e.flatMap(i=>i.nodes.map(r=>r.icon)),Xe(Gu),Xe(i=>Ze(i)&&!i.toLowerCase().startsWith("http")),Hu()).sort(),{imports:n,cases:t}=u.reduce((i,r,o)=>{const[c,D]=r.split(":"),l="Icon"+o.toString().padStart(2,"0");return i.imports.push(`import ${l} from 'likec4/icons/${c}/${D}'`),i.cases.push(` '${c}:${D}': ${l}`),i},{imports:[],cases:[]});return`
|
|
117
117
|
${n.join(`
|
|
118
118
|
`)}
|
|
119
119
|
|
|
@@ -275,15 +275,15 @@ if (import.meta.hot) {
|
|
|
275
275
|
/* prettier-ignore-end */
|
|
276
276
|
`,_e={banner:bn,footer:kn};function Ue(){const e=[y(Ve,"../__app__"),y(Ve,"../../__app__"),y(Ve,"../../dist/__app__")],u=Yu(e,K);if(!u)throw x.error(`likec4 app root does not exist, tried:
|
|
277
277
|
${e.join(`
|
|
278
|
-
`)}`),new Error("likec4 app root does not exist");return u}async function Me(){const e=await fe(ie(me(),".likec4-public-"));return await
|
|
279
|
-
`),e}const Je=1e4,
|
|
278
|
+
`)}`),new Error("likec4 app root does not exist");return u}async function Me(){const e=await fe(ie(me(),".likec4-public-"));return await Q(ie(e,"likec4-views.js"),`// generated by likec4
|
|
279
|
+
`),e}const Je=1e4,We=async({languageServices:e,likec4AssetsDir:u,...n})=>{const t=n.customLogger??R("c4:vite"),i=Ue(),r=n?.useOverviewGraph===!0;t.info(`${a.cyan("likec4 app root")} ${a.dim(i)}`);const o=n.outputDir??y(e.workspace,"dist");t.info(a.cyan("output")+" "+a.dim(o));let c="/";n.base&&(c=Xu(n.base),Zu(c)||(c=Qu(c))),c!=="/"&&t.info(`${a.green("app base url")} ${a.dim(c)}`);const D=n.webcomponentPrefix??"likec4";return{isDev:!1,likec4AssetsDir:u,webcomponentPrefix:D,root:i,languageServices:e,clearScreen:!1,base:c,resolve:{alias:{"likec4/previews":u}},configFile:!1,mode:"production",optimizeDeps:{include:["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client","nanostores","@nanostores/react"],force:!0},define:{WEBCOMPONENT_PREFIX:JSON.stringify(D),__USE_STYLE_BUNDLE__:"false",__USE_OVERVIEW_GRAPH__:r?"true":"false",__USE_HASH_HISTORY__:n?.useHashHistory===!0?"true":"false","process.env.NODE_ENV":'"production"'},build:{outDir:o,modulePreload:!1,emptyOutDir:!1,cssCodeSplit:!1,sourcemap:!1,cssMinify:!0,minify:!0,copyPublicDir:!0,chunkSizeWarningLimit:Je,commonjsOptions:{defaultIsModuleExports:l=>l.includes("react")?!0:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{hoistTransitiveImports:!1,compact:!0}}},customLogger:t,plugins:[Re({languageServices:e,useOverviewGraph:r})]}};async function ze({languageServices:e,outDir:u,base:n,webcomponentPrefix:t="likec4",filename:i="likec4-views.js"}){const r=R("c4:lib"),o=Ue();return r.info(a.cyan("outDir")+" "+a.dim(u)),{root:o,clearScreen:!1,base:n,configFile:!1,publicDir:!1,mode:"production",define:{WEBCOMPONENT_PREFIX:JSON.stringify(t),"process.env.NODE_ENV":'"production"'},resolve:{alias:{"likec4/icons":y(o,"../../icons")}},esbuild:{..._e},build:{outDir:u,emptyOutDir:!1,sourcemap:!1,minify:!0,assetsInlineLimit:100*1024,chunkSizeWarningLimit:Je,lib:{entry:"webcomponent/webcomponent.js",fileName(c,D){return i},formats:["iife"],name:"LikeC4Views"},commonjsOptions:{defaultIsModuleExports:c=>c.includes("react")?!0:"auto",requireReturnsDefault:"auto"},rollupOptions:{treeshake:{preset:"recommended"},output:{format:"iife",hoistTransitiveImports:!1,compact:!0}}},customLogger:r,plugins:[Re({languageServices:e,useOverviewGraph:!1})]}}const Sn=["favicon.ico","robots.txt"],$n=async({buildWebcomponent:e=!0,webcomponentPrefix:u="likec4",languageServices:n,likec4AssetsDir:t,...i})=>{t??=await fe(ie(me(),".likec4-assets-"));const{isDev:r,...o}=await We({...i,languageServices:n,likec4AssetsDir:t,webcomponentPrefix:u}),c=await Me();for(const d of Sn){const f=y(o.root,d);K(f)&&su(f,y(c,d))}const D=await n.diagrams();if(D.length===0)throw process.exitCode=1,new Error("no views found");if(D.forEach(d=>{d.hasLayoutDrift&&o.customLogger.warn(a.yellow("drift detected, manual layout can not be applied, view:")+" "+a.red(d.id))}),e){const d=await ze({webcomponentPrefix:u,languageServices:n,outDir:c,base:o.base});await re(d)}await re({...o,publicDir:c,mode:"production"});const l=y(o.build.outDir,"index.html");K(l)&&su(l,y(o.build.outDir,"404.html"))};function Lu(e){if(e.resolvedUrls)return Qe(e.resolvedUrls.network)??Qe(e.resolvedUrls.local)}function xu(e){if(!e.resolvedUrls)throw new Error("Vite server is not ready, no resolvedUrls");x.box([a.green("LikeC4 served at:"),"",a.dim("Local: ")+e.resolvedUrls.local.join(`
|
|
280
280
|
`+"".padEnd(9," ")),a.dim("Network: ")+e.resolvedUrls.network.join(`
|
|
281
281
|
`+"".padEnd(9," "))].join(`
|
|
282
|
-
`))}class Pu extends Error{constructor(u){super(`${u} is locked`)}}const te={old:new Set,young:new Set},In=1e3*15,we=1024,ve=65535;let de;const Nn=()=>{const e=pt.networkInterfaces(),u=new Set([void 0,"0.0.0.0"]);for(const n of Object.values(e))for(const t of n)u.add(t.address);return u},Tu=e=>new Promise((u,n)=>{const t=gt.createServer();t.unref(),t.on("error",n),t.listen(e,()=>{const{port:i}=t.address();t.close(()=>{u(i)})})}),Ou=async(e,u)=>{if(e.host||e.port===0)return Tu(e);for(const n of u)try{await Tu({port:e.port,host:n})}catch(t){if(!["EADDRNOTAVAIL","EINVAL"].includes(t.code))throw t}return e.port},Ln=function*(e){e&&(yield*e),yield 0};async function He(e){let u,n=new Set;if(e&&(e.port&&(u=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const r of i){if(typeof r!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(r))throw new TypeError(`Number ${r} in the exclude option is not a safe integer and can't be used`)}n=new Set(i)}de===void 0&&(de=setTimeout(()=>{de=void 0,te.old=te.young,te.young=new Set},In),de.unref&&de.unref());const t=Nn();for(const i of Ln(u))try{if(n.has(i))continue;let r=await Ou({...e,port:i},t);for(;te.old.has(r)||te.young.has(r);){if(i!==0)throw new Pu(i);r=await Ou({...e,port:i},t)}return te.young.add(r),r}catch(r){if(!["EADDRINUSE","EACCES"].includes(r.code)&&!(r instanceof Pu))throw r}throw new Error("No available ports found")}function Be(e,u){if(!Number.isInteger(e)||!Number.isInteger(u))throw new TypeError("`from` and `to` must be integer numbers");if(e<we||e>ve)throw new RangeError(`'from' must be between ${we} and ${ve}`);if(u<we||u>ve)throw new RangeError(`'to' must be between ${we} and ${ve}`);if(e>u)throw new RangeError("`to` must be greater than or equal to `from`");return function*(t,i){for(let r=t;r<=i;r++)yield r}(e,u)}async function ju({buildWebcomponent:e=!0,hmr:u=!0,webcomponentPrefix:n="likec4",languageServices:t,likec4AssetsDir:i,openBrowser:r,...o}){i??=await fe(ie(me(),".likec4-assets-"));const{isDev:c,...D}=await
|
|
283
|
-
`+m)),h<r&&(l.push({view:p,attempt:h+1}),t.info(a.dim(`retry ${v}`))),D=void 0}}return d}async function Pn(e,u){let n=await e.locator("//img").all();if(!n.length)return;const t=n.map(i=>i.evaluate(r=>r.complete||new Promise((o,c)=>{r.onload=o,r.onerror=c}),{timeout:Math.max(3e4,u)}));await Promise.allSettled(t)}async function Ru({logger:e,serverUrl:u,theme:n="light",timeoutMs:t=15e3,views:i,output:r,outputType:o="relative",maxAttempts:c=3}){e.info(`${a.cyan("export output")} ${a.dim(r)}`),e.info(`${a.cyan("from server")} ${a.dim(u)}`);const D=du.executablePath();e.info(a.cyan("Start chromium")),e.info(a.dim(D));const l=await du.launch();e.info(a.cyan("Color scheme: ")+n);const d=await l.newContext({deviceScaleFactor:2,colorScheme:n,baseURL:u,isMobile:!1});d.setDefaultNavigationTimeout(t),d.setDefaultTimeout(t);try{return await xn({browserContext:d,views:i,output:r,outputType:o,logger:e,maxAttempts:c,timeout:t,theme:n})}finally{e.info(a.cyan("close chromium")),await d.close(),await l.close()}}async function Vu({path:e,useDotBin:u,theme:n="light",output:t,outputType:i,serverUrl:r,ignore:o=!1,timeoutMs:c=1e4,maxAttempts:D=3}){const l=R("c4:export"),d=rt(),f=await
|
|
284
|
-
`),await Vu({path:e,useDotBin:u,output:d,outputType:"flat",ignore:!0})}catch(f){c.error(a.red("Failed to generate previews")),c.error(f),c.warn(a.yellow("Ignore previews and continue build")),Du(d,{recursive:!0,force:!0}),i=!1}await $n({base:o,useHashHistory:n,customLogger:c,useOverviewGraph:i,webcomponentPrefix:t,languageServices:D,likec4AssetsDir:d,outputDir:r}),i&&(c.info(`${_u("clean previews")} ${Uu(d)}`),Du(d,{recursive:!0,force:!0}))}const On={command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:e=>e.positional("path",Ce).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:y}).option("base",pu).option("use-hash-history",lu).option("use-dot",V).option("webcomponent-prefix",Se).option("use-overview",fu).example(`${a.green("$0 build -o ./build ./src")}`,a.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async e=>{await Tn({path:e.path,output:e.output,base:e.base,useHashHistory:e["use-hash-history"],useDotBin:e["use-dot"],useOverview:e["use-overview"]??!1,webcomponentPrefix:e["webcomponent-prefix"]})}};async function jn(e,u,n){const t=".ts";u=u??y(e.workspace,"likec4.generated"+t),pe(u)!==t&&(u=u+t),await H(ne(u),{recursive:!0});const i=await e.diagrams(),r=dn([...i]);await
|
|
282
|
+
`))}class Pu extends Error{constructor(u){super(`${u} is locked`)}}const te={old:new Set,young:new Set},In=1e3*15,we=1024,ve=65535;let de;const Nn=()=>{const e=pt.networkInterfaces(),u=new Set([void 0,"0.0.0.0"]);for(const n of Object.values(e))for(const t of n)u.add(t.address);return u},Tu=e=>new Promise((u,n)=>{const t=gt.createServer();t.unref(),t.on("error",n),t.listen(e,()=>{const{port:i}=t.address();t.close(()=>{u(i)})})}),Ou=async(e,u)=>{if(e.host||e.port===0)return Tu(e);for(const n of u)try{await Tu({port:e.port,host:n})}catch(t){if(!["EADDRNOTAVAIL","EINVAL"].includes(t.code))throw t}return e.port},Ln=function*(e){e&&(yield*e),yield 0};async function He(e){let u,n=new Set;if(e&&(e.port&&(u=typeof e.port=="number"?[e.port]:e.port),e.exclude)){const i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(const r of i){if(typeof r!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(r))throw new TypeError(`Number ${r} in the exclude option is not a safe integer and can't be used`)}n=new Set(i)}de===void 0&&(de=setTimeout(()=>{de=void 0,te.old=te.young,te.young=new Set},In),de.unref&&de.unref());const t=Nn();for(const i of Ln(u))try{if(n.has(i))continue;let r=await Ou({...e,port:i},t);for(;te.old.has(r)||te.young.has(r);){if(i!==0)throw new Pu(i);r=await Ou({...e,port:i},t)}return te.young.add(r),r}catch(r){if(!["EADDRINUSE","EACCES"].includes(r.code)&&!(r instanceof Pu))throw r}throw new Error("No available ports found")}function Be(e,u){if(!Number.isInteger(e)||!Number.isInteger(u))throw new TypeError("`from` and `to` must be integer numbers");if(e<we||e>ve)throw new RangeError(`'from' must be between ${we} and ${ve}`);if(u<we||u>ve)throw new RangeError(`'to' must be between ${we} and ${ve}`);if(e>u)throw new RangeError("`to` must be greater than or equal to `from`");return function*(t,i){for(let r=t;r<=i;r++)yield r}(e,u)}async function ju({buildWebcomponent:e=!0,hmr:u=!0,webcomponentPrefix:n="likec4",languageServices:t,likec4AssetsDir:i,openBrowser:r,...o}){i??=await fe(ie(me(),".likec4-assets-"));const{isDev:c,...D}=await We({...o,languageServices:t,likec4AssetsDir:i,webcomponentPrefix:n}),l=await He({port:[5173,...Be(61e3,61010),...Be(62002,62010)]}),d=await He({port:Be(24678,24690)}),f=await Me();let p;if(e){const v=await ze({webcomponentPrefix:n,languageServices:t,outDir:f,base:D.base});p=re({...v,logLevel:"warn"}).catch(m=>(x.warn("webcomponent build failed",m),x.warn("Ignoring error and continuing"),Promise.resolve()))}const h=await mt({...D,define:Object.assign({},D.define,u&&{"process.env.NODE_ENV":'"development"'}),mode:u?"development":D.mode,publicDir:f,server:{host:"0.0.0.0",port:l,hmr:u&&{overlay:!0,port:d},fs:{strict:!1},open:r??!c}});return await h.listen(),p&&await p,h}async function xn({browserContext:e,views:u,output:n,logger:t,timeout:i,maxAttempts:r,outputType:o,theme:c}){let D;const l=u.map(p=>({view:p,attempt:1})),d=[];let f;for(;f=l.shift();){const{view:p,attempt:h}=f,v=`/export/${encodeURIComponent(p.id)}`;try{if(h>1){D&&(D.close({runBeforeUnload:!0}).catch(S=>t.error(`failed to close page: ${S}`)),D=void 0);const B=eu(h*200,{min:200,max:1e3});t.info(a.cyan(v)+a.dim(` attempt ${h} of ${r} after ${B}ms`)),await Ft(B)}else p.hasLayoutDrift&&t.warn(a.yellow("Drift detected, manual layout can not be applied, view may be invalid: ")+a.red(p.id)),t.info(a.cyan(v));D??=await e.newPage(),await D.goto(v+`?padding=20&theme=${c}`);const m=D.getByRole("presentation");await m.waitFor(),p.nodes.some(B=>Ze(B.icon)&&B.icon.toLowerCase().startsWith("http"))&&await Pn(D,i);let g=".";o==="relative"&&(g=p.relativePath??".",g.includes("/")?g=g.slice(0,g.lastIndexOf("/")):g=".");const C=y(n,g,`${p.id}.png`);await m.screenshot({path:C,omitBackground:!0}),d.push({view:p,path:C})}catch(m){D?.close({runBeforeUnload:!0}).catch(g=>t.error(`failed to close page: ${g}`)),t.error(a.red("failed "+v+`
|
|
283
|
+
`+m)),h<r&&(l.push({view:p,attempt:h+1}),t.info(a.dim(`retry ${v}`))),D=void 0}}return d}async function Pn(e,u){let n=await e.locator("//img").all();if(!n.length)return;const t=n.map(i=>i.evaluate(r=>r.complete||new Promise((o,c)=>{r.onload=o,r.onerror=c}),{timeout:Math.max(3e4,u)}));await Promise.allSettled(t)}async function Ru({logger:e,serverUrl:u,theme:n="light",timeoutMs:t=15e3,views:i,output:r,outputType:o="relative",maxAttempts:c=3}){e.info(`${a.cyan("export output")} ${a.dim(r)}`),e.info(`${a.cyan("from server")} ${a.dim(u)}`);const D=du.executablePath();e.info(a.cyan("Start chromium")),e.info(a.dim(D));const l=await du.launch();e.info(a.cyan("Color scheme: ")+n);const d=await l.newContext({deviceScaleFactor:2,colorScheme:n,baseURL:u,isMobile:!1});d.setDefaultNavigationTimeout(t),d.setDefaultTimeout(t);try{return await xn({browserContext:d,views:i,output:r,outputType:o,logger:e,maxAttempts:c,timeout:t,theme:n})}finally{e.info(a.cyan("close chromium")),await d.close(),await l.close()}}async function Vu({path:e,useDotBin:u,theme:n="light",output:t,outputType:i,serverUrl:r,ignore:o=!1,timeoutMs:c=1e4,maxAttempts:D=3}){const l=R("c4:export"),d=rt(),f=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"});t??=f.workspace;const p=await f.diagrams();if(!et(p,1))throw l.warn("no views found"),new Error("no views found");let h;if(!r&&(l.info(a.cyan("start preview server")),h=await ju({languageServices:f,buildWebcomponent:!1,openBrowser:!1,useOverviewGraph:!1,hmr:!1}),r=Lu(h),!r))throw l.error("Vite server is not ready, no resolvedUrls"),new Error("Vite server is not ready, no resolvedUrls");try{const v=await Ru({logger:l,serverUrl:r,theme:n,timeoutMs:c,views:p,output:t,outputType:i,maxAttempts:D}),{pretty:m}=ut(d);if(v.length>0&&l.info(a.green(`exported ${v.length} views in ${m}`)),v.length!==p.length&&(o&&v.length>0?l.info(a.dim("ignore")+" "+a.red(`failed ${p.length-v.length} out of ${p.length} views`)):l.error(a.red(`failed ${p.length-v.length} out of ${p.length} views`))),v.length!==p.length&&(v.length===0||!o))throw new Error(`Failed ${p.length-v.length} out of ${p.length} views`)}finally{h&&(l.info(a.cyan("stop server")),await h.close().catch(v=>{l.error(v)}))}}const{cyan:_u,dim:Uu}=a;async function Tn({path:e,useDotBin:u,useHashHistory:n,webcomponentPrefix:t,useOverview:i=!1,output:r,base:o}){const c=R("c4:build"),D=await z.fromWorkspace(e,{graphviz:u?"binary":"wasm",logger:"vite"}),l=r??y(D.workspace,"dist");let d=y(l,"assets");if(i)try{d=y(l,"assets","previews"),await H(d,{recursive:!0}),c.info(`${_u("Generate previews")} ${Uu(d)}
|
|
284
|
+
`),await Vu({path:e,useDotBin:u,output:d,outputType:"flat",ignore:!0})}catch(f){c.error(a.red("Failed to generate previews")),c.error(f),c.warn(a.yellow("Ignore previews and continue build")),Du(d,{recursive:!0,force:!0}),i=!1}await $n({base:o,useHashHistory:n,customLogger:c,useOverviewGraph:i,webcomponentPrefix:t,languageServices:D,likec4AssetsDir:d,outputDir:r}),i&&(c.info(`${_u("clean previews")} ${Uu(d)}`),Du(d,{recursive:!0,force:!0}))}const On={command:"build [path]",aliases:["bundle"],describe:"Build a static website",builder:e=>e.positional("path",Ce).option("output",{alias:"o",type:"string",desc:"output directory for production build",normalize:!0,coerce:y}).option("base",pu).option("use-hash-history",lu).option("use-dot",V).option("webcomponent-prefix",Se).option("use-overview",fu).example(`${a.green("$0 build -o ./build ./src")}`,a.gray("Search for likec4 files in 'src' and output static site to 'build'")),handler:async e=>{await Tn({path:e.path,output:e.output,base:e.base,useHashHistory:e["use-hash-history"],useDotBin:e["use-dot"],useOverview:e["use-overview"]??!1,webcomponentPrefix:e["webcomponent-prefix"]})}};async function jn(e,u,n){const t=".ts";u=u??y(e.workspace,"likec4.generated"+t),pe(u)!==t&&(u=u+t),await H(ne(u),{recursive:!0});const i=await e.diagrams(),r=dn([...i]);await Q(u,r),n.info(`${a.dim("generated")} ${Z(process.cwd(),u)}`)}async function Rn(e,u,n){await H(u,{recursive:!0}),n.info(`${a.dim("format")} ${a.green("dot")}`),n.info(`${a.dim("outdir")} ${u}`);const t=new Set,i=await e.views.layoutViews();let r=0;for(const{diagram:o,dot:c}of i)try{const D=o.relativePath??"";D!==""&&!t.has(D)&&(await H(y(u,D),{recursive:!0}),t.add(D));const l=y(u,D,o.id+".dot");be(c,`dot for ${o.id} not found`),await Q(l,c),n.info(`${a.dim("generated")} ${Z(process.cwd(),l)}`),r++}catch(D){n.error(`error while generating ${o.id}`,{error:D})}r>0&&n.info(`${a.dim("total")} ${r} files`)}async function Vn(e,u,n,t){await H(n,{recursive:!0}),t.info(`${a.dim("format")} ${a.green(u)}`),t.info(`${a.dim("outdir")} ${n}`);let i,r;switch(u){case"d2":i=".d2",r=vu;break;case"mermaid":i=".mmd",r=Bu;break;default:uu(u)}const o=new Set,c=await e.diagrams();let D=0;for(const l of c)try{let d=l.relativePath??".";d.includes("/")?d=d.slice(0,d.lastIndexOf("/")):d=".",d!==""&&!o.has(d)&&(await H(y(n,d),{recursive:!0}),o.add(d));const f=y(n,d,l.id+i),p=r(l);await Q(f,p),t.info(`${a.dim("generated")} ${Z(process.cwd(),f)}`),D++}catch(d){t.error(`error while generating ${l.id}`,{error:d})}D>0&&t.info(`${a.dim("total")} ${D} files`)}async function ye({path:e,useDotBin:u,...n}){const t=R("c4:codegen"),i=le(t),r=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"});if((await r.views.computedViews()).length===0)throw t.warn("no views found"),process.exitCode=1,new Error("no views found");switch(n.format){case"views":{await jn(r,n.outfile,t);break}case"dot":{await Rn(r,n.outdir??e,t);break}case"d2":case"mermaid":{await Vn(r,n.format,n.outdir??e,t);break}default:uu(n)}i.stopAndLog()}async function _n({languageServices:e,outDir:u,filename:n="likec4-react.mjs"}){const t=R("c4:react"),i=Ue();return t.info(a.cyan("outDir")+" "+a.dim(u)),{customLogger:t,root:i,configFile:!1,clearScreen:!1,publicDir:!1,mode:"production",esbuild:{banner:`'use client'
|
|
285
285
|
`+_e.banner,footer:_e.footer,jsx:"transform",jsxDev:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,tsconfigRaw:{compilerOptions:{target:"ES2020",useDefineForClassFields:!0,verbatimModuleSyntax:!0,jsx:"react-jsx"}}},build:{outDir:u,emptyOutDir:!1,sourcemap:!1,minify:!1,target:"es2020",copyPublicDir:!1,chunkSizeWarningLimit:Je,lib:{entry:"react/likec4.tsx",fileName(r,o){return n},formats:["es"]},rollupOptions:{output:{compact:!1},external:["likec4/react","likec4","react","react-dom","react/jsx-runtime","react/jsx-dev-runtime","react-dom/client",/likec4\/icons\/.*/],onwarn(r,o){r.code!=="SOURCEMAP_ERROR"&&o(r)}}},plugins:[Et({}),Re({languageServices:e,useOverviewGraph:!1})]}}function Ge(e){const u=[...e].sort(tt).map(n=>` | ${JSON.stringify(n)}`);return u.length===0?u.push(" | never"):u.push(" | (string & Record<never, never>)"),u.join(`
|
|
286
|
-
`)+";"}async function Un({path:e,useDotBin:u,outfile:n}){const t=R("c4:codegen"),i=le(t),r=await
|
|
286
|
+
`)+";"}async function Un({path:e,useDotBin:u,outfile:n}){const t=R("c4:codegen"),i=le(t),r=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"});t.info(`${a.dim("format")} ${a.green("react")}`);const o=await r.diagrams();if(o.length===0)throw process.exitCode=1,new Error("no views found");o.forEach(g=>{g.hasLayoutDrift&&t.warn(a.yellow("drift detected, manual layout can not be applied, view:")+" "+a.red(g.id))});let c=y(r.workspace,"likec4-views.mjs");if(n&&(c=au(n)?n:y(n),K(n)&&(await cu(n)).isDirectory()))throw new Error(`output file is a directory: ${n}`);const D=ne(c);t.info(`${a.dim("outdir")} ${D}`);const l=ke(c);t.info(`${a.dim("filename")} ${l}`);const d=pe(l).toLocaleLowerCase();if(![".js",".mjs",".jsx"].includes(d))throw t.error(`output file ${n} has extension "${d}"`),new Error(`output file ${n} must be a .js, .jsx or .mjs`);const f=await _n({languageServices:r,outDir:D,filename:l});await re({...f,logLevel:"warn"});const p=o.reduce((g,C)=>(g.ids.add(C.id),C.tags?.forEach(B=>g.tags.add(B)),C.nodes.forEach(B=>{B.tags?.forEach(S=>g.tags.add(S)),g.kinds.add(B.kind)}),C.edges.forEach(B=>{B.tags?.forEach(S=>g.tags.add(S))}),g),{ids:new Set,tags:new Set,kinds:new Set}),h=Ge(p.ids),v=Ge(p.tags),m=Ge(p.kinds);await Q(y(D,ke(c,d)+(d===".mjs"?".d.mts":".d.ts")),`
|
|
287
287
|
/* prettier-ignore-start */
|
|
288
288
|
/* eslint-disable */
|
|
289
289
|
|
|
@@ -350,13 +350,13 @@ export {
|
|
|
350
350
|
/* prettier-ignore-end */
|
|
351
351
|
`.trimStart()),x.box(tu(`
|
|
352
352
|
${a.dim("Component generated:")}
|
|
353
|
-
${
|
|
353
|
+
${Z(ou(),c)}
|
|
354
354
|
|
|
355
355
|
${a.dim("How to use:")}
|
|
356
356
|
${a.blue("https://likec4.dev/tooling/codegen/#react")}
|
|
357
|
-
`)),i.stopAndLog()}async function Mn({path:e,useDotBin:u,webcomponentPrefix:n="likec4",outfile:t}){const i=R("c4:codegen"),r=le(i),o=await
|
|
357
|
+
`)),i.stopAndLog()}async function Mn({path:e,useDotBin:u,webcomponentPrefix:n="likec4",outfile:t}){const i=R("c4:codegen"),r=le(i),o=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"});i.info(`${a.dim("format")} ${a.green("webcomponent")}`);const c=await o.diagrams();if(!nu(c,1))throw i.warn("no views found"),process.exitCode=1,new Error("no views found");c.forEach(v=>{v.hasLayoutDrift&&i.warn(a.yellow("drift detected, manual layout can not be applied, view:")+" "+a.red(v.id))});let D=y(o.workspace,"likec4-views.js");if(t&&(D=au(t)?t:y(t),K(t)&&(await cu(t)).isDirectory()))throw new Error(`output file is a directory: ${t}`);x.debug(`${a.dim("outfilepath")} ${D}`);const l=ke(D);x.debug(`${a.dim("filename")} ${l}`);const d=pe(l).toLocaleLowerCase();if(d!==".js"&&d!==".mjs")throw x.warn(`output file ${t} has extension "${d}"`),new Error(`output file ${t} must be a .js or .mjs`);const f=await Me();x.debug(`${a.dim("created temp public")} ${f}`);const p=await ze({languageServices:o,outDir:f,filename:l,webcomponentPrefix:n,base:"/"});x.debug(`${a.dim("vite build webcomponent")}`),await re({...p,logLevel:"warn"});const h=y(f,l);if(!K(h))throw new Error(`output file not found: ${h}`);await H(ne(D),{recursive:!0}),await dt(h,D),i.info(`${a.dim("generated")} ${D}`),x.debug(`${a.dim("remove temp public")}`),await lt(f,{recursive:!0,force:!0}),x.box(tu(`
|
|
358
358
|
${a.dim("Webcomponents generated to:")}
|
|
359
|
-
${
|
|
359
|
+
${Z(ou(),D)}
|
|
360
360
|
|
|
361
361
|
${a.dim("Setup and usage instructions:")}
|
|
362
362
|
${a.blue("https://likec4.dev/tooling/codegen/#webcomponent")}
|
|
@@ -367,7 +367,7 @@ export {
|
|
|
367
367
|
likec4 gen ts --outfile ../likec4.ts
|
|
368
368
|
likec4 gen mmd --outdir assets/
|
|
369
369
|
likec4 gen dot -o out .
|
|
370
|
-
`),handler:()=>{}};async function
|
|
370
|
+
`),handler:()=>{}};async function Wn({path:e,useDotBin:u,outfile:n}){const t=R("c4:export"),i=le(t),r=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"}),o=await r.computed();if(!o)throw t.warn("no model parsed"),new Error("no model parsed");pe(n)!==".json"&&(n=n+".json"),await H(ne(n),{recursive:!0});const c=await r.diagrams(),D={...o,views:c},l=JSON.stringify(D,null,2);await Q(n,l),t.info(`${a.dim("generated")} ${Z(process.cwd(),n)}`),i.stopAndLog("\u2713 export in ")}const zn={command:"export <format> [path]",describe:"Export to images or JSON",builder:e=>e.usage(`${a.bold("Usage:")} $0 export <format> [path]`).positional("path",Ce).command({command:"png [path]",describe:"export views to PNG",builder:u=>u.option("output",ge).option("theme",{choices:["light","dark"],desc:"color-scheme to use, default is light"}).option("flat",{boolean:!0,type:"boolean",desc:"ignore sources structure and export all PNGs in output directory"}).option("use-dot",V).options({ignore:{boolean:!0,alias:"i",desc:"continue if some views failed to export"},timeout:{type:"number",alias:"t",desc:"(sec) timeout for playwright ",default:10},"max-attempts":{type:"number",describe:"",desc:"(number) max attempts to export failing view",default:3},"server-url":{type:"string",desc:"use this url instead of starting new likec4 server"}}).epilog(`${a.bold("Examples:")}
|
|
371
371
|
${a.green("$0 export png")}
|
|
372
372
|
${a.gray("Search for likec4 files in current directory and output PNG next to sources")}
|
|
373
373
|
|
|
@@ -379,5 +379,5 @@ export {
|
|
|
379
379
|
|
|
380
380
|
${a.green("$0 export json -o ./generated/likec4.json src/likec4 ")}
|
|
381
381
|
${a.gray("Search for likec4 files in src/likec4 and output JSON to generated/likec4.json")}
|
|
382
|
-
`),handler:async u=>{await
|
|
383
|
-
if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"}}).coerce(["path","output"],oe).default("path",oe("."),"."),async handler(e){await Gn(e)}};async function qn({path:e,useDotBin:u,webcomponentPrefix:n,useHashHistory:t,useOverview:i=!1,base:r}){const o=await
|
|
382
|
+
`),handler:async u=>{await Wn({path:u.path,useDotBin:u.useDotBin,outfile:u.outfile})}}).updateStrings({"Commands:":a.bold("Formats:")}),handler:()=>{}};async function Hn(e){const{isDev:u,...n}=await We({...e,likec4AssetsDir:"",webcomponentPrefix:void 0}),t=await He({port:Be(62001,62010)}),i=e?.open??!1;return await Ct({...n,mode:"production",preview:{host:"0.0.0.0",port:t,open:i}})}async function Gn({path:e,output:u,base:n}){const t=await z.fromWorkspace(e,{logger:"vite"}),i=await Hn({base:n,languageServices:t,outputDir:u,open:!0});xu(i)}const Kn={command:"preview [path]",describe:"Start local server to preview production build",builder:e=>e.positional("path",{type:"string",desc:`Directory with LikeC4 source files
|
|
383
|
+
if not specified search in current directory`,normalize:!0}).options({output:{alias:"o",type:"string",desc:"output directory from production build",normalize:!0},base:{type:"string",desc:"base url the app is being served from"}}).coerce(["path","output"],oe).default("path",oe("."),"."),async handler(e){await Gn(e)}};async function qn({path:e,useDotBin:u,webcomponentPrefix:n,useHashHistory:t,useOverview:i=!1,base:r}){const o=await z.fromWorkspace(e,{logger:"vite",graphviz:u?"binary":"wasm"}),c=await fe(ie(me(),".likec4-assets-")),D=await ju({buildWebcomponent:!1,hmr:!0,base:r,webcomponentPrefix:n,languageServices:o,useHashHistory:t,useOverviewGraph:i,likec4AssetsDir:c});if(D.config.logger.clearScreen("info"),xu(D),!i)return;const l=await o.diagrams();if(nu(l,1)){const d=R("c4:export"),f=Lu(D);if(!f){d.error("no preview server url");return}d.info(a.cyan("wait 5sec before generating previews")),await iu(5e3);try{await Ru({serverUrl:f,logger:d,views:l,theme:"light",output:c,outputType:"flat"}),await iu(1e3),d.info(a.yellow("Note: changes in sources do not trigger preview updates, restart is required"))}catch(p){d.error(a.red("Failed to generate previews")),d.error(p)}}else D.config.logger.warn("no views found, no previews generated")}const Yn={command:"start [path]",aliases:["serve","dev"],describe:"Start local dev server to preview LikeC4 views",builder:e=>e.positional("path",Ce).option("base",pu).option("webcomponent-prefix",Se).option("use-hash-history",lu).option("use-overview",fu).option("use-dot",V),handler:async e=>{await qn({path:e.path,useDotBin:e["use-dot"],base:e.base,useOverview:e["use-overview"]??!1,webcomponentPrefix:e["webcomponent-prefix"],useHashHistory:e["use-hash-history"]})}};x.level=ru.debug,it&&(x.level=ru.trace,x.warn("running cli in dev mode"));const Xn=Dt(ct(ot)).scriptName("likec4").usage("Usage: $0 <command>").command(Yn).command(On).command(Jn).command(zn).command(Kn).help("help").version(nt.version).alias("v","version").alias("h","help").demandCommand(1,"Please run with valid command").strict().recommendCommands().showHelpOnFail(!0,"Something is wrong, run with --help").updateStrings({"Options:":a.bold("Options:"),"Positionals:":a.bold("Arguments:"),"Commands:":a.bold("Commands:"),"Examples:":a.bold("Examples:")}).wrap(eu(at.columns-20,{min:80,max:120})).parseAsync();Xn.catch(()=>st(1)),process.on("unhandledRejection",e=>{x.error(e)});
|