markdown-flow-ui 0.1.95 → 0.1.97
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/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs7.js +1 -1
- package/dist/_virtual/index.cjs8.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es5.js +2 -5
- package/dist/_virtual/index.es5.js.map +1 -1
- package/dist/_virtual/index.es6.js +4 -4
- package/dist/_virtual/index.es7.js +5 -2
- package/dist/_virtual/index.es7.js.map +1 -1
- package/dist/_virtual/index.es8.js +2 -3
- package/dist/_virtual/index.es8.js.map +1 -1
- package/dist/_virtual/index.es9.js +3 -2
- package/dist/_virtual/index.es9.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.cjs.js +1 -1
- package/dist/components/ContentRender/IframeSandbox.cjs.js.map +1 -1
- package/dist/components/ContentRender/IframeSandbox.es.js +13 -13
- package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../../../../../../_virtual/index.cjs5.js");/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.cjs.js"),u=require("../../../../devlop@1.1.0/node_modules/devlop/lib/default.cjs.js"),f=require("../../../../property-information@7.1.0/node_modules/property-information/index.cjs.js"),C=require("../../../../space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.cjs.js"),S=require("../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.cjs.js"),u=require("../../../../devlop@1.1.0/node_modules/devlop/lib/default.cjs.js"),f=require("../../../../property-information@7.1.0/node_modules/property-information/index.cjs.js"),C=require("../../../../space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.cjs.js"),S=require("../../../../../../../../../_virtual/index.cjs6.js"),N=require("../../../../hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.cjs.js"),x=require("../../../../estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.cjs.js"),h=require("../../../../vfile-message@4.0.3/node_modules/vfile-message/lib/index.cjs.js"),j=require("../../../../property-information@7.1.0/node_modules/property-information/lib/find.cjs.js"),A=require("../../../../property-information@7.1.0/node_modules/property-information/lib/hast-to-react.cjs.js"),T=require("../../../../unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.cjs.js"),m={}.hasOwnProperty,F=new Map,P=/[A-Z]/g,q=new Set(["table","tbody","thead","tfoot","tr"]),J=new Set(["td","th"]),g="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function M(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=K(r,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=k(r,e.jsx,e.jsxs)}const s={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?f.svg:f.html,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},i=E(s,t,void 0);return i&&typeof i!="string"?i:s.create(t,s.Fragment,{children:i||void 0},void 0)}function E(t,e,r){if(e.type==="element")return I(t,e,r);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return L(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return V(t,e,r);if(e.type==="mdxjsEsm")return $(t,e);if(e.type==="root")return D(t,e,r);if(e.type==="text")return O(t,e)}function I(t,e,r){const n=t.schema;let s=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=f.svg,t.schema=s),t.ancestors.push(e);const i=b(t,e.tagName,!1),a=R(t,e);let o=d(t,e);return q.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!N.whitespace(l):!0})),v(t,a,i,e),y(a,o),t.ancestors.pop(),t.schema=n,t.create(e,i,a,r)}function L(t,e){if(e.data&&e.data.estree&&t.evaluater){const n=e.data.estree.body[0];return u.ok(n.type==="ExpressionStatement"),t.evaluater.evaluateExpression(n.expression)}p(t,e.position)}function $(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);p(t,e.position)}function V(t,e,r){const n=t.schema;let s=n;e.name==="svg"&&n.space==="html"&&(s=f.svg,t.schema=s),t.ancestors.push(e);const i=e.name===null?t.Fragment:b(t,e.name,!0),a=_(t,e),o=d(t,e);return v(t,a,i,e),y(a,o),t.ancestors.pop(),t.schema=n,t.create(e,i,a,r)}function D(t,e,r){const n={};return y(n,d(t,e)),t.create(e,t.Fragment,n,r)}function O(t,e){return e.value}function v(t,e,r,n){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(e.node=n)}function y(t,e){if(e.length>0){const r=e.length>1?e:e[0];r&&(t.children=r)}}function k(t,e,r){return n;function n(s,i,a,o){const c=Array.isArray(a.children)?r:e;return o?c(i,a,o):c(i,a)}}function K(t,e){return r;function r(n,s,i,a){const o=Array.isArray(i.children),l=T.pointStart(n);return e(s,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function R(t,e){const r={};let n,s;for(s in e.properties)if(s!=="children"&&m.call(e.properties,s)){const i=B(t,s,e.properties[s]);if(i){const[a,o]=i;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&J.has(e.tagName)?n=o:r[a]=o}}if(n){const i=r.style||(r.style={});i[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function _(t,e){const r={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const i=n.data.estree.body[0];u.ok(i.type==="ExpressionStatement");const a=i.expression;u.ok(a.type==="ObjectExpression");const o=a.properties[0];u.ok(o.type==="SpreadElement"),Object.assign(r,t.evaluater.evaluateExpression(o.argument))}else p(t,e.position);else{const s=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const o=n.value.data.estree.body[0];u.ok(o.type==="ExpressionStatement"),i=t.evaluater.evaluateExpression(o.expression)}else p(t,e.position);else i=n.value===null?!0:n.value;r[s]=i}return r}function d(t,e){const r=[];let n=-1;const s=t.passKeys?new Map:F;for(;++n<e.children.length;){const i=e.children[n];let a;if(t.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=s.get(l)||0;a=l+"-"+c,s.set(l,c+1)}}const o=E(t,i,a);o!==void 0&&r.push(o)}return r}function B(t,e,r){const n=j.find(t.schema,e);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?w.stringify(r):C.stringify(r)),n.property==="style"){let s=typeof r=="object"?r:z(t,String(r));return t.stylePropertyNameCase==="css"&&(s=X(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&n.space?A.hastToReact[n.property]||n.property:n.attribute,r]}}function z(t,e){try{return S.default(e,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const n=r,s=new h.VFileMessage("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=g+"#cannot-parse-style-attribute",s}}function b(t,e,r){let n;if(!r)n={type:"Literal",value:e};else if(e.includes(".")){const s=e.split(".");let i=-1,a;for(;++i<s.length;){const o=x.name(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}n=a}else n=x.name(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(n.type==="Literal"){const s=n.value;return m.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(n);p(t)}function p(t,e){const r=new h.VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=g+"#cannot-handle-mdx-estrees-without-createevaluater",r}function X(t){const e={};let r;for(r in t)m.call(t,r)&&(e[Z(r)]=t[r]);return e}function Z(t){let e=t.replace(P,G);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function G(t){return"-"+t.toLowerCase()}exports.toJsxRuntime=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -2,7 +2,7 @@ import { stringify as w } from "../../../../comma-separated-tokens@2.0.3/node_mo
|
|
|
2
2
|
import { ok as u } from "../../../../devlop@1.1.0/node_modules/devlop/lib/default.es.js";
|
|
3
3
|
import { svg as m, html as C } from "../../../../property-information@7.1.0/node_modules/property-information/index.es.js";
|
|
4
4
|
import { stringify as N } from "../../../../space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js";
|
|
5
|
-
import S from "../../../../../../../../../_virtual/index.
|
|
5
|
+
import S from "../../../../../../../../../_virtual/index.es6.js";
|
|
6
6
|
import { whitespace as j } from "../../../../hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js";
|
|
7
7
|
import { name as x } from "../../../../estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js";
|
|
8
8
|
import { VFileMessage as h } from "../../../../vfile-message@4.0.3/node_modules/vfile-message/lib/index.es.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("./chunk-TZMSLE5B.cjs.js"),H=require("./chunk-S3R3BYOJ.cjs.js"),B=require("./chunk-ABZYJK2D.cjs.js"),y=require("./chunk-AGHRB4JF.cjs.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const Te=require("../../../../../../../../../../../_virtual/index.cjs8.js"),jt=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var Ft=(function(){var e=y.__name(function(xt,b,x,v){for(x=x||{},v=xt.length;v--;x[xt[v]]=b);return x},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],i=[1,64],n=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],L=[1,33],F=[1,34],G=[1,35],K=[1,36],J=[1,37],Z=[1,38],$=[1,39],tt=[1,40],et=[1,41],at=[1,42],nt=[1,43],it=[1,44],rt=[1,45],st=[1,46],lt=[1,47],ot=[1,48],ct=[1,50],ht=[1,51],ut=[1,52],dt=[1,53],_t=[1,54],ft=[1,55],pt=[1,56],yt=[1,57],gt=[1,58],mt=[1,59],bt=[1,60],Tt=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Dt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],At=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y.__name(function(b,x,v,g,R,h,Pt){var _=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[_-3]);break;case 19:g.setTitle(h[_].substring(6)),this.$=h[_].substring(6);break;case 20:g.setAccDescription(h[_].substring(15)),this.$=h[_].substring(15);break;case 21:this.$=h[_].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[_].trim(),g.setAccDescription(this.$);break;case 28:h[_].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 29:h[_].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 30:g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 31:h[_].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[_]),this.$=h[_];break;case 32:g.addDeploymentNode("node",...h[_]),this.$=h[_];break;case 33:g.addDeploymentNode("nodeL",...h[_]),this.$=h[_];break;case 34:g.addDeploymentNode("nodeR",...h[_]),this.$=h[_];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[_]),this.$=h[_];break;case 40:g.addPersonOrSystem("external_person",...h[_]),this.$=h[_];break;case 41:g.addPersonOrSystem("system",...h[_]),this.$=h[_];break;case 42:g.addPersonOrSystem("system_db",...h[_]),this.$=h[_];break;case 43:g.addPersonOrSystem("system_queue",...h[_]),this.$=h[_];break;case 44:g.addPersonOrSystem("external_system",...h[_]),this.$=h[_];break;case 45:g.addPersonOrSystem("external_system_db",...h[_]),this.$=h[_];break;case 46:g.addPersonOrSystem("external_system_queue",...h[_]),this.$=h[_];break;case 47:g.addContainer("container",...h[_]),this.$=h[_];break;case 48:g.addContainer("container_db",...h[_]),this.$=h[_];break;case 49:g.addContainer("container_queue",...h[_]),this.$=h[_];break;case 50:g.addContainer("external_container",...h[_]),this.$=h[_];break;case 51:g.addContainer("external_container_db",...h[_]),this.$=h[_];break;case 52:g.addContainer("external_container_queue",...h[_]),this.$=h[_];break;case 53:g.addComponent("component",...h[_]),this.$=h[_];break;case 54:g.addComponent("component_db",...h[_]),this.$=h[_];break;case 55:g.addComponent("component_queue",...h[_]),this.$=h[_];break;case 56:g.addComponent("external_component",...h[_]),this.$=h[_];break;case 57:g.addComponent("external_component_db",...h[_]),this.$=h[_];break;case 58:g.addComponent("external_component_queue",...h[_]),this.$=h[_];break;case 60:g.addRel("rel",...h[_]),this.$=h[_];break;case 61:g.addRel("birel",...h[_]),this.$=h[_];break;case 62:g.addRel("rel_u",...h[_]),this.$=h[_];break;case 63:g.addRel("rel_d",...h[_]),this.$=h[_];break;case 64:g.addRel("rel_l",...h[_]),this.$=h[_];break;case 65:g.addRel("rel_r",...h[_]),this.$=h[_];break;case 66:g.addRel("rel_b",...h[_]),this.$=h[_];break;case 67:h[_].splice(0,1),g.addRel("rel",...h[_]),this.$=h[_];break;case 68:g.updateElStyle("update_el_style",...h[_]),this.$=h[_];break;case 69:g.updateRelStyle("update_rel_style",...h[_]),this.$=h[_];break;case 70:g.updateLayoutConfig("update_layout_config",...h[_]),this.$=h[_];break;case 71:this.$=[h[_]];break;case 72:h[_].unshift(h[_-1]),this.$=h[_];break;case 73:case 75:this.$=h[_].trim();break;case 74:let kt={};kt[h[_-1].trim()]=h[_].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{14:[1,74]},e(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:i,37:n,38:u,39:d,40:p,41:f,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt}),e(Tt,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Tt,[2,36],{12:[1,77]}),e(Dt,[2,19]),e(Dt,[2,20]),{25:[1,78]},{27:[1,79]},e(Dt,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Tt,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:i,37:n,38:u,39:d,40:p,41:f,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt}),e(Dt,[2,21]),e(Dt,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(At,[2,28]),e(At,[2,29]),e(At,[2,30]),e(At,[2,31]),e(At,[2,32]),e(At,[2,33]),e(At,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Tt,[2,38]),e(se,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y.__name(function(b,x){if(x.recoverable)this.trace(b);else{var v=new Error(b);throw v.hash=x,v}},"parseError"),parse:y.__name(function(b){var x=this,v=[0],g=[],R=[null],h=[],Pt=this.table,_="",kt=0,le=0,Ae=2,oe=1,ke=h.slice.call(arguments,1),D=Object.create(this.lexer),Ct={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(Ct.yy[Gt]=this.yy[Gt]);D.setInput(b,Ct.yy),Ct.yy.lexer=D,Ct.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Ce=D.options&&D.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function we(N){v.length=v.length-2*N,R.length=R.length-N,h.length=h.length-N}y.__name(we,"popStack");function ce(){var N;return N=g.pop()||D.lex()||oe,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=x.symbols_[N]||N),N}y.__name(ce,"lex");for(var M,wt,Y,Jt,Ot={},Nt,Q,he,Yt;;){if(wt=v[v.length-1],this.defaultActions[wt]?Y=this.defaultActions[wt]:((M===null||typeof M>"u")&&(M=ce()),Y=Pt[wt]&&Pt[wt][M]),typeof Y>"u"||!Y.length||!Y[0]){var Zt="";Yt=[];for(Nt in Pt[wt])this.terminals_[Nt]&&Nt>Ae&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("./chunk-TZMSLE5B.cjs.js"),H=require("./chunk-S3R3BYOJ.cjs.js"),B=require("./chunk-ABZYJK2D.cjs.js"),y=require("./chunk-AGHRB4JF.cjs.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const Te=require("../../../../../../../../../../../_virtual/index.cjs9.js"),jt=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var Ft=(function(){var e=y.__name(function(xt,b,x,v){for(x=x||{},v=xt.length;v--;x[xt[v]]=b);return x},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],i=[1,64],n=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],L=[1,33],F=[1,34],G=[1,35],K=[1,36],J=[1,37],Z=[1,38],$=[1,39],tt=[1,40],et=[1,41],at=[1,42],nt=[1,43],it=[1,44],rt=[1,45],st=[1,46],lt=[1,47],ot=[1,48],ct=[1,50],ht=[1,51],ut=[1,52],dt=[1,53],_t=[1,54],ft=[1,55],pt=[1,56],yt=[1,57],gt=[1,58],mt=[1,59],bt=[1,60],Tt=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Dt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],At=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y.__name(function(b,x,v,g,R,h,Pt){var _=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[_-3]);break;case 19:g.setTitle(h[_].substring(6)),this.$=h[_].substring(6);break;case 20:g.setAccDescription(h[_].substring(15)),this.$=h[_].substring(15);break;case 21:this.$=h[_].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[_].trim(),g.setAccDescription(this.$);break;case 28:h[_].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 29:h[_].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 30:g.addPersonOrSystemBoundary(...h[_]),this.$=h[_];break;case 31:h[_].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[_]),this.$=h[_];break;case 32:g.addDeploymentNode("node",...h[_]),this.$=h[_];break;case 33:g.addDeploymentNode("nodeL",...h[_]),this.$=h[_];break;case 34:g.addDeploymentNode("nodeR",...h[_]),this.$=h[_];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[_]),this.$=h[_];break;case 40:g.addPersonOrSystem("external_person",...h[_]),this.$=h[_];break;case 41:g.addPersonOrSystem("system",...h[_]),this.$=h[_];break;case 42:g.addPersonOrSystem("system_db",...h[_]),this.$=h[_];break;case 43:g.addPersonOrSystem("system_queue",...h[_]),this.$=h[_];break;case 44:g.addPersonOrSystem("external_system",...h[_]),this.$=h[_];break;case 45:g.addPersonOrSystem("external_system_db",...h[_]),this.$=h[_];break;case 46:g.addPersonOrSystem("external_system_queue",...h[_]),this.$=h[_];break;case 47:g.addContainer("container",...h[_]),this.$=h[_];break;case 48:g.addContainer("container_db",...h[_]),this.$=h[_];break;case 49:g.addContainer("container_queue",...h[_]),this.$=h[_];break;case 50:g.addContainer("external_container",...h[_]),this.$=h[_];break;case 51:g.addContainer("external_container_db",...h[_]),this.$=h[_];break;case 52:g.addContainer("external_container_queue",...h[_]),this.$=h[_];break;case 53:g.addComponent("component",...h[_]),this.$=h[_];break;case 54:g.addComponent("component_db",...h[_]),this.$=h[_];break;case 55:g.addComponent("component_queue",...h[_]),this.$=h[_];break;case 56:g.addComponent("external_component",...h[_]),this.$=h[_];break;case 57:g.addComponent("external_component_db",...h[_]),this.$=h[_];break;case 58:g.addComponent("external_component_queue",...h[_]),this.$=h[_];break;case 60:g.addRel("rel",...h[_]),this.$=h[_];break;case 61:g.addRel("birel",...h[_]),this.$=h[_];break;case 62:g.addRel("rel_u",...h[_]),this.$=h[_];break;case 63:g.addRel("rel_d",...h[_]),this.$=h[_];break;case 64:g.addRel("rel_l",...h[_]),this.$=h[_];break;case 65:g.addRel("rel_r",...h[_]),this.$=h[_];break;case 66:g.addRel("rel_b",...h[_]),this.$=h[_];break;case 67:h[_].splice(0,1),g.addRel("rel",...h[_]),this.$=h[_];break;case 68:g.updateElStyle("update_el_style",...h[_]),this.$=h[_];break;case 69:g.updateRelStyle("update_rel_style",...h[_]),this.$=h[_];break;case 70:g.updateLayoutConfig("update_layout_config",...h[_]),this.$=h[_];break;case 71:this.$=[h[_]];break;case 72:h[_].unshift(h[_-1]),this.$=h[_];break;case 73:case 75:this.$=h[_].trim();break;case 74:let kt={};kt[h[_-1].trim()]=h[_].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{14:[1,74]},e(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:i,37:n,38:u,39:d,40:p,41:f,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt}),e(Tt,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Tt,[2,36],{12:[1,77]}),e(Dt,[2,19]),e(Dt,[2,20]),{25:[1,78]},{27:[1,79]},e(Dt,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:i,37:n,38:u,39:d,40:p,41:f,43:23,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Tt,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:i,37:n,38:u,39:d,40:p,41:f,44:E,45:O,46:S,47:P,48:L,49:F,50:G,51:K,52:J,53:Z,54:$,55:tt,56:et,57:at,58:nt,59:it,60:rt,61:st,62:lt,63:ot,64:ct,65:ht,66:ut,67:dt,68:_t,69:ft,70:pt,71:yt,72:gt,73:mt,74:bt}),e(Dt,[2,21]),e(Dt,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(At,[2,28]),e(At,[2,29]),e(At,[2,30]),e(At,[2,31]),e(At,[2,32]),e(At,[2,33]),e(At,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Tt,[2,38]),e(se,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y.__name(function(b,x){if(x.recoverable)this.trace(b);else{var v=new Error(b);throw v.hash=x,v}},"parseError"),parse:y.__name(function(b){var x=this,v=[0],g=[],R=[null],h=[],Pt=this.table,_="",kt=0,le=0,Ae=2,oe=1,ke=h.slice.call(arguments,1),D=Object.create(this.lexer),Ct={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(Ct.yy[Gt]=this.yy[Gt]);D.setInput(b,Ct.yy),Ct.yy.lexer=D,Ct.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Ce=D.options&&D.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function we(N){v.length=v.length-2*N,R.length=R.length-N,h.length=h.length-N}y.__name(we,"popStack");function ce(){var N;return N=g.pop()||D.lex()||oe,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=x.symbols_[N]||N),N}y.__name(ce,"lex");for(var M,wt,Y,Jt,Ot={},Nt,Q,he,Yt;;){if(wt=v[v.length-1],this.defaultActions[wt]?Y=this.defaultActions[wt]:((M===null||typeof M>"u")&&(M=ce()),Y=Pt[wt]&&Pt[wt][M]),typeof Y>"u"||!Y.length||!Y[0]){var Zt="";Yt=[];for(Nt in Pt[wt])this.terminals_[Nt]&&Nt>Ae&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Zt="Parse error on line "+(kt+1)+": Unexpected "+(M==oe?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:Kt,expected:Yt})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+wt+", token: "+M);switch(Y[0]){case 1:v.push(M),R.push(D.yytext),h.push(D.yylloc),v.push(Y[1]),M=null,le=D.yyleng,_=D.yytext,kt=D.yylineno,Kt=D.yylloc;break;case 2:if(Q=this.productions_[Y[1]][1],Ot.$=R[R.length-Q],Ot._$={first_line:h[h.length-(Q||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Q||1)].first_column,last_column:h[h.length-1].last_column},Ce&&(Ot._$.range=[h[h.length-(Q||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(Ot,[_,le,kt,Ct.yy,Y[1],R,h].concat(ke)),typeof Jt<"u")return Jt;Q&&(v=v.slice(0,-1*Q*2),R=R.slice(0,-1*Q),h=h.slice(0,-1*Q)),v.push(this.productions_[Y[1]][0]),R.push(Ot.$),h.push(Ot._$),he=Pt[v[v.length-2]][v[v.length-1]],v.push(he);break;case 3:return!0}}return!0},"parse")},Ee=(function(){var xt={EOF:1,parseError:y.__name(function(x,v){if(this.yy.parser)this.yy.parser.parseError(x,v);else throw new Error(x)},"parseError"),setInput:y.__name(function(b,x){return this.yy=x||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y.__name(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var x=b.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:y.__name(function(b){var x=b.length,v=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===g.length?this.yylloc.first_column:0)+g[g.length-v.length].length-v[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:y.__name(function(){return this._more=!0,this},"more"),reject:y.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y.__name(function(b){this.unput(this.match.slice(b))},"less"),pastInput:y.__name(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y.__name(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y.__name(function(){var b=this.pastInput(),x=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
@@ -4,7 +4,7 @@ import { setAccDescription as Be, getAccDescription as Ie, getAccTitle as Me, se
|
|
|
4
4
|
import { __name as g, log as fe } from "./chunk-AGHRB4JF.es.js";
|
|
5
5
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.es.js";
|
|
6
6
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.es.js";
|
|
7
|
-
import { d as je } from "../../../../../../../../../../../_virtual/index.
|
|
7
|
+
import { d as je } from "../../../../../../../../../../../_virtual/index.es9.js";
|
|
8
8
|
import jt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.es.js";
|
|
9
9
|
var Ft = (function() {
|
|
10
10
|
var e = /* @__PURE__ */ g(function(_t, x, m, v) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./chunk-ABZYJK2D.cjs.js"),s=require("./chunk-AGHRB4JF.cjs.js"),K=require("../../../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./chunk-ABZYJK2D.cjs.js"),s=require("./chunk-AGHRB4JF.cjs.js"),K=require("../../../../../../../../../../../_virtual/index.cjs9.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const w=require("../../../../../../lodash-es@4.17.21/node_modules/lodash-es/memoize.cjs.js"),Q=require("../../../../../../lodash-es@4.17.21/node_modules/lodash-es/merge.cjs.js"),M=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/step.cjs.js"),V=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/natural.cjs.js"),q=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.cjs.js"),ee=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/linearClosed.cjs.js"),te=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.cjs.js"),ne=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRom.cjs.js"),re=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomOpen.cjs.js"),ie=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomClosed.cjs.js"),ae=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinal.cjs.js"),oe=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalOpen.cjs.js"),se=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalClosed.cjs.js"),ce=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/bundle.cjs.js"),L=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.cjs.js"),le=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisOpen.cjs.js"),ue=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisClosed.cjs.js"),de=require("../../../../../../d3-shape@3.2.0/node_modules/d3-shape/src/curve/basis.cjs.js"),he=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var R="",fe={curveBasis:de.default,curveBasisClosed:ue.default,curveBasisOpen:le.default,curveBumpX:L.bumpX,curveBumpY:L.bumpY,curveBundle:ce.default,curveCardinalClosed:se.default,curveCardinalOpen:oe.default,curveCardinal:ae.default,curveCatmullRomClosed:ie.default,curveCatmullRomOpen:re.default,curveCatmullRom:ne.default,curveLinear:te.default,curveLinearClosed:ee.default,curveMonotoneX:q.monotoneX,curveMonotoneY:q.monotoneY,curveNatural:V.default,curveStep:M.default,curveStepAfter:M.stepAfter,curveStepBefore:M.stepBefore},me=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ge=s.__name(function(t,e){const r=D(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const o=r.map(l=>l.args);u.sanitizeDirective(o),n=u.assignWithDepth_default(n,[...o])}else n=r.args;if(!n)return;let i=u.detectType(t,e);const a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),D=s.__name(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${me.source})(?=[}][%]{2}).*
|
|
2
2
|
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),s.log.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n;const i=[];for(;(n=u.directiveRegex.exec(t))!==null;)if(n.index===u.directiveRegex.lastIndex&&u.directiveRegex.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const a=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:o})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return s.log.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),ve=s.__name(function(t){return t.replace(u.directiveRegex,"")},"removeDirectives"),_e=s.__name(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function $(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return fe[r]??e}s.__name($,"interpolateToCurve");function O(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?K.distExports.sanitizeUrl(r):r}s.__name(O,"formatUrl");var ye=s.__name((t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let o=0;o<n;o++)if(a=a[r[o]],!a){s.log.error(`Function name: ${t} not found in window`);return}a[i](...e)},"runFunc");function S(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}s.__name(S,"distance");function H(t){let e,r=0;t.forEach(i=>{r+=S(i,e),e=i});const n=r/2;return C(t,n)}s.__name(H,"traverseEdge");function N(t){return t.length===1?t[0]:H(t)}s.__name(N,"calcLabelPosition");var A=s.__name((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),C=s.__name((t,e)=>{let r,n=e;for(const i of t){if(r){const a=S(i,r);if(a===0)return r;if(a<n)n-=a;else{const o=n/a;if(o<=0)return r;if(o>=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:A((1-o)*r.x+o*i.x,5),y:A((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),xe=s.__name((t,e,r)=>{s.log.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=C(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(e[0].x+i.x)/2,l.y=-Math.cos(o)*a+(e[0].y+i.y)/2,l},"calcCardinalityPosition");function z(t,e,r){const n=structuredClone(r);s.log.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const i=25+t,a=C(n,i),o=10+t*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),c={x:0,y:0};return e==="start_left"?(c.x=Math.sin(l+Math.PI)*o+(n[0].x+a.x)/2,c.y=-Math.cos(l+Math.PI)*o+(n[0].y+a.y)/2):e==="end_right"?(c.x=Math.sin(l-Math.PI)*o+(n[0].x+a.x)/2-5,c.y=-Math.cos(l-Math.PI)*o+(n[0].y+a.y)/2-5):e==="end_left"?(c.x=Math.sin(l)*o+(n[0].x+a.x)/2-5,c.y=-Math.cos(l)*o+(n[0].y+a.y)/2-5):(c.x=Math.sin(l)*o+(n[0].x+a.x)/2,c.y=-Math.cos(l)*o+(n[0].y+a.y)/2),c}s.__name(z,"calcTerminalLabelPosition");function B(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}s.__name(B,"getStylesFromArray");var F=0,j=s.__name(()=>(F++,"id-"+Math.random().toString(36).substr(2,12)+"-"+F),"generateId");function U(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}s.__name(U,"makeRandomHex");var k=s.__name(t=>U(t.length),"random"),pe=s.__name(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),be=s.__name(function(t,e){const r=e.text.replace(u.common_default.lineBreakRegex," "),[,n]=b(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),Y=w.default((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),u.common_default.lineBreakRegex.test(t)))return t;const n=t.split(" ").filter(Boolean),i=[];let a="";return n.forEach((o,l)=>{const c=g(`${o} `,r),d=g(a,r);if(c>e){const{hyphenatedStrings:v,remainingWord:h}=Me(o,e,"-",r);i.push(a,...v),a=h}else d+c>=e?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Me=w.default((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach((l,c)=>{const d=`${o}${l}`;if(g(d,n)>=e){const y=c+1,v=i.length===y,h=`${d}${r}`;a.push(v?d:h),o=""}else o=d}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function E(t,e){return T(t,e).height}s.__name(E,"calculateTextHeight");function g(t,e){return T(t,e).width}s.__name(g,"calculateTextWidth");var T=w.default((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,a]=b(r),o=["sans-serif",n],l=t.split(u.common_default.lineBreakRegex),c=[],d=he.default("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const _=d.append("svg");for(const v of o){let h=0;const f={width:0,height:0,lineHeight:0};for(const Z of l){const I=pe();I.text=Z||R;const P=be(_,I).style("font-size",a).style("font-weight",i).style("font-family",v),x=(P._groups||P)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");f.width=Math.round(Math.max(f.width,x.width)),h=Math.round(x.height),f.height+=h,f.lineHeight=Math.round(Math.max(f.lineHeight,h))}c.push(f)}_.remove();const y=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[y]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),m,we=(m=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},s.__name(m,"InitIDGenerator"),m),p,$e=s.__name(function(t){return p=p||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),p.innerHTML=t,unescape(p.textContent)},"entityDecode");function X(t){return"str"in t}s.__name(X,"isDetailedError");var Se=s.__name((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),b=s.__name(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function W(t,e){return Q.default({},t,e)}s.__name(W,"cleanAndMerge");var Ce={assignWithDepth:u.assignWithDepth_default,wrapLabel:Y,calculateTextHeight:E,calculateTextWidth:g,calculateTextDimensions:T,cleanAndMerge:W,detectInit:ge,detectDirective:D,isSubstringInArray:_e,interpolateToCurve:$,calcLabelPosition:N,calcCardinalityPosition:xe,calcTerminalLabelPosition:z,formatUrl:O,getStylesFromArray:B,generateId:j,random:k,runFunc:ye,entityDecode:$e,insertTitle:Se,isLabelCoordinateInPath:G,parseFontSize:b,InitIDGenerator:we},Be=s.__name(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Ee=s.__name(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Te=s.__name((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function J(t){return t??null}s.__name(J,"handleUndefinedAttr");function G(t,e){const r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}s.__name(G,"isLabelCoordinateInPath");exports.ZERO_WIDTH_SPACE=R;exports.calculateTextHeight=E;exports.calculateTextWidth=g;exports.cleanAndMerge=W;exports.decodeEntities=Ee;exports.encodeEntities=Be;exports.generateId=j;exports.getEdgeId=Te;exports.getStylesFromArray=B;exports.handleUndefinedAttr=J;exports.interpolateToCurve=$;exports.isDetailedError=X;exports.parseFontSize=b;exports.random=k;exports.removeDirectives=ve;exports.utils_default=Ce;exports.wrapLabel=Y;
|
|
3
3
|
//# sourceMappingURL=chunk-S3R3BYOJ.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { common_default as b, assignWithDepth_default as E, directiveRegex as $, sanitizeDirective as X, detectType as Y } from "./chunk-ABZYJK2D.es.js";
|
|
2
2
|
import { __name as s, log as g } from "./chunk-AGHRB4JF.es.js";
|
|
3
|
-
import { d as G } from "../../../../../../../../../../../_virtual/index.
|
|
3
|
+
import { d as G } from "../../../../../../../../../../../_virtual/index.es9.js";
|
|
4
4
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.es.js";
|
|
5
5
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.es.js";
|
|
6
6
|
import w from "../../../../../../lodash-es@4.17.21/node_modules/lodash-es/memoize.es.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./chunk-ABZYJK2D.cjs.js"),s=require("./chunk-AGHRB4JF.cjs.js"),c=require("../../../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./chunk-ABZYJK2D.cjs.js"),s=require("./chunk-AGHRB4JF.cjs.js"),c=require("../../../../../../../../../../../_virtual/index.cjs9.js");var d=s.__name((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),o=s.__name((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};d(a,e).lower()},"drawBackgroundRect"),x=s.__name((a,t)=>{const e=t.text.replace(l.lineBreakRegex," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const n=r.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(e),r},"drawText"),g=s.__name((a,t,e,r)=>{const n=a.append("image");n.attr("x",t),n.attr("y",e);const i=c.distExports.sanitizeUrl(r);n.attr("xlink:href",i)},"drawImage"),m=s.__name((a,t,e,r)=>{const n=a.append("use");n.attr("x",t),n.attr("y",e);const i=c.distExports.sanitizeUrl(r);n.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),h=s.__name(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),y=s.__name(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");exports.drawBackgroundRect=o;exports.drawEmbeddedImage=m;exports.drawImage=g;exports.drawRect=d;exports.drawText=x;exports.getNoteRect=h;exports.getTextObj=y;
|
|
2
2
|
//# sourceMappingURL=chunk-TZMSLE5B.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { lineBreakRegex as o } from "./chunk-ABZYJK2D.es.js";
|
|
2
2
|
import { __name as n } from "./chunk-AGHRB4JF.es.js";
|
|
3
|
-
import { d as l } from "../../../../../../../../../../../_virtual/index.
|
|
3
|
+
import { d as l } from "../../../../../../../../../../../_virtual/index.es9.js";
|
|
4
4
|
var x = /* @__PURE__ */ n((s, t) => {
|
|
5
5
|
const r = s.append("rect");
|
|
6
6
|
if (r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), t.name && r.attr("name", t.name), t.rx && r.attr("rx", t.rx), t.ry && r.attr("ry", t.ry), t.attrs !== void 0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const it=require("./chunk-S3R3BYOJ.cjs.js"),L=require("./chunk-ABZYJK2D.cjs.js"),l=require("./chunk-AGHRB4JF.cjs.js"),rt=require("../../../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const it=require("./chunk-S3R3BYOJ.cjs.js"),L=require("./chunk-ABZYJK2D.cjs.js"),l=require("./chunk-AGHRB4JF.cjs.js"),rt=require("../../../../../../../../../../../_virtual/index.cjs9.js"),M=require("../../../../../../../../../../../_virtual/dayjs.min.cjs.js"),st=require("../../../../../../../../../../../_virtual/isoWeek.cjs.js"),ct=require("../../../../../../../../../../../_virtual/customParseFormat.cjs.js"),lt=require("../../../../../../../../../../../_virtual/advancedFormat.cjs.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const ot=require("../../../../../../d3-scale@4.0.2/node_modules/d3-scale/src/time.cjs.js"),ut=require("../../../../../../d3-array@3.2.4/node_modules/d3-array/src/min.cjs.js"),dt=require("../../../../../../d3-array@3.2.4/node_modules/d3-array/src/max.cjs.js"),ft=require("../../../../../../d3-scale@4.0.2/node_modules/d3-scale/src/linear.cjs.js"),mt=require("../../../../../../d3-interpolate@3.0.1/node_modules/d3-interpolate/src/hcl.cjs.js"),We=require("../../../../../../d3-axis@3.0.0/node_modules/d3-axis/src/axis.cjs.js"),Pe=require("../../../../../../d3-time-format@4.1.0/node_modules/d3-time-format/src/defaultLocale.cjs.js"),Re=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/month.cjs.js"),H=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/week.cjs.js"),Ye=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/day.cjs.js"),Be=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/hour.cjs.js"),Ne=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/minute.cjs.js"),ze=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/second.cjs.js"),Ge=require("../../../../../../d3-time@3.1.0/node_modules/d3-time/src/millisecond.cjs.js"),fe=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var Te=(function(){var e=l.__name(function(T,o,d,f){for(d=d||{},f=T.length;f--;d[T[f]]=o);return d},"o"),a=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],s=[1,27],r=[1,28],k=[1,29],m=[1,30],V=[1,31],Y=[1,32],B=[1,33],E=[1,34],F=[1,9],z=[1,10],W=[1,11],P=[1,12],x=[1,13],$=[1,14],ee=[1,15],te=[1,16],ne=[1,19],ae=[1,20],ie=[1,21],re=[1,22],se=[1,23],y=[1,25],p=[1,35],_={trace:l.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l.__name(function(o,d,f,u,h,n,c){var t=n.length-1;switch(h){case 1:return n[t-1];case 2:this.$=[];break;case 3:n[t-1].push(n[t]),this.$=n[t-1];break;case 4:case 5:this.$=n[t];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[t].substr(11)),this.$=n[t].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[t].substr(18);break;case 19:u.TopAxis(),this.$=n[t].substr(8);break;case 20:u.setAxisFormat(n[t].substr(11)),this.$=n[t].substr(11);break;case 21:u.setTickInterval(n[t].substr(13)),this.$=n[t].substr(13);break;case 22:u.setExcludes(n[t].substr(9)),this.$=n[t].substr(9);break;case 23:u.setIncludes(n[t].substr(9)),this.$=n[t].substr(9);break;case 24:u.setTodayMarker(n[t].substr(12)),this.$=n[t].substr(12);break;case 27:u.setDiagramTitle(n[t].substr(6)),this.$=n[t].substr(6);break;case 28:this.$=n[t].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[t].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[t].substr(8)),this.$=n[t].substr(8);break;case 33:u.addTask(n[t-1],n[t]),this.$="task";break;case 34:this.$=n[t-1],u.setClickEvent(n[t-1],n[t],null);break;case 35:this.$=n[t-2],u.setClickEvent(n[t-2],n[t-1],n[t]);break;case 36:this.$=n[t-2],u.setClickEvent(n[t-2],n[t-1],null),u.setLink(n[t-2],n[t]);break;case 37:this.$=n[t-3],u.setClickEvent(n[t-3],n[t-2],n[t-1]),u.setLink(n[t-3],n[t]);break;case 38:this.$=n[t-2],u.setClickEvent(n[t-2],n[t],null),u.setLink(n[t-2],n[t-1]);break;case 39:this.$=n[t-3],u.setClickEvent(n[t-3],n[t-1],n[t]),u.setLink(n[t-3],n[t-2]);break;case 40:this.$=n[t-1],u.setLink(n[t-1],n[t]);break;case 41:case 47:this.$=n[t-1]+" "+n[t];break;case 42:case 43:case 45:this.$=n[t-2]+" "+n[t-1]+" "+n[t];break;case 44:case 46:this.$=n[t-3]+" "+n[t-2]+" "+n[t-1]+" "+n[t];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:s,14:r,15:k,16:m,17:V,18:Y,19:18,20:B,21:E,22:F,23:z,24:W,25:P,26:x,27:$,28:ee,29:te,30:ne,31:ae,33:ie,35:re,36:se,37:24,38:y,40:p},e(a,[2,7],{1:[2,1]}),e(a,[2,3]),{9:36,11:17,12:i,13:s,14:r,15:k,16:m,17:V,18:Y,19:18,20:B,21:E,22:F,23:z,24:W,25:P,26:x,27:$,28:ee,29:te,30:ne,31:ae,33:ie,35:re,36:se,37:24,38:y,40:p},e(a,[2,5]),e(a,[2,6]),e(a,[2,17]),e(a,[2,18]),e(a,[2,19]),e(a,[2,20]),e(a,[2,21]),e(a,[2,22]),e(a,[2,23]),e(a,[2,24]),e(a,[2,25]),e(a,[2,26]),e(a,[2,27]),{32:[1,37]},{34:[1,38]},e(a,[2,30]),e(a,[2,31]),e(a,[2,32]),{39:[1,39]},e(a,[2,8]),e(a,[2,9]),e(a,[2,10]),e(a,[2,11]),e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(a,[2,16]),{41:[1,40],43:[1,41]},e(a,[2,4]),e(a,[2,28]),e(a,[2,29]),e(a,[2,33]),e(a,[2,34],{42:[1,42],43:[1,43]}),e(a,[2,40],{41:[1,44]}),e(a,[2,35],{43:[1,45]}),e(a,[2,36]),e(a,[2,38],{42:[1,46]}),e(a,[2,37]),e(a,[2,39])],defaultActions:{},parseError:l.__name(function(o,d){if(d.recoverable)this.trace(o);else{var f=new Error(o);throw f.hash=d,f}},"parseError"),parse:l.__name(function(o){var d=this,f=[0],u=[],h=[null],n=[],c=this.table,t="",D=0,b=0,w=2,A=1,C=n.slice.call(arguments,1),S=Object.create(this.lexer),G={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(G.yy[ge]=this.yy[ge]);S.setInput(o,G.yy),G.yy.lexer=S,G.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var _e=S.yylloc;n.push(_e);var nt=S.options&&S.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(O){f.length=f.length-2*O,h.length=h.length-O,n.length=n.length-O}l.__name(at,"popStack");function Ve(){var O;return O=u.pop()||S.lex()||A,typeof O!="number"&&(O instanceof Array&&(u=O,O=u.pop()),O=d.symbols_[O]||O),O}l.__name(Ve,"lex");for(var q,j,R,ve,K={},ue,X,Oe,de;;){if(j=f[f.length-1],this.defaultActions[j]?R=this.defaultActions[j]:((q===null||typeof q>"u")&&(q=Ve()),R=c[j]&&c[j][q]),typeof R>"u"||!R.length||!R[0]){var pe="";de=[];for(ue in c[j])this.terminals_[ue]&&ue>w&&de.push("'"+this.terminals_[ue]+"'");S.showPosition?pe="Parse error on line "+(D+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+de.join(", ")+", got '"+(this.terminals_[q]||q)+"'":pe="Parse error on line "+(D+1)+": Unexpected "+(q==A?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(pe,{text:S.match,token:this.terminals_[q]||q,line:S.yylineno,loc:_e,expected:de})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+q);switch(R[0]){case 1:f.push(q),h.push(S.yytext),n.push(S.yylloc),f.push(R[1]),q=null,b=S.yyleng,t=S.yytext,D=S.yylineno,_e=S.yylloc;break;case 2:if(X=this.productions_[R[1]][1],K.$=h[h.length-X],K._$={first_line:n[n.length-(X||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(X||1)].first_column,last_column:n[n.length-1].last_column},nt&&(K._$.range=[n[n.length-(X||1)].range[0],n[n.length-1].range[1]]),ve=this.performAction.apply(K,[t,b,D,G.yy,R[1],h,n].concat(C)),typeof ve<"u")return ve;X&&(f=f.slice(0,-1*X*2),h=h.slice(0,-1*X),n=n.slice(0,-1*X)),f.push(this.productions_[R[1]][0]),h.push(K.$),n.push(K._$),Oe=c[f[f.length-2]][f[f.length-1]],f.push(Oe);break;case 3:return!0}}return!0},"parse")},v=(function(){var T={EOF:1,parseError:l.__name(function(d,f){if(this.yy.parser)this.yy.parser.parseError(d,f);else throw new Error(d)},"parseError"),setInput:l.__name(function(o,d){return this.yy=d||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l.__name(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:l.__name(function(o){var d=o.length,f=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===u.length?this.yylloc.first_column:0)+u[u.length-f.length].length-f[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l.__name(function(){return this._more=!0,this},"more"),reject:l.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l.__name(function(o){this.unput(this.match.slice(o))},"less"),pastInput:l.__name(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l.__name(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l.__name(function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { utils_default as ie } from "./chunk-S3R3BYOJ.es.js";
|
|
2
2
|
import { getAccDescription as se, setAccDescription as ne, getDiagramTitle as ae, setDiagramTitle as oe, getAccTitle as ce, setAccTitle as le, getConfig2 as K, configureSvgSize as ue, common_default as de, clear as fe } from "./chunk-ABZYJK2D.es.js";
|
|
3
3
|
import { __name as c, log as mt } from "./chunk-AGHRB4JF.es.js";
|
|
4
|
-
import { d as he } from "../../../../../../../../../../../_virtual/index.
|
|
4
|
+
import { d as he } from "../../../../../../../../../../../_virtual/index.es9.js";
|
|
5
5
|
import L from "../../../../../../../../../../../_virtual/dayjs.min.es.js";
|
|
6
6
|
import me from "../../../../../../../../../../../_virtual/isoWeek.es.js";
|
|
7
7
|
import ke from "../../../../../../../../../../../_virtual/customParseFormat.es.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-TZMSLE5B.cjs.js"),Gt=require("./chunk-MI3HLSF2.cjs.js"),de=require("./chunk-QZHKN3VN.cjs.js"),Y=require("./chunk-S3R3BYOJ.cjs.js"),_=require("./chunk-ABZYJK2D.cjs.js"),x=require("./chunk-AGHRB4JF.cjs.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const Jt=require("../../../../../../../../../../../_virtual/index.cjs8.js"),At=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var Yt=(function(){var e=x.__name(function(lt,v,A,I){for(A=A||{},I=lt.length;I--;A[lt[I]]=v);return A},"o"),t=[1,2],n=[1,3],a=[1,4],r=[2,4],i=[1,9],c=[1,11],h=[1,13],o=[1,14],s=[1,16],p=[1,17],g=[1,18],f=[1,24],m=[1,25],b=[1,26],w=[1,27],k=[1,28],N=[1,29],S=[1,30],O=[1,31],B=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],F=[1,39],D=[1,41],Q=[1,42],G=[1,43],$=[1,44],at=[1,45],R=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],L=[2,71],X=[4,5,16,50,52,53],j=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],M=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Rt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Ft=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],it=[69,70,71],nt=[1,127],Dt={trace:x.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:x.__name(function(v,A,I,E,C,d,Et){var u=d.length-1;switch(C){case 3:return E.apply(d[u]),d[u];case 4:case 9:this.$=[];break;case 5:case 10:d[u-1].push(d[u]),this.$=d[u-1];break;case 6:case 7:case 11:case 12:this.$=d[u];break;case 8:case 13:this.$=[];break;case 15:d[u].type="createParticipant",this.$=d[u];break;case 16:d[u-1].unshift({type:"boxStart",boxData:E.parseBoxData(d[u-2])}),d[u-1].push({type:"boxEnd",boxText:d[u-2]}),this.$=d[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-2]),sequenceIndexStep:Number(d[u-1]),sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:E.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:d[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:d[u-1].actor};break;case 29:E.setDiagramTitle(d[u].substring(6)),this.$=d[u].substring(6);break;case 30:E.setDiagramTitle(d[u].substring(7)),this.$=d[u].substring(7);break;case 31:this.$=d[u].trim(),E.setAccTitle(this.$);break;case 32:case 33:this.$=d[u].trim(),E.setAccDescription(this.$);break;case 34:d[u-1].unshift({type:"loopStart",loopText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.LOOP_START}),d[u-1].push({type:"loopEnd",loopText:d[u-2],signalType:E.LINETYPE.LOOP_END}),this.$=d[u-1];break;case 35:d[u-1].unshift({type:"rectStart",color:E.parseMessage(d[u-2]),signalType:E.LINETYPE.RECT_START}),d[u-1].push({type:"rectEnd",color:E.parseMessage(d[u-2]),signalType:E.LINETYPE.RECT_END}),this.$=d[u-1];break;case 36:d[u-1].unshift({type:"optStart",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.OPT_START}),d[u-1].push({type:"optEnd",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.OPT_END}),this.$=d[u-1];break;case 37:d[u-1].unshift({type:"altStart",altText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.ALT_START}),d[u-1].push({type:"altEnd",signalType:E.LINETYPE.ALT_END}),this.$=d[u-1];break;case 38:d[u-1].unshift({type:"parStart",parText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.PAR_START}),d[u-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=d[u-1];break;case 39:d[u-1].unshift({type:"parStart",parText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.PAR_OVER_START}),d[u-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=d[u-1];break;case 40:d[u-1].unshift({type:"criticalStart",criticalText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.CRITICAL_START}),d[u-1].push({type:"criticalEnd",signalType:E.LINETYPE.CRITICAL_END}),this.$=d[u-1];break;case 41:d[u-1].unshift({type:"breakStart",breakText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.BREAK_START}),d[u-1].push({type:"breakEnd",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.BREAK_END}),this.$=d[u-1];break;case 43:this.$=d[u-3].concat([{type:"option",optionText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.CRITICAL_OPTION},d[u]]);break;case 45:this.$=d[u-3].concat([{type:"and",parText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.PAR_AND},d[u]]);break;case 47:this.$=d[u-3].concat([{type:"else",altText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.ALT_ELSE},d[u]]);break;case 48:d[u-3].draw="participant",d[u-3].type="addParticipant",d[u-3].description=E.parseMessage(d[u-1]),this.$=d[u-3];break;case 49:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 50:d[u-3].draw="actor",d[u-3].type="addParticipant",d[u-3].description=E.parseMessage(d[u-1]),this.$=d[u-3];break;case 51:d[u-1].draw="actor",d[u-1].type="addParticipant",this.$=d[u-1];break;case 52:d[u-1].type="destroyParticipant",this.$=d[u-1];break;case 53:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 54:this.$=[d[u-1],{type:"addNote",placement:d[u-2],actor:d[u-1].actor,text:d[u]}];break;case 55:d[u-2]=[].concat(d[u-1],d[u-1]).slice(0,2),d[u-2][0]=d[u-2][0].actor,d[u-2][1]=d[u-2][1].actor,this.$=[d[u-1],{type:"addNote",placement:E.PLACEMENT.OVER,actor:d[u-2].slice(0,2),text:d[u]}];break;case 56:this.$=[d[u-1],{type:"addLinks",actor:d[u-1].actor,text:d[u]}];break;case 57:this.$=[d[u-1],{type:"addALink",actor:d[u-1].actor,text:d[u]}];break;case 58:this.$=[d[u-1],{type:"addProperties",actor:d[u-1].actor,text:d[u]}];break;case 59:this.$=[d[u-1],{type:"addDetails",actor:d[u-1].actor,text:d[u]}];break;case 62:this.$=[d[u-2],d[u]];break;case 63:this.$=d[u];break;case 64:this.$=E.PLACEMENT.LEFTOF;break;case 65:this.$=E.PLACEMENT.RIGHTOF;break;case 66:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u],activate:!0},{type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:d[u-1].actor}];break;case 67:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u]},{type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:d[u-4].actor}];break;case 68:this.$=[d[u-3],d[u-1],{type:"addMessage",from:d[u-3].actor,to:d[u-1].actor,signalType:d[u-2],msg:d[u]}];break;case 69:this.$={type:"addParticipant",actor:d[u-1],config:d[u]};break;case 70:this.$=d[u-1].trim();break;case 71:this.$={type:"addParticipant",actor:d[u]};break;case 72:this.$=E.LINETYPE.SOLID_OPEN;break;case 73:this.$=E.LINETYPE.DOTTED_OPEN;break;case 74:this.$=E.LINETYPE.SOLID;break;case 75:this.$=E.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=E.LINETYPE.DOTTED;break;case 77:this.$=E.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=E.LINETYPE.SOLID_CROSS;break;case 79:this.$=E.LINETYPE.DOTTED_CROSS;break;case 80:this.$=E.LINETYPE.SOLID_POINT;break;case 81:this.$=E.LINETYPE.DOTTED_POINT;break;case 82:this.$=E.parseMessage(d[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:n,6:a},{1:[3]},{3:5,4:t,5:n,6:a},{3:6,4:t,5:n,6:a},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:o,17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},e(y,[2,5]),{9:47,12:12,13:h,14:o,17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},e(y,[2,7]),e(y,[2,8]),e(y,[2,14]),{12:48,50:K,52:U,53:F},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(y,[2,29]),e(y,[2,30]),{32:[1,61]},{34:[1,62]},e(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:R},{22:75,71:R},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],L),e(y,[2,6]),e(y,[2,15]),e(X,[2,9],{10:95}),e(y,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(y,[2,21]),{5:[1,99]},{5:[1,100]},e(y,[2,24]),e(y,[2,25]),e(y,[2,26]),e(y,[2,27]),e(y,[2,28]),e(y,[2,31]),e(y,[2,32]),e(j,r,{7:101}),e(j,r,{7:102}),e(j,r,{7:103}),e(M,r,{40:104,7:105}),e(Rt,r,{42:106,7:107}),e(Rt,r,{7:107,42:108}),e(Ft,r,{45:109,7:110}),e(j,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],L,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(it,[2,72]),e(it,[2,73]),e(it,[2,74]),e(it,[2,75]),e(it,[2,76]),e(it,[2,77]),e(it,[2,78]),e(it,[2,79]),e(it,[2,80]),e(it,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:nt},{57:128,86:nt},{57:129,86:nt},{57:130,86:nt},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:K,52:U,53:F},{5:[1,136]},e(y,[2,19]),e(y,[2,20]),e(y,[2,22]),e(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,137],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,138],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,139],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,46],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,49:[1,141],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,142]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,44],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,48:[1,143],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,144]},{16:[1,145]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,42],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,47:[1,146],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,147],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{15:[1,148]},e(y,[2,49]),e(y,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(y,[2,51]),e(y,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:nt},{57:154,86:nt},{57:155,86:nt},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(y,[2,16]),e(X,[2,10]),{12:157,50:K,52:U,53:F},e(X,[2,12]),e(X,[2,13]),e(y,[2,18]),e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),{15:[1,158]},e(y,[2,38]),{15:[1,159]},e(y,[2,39]),e(y,[2,40]),{15:[1,160]},e(y,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:nt},{57:165,86:nt},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(X,[2,11]),e(M,r,{7:105,40:167}),e(Rt,r,{7:107,42:168}),e(Ft,r,{7:110,45:169}),e(y,[2,48]),{5:[2,70]},e(y,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:x.__name(function(v,A){if(A.recoverable)this.trace(v);else{var I=new Error(v);throw I.hash=A,I}},"parseError"),parse:x.__name(function(v){var A=this,I=[0],E=[],C=[null],d=[],Et=this.table,u="",vt=0,zt=0,oe=2,Ht=1,ce=d.slice.call(arguments,1),q=Object.create(this.lexer),ut={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(ut.yy[Ct]=this.yy[Ct]);q.setInput(v,ut.yy),ut.yy.lexer=q,ut.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var Ot=q.yylloc;d.push(Ot);var le=q.options&&q.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(tt){I.length=I.length-2*tt,C.length=C.length-tt,d.length=d.length-tt}x.__name(he,"popStack");function Kt(){var tt;return tt=E.pop()||q.lex()||Ht,typeof tt!="number"&&(tt instanceof Array&&(E=tt,tt=E.pop()),tt=A.symbols_[tt]||tt),tt}x.__name(Kt,"lex");for(var J,gt,st,Bt,mt={},It,ot,Ut,Lt;;){if(gt=I[I.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((J===null||typeof J>"u")&&(J=Kt()),st=Et[gt]&&Et[gt][J]),typeof st>"u"||!st.length||!st[0]){var Vt="";Lt=[];for(It in Et[gt])this.terminals_[It]&&It>oe&&Lt.push("'"+this.terminals_[It]+"'");q.showPosition?Vt="Parse error on line "+(vt+1)+`:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./chunk-TZMSLE5B.cjs.js"),Gt=require("./chunk-MI3HLSF2.cjs.js"),de=require("./chunk-QZHKN3VN.cjs.js"),Y=require("./chunk-S3R3BYOJ.cjs.js"),_=require("./chunk-ABZYJK2D.cjs.js"),x=require("./chunk-AGHRB4JF.cjs.js");require("../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.cjs.js");require("../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.cjs.js");const Jt=require("../../../../../../../../../../../_virtual/index.cjs9.js"),At=require("../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.cjs.js");var Yt=(function(){var e=x.__name(function(lt,v,A,I){for(A=A||{},I=lt.length;I--;A[lt[I]]=v);return A},"o"),t=[1,2],n=[1,3],a=[1,4],r=[2,4],i=[1,9],c=[1,11],h=[1,13],o=[1,14],s=[1,16],p=[1,17],g=[1,18],f=[1,24],m=[1,25],b=[1,26],w=[1,27],k=[1,28],N=[1,29],S=[1,30],O=[1,31],B=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],F=[1,39],D=[1,41],Q=[1,42],G=[1,43],$=[1,44],at=[1,45],R=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],L=[2,71],X=[4,5,16,50,52,53],j=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],M=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Rt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Ft=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],it=[69,70,71],nt=[1,127],Dt={trace:x.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:x.__name(function(v,A,I,E,C,d,Et){var u=d.length-1;switch(C){case 3:return E.apply(d[u]),d[u];case 4:case 9:this.$=[];break;case 5:case 10:d[u-1].push(d[u]),this.$=d[u-1];break;case 6:case 7:case 11:case 12:this.$=d[u];break;case 8:case 13:this.$=[];break;case 15:d[u].type="createParticipant",this.$=d[u];break;case 16:d[u-1].unshift({type:"boxStart",boxData:E.parseBoxData(d[u-2])}),d[u-1].push({type:"boxEnd",boxText:d[u-2]}),this.$=d[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-2]),sequenceIndexStep:Number(d[u-1]),sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:E.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:E.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:d[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:d[u-1].actor};break;case 29:E.setDiagramTitle(d[u].substring(6)),this.$=d[u].substring(6);break;case 30:E.setDiagramTitle(d[u].substring(7)),this.$=d[u].substring(7);break;case 31:this.$=d[u].trim(),E.setAccTitle(this.$);break;case 32:case 33:this.$=d[u].trim(),E.setAccDescription(this.$);break;case 34:d[u-1].unshift({type:"loopStart",loopText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.LOOP_START}),d[u-1].push({type:"loopEnd",loopText:d[u-2],signalType:E.LINETYPE.LOOP_END}),this.$=d[u-1];break;case 35:d[u-1].unshift({type:"rectStart",color:E.parseMessage(d[u-2]),signalType:E.LINETYPE.RECT_START}),d[u-1].push({type:"rectEnd",color:E.parseMessage(d[u-2]),signalType:E.LINETYPE.RECT_END}),this.$=d[u-1];break;case 36:d[u-1].unshift({type:"optStart",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.OPT_START}),d[u-1].push({type:"optEnd",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.OPT_END}),this.$=d[u-1];break;case 37:d[u-1].unshift({type:"altStart",altText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.ALT_START}),d[u-1].push({type:"altEnd",signalType:E.LINETYPE.ALT_END}),this.$=d[u-1];break;case 38:d[u-1].unshift({type:"parStart",parText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.PAR_START}),d[u-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=d[u-1];break;case 39:d[u-1].unshift({type:"parStart",parText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.PAR_OVER_START}),d[u-1].push({type:"parEnd",signalType:E.LINETYPE.PAR_END}),this.$=d[u-1];break;case 40:d[u-1].unshift({type:"criticalStart",criticalText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.CRITICAL_START}),d[u-1].push({type:"criticalEnd",signalType:E.LINETYPE.CRITICAL_END}),this.$=d[u-1];break;case 41:d[u-1].unshift({type:"breakStart",breakText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.BREAK_START}),d[u-1].push({type:"breakEnd",optText:E.parseMessage(d[u-2]),signalType:E.LINETYPE.BREAK_END}),this.$=d[u-1];break;case 43:this.$=d[u-3].concat([{type:"option",optionText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.CRITICAL_OPTION},d[u]]);break;case 45:this.$=d[u-3].concat([{type:"and",parText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.PAR_AND},d[u]]);break;case 47:this.$=d[u-3].concat([{type:"else",altText:E.parseMessage(d[u-1]),signalType:E.LINETYPE.ALT_ELSE},d[u]]);break;case 48:d[u-3].draw="participant",d[u-3].type="addParticipant",d[u-3].description=E.parseMessage(d[u-1]),this.$=d[u-3];break;case 49:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 50:d[u-3].draw="actor",d[u-3].type="addParticipant",d[u-3].description=E.parseMessage(d[u-1]),this.$=d[u-3];break;case 51:d[u-1].draw="actor",d[u-1].type="addParticipant",this.$=d[u-1];break;case 52:d[u-1].type="destroyParticipant",this.$=d[u-1];break;case 53:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 54:this.$=[d[u-1],{type:"addNote",placement:d[u-2],actor:d[u-1].actor,text:d[u]}];break;case 55:d[u-2]=[].concat(d[u-1],d[u-1]).slice(0,2),d[u-2][0]=d[u-2][0].actor,d[u-2][1]=d[u-2][1].actor,this.$=[d[u-1],{type:"addNote",placement:E.PLACEMENT.OVER,actor:d[u-2].slice(0,2),text:d[u]}];break;case 56:this.$=[d[u-1],{type:"addLinks",actor:d[u-1].actor,text:d[u]}];break;case 57:this.$=[d[u-1],{type:"addALink",actor:d[u-1].actor,text:d[u]}];break;case 58:this.$=[d[u-1],{type:"addProperties",actor:d[u-1].actor,text:d[u]}];break;case 59:this.$=[d[u-1],{type:"addDetails",actor:d[u-1].actor,text:d[u]}];break;case 62:this.$=[d[u-2],d[u]];break;case 63:this.$=d[u];break;case 64:this.$=E.PLACEMENT.LEFTOF;break;case 65:this.$=E.PLACEMENT.RIGHTOF;break;case 66:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u],activate:!0},{type:"activeStart",signalType:E.LINETYPE.ACTIVE_START,actor:d[u-1].actor}];break;case 67:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u]},{type:"activeEnd",signalType:E.LINETYPE.ACTIVE_END,actor:d[u-4].actor}];break;case 68:this.$=[d[u-3],d[u-1],{type:"addMessage",from:d[u-3].actor,to:d[u-1].actor,signalType:d[u-2],msg:d[u]}];break;case 69:this.$={type:"addParticipant",actor:d[u-1],config:d[u]};break;case 70:this.$=d[u-1].trim();break;case 71:this.$={type:"addParticipant",actor:d[u]};break;case 72:this.$=E.LINETYPE.SOLID_OPEN;break;case 73:this.$=E.LINETYPE.DOTTED_OPEN;break;case 74:this.$=E.LINETYPE.SOLID;break;case 75:this.$=E.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=E.LINETYPE.DOTTED;break;case 77:this.$=E.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=E.LINETYPE.SOLID_CROSS;break;case 79:this.$=E.LINETYPE.DOTTED_CROSS;break;case 80:this.$=E.LINETYPE.SOLID_POINT;break;case 81:this.$=E.LINETYPE.DOTTED_POINT;break;case 82:this.$=E.parseMessage(d[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:n,6:a},{1:[3]},{3:5,4:t,5:n,6:a},{3:6,4:t,5:n,6:a},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:o,17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},e(y,[2,5]),{9:47,12:12,13:h,14:o,17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},e(y,[2,7]),e(y,[2,8]),e(y,[2,14]),{12:48,50:K,52:U,53:F},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(y,[2,29]),e(y,[2,30]),{32:[1,61]},{34:[1,62]},e(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:R},{22:75,71:R},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],L),e(y,[2,6]),e(y,[2,15]),e(X,[2,9],{10:95}),e(y,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(y,[2,21]),{5:[1,99]},{5:[1,100]},e(y,[2,24]),e(y,[2,25]),e(y,[2,26]),e(y,[2,27]),e(y,[2,28]),e(y,[2,31]),e(y,[2,32]),e(j,r,{7:101}),e(j,r,{7:102}),e(j,r,{7:103}),e(M,r,{40:104,7:105}),e(Rt,r,{42:106,7:107}),e(Rt,r,{7:107,42:108}),e(Ft,r,{45:109,7:110}),e(j,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],L,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(it,[2,72]),e(it,[2,73]),e(it,[2,74]),e(it,[2,75]),e(it,[2,76]),e(it,[2,77]),e(it,[2,78]),e(it,[2,79]),e(it,[2,80]),e(it,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:nt},{57:128,86:nt},{57:129,86:nt},{57:130,86:nt},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:K,52:U,53:F},{5:[1,136]},e(y,[2,19]),e(y,[2,20]),e(y,[2,22]),e(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,137],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,138],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,139],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,46],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,49:[1,141],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,142]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,44],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,48:[1,143],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{16:[1,144]},{16:[1,145]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,42],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,47:[1,146],50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,147],17:15,18:s,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:f,30:m,31:b,33:w,35:k,36:N,37:S,38:O,39:B,41:z,43:H,44:Z,46:et,50:K,52:U,53:F,55:D,60:Q,61:G,62:$,63:at,71:R},{15:[1,148]},e(y,[2,49]),e(y,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(y,[2,51]),e(y,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:nt},{57:154,86:nt},{57:155,86:nt},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(y,[2,16]),e(X,[2,10]),{12:157,50:K,52:U,53:F},e(X,[2,12]),e(X,[2,13]),e(y,[2,18]),e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),{15:[1,158]},e(y,[2,38]),{15:[1,159]},e(y,[2,39]),e(y,[2,40]),{15:[1,160]},e(y,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:nt},{57:165,86:nt},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(X,[2,11]),e(M,r,{7:105,40:167}),e(Rt,r,{7:107,42:168}),e(Ft,r,{7:110,45:169}),e(y,[2,48]),{5:[2,70]},e(y,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:x.__name(function(v,A){if(A.recoverable)this.trace(v);else{var I=new Error(v);throw I.hash=A,I}},"parseError"),parse:x.__name(function(v){var A=this,I=[0],E=[],C=[null],d=[],Et=this.table,u="",vt=0,zt=0,oe=2,Ht=1,ce=d.slice.call(arguments,1),q=Object.create(this.lexer),ut={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(ut.yy[Ct]=this.yy[Ct]);q.setInput(v,ut.yy),ut.yy.lexer=q,ut.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var Ot=q.yylloc;d.push(Ot);var le=q.options&&q.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(tt){I.length=I.length-2*tt,C.length=C.length-tt,d.length=d.length-tt}x.__name(he,"popStack");function Kt(){var tt;return tt=E.pop()||q.lex()||Ht,typeof tt!="number"&&(tt instanceof Array&&(E=tt,tt=E.pop()),tt=A.symbols_[tt]||tt),tt}x.__name(Kt,"lex");for(var J,gt,st,Bt,mt={},It,ot,Ut,Lt;;){if(gt=I[I.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((J===null||typeof J>"u")&&(J=Kt()),st=Et[gt]&&Et[gt][J]),typeof st>"u"||!st.length||!st[0]){var Vt="";Lt=[];for(It in Et[gt])this.terminals_[It]&&It>oe&&Lt.push("'"+this.terminals_[It]+"'");q.showPosition?Vt="Parse error on line "+(vt+1)+`:
|
|
2
2
|
`+q.showPosition()+`
|
|
3
3
|
Expecting `+Lt.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Vt="Parse error on line "+(vt+1)+": Unexpected "+(J==Ht?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Vt,{text:q.match,token:this.terminals_[J]||J,line:q.yylineno,loc:Ot,expected:Lt})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+J);switch(st[0]){case 1:I.push(J),C.push(q.yytext),d.push(q.yylloc),I.push(st[1]),J=null,zt=q.yyleng,u=q.yytext,vt=q.yylineno,Ot=q.yylloc;break;case 2:if(ot=this.productions_[st[1]][1],mt.$=C[C.length-ot],mt._$={first_line:d[d.length-(ot||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(ot||1)].first_column,last_column:d[d.length-1].last_column},le&&(mt._$.range=[d[d.length-(ot||1)].range[0],d[d.length-1].range[1]]),Bt=this.performAction.apply(mt,[u,zt,vt,ut.yy,st[1],C,d].concat(ce)),typeof Bt<"u")return Bt;ot&&(I=I.slice(0,-1*ot*2),C=C.slice(0,-1*ot),d=d.slice(0,-1*ot)),I.push(this.productions_[st[1]][0]),C.push(mt.$),d.push(mt._$),Ut=Et[I[I.length-2]][I[I.length-1]],I.push(Ut);break;case 3:return!0}}return!0},"parse")},ne=(function(){var lt={EOF:1,parseError:x.__name(function(A,I){if(this.yy.parser)this.yy.parser.parseError(A,I);else throw new Error(A)},"parseError"),setInput:x.__name(function(v,A){return this.yy=A||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x.__name(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var A=v.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:x.__name(function(v){var A=v.length,I=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===E.length?this.yylloc.first_column:0)+E[E.length-I.length].length-I[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:x.__name(function(){return this._more=!0,this},"more"),reject:x.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x.__name(function(v){this.unput(this.match.slice(v))},"less"),pastInput:x.__name(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x.__name(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x.__name(function(){var v=this.pastInput(),A=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
|
|
@@ -6,7 +6,7 @@ import { setConfig2 as ke, getConfig2 as st, configureSvgSize as Pe, assignWithD
|
|
|
6
6
|
import { __name as f, log as Q } from "./chunk-AGHRB4JF.es.js";
|
|
7
7
|
import "../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.es.js";
|
|
8
8
|
import "../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.es.js";
|
|
9
|
-
import { d as ne } from "../../../../../../../../../../../_virtual/index.
|
|
9
|
+
import { d as ne } from "../../../../../../../../../../../_virtual/index.es9.js";
|
|
10
10
|
import Mt from "../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.es.js";
|
|
11
11
|
var Ut = (function() {
|
|
12
12
|
var e = /* @__PURE__ */ f(function(pt, v, A, L) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../../../../../../_virtual/index.cjs8.js"),a=require("../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.cjs.js");var i;function d(){if(i)return t.__exports;i=1;var s=t.__exports&&t.__exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t.__exports,"__esModule",{value:!0}),t.__exports.default=l;const f=s(a.__require());function l(e,o){let r=null;if(!e||typeof e!="string")return r;const c=(0,f.default)(e),p=typeof o=="function";return c.forEach(u=>{if(u.type!=="declaration")return;const{property:_,value:n}=u;p?o(_,n,u):n&&(r=r||{},r[_]=n)}),r}return t.__exports}exports.__require=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as r } from "../../../../../../../../../_virtual/index.
|
|
1
|
+
import { __exports as r } from "../../../../../../../../../_virtual/index.es8.js";
|
|
2
2
|
import { __require as p } from "../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js";
|
|
3
3
|
var f;
|
|
4
4
|
function q() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../../../bail@2.0.2/node_modules/bail/index.cjs.js"),w=require("../../../../../../../../../_virtual/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../../../bail@2.0.2/node_modules/bail/index.cjs.js"),w=require("../../../../../../../../../_virtual/index.cjs7.js"),z=require("../../../../is-plain-obj@4.1.0/node_modules/is-plain-obj/index.cjs.js"),C=require("./callable-instance.cjs.js"),S=require("../../../../trough@2.2.0/node_modules/trough/lib/index.cjs.js"),A=require("../../../../vfile@6.0.3/node_modules/vfile/lib/index.cjs.js"),F={}.hasOwnProperty;class m extends C.CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=S.trough()}copy(){const e=new m;let n=-1;for(;++n<this.attachers.length;){const t=this.attachers[n];e.use(...t)}return e.data(w.default(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(x("data",this.frozen),this.namespace[e]=n,this):F.call(this.namespace,e)&&this.namespace[e]||void 0:e?(x("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...t]=this.attachers[this.freezeIndex];if(t[0]===!1)continue;t[0]===!0&&(t[0]=void 0);const i=n.call(e,...t);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=y(e),t=this.parser||this.Parser;return g("parse",t),t(String(n),n)}process(e,n){const t=this;return this.freeze(),g("process",this.parser||this.Parser),b("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,h){const u=y(e),l=t.parse(u);t.run(l,u,function(o,c,f){if(o||!c||!f)return s(o);const p=c,d=t.stringify(p,f);D(d)?f.value=d:f.result=d,s(o,f)});function s(o,c){o||!c?h(o):a?a(c):n(void 0,c)}}}processSync(e){let n=!1,t;return this.freeze(),g("processSync",this.parser||this.Parser),b("processSync",this.compiler||this.Compiler),this.process(e,i),T("processSync","process",n),t;function i(a,h){n=!0,P.bail(a),t=h}}run(e,n,t){I(e),this.freeze();const i=this.transformers;return!t&&typeof n=="function"&&(t=n,n=void 0),t?a(void 0,t):new Promise(a);function a(h,u){const l=y(n);i.run(e,l,s);function s(o,c,f){const p=c||e;o?u(o):h?h(p):t(void 0,p,f)}}}runSync(e,n){let t=!1,i;return this.run(e,n,a),T("runSync","run",t),i;function a(h,u){P.bail(h),i=u,t=!0}}stringify(e,n){this.freeze();const t=y(n),i=this.compiler||this.Compiler;return b("stringify",i),I(e),i(e,t)}use(e,...n){const t=this.attachers,i=this.namespace;if(x("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?u(e):h(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(s){if(typeof s=="function")l(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[o,...c]=s;l(o,c)}else h(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function h(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(s.plugins),s.settings&&(i.settings=w.default(!0,i.settings,s.settings))}function u(s){let o=-1;if(s!=null)if(Array.isArray(s))for(;++o<s.length;){const c=s[o];a(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function l(s,o){let c=-1,f=-1;for(;++c<t.length;)if(t[c][0]===s){f=c;break}if(f===-1)t.push([s,...o]);else if(o.length>0){let[p,...d]=o;const E=t[f][1];z.default(E)&&z.default(p)&&(p=w.default(!0,E,p)),t[f]=[s,p,...d]}}}}const q=new m().freeze();function g(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `parser`")}function b(r,e){if(typeof e!="function")throw new TypeError("Cannot `"+r+"` without `compiler`")}function x(r,e){if(e)throw new Error("Cannot call `"+r+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I(r){if(!z.default(r)||typeof r.type!="string")throw new TypeError("Expected node, got `"+r+"`")}function T(r,e,n){if(!n)throw new Error("`"+r+"` finished async. Use `"+e+"` instead")}function y(r){return j(r)?r:new A.VFile(r)}function j(r){return!!(r&&typeof r=="object"&&"message"in r&&"messages"in r)}function D(r){return typeof r=="string"||L(r)}function L(r){return!!(r&&typeof r=="object"&&"byteLength"in r&&"byteOffset"in r)}exports.Processor=m;exports.unified=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bail as P } from "../../../../bail@2.0.2/node_modules/bail/index.es.js";
|
|
2
|
-
import y from "../../../../../../../../../_virtual/index.
|
|
2
|
+
import y from "../../../../../../../../../_virtual/index.es7.js";
|
|
3
3
|
import z from "../../../../is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js";
|
|
4
4
|
import { CallableInstance as C } from "./callable-instance.es.js";
|
|
5
5
|
import { trough as A } from "../../../../trough@2.2.0/node_modules/trough/lib/index.es.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),r=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-js@1.1.18/node_modules/style-to-js/cjs/index.cjs.js");var t=r.__require();const o=e.getDefaultExportFromCjs(t);exports.default=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),t=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.cjs.js");var r=t.__require();const o=e.getDefaultExportFromCjs(r);exports.default=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs8.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js");var r=e.__require();exports.distExports=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs9.js.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as o } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-js@1.1.18/node_modules/style-to-js/cjs/index.es.js";
|
|
3
|
-
var t = o();
|
|
4
|
-
const a = /* @__PURE__ */ r(t);
|
|
1
|
+
var s = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
s as __module
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=index.es5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var t =
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.es.js";
|
|
2
|
+
import { __require as o } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-js@1.1.18/node_modules/style-to-js/cjs/index.es.js";
|
|
3
|
+
var t = o();
|
|
4
|
+
const a = /* @__PURE__ */ r(t);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.es.js";
|
|
2
|
+
import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js";
|
|
3
|
+
var t = r();
|
|
4
|
+
const a = /* @__PURE__ */ e(t);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
a as default
|
|
4
7
|
};
|
|
5
8
|
//# sourceMappingURL=index.es7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es7.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var i = r();
|
|
1
|
+
var r = {};
|
|
3
2
|
export {
|
|
4
|
-
|
|
3
|
+
r as __exports
|
|
5
4
|
};
|
|
6
5
|
//# sourceMappingURL=index.es8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es8.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js";
|
|
2
|
+
var i = r();
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
i as d
|
|
4
5
|
};
|
|
5
6
|
//# sourceMappingURL=index.es9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es9.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es9.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
|
15
15
|
</body>
|
|
16
|
-
</html>`),e.close(),T.current=e;const i=e.getElementById("root");if(!i)return;const a=G.createRoot(i);M.current=a;let w=!1;const y=(l,f)=>{const o=l.trim().toLowerCase();if(!o)return null;const c=Number.parseFloat(o);return Number.isNaN(c)?null:/(dvh|svh|lvh|vh)$/i.test(o)?c/100*f:o.endsWith("px")||/^[0-9.]+$/.test(o)?c:null},H=(l,f)=>{if(!l.trim())return null;const o=D(l);if(o)return y(o,f);const
|
|
16
|
+
</html>`),e.close(),T.current=e;const i=e.getElementById("root");if(!i)return;const a=G.createRoot(i);M.current=a;let w=!1;const y=(l,f)=>{const o=l.trim().toLowerCase();if(!o)return null;const c=Number.parseFloat(o);return Number.isNaN(c)?null:/(dvh|svh|lvh|vh)$/i.test(o)?c/100*f:o.endsWith("px")||/^[0-9.]+$/.test(o)?c:null},H=(l,f)=>{if(!l.trim())return null;const o=D(l);if(o)return y(o,f);const b=O(l).find(k=>/^h-\[[0-9.]+px\]$/i.test(k));if(!b)return null;const g=b.match(/^h-\[([0-9.]+)px\]$/i);if(!g)return null;const p=Number.parseFloat(g[1]);return Number.isNaN(p)?null:p},m=()=>{if(!x.current||!e.body)return null;const f=e.body.querySelector(".sandbox-wrapper")?.firstElementChild;if(!f)return null;const o=Array.from(f.children);if(o.length!==1)return null;const c=o[0],b=c.style.height||c.getAttribute("height"),g=x.current.ownerDocument?.documentElement?.clientHeight||window.innerHeight,p=b?y(b,g):null;if(p!==null)return Math.ceil(p);const k=H(c.getAttribute("class")||"",g);return k!==null?Math.ceil(k):null},F=()=>{if(!x.current||!e.body)return;const l=e.body.getBoundingClientRect(),f=e.documentElement?.getBoundingClientRect(),o=l.height,c=f?.height||0,b=Math.max(o,c),g=m(),p=Math.max(200,g??Math.ceil(b));I(p)},E=()=>{requestAnimationFrame(()=>{w||F()})};q.current=E,F(),E(),X().then(l=>{w||(l(e),E())}).catch(()=>{w||E()});const $=new ResizeObserver(()=>F());return $.observe(e.body),i&&$.observe(i),()=>{w=!0,$.disconnect(),setTimeout(()=>{a.unmount(),M.current=null,T.current=null,q.current=()=>{}},0)}},[]),n.useEffect(()=>{const t=()=>{_(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[]);const Y=()=>{const t=N.current||x.current;if(t){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}t.requestFullscreen&&t.requestFullscreen().catch(()=>{})}};n.useEffect(()=>{const t=M.current;t&&(t.render(R.jsxRuntimeExports.jsx(J.default,{html:d,loadingText:v,styleLoadingText:C,scriptLoadingText:A,fullScreenButtonText:j,hideFullScreen:B,resetToken:S,hasRootVhHeight:V,mode:u})),requestAnimationFrame(()=>q.current?.()))},[r,d,v,C,A,j,S,u]);const Z=["w-full relative content-render-iframe-sandbox",U?"h-full overflow-auto flex flex-col":"aspect-[16/9] overflow-hidden flex items-center justify-center"].filter(Boolean).join(" ");return R.jsxRuntimeExports.jsxs("div",{ref:N,"data-root-vh":V?"true":"false",className:Z,children:[!B&&R.jsxRuntimeExports.jsx("button",{type:"button",onClick:Y,className:"absolute top-2 right-2 z-50 p-1.5 bg-black/75 text-white rounded-md cursor-pointer",children:W?"退出全屏":j||"全屏浏览"}),u==="blackboard"&&s==="markdown"?R.jsxRuntimeExports.jsx(Q.default,{content:r}):R.jsxRuntimeExports.jsx("iframe",{ref:x,sandbox:"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",allow:"fullscreen",allowFullScreen:!0,className:[h,"w-full h-full mx-auto my-auto block"].filter(Boolean).join(" "),style:{height:"100%",margin:"auto"}})]})};exports.default=ee;
|
|
17
17
|
//# sourceMappingURL=IframeSandbox.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeSandbox.cjs.js","sources":["../../../src/components/ContentRender/IframeSandbox.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport SandboxApp from \"./SandboxApp\";\nimport { splitContentSegments } from \"./utils/split-content\";\nimport ContentRender from \"./ContentRender\";\n// Lazy-load iframe vendor libraries and inject them into the sandbox document.\nconst loadBlackboardVendor = () =>\n import(\"./blackboard-vendor\").then((m) => m.injectBlackboardLibraries);\nexport interface IframeSandboxProps {\n content: string;\n className?: string;\n loadingText?: string;\n styleLoadingText?: string;\n scriptLoadingText?: string;\n fullScreenButtonText?: string;\n hideFullScreen?: boolean;\n mode?: \"content\" | \"blackboard\";\n type: \"sandbox\" | \"markdown\";\n}\n\nconst normalizeTailwindHeightTokens = (className: string) =>\n className\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => token.split(\":\").pop() || token);\n\nconst parseViewportHeightCss = (value: string) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const matched = normalized.match(/^([0-9.]+)(vh|dvh|svh|lvh)$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst extractViewportHeightFromTailwindClass = (className: string) => {\n if (!className.trim()) return null;\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n if (\n normalizedTokens.includes(\"h-screen\") ||\n normalizedTokens.includes(\"h-dvh\")\n ) {\n return \"100dvh\";\n }\n if (normalizedTokens.includes(\"h-svh\")) {\n return \"100svh\";\n }\n if (normalizedTokens.includes(\"h-lvh\")) {\n return \"100lvh\";\n }\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+(vh|dvh|svh|lvh)\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)(vh|dvh|svh|lvh)\\]$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst IframeSandbox: React.FC<IframeSandboxProps> = ({\n content,\n type,\n className,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n hideFullScreen = false,\n mode = \"content\",\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const rootRef = useRef<Root | null>(null);\n const docRef = useRef<Document | null>(null);\n const updateHeightRef = useRef<() => void>(() => {});\n const [, setHeight] = useState(480);\n const [resetToken, setResetToken] = useState(0);\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isBlackboardMode = mode === \"blackboard\";\n const prevHtmlRef = useRef<string>(\"\");\n const htmlContent = React.useMemo(() => {\n const segments = splitContentSegments(content);\n // console.log('segments=====', segments);\n const sandboxSegments = segments.filter((seg) => seg.type === \"sandbox\");\n const sandboxContent =\n mode === \"blackboard\"\n ? sandboxSegments[sandboxSegments.length - 1]?.value || \"\"\n : sandboxSegments.map((seg) => seg.value).join(\"\\n\");\n return sandboxContent || \"\";\n }, [content, mode]);\n const rootViewportHeightCss = React.useMemo(() => {\n const normalized = htmlContent.trim();\n if (!normalized) return null;\n const rootMatch = normalized.match(/^<([a-zA-Z][\\w:-]*)(\\s[^>]*?)?>/);\n if (!rootMatch) return null;\n const attrs = rootMatch[2] || \"\";\n const heightAttrMatch = attrs.match(/\\bheight\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (heightAttrMatch) {\n const explicitHeightCss = parseViewportHeightCss(heightAttrMatch[1]);\n if (explicitHeightCss) return explicitHeightCss;\n }\n const styleAttrMatch = attrs.match(/\\bstyle\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n const styleHeightMatch = styleAttrMatch?.match(\n /\\bheight\\s*:\\s*([^;]+)/i\n )?.[1];\n if (styleHeightMatch) {\n const styleHeightCss = parseViewportHeightCss(styleHeightMatch);\n if (styleHeightCss) return styleHeightCss;\n }\n const classAttrMatch = attrs.match(/\\bclass\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n if (!classAttrMatch) return null;\n return extractViewportHeightFromTailwindClass(classAttrMatch);\n }, [htmlContent]);\n const hasRootVhHeight = Boolean(rootViewportHeightCss);\n useEffect(() => {\n if (mode !== \"blackboard\") {\n prevHtmlRef.current = htmlContent;\n return;\n }\n const prev = prevHtmlRef.current;\n const isContinuation = prev && htmlContent.startsWith(prev);\n if (!isContinuation && prev) {\n setResetToken((token) => token + 1);\n }\n prevHtmlRef.current = htmlContent;\n }, [htmlContent, mode]);\n\n useEffect(() => {\n const iframe = iframeRef.current;\n if (!iframe) return undefined;\n\n const doc = iframe.contentDocument;\n if (!doc) return undefined;\n\n doc.open();\n doc.write(`<!DOCTYPE html>\n<html${mode === \"blackboard\" ? ' style=\"height: 100%;\"' : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html, body, #root { width: 100%; height: 100%; }\n html, body { margin: 0; padding: 0; overflow: auto; }\n *, *::before, *::after { box-sizing: border-box; }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>`);\n doc.close();\n\n docRef.current = doc;\n\n const rootEl = doc.getElementById(\"root\");\n if (!rootEl) return undefined;\n\n const root = createRoot(rootEl);\n rootRef.current = root;\n let isDestroyed = false;\n\n const parseExplicitHeight = (\n value: string,\n parentViewportHeight: number\n ) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const numeric = Number.parseFloat(normalized);\n if (Number.isNaN(numeric)) return null;\n if (/(dvh|svh|lvh|vh)$/i.test(normalized)) {\n return (numeric / 100) * parentViewportHeight;\n }\n if (normalized.endsWith(\"px\") || /^[0-9.]+$/.test(normalized)) {\n return numeric;\n }\n return null;\n };\n const parseTailwindHeightClass = (\n className: string,\n parentViewportHeight: number\n ) => {\n if (!className.trim()) return null;\n const viewportHeightCss =\n extractViewportHeightFromTailwindClass(className);\n if (viewportHeightCss) {\n return parseExplicitHeight(viewportHeightCss, parentViewportHeight);\n }\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+px\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)px\\]$/i);\n if (!matched) return null;\n const numeric = Number.parseFloat(matched[1]);\n if (Number.isNaN(numeric)) return null;\n return numeric;\n };\n\n const resolveExplicitHeight = () => {\n if (!iframeRef.current || !doc.body) return null;\n const wrapper = doc.body.querySelector(\n \".sandbox-wrapper\"\n ) as HTMLElement | null;\n const container = wrapper?.firstElementChild as HTMLElement | null;\n if (!container) return null;\n const elements = Array.from(container.children) as HTMLElement[];\n if (elements.length !== 1) return null;\n const target = elements[0];\n const heightValue = target.style.height || target.getAttribute(\"height\");\n const parentViewportHeight =\n iframeRef.current.ownerDocument?.documentElement?.clientHeight ||\n window.innerHeight;\n const parsed = heightValue\n ? parseExplicitHeight(heightValue, parentViewportHeight)\n : null;\n if (parsed !== null) {\n return Math.ceil(parsed);\n }\n const classHeight = parseTailwindHeightClass(\n target.getAttribute(\"class\") || \"\",\n parentViewportHeight\n );\n return classHeight !== null ? Math.ceil(classHeight) : null;\n };\n\n const updateHeight = () => {\n if (!iframeRef.current || !doc.body) return;\n const bodyRect = doc.body.getBoundingClientRect();\n const htmlRect = doc.documentElement?.getBoundingClientRect();\n const bodyHeight = bodyRect.height;\n const htmlHeight = htmlRect?.height || 0;\n const contentHeight = Math.max(bodyHeight, htmlHeight);\n const explicitHeight = resolveExplicitHeight();\n const nextHeight = Math.max(\n 200,\n explicitHeight ?? Math.ceil(contentHeight)\n );\n setHeight(nextHeight);\n };\n const scheduleHeightUpdate = () => {\n requestAnimationFrame(() => {\n if (isDestroyed) return;\n updateHeight();\n });\n };\n updateHeightRef.current = scheduleHeightUpdate;\n\n updateHeight();\n scheduleHeightUpdate();\n\n // Inject Tailwind/DaisyUI/GSAP into iframe for all sandbox modes.\n // Dynamic import keeps ~3.3 MB of vendor libs out of the main bundle.\n // Tailwind's MutationObserver ensures styles apply even if content renders first.\n loadBlackboardVendor()\n .then((inject) => {\n if (isDestroyed) return;\n inject(doc);\n scheduleHeightUpdate();\n })\n .catch(() => {\n if (isDestroyed) return;\n scheduleHeightUpdate();\n });\n\n const resizeObserver = new ResizeObserver(() => updateHeight());\n resizeObserver.observe(doc.body);\n if (rootEl) {\n resizeObserver.observe(rootEl);\n }\n\n return () => {\n isDestroyed = true;\n resizeObserver.disconnect();\n // Defer unmount to avoid React warning when parent is mid-render\n setTimeout(() => {\n root.unmount();\n rootRef.current = null;\n docRef.current = null;\n updateHeightRef.current = () => {};\n }, 0);\n };\n }, []);\n\n useEffect(() => {\n const onFullscreenChange = () => {\n setIsFullscreen(Boolean(document.fullscreenElement));\n };\n document.addEventListener(\"fullscreenchange\", onFullscreenChange);\n return () =>\n document.removeEventListener(\"fullscreenchange\", onFullscreenChange);\n }, []);\n\n const toggleFullscreen = () => {\n const target = containerRef.current || iframeRef.current;\n if (!target) return;\n if (document.fullscreenElement) {\n document.exitFullscreen().catch(() => {});\n return;\n }\n if (target.requestFullscreen) {\n target.requestFullscreen().catch(() => {});\n }\n };\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n root.render(\n <SandboxApp\n html={htmlContent}\n loadingText={loadingText}\n styleLoadingText={styleLoadingText}\n scriptLoadingText={scriptLoadingText}\n fullScreenButtonText={fullScreenButtonText}\n hideFullScreen={hideFullScreen}\n resetToken={resetToken}\n hasRootVhHeight={hasRootVhHeight}\n mode={mode}\n />\n );\n requestAnimationFrame(() => updateHeightRef.current?.());\n }, [\n content,\n htmlContent,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n resetToken,\n mode,\n ]);\n const containerClassName = [\n \"w-full relative content-render-iframe-sandbox\",\n isBlackboardMode\n ? \"h-full overflow-auto flex flex-col\"\n : \"aspect-[16/9] overflow-hidden flex items-center justify-center\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div\n ref={containerRef}\n data-root-vh={hasRootVhHeight ? \"true\" : \"false\"}\n className={containerClassName}\n >\n {!hideFullScreen && (\n <button\n type=\"button\"\n onClick={toggleFullscreen}\n className={\n \"absolute top-2 right-2 z-50 p-1.5 bg-black/75 text-white rounded-md cursor-pointer\"\n }\n >\n {isFullscreen ? \"退出全屏\" : fullScreenButtonText || \"全屏浏览\"}\n </button>\n )}\n {mode === \"blackboard\" && type === \"markdown\" ? (\n <ContentRender content={content} />\n ) : (\n <iframe\n ref={iframeRef}\n sandbox=\"allow-scripts allow-same-origin\"\n allow=\"fullscreen\"\n allowFullScreen\n className={[className, \"w-full h-full mx-auto my-auto block\"]\n .filter(Boolean)\n .join(\" \")}\n style={{\n height: \"100%\",\n margin: \"auto\",\n }}\n />\n )}\n </div>\n );\n};\n\nexport default IframeSandbox;\n"],"names":["loadBlackboardVendor","m","normalizeTailwindHeightTokens","className","token","parseViewportHeightCss","value","normalized","matched","extractViewportHeightFromTailwindClass","normalizedTokens","arbitraryToken","IframeSandbox","content","type","loadingText","styleLoadingText","scriptLoadingText","fullScreenButtonText","hideFullScreen","mode","containerRef","useRef","iframeRef","rootRef","docRef","updateHeightRef","setHeight","useState","resetToken","setResetToken","isFullscreen","setIsFullscreen","isBlackboardMode","prevHtmlRef","htmlContent","React","sandboxSegments","splitContentSegments","seg","hasRootVhHeight","rootMatch","attrs","heightAttrMatch","explicitHeightCss","styleHeightMatch","styleHeightCss","classAttrMatch","useEffect","prev","iframe","doc","rootEl","root","createRoot","isDestroyed","parseExplicitHeight","parentViewportHeight","numeric","parseTailwindHeightClass","viewportHeightCss","resolveExplicitHeight","container","elements","target","heightValue","parsed","classHeight","updateHeight","bodyRect","htmlRect","bodyHeight","htmlHeight","contentHeight","explicitHeight","nextHeight","scheduleHeightUpdate","inject","resizeObserver","onFullscreenChange","toggleFullscreen","jsx","SandboxApp","containerClassName","jsxs","ContentRender"],"mappings":"iUAMMA,EAAuB,IAC3B,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,4BAAqB,CAAA,EAAE,KAAMC,GAAMA,EAAE,yBAAyB,EAajEC,EAAiCC,GACrCA,EACG,MAAM,KAAK,EACX,OAAO,OAAO,EACd,IAAKC,GAAUA,EAAM,MAAM,GAAG,EAAE,IAAA,GAASA,CAAK,EAE7CC,EAA0BC,GAAkB,CAChD,MAAMC,EAAaD,EAAM,KAAA,EAAO,YAAA,EAChC,GAAI,CAACC,EAAY,OAAO,KACxB,MAAMC,EAAUD,EAAW,MAAM,8BAA8B,EAC/D,OAAKC,EACE,GAAGA,EAAQ,CAAC,CAAC,GAAGA,EAAQ,CAAC,EAAE,YAAA,CAAa,GAD1B,IAEvB,EAEMC,EAA0CN,GAAsB,CACpE,GAAI,CAACA,EAAU,KAAA,EAAQ,OAAO,KAC9B,MAAMO,EAAmBR,EAA8BC,CAAS,EAChE,GACEO,EAAiB,SAAS,UAAU,GACpCA,EAAiB,SAAS,OAAO,EAEjC,MAAO,SAET,GAAIA,EAAiB,SAAS,OAAO,EACnC,MAAO,SAET,GAAIA,EAAiB,SAAS,OAAO,EACnC,MAAO,SAET,MAAMC,EAAiBD,EAAiB,KAAMN,GAC5C,mCAAmC,KAAKA,CAAK,CAAA,EAE/C,GAAI,CAACO,EAAgB,OAAO,KAC5B,MAAMH,EAAUG,EAAe,MAAM,oCAAoC,EACzE,OAAKH,EACE,GAAGA,EAAQ,CAAC,CAAC,GAAGA,EAAQ,CAAC,EAAE,YAAA,CAAa,GAD1B,IAEvB,EAEMI,GAA8C,CAAC,CACnD,QAAAC,EACA,KAAAC,EACA,UAAAX,EACA,YAAAY,E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A,EAAO,mBACTA,EAAO,oBAAoB,MAAM,IAAM,CAAC,CAAC,EAE7C,EAEAhB,EAAAA,UAAU,IAAM,CACd,MAAMK,EAAO7B,EAAQ,QAChB6B,IAELA,EAAK,OACH4B,EAAAA,kBAAAA,IAACC,EAAAA,QAAA,CACC,KAAM/C,EACN,YAAApB,EACA,iBAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,eAAAC,EACA,WAAAU,EACA,gBAAAW,EACA,KAAApB,CAAA,CAAA,CACF,EAEF,sBAAsB,IAAMM,EAAgB,WAAW,EACzD,EAAG,CACDb,EACAsB,EACApB,EACAC,EACAC,EACAC,EACAW,EACAT,CAAA,CACD,EACD,MAAM+D,EAAqB,CACzB,gDACAlD,EACI,qCACA,gEAAA,EAEH,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEmD,EAAAA,kBAAAA,KAAC,MAAA,CACC,IAAK/D,EACL,eAAcmB,EAAkB,OAAS,QACzC,UAAW2C,EAEV,SAAA,CAAA,CAAChE,GACA8D,EAAAA,kBAAAA,IAAC,SAAA,CACC,KAAK,SACL,QAASD,EACT,UACE,qFAGD,SAAAjD,EAAe,OAASb,GAAwB,MAAA,CAAA,EAGpDE,IAAS,cAAgBN,IAAS,WACjCmE,EAAAA,kBAAAA,IAACI,UAAA,CAAc,QAAAxE,EAAkB,EAEjCoE,EAAAA,kBAAAA,IAAC,SAAA,CACC,IAAK1D,EACL,QAAQ,kCACR,MAAM,aACN,gBAAe,GACf,UAAW,CAACpB,EAAW,qCAAqC,EACzD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,CACL,OAAQ,OACR,OAAQ,MAAA,CACV,CAAA,CACF,CAAA,CAAA,CAIR"}
|
|
1
|
+
{"version":3,"file":"IframeSandbox.cjs.js","sources":["../../../src/components/ContentRender/IframeSandbox.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport SandboxApp from \"./SandboxApp\";\nimport { splitContentSegments } from \"./utils/split-content\";\nimport ContentRender from \"./ContentRender\";\n// Lazy-load iframe vendor libraries and inject them into the sandbox document.\nconst loadBlackboardVendor = () =>\n import(\"./blackboard-vendor\").then((m) => m.injectBlackboardLibraries);\nexport interface IframeSandboxProps {\n content: string;\n className?: string;\n loadingText?: string;\n styleLoadingText?: string;\n scriptLoadingText?: string;\n fullScreenButtonText?: string;\n hideFullScreen?: boolean;\n mode?: \"content\" | \"blackboard\";\n type: \"sandbox\" | \"markdown\";\n}\n\nconst normalizeTailwindHeightTokens = (className: string) =>\n className\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => token.split(\":\").pop() || token);\n\nconst parseViewportHeightCss = (value: string) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const matched = normalized.match(/^([0-9.]+)(vh|dvh|svh|lvh)$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst extractViewportHeightFromTailwindClass = (className: string) => {\n if (!className.trim()) return null;\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n if (\n normalizedTokens.includes(\"h-screen\") ||\n normalizedTokens.includes(\"h-dvh\")\n ) {\n return \"100dvh\";\n }\n if (normalizedTokens.includes(\"h-svh\")) {\n return \"100svh\";\n }\n if (normalizedTokens.includes(\"h-lvh\")) {\n return \"100lvh\";\n }\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+(vh|dvh|svh|lvh)\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)(vh|dvh|svh|lvh)\\]$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst IframeSandbox: React.FC<IframeSandboxProps> = ({\n content,\n type,\n className,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n hideFullScreen = false,\n mode = \"content\",\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const rootRef = useRef<Root | null>(null);\n const docRef = useRef<Document | null>(null);\n const updateHeightRef = useRef<() => void>(() => {});\n const [, setHeight] = useState(480);\n const [resetToken, setResetToken] = useState(0);\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isBlackboardMode = mode === \"blackboard\";\n const prevHtmlRef = useRef<string>(\"\");\n const htmlContent = React.useMemo(() => {\n const segments = splitContentSegments(content);\n // console.log('segments=====', segments);\n const sandboxSegments = segments.filter((seg) => seg.type === \"sandbox\");\n const sandboxContent =\n mode === \"blackboard\"\n ? sandboxSegments[sandboxSegments.length - 1]?.value || \"\"\n : sandboxSegments.map((seg) => seg.value).join(\"\\n\");\n return sandboxContent || \"\";\n }, [content, mode]);\n const rootViewportHeightCss = React.useMemo(() => {\n const normalized = htmlContent.trim();\n if (!normalized) return null;\n const rootMatch = normalized.match(/^<([a-zA-Z][\\w:-]*)(\\s[^>]*?)?>/);\n if (!rootMatch) return null;\n const attrs = rootMatch[2] || \"\";\n const heightAttrMatch = attrs.match(/\\bheight\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (heightAttrMatch) {\n const explicitHeightCss = parseViewportHeightCss(heightAttrMatch[1]);\n if (explicitHeightCss) return explicitHeightCss;\n }\n const styleAttrMatch = attrs.match(/\\bstyle\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n const styleHeightMatch = styleAttrMatch?.match(\n /\\bheight\\s*:\\s*([^;]+)/i\n )?.[1];\n if (styleHeightMatch) {\n const styleHeightCss = parseViewportHeightCss(styleHeightMatch);\n if (styleHeightCss) return styleHeightCss;\n }\n const classAttrMatch = attrs.match(/\\bclass\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n if (!classAttrMatch) return null;\n return extractViewportHeightFromTailwindClass(classAttrMatch);\n }, [htmlContent]);\n const hasRootVhHeight = Boolean(rootViewportHeightCss);\n useEffect(() => {\n if (mode !== \"blackboard\") {\n prevHtmlRef.current = htmlContent;\n return;\n }\n const prev = prevHtmlRef.current;\n const isContinuation = prev && htmlContent.startsWith(prev);\n if (!isContinuation && prev) {\n setResetToken((token) => token + 1);\n }\n prevHtmlRef.current = htmlContent;\n }, [htmlContent, mode]);\n\n useEffect(() => {\n const iframe = iframeRef.current;\n if (!iframe) return undefined;\n\n const doc = iframe.contentDocument;\n if (!doc) return undefined;\n\n doc.open();\n doc.write(`<!DOCTYPE html>\n<html${mode === \"blackboard\" ? ' style=\"height: 100%;\"' : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html, body, #root { width: 100%; height: 100%; }\n html, body { margin: 0; padding: 0; overflow: auto; }\n *, *::before, *::after { box-sizing: border-box; }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>`);\n doc.close();\n\n docRef.current = doc;\n\n const rootEl = doc.getElementById(\"root\");\n if (!rootEl) return undefined;\n\n const root = createRoot(rootEl);\n rootRef.current = root;\n let isDestroyed = false;\n\n const parseExplicitHeight = (\n value: string,\n parentViewportHeight: number\n ) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const numeric = Number.parseFloat(normalized);\n if (Number.isNaN(numeric)) return null;\n if (/(dvh|svh|lvh|vh)$/i.test(normalized)) {\n return (numeric / 100) * parentViewportHeight;\n }\n if (normalized.endsWith(\"px\") || /^[0-9.]+$/.test(normalized)) {\n return numeric;\n }\n return null;\n };\n const parseTailwindHeightClass = (\n className: string,\n parentViewportHeight: number\n ) => {\n if (!className.trim()) return null;\n const viewportHeightCss =\n extractViewportHeightFromTailwindClass(className);\n if (viewportHeightCss) {\n return parseExplicitHeight(viewportHeightCss, parentViewportHeight);\n }\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+px\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)px\\]$/i);\n if (!matched) return null;\n const numeric = Number.parseFloat(matched[1]);\n if (Number.isNaN(numeric)) return null;\n return numeric;\n };\n\n const resolveExplicitHeight = () => {\n if (!iframeRef.current || !doc.body) return null;\n const wrapper = doc.body.querySelector(\n \".sandbox-wrapper\"\n ) as HTMLElement | null;\n const container = wrapper?.firstElementChild as HTMLElement | null;\n if (!container) return null;\n const elements = Array.from(container.children) as HTMLElement[];\n if (elements.length !== 1) return null;\n const target = elements[0];\n const heightValue = target.style.height || target.getAttribute(\"height\");\n const parentViewportHeight =\n iframeRef.current.ownerDocument?.documentElement?.clientHeight ||\n window.innerHeight;\n const parsed = heightValue\n ? parseExplicitHeight(heightValue, parentViewportHeight)\n : null;\n if (parsed !== null) {\n return Math.ceil(parsed);\n }\n const classHeight = parseTailwindHeightClass(\n target.getAttribute(\"class\") || \"\",\n parentViewportHeight\n );\n return classHeight !== null ? Math.ceil(classHeight) : null;\n };\n\n const updateHeight = () => {\n if (!iframeRef.current || !doc.body) return;\n const bodyRect = doc.body.getBoundingClientRect();\n const htmlRect = doc.documentElement?.getBoundingClientRect();\n const bodyHeight = bodyRect.height;\n const htmlHeight = htmlRect?.height || 0;\n const contentHeight = Math.max(bodyHeight, htmlHeight);\n const explicitHeight = resolveExplicitHeight();\n const nextHeight = Math.max(\n 200,\n explicitHeight ?? Math.ceil(contentHeight)\n );\n setHeight(nextHeight);\n };\n const scheduleHeightUpdate = () => {\n requestAnimationFrame(() => {\n if (isDestroyed) return;\n updateHeight();\n });\n };\n updateHeightRef.current = scheduleHeightUpdate;\n\n updateHeight();\n scheduleHeightUpdate();\n\n // Inject Tailwind/DaisyUI/GSAP into iframe for all sandbox modes.\n // Dynamic import keeps ~3.3 MB of vendor libs out of the main bundle.\n // Tailwind's MutationObserver ensures styles apply even if content renders first.\n loadBlackboardVendor()\n .then((inject) => {\n if (isDestroyed) return;\n inject(doc);\n scheduleHeightUpdate();\n })\n .catch(() => {\n if (isDestroyed) return;\n scheduleHeightUpdate();\n });\n\n const resizeObserver = new ResizeObserver(() => updateHeight());\n resizeObserver.observe(doc.body);\n if (rootEl) {\n resizeObserver.observe(rootEl);\n }\n\n return () => {\n isDestroyed = true;\n resizeObserver.disconnect();\n // Defer unmount to avoid React warning when parent is mid-render\n setTimeout(() => {\n root.unmount();\n rootRef.current = null;\n docRef.current = null;\n updateHeightRef.current = () => {};\n }, 0);\n };\n }, []);\n\n useEffect(() => {\n const onFullscreenChange = () => {\n setIsFullscreen(Boolean(document.fullscreenElement));\n };\n document.addEventListener(\"fullscreenchange\", onFullscreenChange);\n return () =>\n document.removeEventListener(\"fullscreenchange\", onFullscreenChange);\n }, []);\n\n const toggleFullscreen = () => {\n const target = containerRef.current || iframeRef.current;\n if (!target) return;\n if (document.fullscreenElement) {\n document.exitFullscreen().catch(() => {});\n return;\n }\n if (target.requestFullscreen) {\n target.requestFullscreen().catch(() => {});\n }\n };\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n root.render(\n <SandboxApp\n html={htmlContent}\n loadingText={loadingText}\n styleLoadingText={styleLoadingText}\n scriptLoadingText={scriptLoadingText}\n fullScreenButtonText={fullScreenButtonText}\n hideFullScreen={hideFullScreen}\n resetToken={resetToken}\n hasRootVhHeight={hasRootVhHeight}\n mode={mode}\n />\n );\n requestAnimationFrame(() => updateHeightRef.current?.());\n }, [\n content,\n htmlContent,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n resetToken,\n mode,\n ]);\n const containerClassName = [\n \"w-full relative content-render-iframe-sandbox\",\n isBlackboardMode\n ? \"h-full overflow-auto flex flex-col\"\n : \"aspect-[16/9] overflow-hidden flex items-center justify-center\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div\n ref={containerRef}\n data-root-vh={hasRootVhHeight ? \"true\" : \"false\"}\n className={containerClassName}\n >\n {!hideFullScreen && (\n <button\n type=\"button\"\n onClick={toggleFullscreen}\n className={\n \"absolute top-2 right-2 z-50 p-1.5 bg-black/75 text-white rounded-md cursor-pointer\"\n }\n >\n {isFullscreen ? \"退出全屏\" : fullScreenButtonText || \"全屏浏览\"}\n </button>\n )}\n {mode === \"blackboard\" && type === \"markdown\" ? (\n <ContentRender content={content} />\n ) : (\n <iframe\n ref={iframeRef}\n sandbox=\"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\"\n allow=\"fullscreen\"\n allowFullScreen\n className={[className, \"w-full h-full mx-auto my-auto block\"]\n .filter(Boolean)\n .join(\" \")}\n style={{\n height: \"100%\",\n margin: \"auto\",\n }}\n />\n )}\n </div>\n );\n};\n\nexport default IframeSandbox;\n"],"names":["loadBlackboardVendor","m","normalizeTailwindHeightTokens","className","token","parseViewportHeightCss","value","normalized","matched","extractViewportHeightFromTailwindClass","normalizedTokens","arbitraryToken","IframeSandbox","content","type","loadingText","styleLoadingText","scriptLoadingText","fullScreenButtonText","hideFullScreen","mode","containerRef","useRef","iframeRef","rootRef","docRef","updateHeightRef","setHeight","useState","resetToken","setResetToken","isFullscreen","setIsFullscreen","isBlackboardMode","prevHtmlRef","htmlContent","React","sandboxSegments","splitContentSegments","seg","hasRootVhHeight","rootMatch","attrs","heightAttrMatch","explicitHeightCss","styleHeightMatch","styleHeightCss","classAttrMatch","useEffect","prev","iframe","doc","rootEl","root","createRoot","isDestroyed","parseExplicitHeight","parentViewportHeight","numeric","parseTailwindHeightClass","viewportHeightCss","resolveExplicitHeight","container","elements","target","heightValue","parsed","classHeight","updateHeight","bodyRect","htmlRect","bodyHeight","htmlHeight","contentHeight","explicitHeight","nextHeight","scheduleHeightUpdate","inject","resizeObserver","onFullscreenChange","toggleFullscreen","jsx","SandboxApp","containerClassName","jsxs","ContentRender"],"mappings":"iUAMMA,EAAuB,IAC3B,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,4BAAqB,CAAA,EAAE,KAAMC,GAAMA,EAAE,yBAAyB,EAajEC,EAAiCC,GACrCA,EACG,MAAM,KAAK,EACX,OAAO,OAAO,EACd,IAAKC,GAAUA,EAAM,MA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C,EACAC,EACAW,EACAT,CAAA,CACD,EACD,MAAM+D,EAAqB,CACzB,gDACAlD,EACI,qCACA,gEAAA,EAEH,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEmD,EAAAA,kBAAAA,KAAC,MAAA,CACC,IAAK/D,EACL,eAAcmB,EAAkB,OAAS,QACzC,UAAW2C,EAEV,SAAA,CAAA,CAAChE,GACA8D,EAAAA,kBAAAA,IAAC,SAAA,CACC,KAAK,SACL,QAASD,EACT,UACE,qFAGD,SAAAjD,EAAe,OAASb,GAAwB,MAAA,CAAA,EAGpDE,IAAS,cAAgBN,IAAS,WACjCmE,EAAAA,kBAAAA,IAACI,UAAA,CAAc,QAAAxE,EAAkB,EAEjCoE,EAAAA,kBAAAA,IAAC,SAAA,CACC,IAAK1D,EACL,QAAQ,8EACR,MAAM,aACN,gBAAe,GACf,UAAW,CAACpB,EAAW,qCAAqC,EACzD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,CACL,OAAQ,OACR,OAAQ,MAAA,CACV,CAAA,CACF,CAAA,CAAA,CAIR"}
|
|
@@ -22,13 +22,13 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
22
22
|
(C) => /^h-\[[0-9.]+(vh|dvh|svh|lvh)\]$/i.test(C)
|
|
23
23
|
);
|
|
24
24
|
if (!u) return null;
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const g = u.match(/^h-\[([0-9.]+)(vh|dvh|svh|lvh)\]$/i);
|
|
26
|
+
return g ? `${g[1]}${g[2].toLowerCase()}` : null;
|
|
27
27
|
}, ut = ({
|
|
28
28
|
content: n,
|
|
29
29
|
type: r,
|
|
30
30
|
className: u,
|
|
31
|
-
loadingText:
|
|
31
|
+
loadingText: g,
|
|
32
32
|
styleLoadingText: C,
|
|
33
33
|
scriptLoadingText: T,
|
|
34
34
|
fullScreenButtonText: j,
|
|
@@ -106,9 +106,9 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
106
106
|
(E) => /^h-\[[0-9.]+px\]$/i.test(E)
|
|
107
107
|
);
|
|
108
108
|
if (!f) return null;
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
111
|
-
const b = Number.parseFloat(
|
|
109
|
+
const p = f.match(/^h-\[([0-9.]+)px\]$/i);
|
|
110
|
+
if (!p) return null;
|
|
111
|
+
const b = Number.parseFloat(p[1]);
|
|
112
112
|
return Number.isNaN(b) ? null : b;
|
|
113
113
|
}, m = () => {
|
|
114
114
|
if (!v.current || !t.body) return null;
|
|
@@ -118,19 +118,19 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
118
118
|
if (!d) return null;
|
|
119
119
|
const o = Array.from(d.children);
|
|
120
120
|
if (o.length !== 1) return null;
|
|
121
|
-
const l = o[0], f = l.style.height || l.getAttribute("height"),
|
|
121
|
+
const l = o[0], f = l.style.height || l.getAttribute("height"), p = v.current.ownerDocument?.documentElement?.clientHeight || window.innerHeight, b = f ? y(f, p) : null;
|
|
122
122
|
if (b !== null)
|
|
123
123
|
return Math.ceil(b);
|
|
124
124
|
const E = k(
|
|
125
125
|
l.getAttribute("class") || "",
|
|
126
|
-
|
|
126
|
+
p
|
|
127
127
|
);
|
|
128
128
|
return E !== null ? Math.ceil(E) : null;
|
|
129
129
|
}, A = () => {
|
|
130
130
|
if (!v.current || !t.body) return;
|
|
131
|
-
const i = t.body.getBoundingClientRect(), d = t.documentElement?.getBoundingClientRect(), o = i.height, l = d?.height || 0, f = Math.max(o, l),
|
|
131
|
+
const i = t.body.getBoundingClientRect(), d = t.documentElement?.getBoundingClientRect(), o = i.height, l = d?.height || 0, f = Math.max(o, l), p = m(), b = Math.max(
|
|
132
132
|
200,
|
|
133
|
-
|
|
133
|
+
p ?? Math.ceil(f)
|
|
134
134
|
);
|
|
135
135
|
P(b);
|
|
136
136
|
}, R = () => {
|
|
@@ -175,7 +175,7 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
175
175
|
X,
|
|
176
176
|
{
|
|
177
177
|
html: h,
|
|
178
|
-
loadingText:
|
|
178
|
+
loadingText: g,
|
|
179
179
|
styleLoadingText: C,
|
|
180
180
|
scriptLoadingText: T,
|
|
181
181
|
fullScreenButtonText: j,
|
|
@@ -189,7 +189,7 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
189
189
|
}, [
|
|
190
190
|
n,
|
|
191
191
|
h,
|
|
192
|
-
|
|
192
|
+
g,
|
|
193
193
|
C,
|
|
194
194
|
T,
|
|
195
195
|
j,
|
|
@@ -220,7 +220,7 @@ const nt = () => import("./blackboard-vendor.es.js").then((n) => n.injectBlackbo
|
|
|
220
220
|
"iframe",
|
|
221
221
|
{
|
|
222
222
|
ref: v,
|
|
223
|
-
sandbox: "allow-scripts allow-same-origin",
|
|
223
|
+
sandbox: "allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",
|
|
224
224
|
allow: "fullscreen",
|
|
225
225
|
allowFullScreen: !0,
|
|
226
226
|
className: [u, "w-full h-full mx-auto my-auto block"].filter(Boolean).join(" "),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeSandbox.es.js","sources":["../../../src/components/ContentRender/IframeSandbox.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport SandboxApp from \"./SandboxApp\";\nimport { splitContentSegments } from \"./utils/split-content\";\nimport ContentRender from \"./ContentRender\";\n// Lazy-load iframe vendor libraries and inject them into the sandbox document.\nconst loadBlackboardVendor = () =>\n import(\"./blackboard-vendor\").then((m) => m.injectBlackboardLibraries);\nexport interface IframeSandboxProps {\n content: string;\n className?: string;\n loadingText?: string;\n styleLoadingText?: string;\n scriptLoadingText?: string;\n fullScreenButtonText?: string;\n hideFullScreen?: boolean;\n mode?: \"content\" | \"blackboard\";\n type: \"sandbox\" | \"markdown\";\n}\n\nconst normalizeTailwindHeightTokens = (className: string) =>\n className\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => token.split(\":\").pop() || token);\n\nconst parseViewportHeightCss = (value: string) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const matched = normalized.match(/^([0-9.]+)(vh|dvh|svh|lvh)$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst extractViewportHeightFromTailwindClass = (className: string) => {\n if (!className.trim()) return null;\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n if (\n normalizedTokens.includes(\"h-screen\") ||\n normalizedTokens.includes(\"h-dvh\")\n ) {\n return \"100dvh\";\n }\n if (normalizedTokens.includes(\"h-svh\")) {\n return \"100svh\";\n }\n if (normalizedTokens.includes(\"h-lvh\")) {\n return \"100lvh\";\n }\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+(vh|dvh|svh|lvh)\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)(vh|dvh|svh|lvh)\\]$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst IframeSandbox: React.FC<IframeSandboxProps> = ({\n content,\n type,\n className,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n hideFullScreen = false,\n mode = \"content\",\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const rootRef = useRef<Root | null>(null);\n const docRef = useRef<Document | null>(null);\n const updateHeightRef = useRef<() => void>(() => {});\n const [, setHeight] = useState(480);\n const [resetToken, setResetToken] = useState(0);\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isBlackboardMode = mode === \"blackboard\";\n const prevHtmlRef = useRef<string>(\"\");\n const htmlContent = React.useMemo(() => {\n const segments = splitContentSegments(content);\n // console.log('segments=====', segments);\n const sandboxSegments = segments.filter((seg) => seg.type === \"sandbox\");\n const sandboxContent =\n mode === \"blackboard\"\n ? sandboxSegments[sandboxSegments.length - 1]?.value || \"\"\n : sandboxSegments.map((seg) => seg.value).join(\"\\n\");\n return sandboxContent || \"\";\n }, [content, mode]);\n const rootViewportHeightCss = React.useMemo(() => {\n const normalized = htmlContent.trim();\n if (!normalized) return null;\n const rootMatch = normalized.match(/^<([a-zA-Z][\\w:-]*)(\\s[^>]*?)?>/);\n if (!rootMatch) return null;\n const attrs = rootMatch[2] || \"\";\n const heightAttrMatch = attrs.match(/\\bheight\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (heightAttrMatch) {\n const explicitHeightCss = parseViewportHeightCss(heightAttrMatch[1]);\n if (explicitHeightCss) return explicitHeightCss;\n }\n const styleAttrMatch = attrs.match(/\\bstyle\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n const styleHeightMatch = styleAttrMatch?.match(\n /\\bheight\\s*:\\s*([^;]+)/i\n )?.[1];\n if (styleHeightMatch) {\n const styleHeightCss = parseViewportHeightCss(styleHeightMatch);\n if (styleHeightCss) return styleHeightCss;\n }\n const classAttrMatch = attrs.match(/\\bclass\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n if (!classAttrMatch) return null;\n return extractViewportHeightFromTailwindClass(classAttrMatch);\n }, [htmlContent]);\n const hasRootVhHeight = Boolean(rootViewportHeightCss);\n useEffect(() => {\n if (mode !== \"blackboard\") {\n prevHtmlRef.current = htmlContent;\n return;\n }\n const prev = prevHtmlRef.current;\n const isContinuation = prev && htmlContent.startsWith(prev);\n if (!isContinuation && prev) {\n setResetToken((token) => token + 1);\n }\n prevHtmlRef.current = htmlContent;\n }, [htmlContent, mode]);\n\n useEffect(() => {\n const iframe = iframeRef.current;\n if (!iframe) return undefined;\n\n const doc = iframe.contentDocument;\n if (!doc) return undefined;\n\n doc.open();\n doc.write(`<!DOCTYPE html>\n<html${mode === \"blackboard\" ? ' style=\"height: 100%;\"' : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html, body, #root { width: 100%; height: 100%; }\n html, body { margin: 0; padding: 0; overflow: auto; }\n *, *::before, *::after { box-sizing: border-box; }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>`);\n doc.close();\n\n docRef.current = doc;\n\n const rootEl = doc.getElementById(\"root\");\n if (!rootEl) return undefined;\n\n const root = createRoot(rootEl);\n rootRef.current = root;\n let isDestroyed = false;\n\n const parseExplicitHeight = (\n value: string,\n parentViewportHeight: number\n ) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const numeric = Number.parseFloat(normalized);\n if (Number.isNaN(numeric)) return null;\n if (/(dvh|svh|lvh|vh)$/i.test(normalized)) {\n return (numeric / 100) * parentViewportHeight;\n }\n if (normalized.endsWith(\"px\") || /^[0-9.]+$/.test(normalized)) {\n return numeric;\n }\n return null;\n };\n const parseTailwindHeightClass = (\n className: string,\n parentViewportHeight: number\n ) => {\n if (!className.trim()) return null;\n const viewportHeightCss =\n extractViewportHeightFromTailwindClass(className);\n if (viewportHeightCss) {\n return parseExplicitHeight(viewportHeightCss, parentViewportHeight);\n }\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+px\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)px\\]$/i);\n if (!matched) return null;\n const numeric = Number.parseFloat(matched[1]);\n if (Number.isNaN(numeric)) return null;\n return numeric;\n };\n\n const resolveExplicitHeight = () => {\n if (!iframeRef.current || !doc.body) return null;\n const wrapper = doc.body.querySelector(\n \".sandbox-wrapper\"\n ) as HTMLElement | null;\n const container = wrapper?.firstElementChild as HTMLElement | null;\n if (!container) return null;\n const elements = Array.from(container.children) as HTMLElement[];\n if (elements.length !== 1) return null;\n const target = elements[0];\n const heightValue = target.style.height || target.getAttribute(\"height\");\n const parentViewportHeight =\n iframeRef.current.ownerDocument?.documentElement?.clientHeight ||\n window.innerHeight;\n const parsed = heightValue\n ? parseExplicitHeight(heightValue, parentViewportHeight)\n : null;\n if (parsed !== null) {\n return Math.ceil(parsed);\n }\n const classHeight = parseTailwindHeightClass(\n target.getAttribute(\"class\") || \"\",\n parentViewportHeight\n );\n return classHeight !== null ? Math.ceil(classHeight) : null;\n };\n\n const updateHeight = () => {\n if (!iframeRef.current || !doc.body) return;\n const bodyRect = doc.body.getBoundingClientRect();\n const htmlRect = doc.documentElement?.getBoundingClientRect();\n const bodyHeight = bodyRect.height;\n const htmlHeight = htmlRect?.height || 0;\n const contentHeight = Math.max(bodyHeight, htmlHeight);\n const explicitHeight = resolveExplicitHeight();\n const nextHeight = Math.max(\n 200,\n explicitHeight ?? Math.ceil(contentHeight)\n );\n setHeight(nextHeight);\n };\n const scheduleHeightUpdate = () => {\n requestAnimationFrame(() => {\n if (isDestroyed) return;\n updateHeight();\n });\n };\n updateHeightRef.current = scheduleHeightUpdate;\n\n updateHeight();\n scheduleHeightUpdate();\n\n // Inject Tailwind/DaisyUI/GSAP into iframe for all sandbox modes.\n // Dynamic import keeps ~3.3 MB of vendor libs out of the main bundle.\n // Tailwind's MutationObserver ensures styles apply even if content renders first.\n loadBlackboardVendor()\n .then((inject) => {\n if (isDestroyed) return;\n inject(doc);\n scheduleHeightUpdate();\n })\n .catch(() => {\n if (isDestroyed) return;\n scheduleHeightUpdate();\n });\n\n const resizeObserver = new ResizeObserver(() => updateHeight());\n resizeObserver.observe(doc.body);\n if (rootEl) {\n resizeObserver.observe(rootEl);\n }\n\n return () => {\n isDestroyed = true;\n resizeObserver.disconnect();\n // Defer unmount to avoid React warning when parent is mid-render\n setTimeout(() => {\n root.unmount();\n rootRef.current = null;\n docRef.current = null;\n updateHeightRef.current = () => {};\n }, 0);\n };\n }, []);\n\n useEffect(() => {\n const onFullscreenChange = () => {\n setIsFullscreen(Boolean(document.fullscreenElement));\n };\n document.addEventListener(\"fullscreenchange\", onFullscreenChange);\n return () =>\n document.removeEventListener(\"fullscreenchange\", onFullscreenChange);\n }, []);\n\n const toggleFullscreen = () => {\n const target = containerRef.current || iframeRef.current;\n if (!target) return;\n if (document.fullscreenElement) {\n document.exitFullscreen().catch(() => {});\n return;\n }\n if (target.requestFullscreen) {\n target.requestFullscreen().catch(() => {});\n }\n };\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n root.render(\n <SandboxApp\n html={htmlContent}\n loadingText={loadingText}\n styleLoadingText={styleLoadingText}\n scriptLoadingText={scriptLoadingText}\n fullScreenButtonText={fullScreenButtonText}\n hideFullScreen={hideFullScreen}\n resetToken={resetToken}\n hasRootVhHeight={hasRootVhHeight}\n mode={mode}\n />\n );\n requestAnimationFrame(() => updateHeightRef.current?.());\n }, [\n content,\n htmlContent,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n resetToken,\n mode,\n ]);\n const containerClassName = [\n \"w-full relative content-render-iframe-sandbox\",\n isBlackboardMode\n ? \"h-full overflow-auto flex flex-col\"\n : \"aspect-[16/9] overflow-hidden flex items-center justify-center\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div\n ref={containerRef}\n data-root-vh={hasRootVhHeight ? \"true\" : \"false\"}\n className={containerClassName}\n >\n {!hideFullScreen && (\n <button\n type=\"button\"\n onClick={toggleFullscreen}\n className={\n \"absolute top-2 right-2 z-50 p-1.5 bg-black/75 text-white rounded-md cursor-pointer\"\n }\n >\n {isFullscreen ? \"退出全屏\" : fullScreenButtonText || \"全屏浏览\"}\n </button>\n )}\n {mode === \"blackboard\" && type === \"markdown\" ? (\n <ContentRender content={content} />\n ) : (\n <iframe\n ref={iframeRef}\n sandbox=\"allow-scripts allow-same-origin\"\n allow=\"fullscreen\"\n allowFullScreen\n className={[className, \"w-full h-full mx-auto my-auto block\"]\n .filter(Boolean)\n .join(\" \")}\n style={{\n height: \"100%\",\n margin: \"auto\",\n }}\n />\n )}\n </div>\n );\n};\n\nexport default IframeSandbox;\n"],"names":["loadBlackboardVendor","m","normalizeTailwindHeightTokens","className","token","parseViewportHeightCss","value","normalized","matched","extractViewportHeightFromTailwindClass","normalizedTokens","arbitraryToken","IframeSandbox","content","type","loadingText","styleLoadingText","scriptLoadingText","fullScreenButtonText","hideFullScreen","mode","containerRef","useRef","iframeRef","rootRef","docRef","updateHeightRef","setHeight","useState","resetToken","setResetToken","isFullscreen","setIsFullscreen","isBlackboardMode","prevHtmlRef","htmlContent","React","sandboxSegments","splitContentSegments","seg","hasRootVhHeight","rootMatch","attrs","heightAttrMatch","explicitHeightCss","styleHeightMatch","styleHeightCss","classAttrMatch","useEffect","prev","iframe","doc","rootEl","root","createRoot","isDestroyed","parseExplicitHeight","parentViewportHeight","numeric","parseTailwindHeightClass","viewportHeightCss","resolveExplicitHeight","container","elements","target","heightValue","parsed","classHeight","updateHeight","bodyRect","htmlRect","bodyHeight","htmlHeight","contentHeight","explicitHeight","nextHeight","scheduleHeightUpdate","inject","resizeObserver","onFullscreenChange","toggleFullscreen","jsx","SandboxApp","containerClassName","jsxs","ContentRender"],"mappings":";;;;;;AAMA,MAAMA,KAAuB,MAC3B,OAAO,2BAAqB,EAAE,KAAK,CAACC,MAAMA,EAAE,yBAAyB,GAajEC,IAAgC,CAACC,MACrCA,EACG,MAAM,KAAK,EACX,OAAO,OAAO,EACd,IAAI,CAACC,MAAUA,EAAM,MAAM,GAAG,EAAE,IAAA,KAASA,CAAK,GAE7CC,IAAyB,CAACC,MAAkB;AAChD,QAAMC,IAAaD,EAAM,KAAA,EAAO,YAAA;AAChC,MAAI,CAACC,EAAY,QAAO;AACxB,QAAMC,IAAUD,EAAW,MAAM,8BAA8B;AAC/D,SAAKC,IACE,GAAGA,EAAQ,CAAC,CAAC,GAAGA,EAAQ,CAAC,EAAE,YAAA,CAAa,KAD1B;AAEvB,GAEMC,IAAyC,CAACN,MAAsB;AACpE,MAAI,CAACA,EAAU,KAAA,EAAQ,QAAO;AAC9B,QA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MM,EAAgB,WAAW;AAAA,EACzD,GAAG;AAAA,IACDb;AAAA,IACAsB;AAAA,IACApB;AAAA,IACAC;AAAA,IACAC;AAAA,IACAC;AAAA,IACAW;AAAA,IACAT;AAAA,EAAA,CACD;AACD,QAAM+D,IAAqB;AAAA,IACzB;AAAA,IACAlD,IACI,uCACA;AAAA,EAAA,EAEH,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACEmD,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK/D;AAAA,MACL,gBAAcmB,IAAkB,SAAS;AAAA,MACzC,WAAW2C;AAAA,MAEV,UAAA;AAAA,QAAA,CAAChE,KACA8D,gBAAAA,EAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASD;AAAA,YACT,WACE;AAAA,YAGD,UAAAjD,IAAe,SAASb,KAAwB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGpDE,MAAS,gBAAgBN,MAAS,aACjCmE,gBAAAA,EAAAA,IAACI,IAAA,EAAc,SAAAxE,GAAkB,IAEjCoE,gBAAAA,EAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAK1D;AAAA,YACL,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,iBAAe;AAAA,YACf,WAAW,CAACpB,GAAW,qCAAqC,EACzD,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,YACX,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,QAAQ;AAAA,YAAA;AAAA,UACV;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
1
|
+
{"version":3,"file":"IframeSandbox.es.js","sources":["../../../src/components/ContentRender/IframeSandbox.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport SandboxApp from \"./SandboxApp\";\nimport { splitContentSegments } from \"./utils/split-content\";\nimport ContentRender from \"./ContentRender\";\n// Lazy-load iframe vendor libraries and inject them into the sandbox document.\nconst loadBlackboardVendor = () =>\n import(\"./blackboard-vendor\").then((m) => m.injectBlackboardLibraries);\nexport interface IframeSandboxProps {\n content: string;\n className?: string;\n loadingText?: string;\n styleLoadingText?: string;\n scriptLoadingText?: string;\n fullScreenButtonText?: string;\n hideFullScreen?: boolean;\n mode?: \"content\" | \"blackboard\";\n type: \"sandbox\" | \"markdown\";\n}\n\nconst normalizeTailwindHeightTokens = (className: string) =>\n className\n .split(/\\s+/)\n .filter(Boolean)\n .map((token) => token.split(\":\").pop() || token);\n\nconst parseViewportHeightCss = (value: string) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const matched = normalized.match(/^([0-9.]+)(vh|dvh|svh|lvh)$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst extractViewportHeightFromTailwindClass = (className: string) => {\n if (!className.trim()) return null;\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n if (\n normalizedTokens.includes(\"h-screen\") ||\n normalizedTokens.includes(\"h-dvh\")\n ) {\n return \"100dvh\";\n }\n if (normalizedTokens.includes(\"h-svh\")) {\n return \"100svh\";\n }\n if (normalizedTokens.includes(\"h-lvh\")) {\n return \"100lvh\";\n }\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+(vh|dvh|svh|lvh)\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)(vh|dvh|svh|lvh)\\]$/i);\n if (!matched) return null;\n return `${matched[1]}${matched[2].toLowerCase()}`;\n};\n\nconst IframeSandbox: React.FC<IframeSandboxProps> = ({\n content,\n type,\n className,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n hideFullScreen = false,\n mode = \"content\",\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const rootRef = useRef<Root | null>(null);\n const docRef = useRef<Document | null>(null);\n const updateHeightRef = useRef<() => void>(() => {});\n const [, setHeight] = useState(480);\n const [resetToken, setResetToken] = useState(0);\n const [isFullscreen, setIsFullscreen] = useState(false);\n const isBlackboardMode = mode === \"blackboard\";\n const prevHtmlRef = useRef<string>(\"\");\n const htmlContent = React.useMemo(() => {\n const segments = splitContentSegments(content);\n // console.log('segments=====', segments);\n const sandboxSegments = segments.filter((seg) => seg.type === \"sandbox\");\n const sandboxContent =\n mode === \"blackboard\"\n ? sandboxSegments[sandboxSegments.length - 1]?.value || \"\"\n : sandboxSegments.map((seg) => seg.value).join(\"\\n\");\n return sandboxContent || \"\";\n }, [content, mode]);\n const rootViewportHeightCss = React.useMemo(() => {\n const normalized = htmlContent.trim();\n if (!normalized) return null;\n const rootMatch = normalized.match(/^<([a-zA-Z][\\w:-]*)(\\s[^>]*?)?>/);\n if (!rootMatch) return null;\n const attrs = rootMatch[2] || \"\";\n const heightAttrMatch = attrs.match(/\\bheight\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (heightAttrMatch) {\n const explicitHeightCss = parseViewportHeightCss(heightAttrMatch[1]);\n if (explicitHeightCss) return explicitHeightCss;\n }\n const styleAttrMatch = attrs.match(/\\bstyle\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n const styleHeightMatch = styleAttrMatch?.match(\n /\\bheight\\s*:\\s*([^;]+)/i\n )?.[1];\n if (styleHeightMatch) {\n const styleHeightCss = parseViewportHeightCss(styleHeightMatch);\n if (styleHeightCss) return styleHeightCss;\n }\n const classAttrMatch = attrs.match(/\\bclass\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1];\n if (!classAttrMatch) return null;\n return extractViewportHeightFromTailwindClass(classAttrMatch);\n }, [htmlContent]);\n const hasRootVhHeight = Boolean(rootViewportHeightCss);\n useEffect(() => {\n if (mode !== \"blackboard\") {\n prevHtmlRef.current = htmlContent;\n return;\n }\n const prev = prevHtmlRef.current;\n const isContinuation = prev && htmlContent.startsWith(prev);\n if (!isContinuation && prev) {\n setResetToken((token) => token + 1);\n }\n prevHtmlRef.current = htmlContent;\n }, [htmlContent, mode]);\n\n useEffect(() => {\n const iframe = iframeRef.current;\n if (!iframe) return undefined;\n\n const doc = iframe.contentDocument;\n if (!doc) return undefined;\n\n doc.open();\n doc.write(`<!DOCTYPE html>\n<html${mode === \"blackboard\" ? ' style=\"height: 100%;\"' : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <style>\n html, body, #root { width: 100%; height: 100%; }\n html, body { margin: 0; padding: 0; overflow: auto; }\n *, *::before, *::after { box-sizing: border-box; }\n </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>`);\n doc.close();\n\n docRef.current = doc;\n\n const rootEl = doc.getElementById(\"root\");\n if (!rootEl) return undefined;\n\n const root = createRoot(rootEl);\n rootRef.current = root;\n let isDestroyed = false;\n\n const parseExplicitHeight = (\n value: string,\n parentViewportHeight: number\n ) => {\n const normalized = value.trim().toLowerCase();\n if (!normalized) return null;\n const numeric = Number.parseFloat(normalized);\n if (Number.isNaN(numeric)) return null;\n if (/(dvh|svh|lvh|vh)$/i.test(normalized)) {\n return (numeric / 100) * parentViewportHeight;\n }\n if (normalized.endsWith(\"px\") || /^[0-9.]+$/.test(normalized)) {\n return numeric;\n }\n return null;\n };\n const parseTailwindHeightClass = (\n className: string,\n parentViewportHeight: number\n ) => {\n if (!className.trim()) return null;\n const viewportHeightCss =\n extractViewportHeightFromTailwindClass(className);\n if (viewportHeightCss) {\n return parseExplicitHeight(viewportHeightCss, parentViewportHeight);\n }\n const normalizedTokens = normalizeTailwindHeightTokens(className);\n const arbitraryToken = normalizedTokens.find((token) =>\n /^h-\\[[0-9.]+px\\]$/i.test(token)\n );\n if (!arbitraryToken) return null;\n const matched = arbitraryToken.match(/^h-\\[([0-9.]+)px\\]$/i);\n if (!matched) return null;\n const numeric = Number.parseFloat(matched[1]);\n if (Number.isNaN(numeric)) return null;\n return numeric;\n };\n\n const resolveExplicitHeight = () => {\n if (!iframeRef.current || !doc.body) return null;\n const wrapper = doc.body.querySelector(\n \".sandbox-wrapper\"\n ) as HTMLElement | null;\n const container = wrapper?.firstElementChild as HTMLElement | null;\n if (!container) return null;\n const elements = Array.from(container.children) as HTMLElement[];\n if (elements.length !== 1) return null;\n const target = elements[0];\n const heightValue = target.style.height || target.getAttribute(\"height\");\n const parentViewportHeight =\n iframeRef.current.ownerDocument?.documentElement?.clientHeight ||\n window.innerHeight;\n const parsed = heightValue\n ? parseExplicitHeight(heightValue, parentViewportHeight)\n : null;\n if (parsed !== null) {\n return Math.ceil(parsed);\n }\n const classHeight = parseTailwindHeightClass(\n target.getAttribute(\"class\") || \"\",\n parentViewportHeight\n );\n return classHeight !== null ? Math.ceil(classHeight) : null;\n };\n\n const updateHeight = () => {\n if (!iframeRef.current || !doc.body) return;\n const bodyRect = doc.body.getBoundingClientRect();\n const htmlRect = doc.documentElement?.getBoundingClientRect();\n const bodyHeight = bodyRect.height;\n const htmlHeight = htmlRect?.height || 0;\n const contentHeight = Math.max(bodyHeight, htmlHeight);\n const explicitHeight = resolveExplicitHeight();\n const nextHeight = Math.max(\n 200,\n explicitHeight ?? Math.ceil(contentHeight)\n );\n setHeight(nextHeight);\n };\n const scheduleHeightUpdate = () => {\n requestAnimationFrame(() => {\n if (isDestroyed) return;\n updateHeight();\n });\n };\n updateHeightRef.current = scheduleHeightUpdate;\n\n updateHeight();\n scheduleHeightUpdate();\n\n // Inject Tailwind/DaisyUI/GSAP into iframe for all sandbox modes.\n // Dynamic import keeps ~3.3 MB of vendor libs out of the main bundle.\n // Tailwind's MutationObserver ensures styles apply even if content renders first.\n loadBlackboardVendor()\n .then((inject) => {\n if (isDestroyed) return;\n inject(doc);\n scheduleHeightUpdate();\n })\n .catch(() => {\n if (isDestroyed) return;\n scheduleHeightUpdate();\n });\n\n const resizeObserver = new ResizeObserver(() => updateHeight());\n resizeObserver.observe(doc.body);\n if (rootEl) {\n resizeObserver.observe(rootEl);\n }\n\n return () => {\n isDestroyed = true;\n resizeObserver.disconnect();\n // Defer unmount to avoid React warning when parent is mid-render\n setTimeout(() => {\n root.unmount();\n rootRef.current = null;\n docRef.current = null;\n updateHeightRef.current = () => {};\n }, 0);\n };\n }, []);\n\n useEffect(() => {\n const onFullscreenChange = () => {\n setIsFullscreen(Boolean(document.fullscreenElement));\n };\n document.addEventListener(\"fullscreenchange\", onFullscreenChange);\n return () =>\n document.removeEventListener(\"fullscreenchange\", onFullscreenChange);\n }, []);\n\n const toggleFullscreen = () => {\n const target = containerRef.current || iframeRef.current;\n if (!target) return;\n if (document.fullscreenElement) {\n document.exitFullscreen().catch(() => {});\n return;\n }\n if (target.requestFullscreen) {\n target.requestFullscreen().catch(() => {});\n }\n };\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n root.render(\n <SandboxApp\n html={htmlContent}\n loadingText={loadingText}\n styleLoadingText={styleLoadingText}\n scriptLoadingText={scriptLoadingText}\n fullScreenButtonText={fullScreenButtonText}\n hideFullScreen={hideFullScreen}\n resetToken={resetToken}\n hasRootVhHeight={hasRootVhHeight}\n mode={mode}\n />\n );\n requestAnimationFrame(() => updateHeightRef.current?.());\n }, [\n content,\n htmlContent,\n loadingText,\n styleLoadingText,\n scriptLoadingText,\n fullScreenButtonText,\n resetToken,\n mode,\n ]);\n const containerClassName = [\n \"w-full relative content-render-iframe-sandbox\",\n isBlackboardMode\n ? \"h-full overflow-auto flex flex-col\"\n : \"aspect-[16/9] overflow-hidden flex items-center justify-center\",\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div\n ref={containerRef}\n data-root-vh={hasRootVhHeight ? \"true\" : \"false\"}\n className={containerClassName}\n >\n {!hideFullScreen && (\n <button\n type=\"button\"\n onClick={toggleFullscreen}\n className={\n \"absolute top-2 right-2 z-50 p-1.5 bg-black/75 text-white rounded-md cursor-pointer\"\n }\n >\n {isFullscreen ? \"退出全屏\" : fullScreenButtonText || \"全屏浏览\"}\n </button>\n )}\n {mode === \"blackboard\" && type === \"markdown\" ? (\n <ContentRender content={content} />\n ) : (\n <iframe\n ref={iframeRef}\n sandbox=\"allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\"\n allow=\"fullscreen\"\n allowFullScreen\n className={[className, \"w-full h-full mx-auto my-auto block\"]\n .filter(Boolean)\n .join(\" \")}\n style={{\n height: \"100%\",\n margin: \"auto\",\n }}\n />\n )}\n </div>\n );\n};\n\nexport default IframeSandbox;\n"],"names":["loadBlackboardVendor","m","normalizeTailwindHeightTokens","className","token","parseViewportHeightCss","value","normalized","matched","extractViewportHeightFromTailwindClass","normalizedTokens","arbitraryToken","IframeSandbox","content","type","loadingText","styleLoadingText","scriptLoadingText","fullScreenButtonText","hideFullScreen","mode","containerRef","useRef","iframeRef","rootRef","docRef","updateHeightRef","setHeight","useState","resetToken","setResetToken","isFullscreen","setIsFullscreen","isBlackboardMode","prevHtmlRef","htmlContent","React","sandboxSegments","splitContentSegments","seg","hasRootVhHeight","rootMatch","attrs","heightAttrMatch","explicitHeightCss","styleHeightMatch","styleHeightCss","classAttrMatch","useEffect","prev","iframe","doc","rootEl","root","createRoot","isDestroyed","parseExplicitHeight","parentViewportHeight","numeric","parseTailwindHeightClass","viewportHeightCss","resolveExplicitHeight","container","elements","target","heightValue","parsed","classHeight","updateHeight","bodyRect","htmlRect","bodyHeight","htmlHeight","contentHeight","explicitHeight","nextHeight","scheduleHeightUpdate","inject","resizeObserver","onFullscreenChange","toggleFullscreen","jsx","SandboxApp","containerClassName","jsxs","ContentRender"],"mappings":";;;;;;AAMA,MAAMA,KAAuB,MAC3B,OAAO,2BAAqB,EAAE,KAAK,CAACC,MAAMA,EAAE,yBAAyB,GAajEC,IAAgC,CAACC,MACrCA,EACG,MAAM,KAAK,EACX,OAAO,OAAO,EACd,IAAI,CAACC,MAAUA,EAAM,MAAM,GAAG,EAAE,IAAA,KAASA,CAAK,GAE7CC,IAAyB,CAACC,MAAkB;AAChD,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