crewx 0.8.9-rc.8 → 0.8.9
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/assets/{MarketPage-DHEHQ8dR.js → MarketPage-Bk13HBH8.js} +1 -1
- package/dist/assets/PromptTab-BROKndtk.js +27 -0
- package/dist/assets/{arc-OL5XTRNV.js → arc-8uTktI_9.js} +1 -1
- package/dist/assets/{architectureDiagram-UYN6MBPD-B9jsnrsX.js → architectureDiagram-UYN6MBPD-CJyGJizJ.js} +1 -1
- package/dist/assets/{blockDiagram-ZHA2E4KO-CggogzTX.js → blockDiagram-ZHA2E4KO-tb7_qUXV.js} +7 -7
- package/dist/assets/{c4Diagram-6F5ED5ID-D0vxgJZG.js → c4Diagram-6F5ED5ID-Bh0hYgUZ.js} +1 -1
- package/dist/assets/channel-DqvfwSMt.js +1 -0
- package/dist/assets/{chunk-5HRBRIJM-M_jZrdQe.js → chunk-5HRBRIJM-Ctb_uxZ5.js} +1 -1
- package/dist/assets/{chunk-7U56Z5CX-DcVIrSV1.js → chunk-7U56Z5CX-h1fDz-WT.js} +1 -1
- package/dist/assets/{chunk-ASOPGD6M-BF4K1A-H.js → chunk-ASOPGD6M-CgfyXIoW.js} +1 -1
- package/dist/assets/{chunk-KFBOBJHC-5SiqcGXC.js → chunk-KFBOBJHC-CR7Ttw70.js} +1 -1
- package/dist/assets/{chunk-T2TOU4HS-DMdegpPQ.js → chunk-T2TOU4HS-C2u5B7pp.js} +1 -1
- package/dist/assets/{chunk-TMUBEWPD-Dx-0xBrn.js → chunk-TMUBEWPD-x_AdOhrN.js} +1 -1
- package/dist/assets/classDiagram-LNE6IOMH-Bfz8M3CC.js +1 -0
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-Bfz8M3CC.js +1 -0
- package/dist/assets/{dagre-4EVJKHTY-Dt6S-x7L.js → dagre-4EVJKHTY-BfYeEJwg.js} +1 -1
- package/dist/assets/{diagram-QW4FP2JN-BlOuLW4Z.js → diagram-QW4FP2JN-Bkxhu2Ro.js} +1 -1
- package/dist/assets/{erDiagram-6RL3IURR-C2IWuGef.js → erDiagram-6RL3IURR-CEJ086-x.js} +1 -1
- package/dist/assets/{flowDiagram-7ASYPVHJ-D_hXYgQB.js → flowDiagram-7ASYPVHJ-DpYeXRcJ.js} +1 -1
- package/dist/assets/{ganttDiagram-NTVNEXSI-C7MlLfde.js → ganttDiagram-NTVNEXSI-DPWdP6sZ.js} +1 -1
- package/dist/assets/{gitGraph-YCYPL57B-G1Eg9Zrs.js → gitGraph-YCYPL57B-nXetpL58.js} +1 -1
- package/dist/assets/{gitGraphDiagram-NRZ2UAAF-D44FTqY7.js → gitGraphDiagram-NRZ2UAAF-C2wvk5wx.js} +1 -1
- package/dist/assets/{infoDiagram-A4XQUW5V-DWomU1of.js → infoDiagram-A4XQUW5V-CO4mymBv.js} +1 -1
- package/dist/assets/{journeyDiagram-G5WM74LC-CyY2EEDw.js → journeyDiagram-G5WM74LC-BwPltDU3.js} +1 -1
- package/dist/assets/{kanban-definition-QRCXZQQD-C4FJp6N-.js → kanban-definition-QRCXZQQD-nVR8EB4Y.js} +1 -1
- package/dist/assets/{linear-BDy_wsSa.js → linear-BmiykovK.js} +1 -1
- package/dist/assets/main-BgbJXb8c.css +10 -0
- package/dist/assets/main-CkEY2gMZ.js +1471 -0
- package/dist/assets/{mindmap-definition-GWI6TPTV-CtoohpFK.js → mindmap-definition-GWI6TPTV-LMan8jbf.js} +1 -1
- package/dist/assets/{pieDiagram-YF2LJOPJ-E93lN9Jr.js → pieDiagram-YF2LJOPJ-pAuujp_Z.js} +1 -1
- package/dist/assets/{quadrantDiagram-OS5C2QUG-B7ToYMhX.js → quadrantDiagram-OS5C2QUG-MVRGxfWA.js} +1 -1
- package/dist/assets/{requirementDiagram-MIRIMTAZ-D6fO48rd.js → requirementDiagram-MIRIMTAZ-CNm_y0ia.js} +1 -1
- package/dist/assets/{sankeyDiagram-Y46BX6SQ-BIOSo6BC.js → sankeyDiagram-Y46BX6SQ-C3xgOXdi.js} +1 -1
- package/dist/assets/{sequenceDiagram-G6AWOVSC-CGsoNHvm.js → sequenceDiagram-G6AWOVSC-DdyyPE0m.js} +1 -1
- package/dist/assets/{stateDiagram-MAYHULR4-Bd5yC5nw.js → stateDiagram-MAYHULR4-DrYVdByC.js} +1 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-rKn6dm3O.js +1 -0
- package/dist/assets/{timeline-definition-U7ZMHBDA-DVnI3tnK.js → timeline-definition-U7ZMHBDA-Bw30fcXQ.js} +1 -1
- package/dist/assets/{xychartDiagram-6QU3TZC5-MuhHydF1.js → xychartDiagram-6QU3TZC5-bNAui1Ve.js} +1 -1
- package/dist/index.html +2 -2
- package/dist-server/app.module.js +2 -0
- package/dist-server/common/limits/defaults.js +3 -3
- package/dist-server/domain/agent/agent.service.js +20 -1
- package/dist-server/domain/cli/cli.service.js +15 -34
- package/dist-server/domain/cli/dto/login-cli.dto.js +2 -2
- package/dist-server/domain/git/git.service.js +7 -7
- package/dist-server/domain/market/default-marketplace.json +24 -0
- package/dist-server/domain/settings/settings.controller.js +1 -1
- package/dist-server/domain/settings/settings.module.js +2 -0
- package/dist-server/domain/settings/settings.service.js +97 -8
- package/dist-server/domain/task/task.service.js +57 -15
- package/dist-server/domain/thread/thread.service.js +56 -0
- package/dist-server/domain/usage/usage.controller.js +18 -0
- package/dist-server/domain/usage/usage.service.js +175 -21
- package/dist-server/domain/wi/wi.controller.js +70 -0
- package/dist-server/domain/wi/wi.module.js +22 -0
- package/dist-server/domain/wi/wi.service.js +169 -0
- package/dist-server/domain/wi/wi.types.js +2 -0
- package/dist-server/modules/crewx-pool.service.js +194 -53
- package/dist-server/package.json +3 -0
- package/dist-server/repository/task.repository.js +5 -1
- package/package.json +8 -8
- package/packages/cli/dist/commands/agent.js +1 -1
- package/packages/cli/dist/commands/doctor.js +15 -9
- package/packages/cli/dist/commands/init.js +5 -5
- package/packages/cli/package.json +1 -1
- package/dist/assets/PromptTab-Dj74kcD1.js +0 -32
- package/dist/assets/channel-B7x7y1Y2.js +0 -1
- package/dist/assets/classDiagram-LNE6IOMH-DV4LUYOI.js +0 -1
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-DV4LUYOI.js +0 -1
- package/dist/assets/index.browser-CAdCkbEw.js +0 -18
- package/dist/assets/main-C6Vpc-SO.css +0 -10
- package/dist/assets/main-xgsDUAqJ.js +0 -1424
- package/dist/assets/stateDiagram-v2-4JROLMXI-BAVvcAyV.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{bu as Ce,bv as Ie,bw as Be,bx as $t,by as Jt,bz as At,bA as Ae,bB as Oe,bC as Qt,bD as _t,bE as te,bF as ht,bG as Re,bH as ze,bI as Me,bJ as je,bK as Fe,bL as Pe,bM as We,_ as g,E as st,d as R,e as Ye,l as S,v as Ke,A as He,bN as Ue,K as Xe,Q as Ve,c as z,bO as q,ax as ee,aq as Ge,u as et,k as Ze,bP as qe,bQ as wt,bR as $e,i as Ot}from"./main-xgsDUAqJ.js";import{G as Je}from"./graph-BlwPajkw.js";import{c as Qe}from"./channel-B7x7y1Y2.js";function tr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function re(e){return Ce(e)?Ie(e):Be(e)}function er(e,t){return e&&$t(t,re(t),e)}function rr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function ar(){return[]}var sr=Object.prototype,ir=sr.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,ae=Rt?function(e){return e==null?[]:(e=Object(e),rr(Rt(e),function(t){return ir.call(e,t)}))}:ar;function nr(e,t){return $t(e,ae(e),t)}function lr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function cr(e,t,r){var n=t(e);return Jt(e)?n:lr(n,r(e))}function or(e){return cr(e,re,ae)}var hr=Object.prototype,gr=hr.hasOwnProperty;function ur(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&gr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function dr(e,t){var r=e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var pr=/\w*$/;function fr(e){var t=new e.constructor(e.source,pr.exec(e));return t.lastIndex=e.lastIndex,t}var zt=At?At.prototype:void 0,Mt=zt?zt.valueOf:void 0;function yr(e){return Mt?Object(Mt.call(e)):{}}var xr="[object Boolean]",br="[object Date]",wr="[object Map]",mr="[object Number]",Lr="[object RegExp]",Sr="[object Set]",vr="[object String]",Er="[object Symbol]",_r="[object ArrayBuffer]",kr="[object DataView]",Tr="[object Float32Array]",Dr="[object Float64Array]",Nr="[object Int8Array]",Cr="[object Int16Array]",Ir="[object Int32Array]",Br="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Or="[object Uint16Array]",Rr="[object Uint32Array]";function zr(e,t,r){var n=e.constructor;switch(t){case _r:return Oe(e);case xr:case br:return new n(+e);case kr:return dr(e);case Tr:case Dr:case Nr:case Cr:case Ir:case Br:case Ar:case Or:case Rr:return Ae(e,r);case wr:return new n;case mr:case vr:return new n(e);case Lr:return fr(e);case Sr:return new n;case Er:return yr(e)}}var Mr="[object Map]";function jr(e){return Qt(e)&&_t(e)==Mr}var jt=ht&&ht.isMap,Fr=jt?te(jt):jr,Pr="[object Set]";function Wr(e){return Qt(e)&&_t(e)==Pr}var Ft=ht&&ht.isSet,Yr=Ft?te(Ft):Wr,Kr=1,se="[object Arguments]",Hr="[object Array]",Ur="[object Boolean]",Xr="[object Date]",Vr="[object Error]",ie="[object Function]",Gr="[object GeneratorFunction]",Zr="[object Map]",qr="[object Number]",ne="[object Object]",$r="[object RegExp]",Jr="[object Set]",Qr="[object String]",ta="[object Symbol]",ea="[object WeakMap]",ra="[object ArrayBuffer]",aa="[object DataView]",sa="[object Float32Array]",ia="[object Float64Array]",na="[object Int8Array]",la="[object Int16Array]",ca="[object Int32Array]",oa="[object Uint8Array]",ha="[object Uint8ClampedArray]",ga="[object Uint16Array]",ua="[object Uint32Array]",C={};C[se]=C[Hr]=C[ra]=C[aa]=C[Ur]=C[Xr]=C[sa]=C[ia]=C[na]=C[la]=C[ca]=C[Zr]=C[qr]=C[ne]=C[$r]=C[Jr]=C[Qr]=C[ta]=C[oa]=C[ha]=C[ga]=C[ua]=!0;C[Vr]=C[ie]=C[ea]=!1;function ct(e,t,r,n,i,s){var a,l=t&Kr;if(a!==void 0)return a;if(!Re(e))return e;var c=Jt(e);if(c)return a=ur(e),ze(e,a);var f=_t(e),h=f==ie||f==Gr;if(Me(e))return je(e,l);if(f==ne||f==se||h&&!i)return a=h?{}:Fe(e),nr(e,er(a,e));if(!C[f])return i?e:{};a=zr(e,f,l),s||(s=new Pe);var x=s.get(e);if(x)return x;s.set(e,a),Yr(e)?e.forEach(function(L){a.add(ct(L,t,r,L,e,s))}):Fr(e)&&e.forEach(function(L,T){a.set(T,ct(L,t,r,T,e,s))});var b=or,m=c?void 0:b(e);return tr(m||e,function(L,T){m&&(T=L,L=e[T]),We(a,T,ct(L,t,r,T,e,s))}),a}var da=4;function pa(e){return ct(e,da)}var mt=function(){var e=g(function(D,y,u,d){for(u=u||{},d=D.length;d--;u[D[d]]=y);return u},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],s=[1,19],a=[1,16],l=[1,17],c=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],x=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],L=[8,15,16,21,27,28,29,30,31,32,40,44,47],T=[1,49],E={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(y,u,d,w,v,o,_){var p=o.length-1;switch(v){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",o[p-1]),w.setHierarchy(o[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",o[p]),typeof o[p].length=="number"?this.$=o[p]:this.$=[o[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",o[p-1]),this.$=[o[p-1]].concat(o[p]);break;case 14:w.getLogger().debug("Rule: link: ",o[p],y),this.$={edgeTypeStr:o[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",o[p-3],o[p-1],o[p]),this.$={edgeTypeStr:o[p],label:o[p-1]};break;case 18:const M=parseInt(o[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:M,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",o[p-2],o[p-1],o[p]," typestr: ",o[p-1].edgeTypeStr);const U=w.edgeStrToEdgeData(o[p-1].edgeTypeStr);this.$=[{id:o[p-2].id,label:o[p-2].label,type:o[p-2].type,directions:o[p-2].directions},{id:o[p-2].id+"-"+o[p].id,start:o[p-2].id,end:o[p].id,label:o[p-1].label,type:"edge",directions:o[p].directions,arrowTypeEnd:U,arrowTypeStart:"arrow_open"},{id:o[p].id,label:o[p].label,type:w.typeStr2Type(o[p].typeStr),directions:o[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[p-1],o[p]),this.$={id:o[p-1].id,label:o[p-1].label,type:w.typeStr2Type(o[p-1].typeStr),directions:o[p-1].directions,widthInColumns:parseInt(o[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",o[p]),this.$={id:o[p].id,label:o[p].label,type:w.typeStr2Type(o[p].typeStr),directions:o[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",o[p]),this.$={type:"column-setting",columns:o[p]==="auto"?-1:parseInt(o[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",o[p-2],o[p-1]),w.generateId(),this.$={...o[p-2],type:"composite",children:o[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",o[p-2],o[p-1],o[p]);const P=w.generateId();this.$={id:P,type:"composite",label:"",children:o[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",o[p]),this.$={id:o[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[p-1],o[p]),this.$={id:o[p-1],label:o[p].label,typeStr:o[p].typeStr,directions:o[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",o[p]),this.$=[o[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",o[p-1],o[p]),this.$=[o[p-1]].concat(o[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",o[p-2],o[p-1],o[p]),this.$={typeStr:o[p-2]+o[p],label:o[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[p-3],o[p-2]," #3:",o[p-1],o[p]),this.$={typeStr:o[p-3]+o[p],label:o[p-2],directions:o[p-1]};break;case 35:case 36:this.$={type:"classDef",id:o[p-1].trim(),css:o[p].trim()};break;case 37:this.$={type:"applyClass",id:o[p-1].trim(),styleClass:o[p].trim()};break;case 38:this.$={type:"applyStyles",id:o[p-1].trim(),stylesStr:o[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:s,40:a,44:l,47:c}),e(h,[2,16],{14:22,15:x,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(L,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:x,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:T},{15:[1,50]},e(h,[2,27]),e(L,[2,33]),{39:[1,51]},{34:52,35:T,39:[2,31]},{32:[2,15]},e(L,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(y,u){if(u.recoverable)this.trace(y);else{var d=new Error(y);throw d.hash=u,d}},"parseError"),parse:g(function(y){var u=this,d=[0],w=[],v=[null],o=[],_=this.table,p="",M=0,O=0,U=2,P=1,Te=o.slice.call(arguments,1),j=Object.create(this.lexer),J={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(J.yy[ft]=this.yy[ft]);j.setInput(y,J.yy),J.yy.lexer=j,J.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var yt=j.yylloc;o.push(yt);var De=j.options&&j.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(K){d.length=d.length-2*K,v.length=v.length-K,o.length=o.length-K}g(Ne,"popStack");function It(){var K;return K=w.pop()||j.lex()||P,typeof K!="number"&&(K instanceof Array&&(w=K,K=w.pop()),K=u.symbols_[K]||K),K}g(It,"lex");for(var Y,Q,X,xt,tt={},it,$,Bt,nt;;){if(Q=d[d.length-1],this.defaultActions[Q]?X=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=It()),X=_[Q]&&_[Q][Y]),typeof X>"u"||!X.length||!X[0]){var bt="";nt=[];for(it in _[Q])this.terminals_[it]&&it>U&&nt.push("'"+this.terminals_[it]+"'");j.showPosition?bt="Parse error on line "+(M+1)+`:
|
|
1
|
+
import{bv as Ce,bw as Ie,bx as Be,by as $t,bz as Jt,bA as At,bB as Ae,bC as Oe,bD as Qt,bE as _t,bF as te,bG as ht,bH as Re,bI as ze,bJ as Me,bK as je,bL as Fe,bM as Pe,bN as We,_ as g,E as st,d as R,e as Ye,l as S,v as Ke,A as He,bO as Ue,K as Xe,Q as Ve,c as z,bP as q,ax as ee,aq as Ge,u as et,k as Ze,bQ as qe,bR as wt,bS as $e,i as Ot}from"./main-CkEY2gMZ.js";import{G as Je}from"./graph-BlwPajkw.js";import{c as Qe}from"./channel-DqvfwSMt.js";function tr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function re(e){return Ce(e)?Ie(e):Be(e)}function er(e,t){return e&&$t(t,re(t),e)}function rr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function ar(){return[]}var sr=Object.prototype,ir=sr.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,ae=Rt?function(e){return e==null?[]:(e=Object(e),rr(Rt(e),function(t){return ir.call(e,t)}))}:ar;function nr(e,t){return $t(e,ae(e),t)}function lr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function cr(e,t,r){var n=t(e);return Jt(e)?n:lr(n,r(e))}function or(e){return cr(e,re,ae)}var hr=Object.prototype,gr=hr.hasOwnProperty;function dr(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&gr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function ur(e,t){var r=e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var pr=/\w*$/;function fr(e){var t=new e.constructor(e.source,pr.exec(e));return t.lastIndex=e.lastIndex,t}var zt=At?At.prototype:void 0,Mt=zt?zt.valueOf:void 0;function yr(e){return Mt?Object(Mt.call(e)):{}}var xr="[object Boolean]",br="[object Date]",wr="[object Map]",mr="[object Number]",Lr="[object RegExp]",Sr="[object Set]",vr="[object String]",Er="[object Symbol]",_r="[object ArrayBuffer]",kr="[object DataView]",Tr="[object Float32Array]",Dr="[object Float64Array]",Nr="[object Int8Array]",Cr="[object Int16Array]",Ir="[object Int32Array]",Br="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Or="[object Uint16Array]",Rr="[object Uint32Array]";function zr(e,t,r){var n=e.constructor;switch(t){case _r:return Oe(e);case xr:case br:return new n(+e);case kr:return ur(e);case Tr:case Dr:case Nr:case Cr:case Ir:case Br:case Ar:case Or:case Rr:return Ae(e,r);case wr:return new n;case mr:case vr:return new n(e);case Lr:return fr(e);case Sr:return new n;case Er:return yr(e)}}var Mr="[object Map]";function jr(e){return Qt(e)&&_t(e)==Mr}var jt=ht&&ht.isMap,Fr=jt?te(jt):jr,Pr="[object Set]";function Wr(e){return Qt(e)&&_t(e)==Pr}var Ft=ht&&ht.isSet,Yr=Ft?te(Ft):Wr,Kr=1,se="[object Arguments]",Hr="[object Array]",Ur="[object Boolean]",Xr="[object Date]",Vr="[object Error]",ie="[object Function]",Gr="[object GeneratorFunction]",Zr="[object Map]",qr="[object Number]",ne="[object Object]",$r="[object RegExp]",Jr="[object Set]",Qr="[object String]",ta="[object Symbol]",ea="[object WeakMap]",ra="[object ArrayBuffer]",aa="[object DataView]",sa="[object Float32Array]",ia="[object Float64Array]",na="[object Int8Array]",la="[object Int16Array]",ca="[object Int32Array]",oa="[object Uint8Array]",ha="[object Uint8ClampedArray]",ga="[object Uint16Array]",da="[object Uint32Array]",C={};C[se]=C[Hr]=C[ra]=C[aa]=C[Ur]=C[Xr]=C[sa]=C[ia]=C[na]=C[la]=C[ca]=C[Zr]=C[qr]=C[ne]=C[$r]=C[Jr]=C[Qr]=C[ta]=C[oa]=C[ha]=C[ga]=C[da]=!0;C[Vr]=C[ie]=C[ea]=!1;function ct(e,t,r,n,i,s){var a,l=t&Kr;if(a!==void 0)return a;if(!Re(e))return e;var c=Jt(e);if(c)return a=dr(e),ze(e,a);var f=_t(e),h=f==ie||f==Gr;if(Me(e))return je(e,l);if(f==ne||f==se||h&&!i)return a=h?{}:Fe(e),nr(e,er(a,e));if(!C[f])return i?e:{};a=zr(e,f,l),s||(s=new Pe);var x=s.get(e);if(x)return x;s.set(e,a),Yr(e)?e.forEach(function(L){a.add(ct(L,t,r,L,e,s))}):Fr(e)&&e.forEach(function(L,T){a.set(T,ct(L,t,r,T,e,s))});var b=or,m=c?void 0:b(e);return tr(m||e,function(L,T){m&&(T=L,L=e[T]),We(a,T,ct(L,t,r,T,e,s))}),a}var ua=4;function pa(e){return ct(e,ua)}var mt=function(){var e=g(function(D,y,d,u){for(d=d||{},u=D.length;u--;d[D[u]]=y);return d},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],s=[1,19],a=[1,16],l=[1,17],c=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],x=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],L=[8,15,16,21,27,28,29,30,31,32,40,44,47],T=[1,49],E={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(y,d,u,w,v,o,_){var p=o.length-1;switch(v){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",o[p-1]),w.setHierarchy(o[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",o[p]),typeof o[p].length=="number"?this.$=o[p]:this.$=[o[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",o[p-1]),this.$=[o[p-1]].concat(o[p]);break;case 14:w.getLogger().debug("Rule: link: ",o[p],y),this.$={edgeTypeStr:o[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",o[p-3],o[p-1],o[p]),this.$={edgeTypeStr:o[p],label:o[p-1]};break;case 18:const M=parseInt(o[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:M,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",o[p-2],o[p-1],o[p]," typestr: ",o[p-1].edgeTypeStr);const U=w.edgeStrToEdgeData(o[p-1].edgeTypeStr);this.$=[{id:o[p-2].id,label:o[p-2].label,type:o[p-2].type,directions:o[p-2].directions},{id:o[p-2].id+"-"+o[p].id,start:o[p-2].id,end:o[p].id,label:o[p-1].label,type:"edge",directions:o[p].directions,arrowTypeEnd:U,arrowTypeStart:"arrow_open"},{id:o[p].id,label:o[p].label,type:w.typeStr2Type(o[p].typeStr),directions:o[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[p-1],o[p]),this.$={id:o[p-1].id,label:o[p-1].label,type:w.typeStr2Type(o[p-1].typeStr),directions:o[p-1].directions,widthInColumns:parseInt(o[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",o[p]),this.$={id:o[p].id,label:o[p].label,type:w.typeStr2Type(o[p].typeStr),directions:o[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",o[p]),this.$={type:"column-setting",columns:o[p]==="auto"?-1:parseInt(o[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",o[p-2],o[p-1]),w.generateId(),this.$={...o[p-2],type:"composite",children:o[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",o[p-2],o[p-1],o[p]);const P=w.generateId();this.$={id:P,type:"composite",label:"",children:o[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",o[p]),this.$={id:o[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[p-1],o[p]),this.$={id:o[p-1],label:o[p].label,typeStr:o[p].typeStr,directions:o[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",o[p]),this.$=[o[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",o[p-1],o[p]),this.$=[o[p-1]].concat(o[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",o[p-2],o[p-1],o[p]),this.$={typeStr:o[p-2]+o[p],label:o[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[p-3],o[p-2]," #3:",o[p-1],o[p]),this.$={typeStr:o[p-3]+o[p],label:o[p-2],directions:o[p-1]};break;case 35:case 36:this.$={type:"classDef",id:o[p-1].trim(),css:o[p].trim()};break;case 37:this.$={type:"applyClass",id:o[p-1].trim(),styleClass:o[p].trim()};break;case 38:this.$={type:"applyStyles",id:o[p-1].trim(),stylesStr:o[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:s,40:a,44:l,47:c}),e(h,[2,16],{14:22,15:x,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(L,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:x,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:a,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:T},{15:[1,50]},e(h,[2,27]),e(L,[2,33]),{39:[1,51]},{34:52,35:T,39:[2,31]},{32:[2,15]},e(L,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(y,d){if(d.recoverable)this.trace(y);else{var u=new Error(y);throw u.hash=d,u}},"parseError"),parse:g(function(y){var d=this,u=[0],w=[],v=[null],o=[],_=this.table,p="",M=0,O=0,U=2,P=1,Te=o.slice.call(arguments,1),j=Object.create(this.lexer),J={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(J.yy[ft]=this.yy[ft]);j.setInput(y,J.yy),J.yy.lexer=j,J.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var yt=j.yylloc;o.push(yt);var De=j.options&&j.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(K){u.length=u.length-2*K,v.length=v.length-K,o.length=o.length-K}g(Ne,"popStack");function It(){var K;return K=w.pop()||j.lex()||P,typeof K!="number"&&(K instanceof Array&&(w=K,K=w.pop()),K=d.symbols_[K]||K),K}g(It,"lex");for(var Y,Q,X,xt,tt={},it,$,Bt,nt;;){if(Q=u[u.length-1],this.defaultActions[Q]?X=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=It()),X=_[Q]&&_[Q][Y]),typeof X>"u"||!X.length||!X[0]){var bt="";nt=[];for(it in _[Q])this.terminals_[it]&&it>U&&nt.push("'"+this.terminals_[it]+"'");j.showPosition?bt="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+j.showPosition()+`
|
|
3
|
-
Expecting `+nt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":bt="Parse error on line "+(M+1)+": Unexpected "+(Y==P?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(bt,{text:j.match,token:this.terminals_[Y]||Y,line:j.yylineno,loc:yt,expected:nt})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(X[0]){case 1:
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(y){this.unput(this.match.slice(y))},"less"),pastInput:g(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var y=this.pastInput(),
|
|
5
|
-
`+
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var u=this.next();return u||this.lex()},"lex"),begin:g(function(u){this.conditionStack.push(u)},"begin"),popState:g(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:g(function(u){this.begin(u)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(u,d,w,v){switch(w){case 0:return 10;case 1:return u.getLogger().debug("Found space-block"),31;case 2:return u.getLogger().debug("Found nl-block"),31;case 3:return u.getLogger().debug("Found space-block"),29;case 4:u.getLogger().debug(".",d.yytext);break;case 5:u.getLogger().debug("_",d.yytext);break;case 6:return 5;case 7:return d.yytext=-1,28;case 8:return d.yytext=d.yytext.replace(/columns\s+/,""),u.getLogger().debug("COLUMNS (LEX)",d.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:u.getLogger().debug("LEX: POPPING STR:",d.yytext),this.popState();break;case 14:return u.getLogger().debug("LEX: STR end:",d.yytext),"STR";case 15:return d.yytext=d.yytext.replace(/space\:/,""),u.getLogger().debug("SPACE NUM (LEX)",d.yytext),21;case 16:return d.yytext="1",u.getLogger().debug("COLUMNS (LEX)",d.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),u.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),u.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),u.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),u.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),u.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),u.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),u.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),u.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),u.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),u.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return u.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return u.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return u.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return u.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return u.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return u.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return u.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),u.getLogger().debug("LEX ARR START"),38;case 75:return u.getLogger().debug("Lex: NODE_ID",d.yytext),32;case 76:return u.getLogger().debug("Lex: EOF",d.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:u.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:u.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return u.getLogger().debug("LEX: NODE_DESCR:",d.yytext),"NODE_DESCR";case 84:u.getLogger().debug("LEX POPPING"),this.popState();break;case 85:u.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (right): dir:",d.yytext),"DIR";case 87:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (left):",d.yytext),"DIR";case 88:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (x):",d.yytext),"DIR";case 89:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (y):",d.yytext),"DIR";case 90:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (up):",d.yytext),"DIR";case 91:return d.yytext=d.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (down):",d.yytext),"DIR";case 92:return d.yytext="]>",u.getLogger().debug("Lex (ARROW_DIR end):",d.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return u.getLogger().debug("Lex: LINK","#"+d.yytext+"#"),15;case 94:return u.getLogger().debug("Lex: LINK",d.yytext),15;case 95:return u.getLogger().debug("Lex: LINK",d.yytext),15;case 96:return u.getLogger().debug("Lex: LINK",d.yytext),15;case 97:return u.getLogger().debug("Lex: START_LINK",d.yytext),this.pushState("LLABEL"),16;case 98:return u.getLogger().debug("Lex: START_LINK",d.yytext),this.pushState("LLABEL"),16;case 99:return u.getLogger().debug("Lex: START_LINK",d.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return u.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),u.getLogger().debug("Lex: LINK","#"+d.yytext+"#"),15;case 103:return this.popState(),u.getLogger().debug("Lex: LINK",d.yytext),15;case 104:return this.popState(),u.getLogger().debug("Lex: LINK",d.yytext),15;case 105:return u.getLogger().debug("Lex: COLON",d.yytext),d.yytext=d.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D}();E.lexer=N;function k(){this.yy={}}return g(k,"Parser"),k.prototype=E,E.Parser=k,new k}();mt.parser=mt;var fa=mt,G=new Map,kt=[],Lt=new Map,Pt="color",Wt="fill",ya="bgFill",le=",",xa=z(),gt=new Map,ba=g(e=>Ze.sanitizeText(e,xa),"sanitizeText"),wa=g(function(e,t=""){let r=gt.get(e);r||(r={id:e,styles:[],textStyles:[]},gt.set(e,r)),t!=null&&t.split(le).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Pt).exec(n)){const a=i.replace(Wt,ya).replace(Pt,Wt);r.textStyles.push(a)}r.styles.push(i)})},"addStyleClass"),ma=g(function(e,t=""){const r=G.get(e);t!=null&&(r.styles=t.split(le))},"addStyle2Node"),La=g(function(e,t){e.split(",").forEach(function(r){let n=G.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},G.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),ce=g((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=ba(i.label)),i.type==="classDef"){wa(i.id,i.css);continue}if(i.type==="applyClass"){La(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&ma(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const s=(Lt.get(i.id)??0)+1;Lt.set(i.id,s),i.id=s+"-"+i.id,kt.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const s=G.get(i.id);if(s===void 0?G.set(i.id,i):(i.type!=="na"&&(s.type=i.type),i.label!==i.id&&(s.label=i.label)),i.children&&ce(i.children,i),i.type==="space"){const a=i.width??1;for(let l=0;l<a;l++){const c=pa(i);c.id=c.id+"-"+l,G.set(c.id,c),n.push(c)}}else s===void 0&&n.push(i)}}t.children=n},"populateBlockDatabase"),Tt=[],at={id:"root",type:"composite",children:[],columns:-1},Sa=g(()=>{S.debug("Clear called"),Ke(),at={id:"root",type:"composite",children:[],columns:-1},G=new Map([["root",at]]),Tt=[],gt=new Map,kt=[],Lt=new Map},"clear");function oe(e){switch(S.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return S.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(oe,"typeStr2Type");function he(e){switch(S.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}g(he,"edgeTypeStr2Type");function ge(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}g(ge,"edgeStrToEdgeData");var Yt=0,va=g(()=>(Yt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Yt),"generateId"),Ea=g(e=>{at.children=e,ce(e,at),Tt=at.children},"setHierarchy"),_a=g(e=>{const t=G.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ka=g(()=>[...G.values()],"getBlocksFlat"),Ta=g(()=>Tt||[],"getBlocks"),Da=g(()=>kt,"getEdges"),Na=g(e=>G.get(e),"getBlock"),Ca=g(e=>{G.set(e.id,e)},"setBlock"),Ia=g(()=>console,"getLogger"),Ba=g(function(){return gt},"getClasses"),Aa={getConfig:g(()=>st().block,"getConfig"),typeStr2Type:oe,edgeTypeStr2Type:he,edgeStrToEdgeData:ge,getLogger:Ia,getBlocksFlat:ka,getBlocks:Ta,getEdges:Da,setHierarchy:Ea,getBlock:Na,setBlock:Ca,getColumns:_a,getClasses:Ba,clear:Sa,generateId:va},Oa=Aa,lt=g((e,t)=>{const r=Qe,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return He(n,i,s,t)},"fade"),Ra=g(e=>`.label {
|
|
3
|
+
Expecting `+nt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":bt="Parse error on line "+(M+1)+": Unexpected "+(Y==P?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(bt,{text:j.match,token:this.terminals_[Y]||Y,line:j.yylineno,loc:yt,expected:nt})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(X[0]){case 1:u.push(Y),v.push(j.yytext),o.push(j.yylloc),u.push(X[1]),Y=null,O=j.yyleng,p=j.yytext,M=j.yylineno,yt=j.yylloc;break;case 2:if($=this.productions_[X[1]][1],tt.$=v[v.length-$],tt._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},De&&(tt._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),xt=this.performAction.apply(tt,[p,O,M,J.yy,X[1],v,o].concat(Te)),typeof xt<"u")return xt;$&&(u=u.slice(0,-1*$*2),v=v.slice(0,-1*$),o=o.slice(0,-1*$)),u.push(this.productions_[X[1]][0]),v.push(tt.$),o.push(tt._$),Bt=_[u[u.length-2]][u[u.length-1]],u.push(Bt);break;case 3:return!0}}return!0},"parse")},N=function(){var D={EOF:1,parseError:g(function(d,u){if(this.yy.parser)this.yy.parser.parseError(d,u);else throw new Error(d)},"parseError"),setInput:g(function(y,d){return this.yy=d||this.yy||{},this._input=y,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:g(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var d=y.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),y},"input"),unput:g(function(y){var d=y.length,u=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var w=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),u.length-1&&(this.yylineno-=u.length-1);var v=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:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(y){this.unput(this.match.slice(y))},"less"),pastInput:g(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var y=this.pastInput(),d=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
|
|
5
|
+
`+d+"^"},"showPosition"),test_match:g(function(y,d){var u,w,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),w=y[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+y[0].length},this.yytext+=y[0],this.match+=y[0],this.matches=y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(y[0].length),this.matched+=y[0],u=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var o in v)this[o]=v[o];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var y,d,u,w;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),o=0;o<v.length;o++)if(u=this._input.match(this.rules[v[o]]),u&&(!d||u[0].length>d[0].length)){if(d=u,w=o,this.options.backtrack_lexer){if(y=this.test_match(u,v[o]),y!==!1)return y;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(y=this.test_match(d,v[w]),y!==!1?y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var d=this.next();return d||this.lex()},"lex"),begin:g(function(d){this.conditionStack.push(d)},"begin"),popState:g(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:g(function(d){this.begin(d)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(d,u,w,v){switch(w){case 0:return 10;case 1:return d.getLogger().debug("Found space-block"),31;case 2:return d.getLogger().debug("Found nl-block"),31;case 3:return d.getLogger().debug("Found space-block"),29;case 4:d.getLogger().debug(".",u.yytext);break;case 5:d.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),d.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:d.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return d.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),d.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",d.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),d.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),d.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),d.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),d.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),d.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),d.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),d.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),d.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),d.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),d.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),d.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),d.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),d.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return d.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return d.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return d.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return d.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return d.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return d.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return d.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return d.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),d.getLogger().debug("LEX ARR START"),38;case 75:return d.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return d.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:d.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:d.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return d.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:d.getLogger().debug("LEX POPPING"),this.popState();break;case 85:d.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),d.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",d.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return d.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return d.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return d.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return d.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return d.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return d.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return d.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),d.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),d.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),d.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return d.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D}();E.lexer=N;function k(){this.yy={}}return g(k,"Parser"),k.prototype=E,E.Parser=k,new k}();mt.parser=mt;var fa=mt,G=new Map,kt=[],Lt=new Map,Pt="color",Wt="fill",ya="bgFill",le=",",xa=z(),gt=new Map,ba=g(e=>Ze.sanitizeText(e,xa),"sanitizeText"),wa=g(function(e,t=""){let r=gt.get(e);r||(r={id:e,styles:[],textStyles:[]},gt.set(e,r)),t!=null&&t.split(le).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Pt).exec(n)){const a=i.replace(Wt,ya).replace(Pt,Wt);r.textStyles.push(a)}r.styles.push(i)})},"addStyleClass"),ma=g(function(e,t=""){const r=G.get(e);t!=null&&(r.styles=t.split(le))},"addStyle2Node"),La=g(function(e,t){e.split(",").forEach(function(r){let n=G.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},G.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),ce=g((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=ba(i.label)),i.type==="classDef"){wa(i.id,i.css);continue}if(i.type==="applyClass"){La(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&ma(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const s=(Lt.get(i.id)??0)+1;Lt.set(i.id,s),i.id=s+"-"+i.id,kt.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const s=G.get(i.id);if(s===void 0?G.set(i.id,i):(i.type!=="na"&&(s.type=i.type),i.label!==i.id&&(s.label=i.label)),i.children&&ce(i.children,i),i.type==="space"){const a=i.width??1;for(let l=0;l<a;l++){const c=pa(i);c.id=c.id+"-"+l,G.set(c.id,c),n.push(c)}}else s===void 0&&n.push(i)}}t.children=n},"populateBlockDatabase"),Tt=[],at={id:"root",type:"composite",children:[],columns:-1},Sa=g(()=>{S.debug("Clear called"),Ke(),at={id:"root",type:"composite",children:[],columns:-1},G=new Map([["root",at]]),Tt=[],gt=new Map,kt=[],Lt=new Map},"clear");function oe(e){switch(S.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return S.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(oe,"typeStr2Type");function he(e){switch(S.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}g(he,"edgeTypeStr2Type");function ge(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}g(ge,"edgeStrToEdgeData");var Yt=0,va=g(()=>(Yt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Yt),"generateId"),Ea=g(e=>{at.children=e,ce(e,at),Tt=at.children},"setHierarchy"),_a=g(e=>{const t=G.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ka=g(()=>[...G.values()],"getBlocksFlat"),Ta=g(()=>Tt||[],"getBlocks"),Da=g(()=>kt,"getEdges"),Na=g(e=>G.get(e),"getBlock"),Ca=g(e=>{G.set(e.id,e)},"setBlock"),Ia=g(()=>console,"getLogger"),Ba=g(function(){return gt},"getClasses"),Aa={getConfig:g(()=>st().block,"getConfig"),typeStr2Type:oe,edgeTypeStr2Type:he,edgeStrToEdgeData:ge,getLogger:Ia,getBlocksFlat:ka,getBlocks:Ta,getEdges:Da,setHierarchy:Ea,getBlock:Na,setBlock:Ca,getColumns:_a,getClasses:Ba,clear:Sa,generateId:va},Oa=Aa,lt=g((e,t)=>{const r=Qe,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return He(n,i,s,t)},"fade"),Ra=g(e=>`.label {
|
|
7
7
|
font-family: ${e.fontFamily};
|
|
8
8
|
color: ${e.nodeTextColor||e.textColor};
|
|
9
9
|
}
|
|
@@ -115,7 +115,7 @@ Expecting `+nt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":bt="Parse error
|
|
|
115
115
|
font-size: 18px;
|
|
116
116
|
fill: ${e.textColor};
|
|
117
117
|
}
|
|
118
|
-
`,"getStyles"),za=Ra,Ma=g((e,t,r,n)=>{t.forEach(i=>{Va[i](e,r,n)})},"insertMarkers"),ja=g((e,t,r)=>{S.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Fa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Pa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Wa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ya=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Ka=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Ha=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Ua=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Xa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Va={extension:ja,composition:Fa,aggregation:Pa,dependency:Wa,lollipop:Ya,point:Ka,circle:Ha,cross:Ua,barb:Xa},Ga=Ma,Zt,qt,A=((qt=(Zt=z())==null?void 0:Zt.block)==null?void 0:qt.padding)??8;function ue(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}g(ue,"calculateBlockPosition");var Za=g(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:s,x:a,y:l}=n.size??{width:0,height:0,x:0,y:0};S.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",a,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),s>r&&(r=s))}return{width:t,height:r}},"getMaxChildSize");function ut(e,t,r=0,n=0){var a,l,c,f,h,x,b,m,L,T,E;S.debug("setBlockSizes abc95 (start)",e.id,(a=e==null?void 0:e.size)==null?void 0:a.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,s=0;if(((c=e.children)==null?void 0:c.length)>0){for(const v of e.children)ut(v,t);const N=Za(e);i=N.width,s=N.height,S.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,s);for(const v of e.children)v.size&&(S.debug(`abc95 Setting size of children of ${e.id} id=${v.id} ${i} ${s} ${JSON.stringify(v.size)}`),v.size.width=i*(v.widthInColumns??1)+A*((v.widthInColumns??1)-1),v.size.height=s,v.size.x=0,v.size.y=0,S.debug(`abc95 updating size of ${e.id} children child:${v.id} maxWidth:${i} maxHeight:${s}`));for(const v of e.children)ut(v,t,i,s);const k=e.columns??-1;let D=0;for(const v of e.children)D+=v.widthInColumns??1;let y=e.children.length;k>0&&k<D&&(y=k);const u=Math.ceil(D/y);let d=y*(i+A)+A,w=u*(s+A)+A;if(d<r){S.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${r} sieblingHeight ${n} width ${d}`),d=r,w=n;const v=(r-y*A-A)/y,o=(n-u*A-A)/u;S.debug("Size indata abc88",e.id,"childWidth",v,"maxWidth",i),S.debug("Size indata abc88",e.id,"childHeight",o,"maxHeight",s),S.debug("Size indata abc88 xSize",y,"padding",A);for(const _ of e.children)_.size&&(_.size.width=v,_.size.height=o,_.size.x=0,_.size.y=0)}if(S.debug(`abc95 (finale calc) ${e.id} xSize ${y} ySize ${u} columns ${k}${e.children.length} width=${Math.max(d,((f=e.size)==null?void 0:f.width)||0)}`),d<(((h=e==null?void 0:e.size)==null?void 0:h.width)||0)){d=((x=e==null?void 0:e.size)==null?void 0:x.width)||0;const v=k>0?Math.min(e.children.length,k):e.children.length;if(v>0){const o=(d-v*A-A)/v;S.debug("abc95 (growing to fit) width",e.id,d,(b=e.size)==null?void 0:b.width,o);for(const _ of e.children)_.size&&(_.size.width=o)}}e.size={width:d,height:w,x:0,y:0}}S.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(L=e==null?void 0:e.size)==null?void 0:L.width,(T=e==null?void 0:e.size)==null?void 0:T.y,(E=e==null?void 0:e.size)==null?void 0:E.height)}g(ut,"setBlockSizes");function Dt(e,t){var n,i,s,a,l,c,f,h,x,b,m,L,T,E,N,k,D;S.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(s=e==null?void 0:e.size)==null?void 0:s.width}`);const r=e.columns??-1;if(S.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const y=((l=(a=e==null?void 0:e.children[0])==null?void 0:a.size)==null?void 0:l.width)??0,u=e.children.length*y+(e.children.length-1)*A;S.debug("widthOfChildren 88",u,"posX");let d=0;S.debug("abc91 block?.size?.x",e.id,(c=e==null?void 0:e.size)==null?void 0:c.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((x=e==null?void 0:e.size)==null?void 0:x.width)/2||0):-A,v=0;for(const o of e.children){const _=e;if(!o.size)continue;const{width:p,height:M}=o.size,{px:O,py:U}=ue(r,d);if(U!=v&&(v=U,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((L=e==null?void 0:e.size)==null?void 0:L.width)/2||0):-A,S.debug("New row in layout for block",e.id," and child ",o.id,v)),S.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${d} (px, py) ${O},${U} (${(T=_==null?void 0:_.size)==null?void 0:T.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${p}${A}`),_.size){const P=p/2;o.size.x=w+A+P,S.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${w} new startingPosX${o.size.x} ${P} padding=${A} width=${p} halfWidth=${P} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((o==null?void 0:o.widthInColumns)??1)/2}`),w=o.size.x+P,o.size.y=_.size.y-_.size.height/2+U*(M+A)+M/2+A,S.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${w}${A}${P}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2${p*((o==null?void 0:o.widthInColumns)??1)/2}`)}o.children&&Dt(o),d+=(o==null?void 0:o.widthInColumns)??1,S.debug("abc88 columnsPos",o,d)}}S.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(N=e==null?void 0:e.size)==null?void 0:N.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(D=e==null?void 0:e.size)==null?void 0:D.width}`)}g(Dt,"layoutBlocks");function Nt(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:s,y:a,width:l,height:c}=e.size;s-l/2<t&&(t=s-l/2),a-c/2<r&&(r=a-c/2),s+l/2>n&&(n=s+l/2),a+c/2>i&&(i=a+c/2)}if(e.children)for(const s of e.children)({minX:t,minY:r,maxX:n,maxY:i}=Nt(s,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}g(Nt,"findBounds");function de(e){const t=e.getBlock("root");if(!t)return;ut(t,e,0,0),Dt(t),S.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:s}=Nt(t),a=s-n,l=i-r;return{x:r,y:n,width:l,height:a}}g(de,"layout");function St(e,t){t&&e.attr("style",t)}g(St,"applyStyle");function pe(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",s=r.append("span");return s.html(n),St(s,e.labelStyle),s.attr("class",i),St(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}g(pe,"addHtmlLabel");var qa=g((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),q(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),S.debug("vertexText"+i);const s={isNode:n,label:qe(wt(i)),labelStyle:t.replace("fill:","color:")};return pe(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?a=i:a=[];for(const l of a){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=l.trim(),s.appendChild(c)}return s}},"createLabel"),V=qa,$a=g((e,t,r,n,i)=>{t.arrowTypeStart&&Kt(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Kt(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Ja={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Kt=g((e,t,r,n,i,s)=>{const a=Ja[r];if(!a){S.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${s}-${a}${l})`)},"addEdgeMarker"),vt={},W={},Qa=g((e,t)=>{const r=z(),n=q(r.flowchart.htmlLabels),i=t.labelType==="markdown"?ee(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):V(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label");a.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}a.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),vt[t.id]=s,t.width=l.width,t.height=l.height;let c;if(t.startLabelLeft){const f=V(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),W[t.id]||(W[t.id]={}),W[t.id].startLeft=h,rt(c,t.startLabelLeft)}if(t.startLabelRight){const f=V(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=h.node().appendChild(f),x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),W[t.id]||(W[t.id]={}),W[t.id].startRight=h,rt(c,t.startLabelRight)}if(t.endLabelLeft){const f=V(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),W[t.id]||(W[t.id]={}),W[t.id].endLeft=h,rt(c,t.endLabelLeft)}if(t.endLabelRight){const f=V(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),W[t.id]||(W[t.id]={}),W[t.id].endRight=h,rt(c,t.endLabelRight)}return i},"insertEdgeLabel");function rt(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(rt,"setTerminalWidth");var ts=g((e,t)=>{S.debug("Moving label abc88 ",e.id,e.label,vt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=Ge(n);if(e.label){const s=vt[e.id];let a=e.x,l=e.y;if(r){const c=et.calcLabelPosition(r);S.debug("Moving label "+e.label+" from (",a,",",l,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(a=c.x,l=c.y)}s.attr("transform",`translate(${a}, ${l+i/2})`)}if(e.startLabelLeft){const s=W[e.id].startLeft;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.startLabelRight){const s=W[e.id].startRight;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.endLabelLeft){const s=W[e.id].endLeft;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.endLabelRight){const s=W[e.id].endRight;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}},"positionEdgeLabel"),es=g((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),a=e.width/2,l=e.height/2;return i>=a||s>=l},"outsideNode"),rs=g((e,t,r)=>{S.debug(`intersection calc abc89:
|
|
118
|
+
`,"getStyles"),za=Ra,Ma=g((e,t,r,n)=>{t.forEach(i=>{Va[i](e,r,n)})},"insertMarkers"),ja=g((e,t,r)=>{S.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Fa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Pa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Wa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ya=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Ka=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Ha=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Ua=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Xa=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Va={extension:ja,composition:Fa,aggregation:Pa,dependency:Wa,lollipop:Ya,point:Ka,circle:Ha,cross:Ua,barb:Xa},Ga=Ma,Zt,qt,A=((qt=(Zt=z())==null?void 0:Zt.block)==null?void 0:qt.padding)??8;function de(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}g(de,"calculateBlockPosition");var Za=g(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:s,x:a,y:l}=n.size??{width:0,height:0,x:0,y:0};S.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",a,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),s>r&&(r=s))}return{width:t,height:r}},"getMaxChildSize");function dt(e,t,r=0,n=0){var a,l,c,f,h,x,b,m,L,T,E;S.debug("setBlockSizes abc95 (start)",e.id,(a=e==null?void 0:e.size)==null?void 0:a.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,s=0;if(((c=e.children)==null?void 0:c.length)>0){for(const v of e.children)dt(v,t);const N=Za(e);i=N.width,s=N.height,S.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,s);for(const v of e.children)v.size&&(S.debug(`abc95 Setting size of children of ${e.id} id=${v.id} ${i} ${s} ${JSON.stringify(v.size)}`),v.size.width=i*(v.widthInColumns??1)+A*((v.widthInColumns??1)-1),v.size.height=s,v.size.x=0,v.size.y=0,S.debug(`abc95 updating size of ${e.id} children child:${v.id} maxWidth:${i} maxHeight:${s}`));for(const v of e.children)dt(v,t,i,s);const k=e.columns??-1;let D=0;for(const v of e.children)D+=v.widthInColumns??1;let y=e.children.length;k>0&&k<D&&(y=k);const d=Math.ceil(D/y);let u=y*(i+A)+A,w=d*(s+A)+A;if(u<r){S.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${r} sieblingHeight ${n} width ${u}`),u=r,w=n;const v=(r-y*A-A)/y,o=(n-d*A-A)/d;S.debug("Size indata abc88",e.id,"childWidth",v,"maxWidth",i),S.debug("Size indata abc88",e.id,"childHeight",o,"maxHeight",s),S.debug("Size indata abc88 xSize",y,"padding",A);for(const _ of e.children)_.size&&(_.size.width=v,_.size.height=o,_.size.x=0,_.size.y=0)}if(S.debug(`abc95 (finale calc) ${e.id} xSize ${y} ySize ${d} columns ${k}${e.children.length} width=${Math.max(u,((f=e.size)==null?void 0:f.width)||0)}`),u<(((h=e==null?void 0:e.size)==null?void 0:h.width)||0)){u=((x=e==null?void 0:e.size)==null?void 0:x.width)||0;const v=k>0?Math.min(e.children.length,k):e.children.length;if(v>0){const o=(u-v*A-A)/v;S.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,o);for(const _ of e.children)_.size&&(_.size.width=o)}}e.size={width:u,height:w,x:0,y:0}}S.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(L=e==null?void 0:e.size)==null?void 0:L.width,(T=e==null?void 0:e.size)==null?void 0:T.y,(E=e==null?void 0:e.size)==null?void 0:E.height)}g(dt,"setBlockSizes");function Dt(e,t){var n,i,s,a,l,c,f,h,x,b,m,L,T,E,N,k,D;S.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(s=e==null?void 0:e.size)==null?void 0:s.width}`);const r=e.columns??-1;if(S.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const y=((l=(a=e==null?void 0:e.children[0])==null?void 0:a.size)==null?void 0:l.width)??0,d=e.children.length*y+(e.children.length-1)*A;S.debug("widthOfChildren 88",d,"posX");let u=0;S.debug("abc91 block?.size?.x",e.id,(c=e==null?void 0:e.size)==null?void 0:c.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((x=e==null?void 0:e.size)==null?void 0:x.width)/2||0):-A,v=0;for(const o of e.children){const _=e;if(!o.size)continue;const{width:p,height:M}=o.size,{px:O,py:U}=de(r,u);if(U!=v&&(v=U,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((L=e==null?void 0:e.size)==null?void 0:L.width)/2||0):-A,S.debug("New row in layout for block",e.id," and child ",o.id,v)),S.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${u} (px, py) ${O},${U} (${(T=_==null?void 0:_.size)==null?void 0:T.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${p}${A}`),_.size){const P=p/2;o.size.x=w+A+P,S.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${w} new startingPosX${o.size.x} ${P} padding=${A} width=${p} halfWidth=${P} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((o==null?void 0:o.widthInColumns)??1)/2}`),w=o.size.x+P,o.size.y=_.size.y-_.size.height/2+U*(M+A)+M/2+A,S.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${w}${A}${P}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2${p*((o==null?void 0:o.widthInColumns)??1)/2}`)}o.children&&Dt(o),u+=(o==null?void 0:o.widthInColumns)??1,S.debug("abc88 columnsPos",o,u)}}S.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(N=e==null?void 0:e.size)==null?void 0:N.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(D=e==null?void 0:e.size)==null?void 0:D.width}`)}g(Dt,"layoutBlocks");function Nt(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:s,y:a,width:l,height:c}=e.size;s-l/2<t&&(t=s-l/2),a-c/2<r&&(r=a-c/2),s+l/2>n&&(n=s+l/2),a+c/2>i&&(i=a+c/2)}if(e.children)for(const s of e.children)({minX:t,minY:r,maxX:n,maxY:i}=Nt(s,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}g(Nt,"findBounds");function ue(e){const t=e.getBlock("root");if(!t)return;dt(t,e,0,0),Dt(t),S.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:s}=Nt(t),a=s-n,l=i-r;return{x:r,y:n,width:l,height:a}}g(ue,"layout");function St(e,t){t&&e.attr("style",t)}g(St,"applyStyle");function pe(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",s=r.append("span");return s.html(n),St(s,e.labelStyle),s.attr("class",i),St(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}g(pe,"addHtmlLabel");var qa=g((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),q(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),S.debug("vertexText"+i);const s={isNode:n,label:qe(wt(i)),labelStyle:t.replace("fill:","color:")};return pe(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?a=i:a=[];for(const l of a){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=l.trim(),s.appendChild(c)}return s}},"createLabel"),V=qa,$a=g((e,t,r,n,i)=>{t.arrowTypeStart&&Kt(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Kt(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Ja={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Kt=g((e,t,r,n,i,s)=>{const a=Ja[r];if(!a){S.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${s}-${a}${l})`)},"addEdgeMarker"),vt={},W={},Qa=g((e,t)=>{const r=z(),n=q(r.flowchart.htmlLabels),i=t.labelType==="markdown"?ee(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):V(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label");a.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}a.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),vt[t.id]=s,t.width=l.width,t.height=l.height;let c;if(t.startLabelLeft){const f=V(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),W[t.id]||(W[t.id]={}),W[t.id].startLeft=h,rt(c,t.startLabelLeft)}if(t.startLabelRight){const f=V(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=h.node().appendChild(f),x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),W[t.id]||(W[t.id]={}),W[t.id].startRight=h,rt(c,t.startLabelRight)}if(t.endLabelLeft){const f=V(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),W[t.id]||(W[t.id]={}),W[t.id].endLeft=h,rt(c,t.endLabelLeft)}if(t.endLabelRight){const f=V(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),x=h.insert("g").attr("class","inner");c=x.node().appendChild(f);const b=f.getBBox();x.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),W[t.id]||(W[t.id]={}),W[t.id].endRight=h,rt(c,t.endLabelRight)}return i},"insertEdgeLabel");function rt(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(rt,"setTerminalWidth");var ts=g((e,t)=>{S.debug("Moving label abc88 ",e.id,e.label,vt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=Ge(n);if(e.label){const s=vt[e.id];let a=e.x,l=e.y;if(r){const c=et.calcLabelPosition(r);S.debug("Moving label "+e.label+" from (",a,",",l,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(a=c.x,l=c.y)}s.attr("transform",`translate(${a}, ${l+i/2})`)}if(e.startLabelLeft){const s=W[e.id].startLeft;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.startLabelRight){const s=W[e.id].startRight;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.endLabelLeft){const s=W[e.id].endLeft;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}if(e.endLabelRight){const s=W[e.id].endRight;let a=e.x,l=e.y;if(r){const c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=c.x,l=c.y}s.attr("transform",`translate(${a}, ${l})`)}},"positionEdgeLabel"),es=g((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),a=e.width/2,l=e.height/2;return i>=a||s>=l},"outsideNode"),rs=g((e,t,r)=>{S.debug(`intersection calc abc89:
|
|
119
119
|
outsidePoint: ${JSON.stringify(t)}
|
|
120
120
|
insidePoint : ${JSON.stringify(r)}
|
|
121
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,s=Math.abs(n-r.x),a=e.width/2;let l=r.x<t.x?a-s:a+s;const c=e.height/2,f=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*a>Math.abs(n-t.x)*c){let x=r.y<t.y?t.y-c-i:i-c-t.y;l=h*x/f;const b={x:r.x<t.x?r.x+l:r.x-h+l,y:r.y<t.y?r.y+f-x:r.y-f+x};return l===0&&(b.x=t.x,b.y=t.y),h===0&&(b.x=t.x),f===0&&(b.y=t.y),S.debug(`abc89 topp/bott calc, Q ${f}, q ${x}, R ${h}, r ${l}`,b),b}else{r.x<t.x?l=t.x-a-n:l=n-a-t.x;let x=f*l/h,b=r.x<t.x?r.x+h-l:r.x-h+l,m=r.y<t.y?r.y+x:r.y-x;return S.debug(`sides calc abc89, Q ${f}, q ${x}, R ${h}, r ${l}`,{_x:b,_y:m}),l===0&&(b=t.x,m=t.y),h===0&&(b=t.x),f===0&&(m=t.y),{x:b,y:m}}},"intersection"),Ht=g((e,t)=>{S.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(!es(t,s)&&!i){const a=rs(t,n,s);let l=!1;r.forEach(c=>{l=l||c.x===a.x&&c.y===a.y}),r.some(c=>c.x===a.x&&c.y===a.y)||r.push(a),i=!0}else n=s,i||r.push(s)}),r},"cutPathAtIntersect"),as=g(function(e,t,r,n,i,s,a){let l=r.points;S.debug("abc88 InsertEdge: edge=",r,"e=",t);let c=!1;const f=s.node(t.v);var h=s.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(S.debug("to cluster abc88",n[r.toCluster]),l=Ht(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(S.debug("from cluster abc88",n[r.fromCluster]),l=Ht(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const x=l.filter(y=>!Number.isNaN(y.y));let b=Ve;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:L}=Ue(r),T=Xe().x(m).y(L).curve(b);let E;switch(r.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-thick";break;default:E=""}switch(r.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break}const N=e.append("path").attr("d",T(x)).attr("id",r.id).attr("class"," "+E+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),$a(N,r,k,a,i);let D={};return c&&(D.updatedPath=l),D.originalPath=r.points,D},"insertEdge"),ss=g(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),is=g((e,t,r)=>{const n=ss(e),i=2,s=t.height+2*r.padding,a=s/i,l=t.width+2*a+r.padding,c=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:a,y:0},{x:l/2,y:2*c},{x:l-a,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*c,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-a,y:-s},{x:l/2,y:-s-2*c},{x:a,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*c,y:-s/2},{x:0,y:-s/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:a,y:0},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:a,y:-s},{x:l-a,y:-s},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-a},{x:l,y:-s+a},{x:0,y:-s}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-a},{x:0,y:-s+a},{x:l,y:-s}]:n.has("right")&&n.has("left")?[{x:a,y:0},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s},{x:0,y:-s/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-c},{x:a,y:-c},{x:a,y:-s+c},{x:0,y:-s+c},{x:l/2,y:-s},{x:l,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c},{x:l,y:-c}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-a},{x:0,y:-s}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-a},{x:l,y:-s}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:n.has("right")?[{x:a,y:-c},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s+c}]:n.has("left")?[{x:a,y:0},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s},{x:0,y:-s/2}]:n.has("up")?[{x:a,y:-c},{x:a,y:-s+c},{x:0,y:-s+c},{x:l/2,y:-s},{x:l,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-c},{x:a,y:-c},{x:a,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c},{x:l,y:-c}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var ns=fe;function ye(e,t,r,n){var i=e.x,s=e.y,a=i-n.x,l=s-n.y,c=Math.sqrt(t*t*l*l+r*r*a*a),f=Math.abs(t*r*a/c);n.x<i&&(f=-f);var h=Math.abs(t*r*l/c);return n.y<s&&(h=-h),{x:i+f,y:s+h}}g(ye,"intersectEllipse");var xe=ye;function be(e,t,r){return xe(e,t,t,r)}g(be,"intersectCircle");var ls=be;function we(e,t,r,n){var i,s,a,l,c,f,h,x,b,m,L,T,E,N,k;if(i=t.y-e.y,a=e.x-t.x,c=t.x*e.y-e.x*t.y,b=i*r.x+a*r.y+c,m=i*n.x+a*n.y+c,!(b!==0&&m!==0&&Et(b,m))&&(s=n.y-r.y,l=r.x-n.x,f=n.x*r.y-r.x*n.y,h=s*e.x+l*e.y+f,x=s*t.x+l*t.y+f,!(h!==0&&x!==0&&Et(h,x))&&(L=i*l-s*a,L!==0)))return T=Math.abs(L/2),E=a*f-l*c,N=E<0?(E-T)/L:(E+T)/L,E=s*c-i*f,k=E<0?(E-T)/L:(E+T)/L,{x:N,y:k}}g(we,"intersectLine");function Et(e,t){return e*t>0}g(Et,"sameSign");var cs=we,os=me;function me(e,t,r){var n=e.x,i=e.y,s=[],a=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){a=Math.min(a,L.x),l=Math.min(l,L.y)}):(a=Math.min(a,t.x),l=Math.min(l,t.y));for(var c=n-e.width/2-a,f=i-e.height/2-l,h=0;h<t.length;h++){var x=t[h],b=t[h<t.length-1?h+1:0],m=cs(e,r,{x:c+x.x,y:f+x.y},{x:c+b.x,y:f+b.y});m&&s.push(m)}return s.length?(s.length>1&&s.sort(function(L,T){var E=L.x-r.x,N=L.y-r.y,k=Math.sqrt(E*E+N*N),D=T.x-r.x,y=T.y-r.y,u=Math.sqrt(D*D+y*y);return k<u?-1:k===u?0:1}),s[0]):e}g(me,"intersectPolygon");var hs=g((e,t)=>{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,a=e.width/2,l=e.height/2,c,f;return Math.abs(s)*a>Math.abs(i)*l?(s<0&&(l=-l),c=s===0?0:l*i/s,f=l):(i<0&&(a=-a),c=a,f=i===0?0:a*s/i),{x:r+c,y:n+f}},"intersectRect"),gs=hs,I={node:ns,circle:ls,ellipse:xe,polygon:os,rect:gs},F=g(async(e,t,r,n)=>{const i=z();let s;const a=t.useHtmlLabels||q(i.flowchart.htmlLabels);r?s=r:s="node default";const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=c.node();let x;t.labelType==="markdown"?x=ee(c,Ot(wt(f),i),{useHtmlLabels:a,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):x=h.appendChild(V(Ot(wt(f),i),t.labelStyle,!1,n));let b=x.getBBox();const m=t.padding/2;if(q(i.flowchart.htmlLabels)){const L=x.children[0],T=R(x),E=L.getElementsByTagName("img");if(E){const N=f.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...E].map(k=>new Promise(D=>{function y(){if(k.style.display="flex",k.style.flexDirection="column",N){const u=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(u,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";D(k)}g(y,"setupImage"),setTimeout(()=>{k.complete&&y()}),k.addEventListener("error",y),k.addEventListener("load",y)})))}b=L.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}return a?c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):c.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:c}},"labelHelper"),B=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function Z(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Z,"insertPolygonShape");var us=g(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:s}=await F(e,t,"node "+t.classes,!0);S.info("Classes = ",t.classes);const a=n.insert("rect",":first-child");return a.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-s).attr("y",-i.height/2-s).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,a),t.intersect=function(l){return I.rect(t,l)},n},"note"),ds=us,Ut=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${Ut(e.classes)} ${Ut(e.class)}`,"getClassesFromNode"),Xt=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=i+s,l=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];S.info("Question main (Circle)");const c=Z(r,a,a,l);return c.attr("style",t.style),B(t,c),t.intersect=function(f){return S.warn("Intersect called"),I.polygon(t,l,f)},r},"question"),ps=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(a){return I.circle(t,14,a)},r},"choice"),fs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=4,s=n.height+t.padding,a=s/i,l=n.width+2*a+t.padding,c=[{x:a,y:0},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],f=Z(r,l,s,c);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return I.polygon(t,c,h)},r},"hexagon"),ys=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,s=n.height+2*t.padding,a=s/i,l=n.width+2*a+t.padding,c=is(t.directions,n,t),f=Z(r,l,s,c);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return I.polygon(t,c,h)},r},"block_arrow"),xs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Z(r,i,s,a).attr("style",t.style),t.width=i+s,t.height=s,t.intersect=function(c){return I.polygon(t,a,c)},r},"rect_left_inv_arrow"),bs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"lean_right"),ws=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"lean_left"),ms=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"trapezoid"),Ls=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"inv_trapezoid"),Ss=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"rect_right_inv_arrow"),vs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=i/2,a=s/(2.5+i/50),l=n.height+a+t.padding,c="M 0,"+a+" a "+s+","+a+" 0,0,0 "+i+" 0 a "+s+","+a+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+a+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-i/2+","+-(l/2+a)+")");return B(t,f),t.intersect=function(h){const x=I.rect(t,h),b=x.x-t.x;if(s!=0&&(Math.abs(b)<t.width/2||Math.abs(b)==t.width/2&&Math.abs(x.y-t.y)>t.height/2-a)){let m=a*a*(1-b*b/(s*s));m!=0&&(m=Math.sqrt(m)),m=a-m,h.y-t.y>0&&(m=-m),x.y+=m}return x},r},"cylinder"),Es=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),s=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",f).attr("width",a).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(dt(s,t.props.borders,a,l),h.delete("borders")),h.forEach(x=>{S.warn(`Unknown node property ${x}`)})}return B(t,s),t.intersect=function(h){return I.rect(t,h)},r},"rect"),_s=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),s=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",f).attr("width",a).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(dt(s,t.props.borders,a,l),h.delete("borders")),h.forEach(x=>{S.warn(`Unknown node property ${x}`)})}return B(t,s),t.intersect=function(h){return I.rect(t,h)},r},"composite"),ks=g(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);S.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,s=0;if(n.attr("width",i).attr("height",s),r.attr("class","label edgeLabel"),t.props){const a=new Set(Object.keys(t.props));t.props.borders&&(dt(n,t.props.borders,i,s),a.delete("borders")),a.forEach(l=>{S.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(a){return I.rect(t,a)},r},"labelRect");function dt(e,t,r,n){const i=[],s=g(l=>{i.push(l,0)},"addBorder"),a=g(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(S.debug("add top border"),s(r)):a(r),t.includes("r")?(S.debug("add right border"),s(n)):a(n),t.includes("b")?(S.debug("add bottom border"),s(r)):a(r),t.includes("l")?(S.debug("add left border"),s(n)):a(n),e.attr("stroke-dasharray",i.join(" "))}g(dt,"applyNodePropertyBorders");var Ts=g((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),s=n.insert("line"),a=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,S.info("Label text abc79",c,l,typeof l=="object");const f=a.node().appendChild(V(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(q(z().flowchart.htmlLabels)){const T=f.children[0],E=R(f);h=T.getBoundingClientRect(),E.attr("width",h.width),E.attr("height",h.height)}S.info("Text 2",l);const x=l.slice(1,l.length);let b=f.getBBox();const m=a.node().appendChild(V(x.join?x.join("<br/>"):x,t.labelStyle,!0,!0));if(q(z().flowchart.htmlLabels)){const T=m.children[0],E=R(m);h=T.getBoundingClientRect(),E.attr("width",h.width),E.attr("height",h.height)}const L=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+L+5)+")"),R(f).attr("transform","translate( "+(h.width<b.width?0:-(b.width-h.width)/2)+", 0)"),h=a.node().getBBox(),a.attr("transform","translate("+-h.width/2+", "+(-h.height/2-L+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-L).attr("y",-h.height/2-L).attr("width",h.width+t.padding).attr("height",h.height+t.padding),s.attr("class","divider").attr("x1",-h.width/2-L).attr("x2",h.width/2+L).attr("y1",-h.height/2-L+b.height+L).attr("y2",-h.height/2-L+b.height+L),B(t,i),t.intersect=function(T){return I.rect(t,T)},n},"rectWithTitle"),Ds=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.height+t.padding,s=n.width+i/4+t.padding,a=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return B(t,a),t.intersect=function(l){return I.rect(t,l)},r},"stadium"),Ns=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,H(t,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),S.info("Circle main"),B(t,s),t.intersect=function(a){return S.info("Circle intersect",t,n.width/2+i,a),I.circle(t,n.width/2+i,a)},r},"circle"),Cs=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,H(t,void 0),!0),s=5,a=r.insert("g",":first-child"),l=a.insert("circle"),c=a.insert("circle");return a.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+s).attr("width",n.width+t.padding+s*2).attr("height",n.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),S.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return S.info("DoubleCircle intersect",t,n.width/2+i+s,f),I.circle(t,n.width/2+i+s,f)},r},"doublecircle"),Is=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"subroutine"),Bs=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return I.circle(t,7,i)},r},"start"),Vt=g((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,s=10;r==="LR"&&(i=10,s=70);const a=n.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return B(t,a),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return I.rect(t,l)},n},"forkJoin"),As=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(s){return I.circle(t,7,s)},r},"end"),Os=g((e,t)=>{var v;const r=t.padding/2,n=4,i=8;let s;t.classes?s="node "+t.classes:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),l=a.insert("rect",":first-child"),c=a.insert("line"),f=a.insert("line");let h=0,x=n;const b=a.insert("g").attr("class","label");let m=0;const L=(v=t.classData.annotations)==null?void 0:v[0],T=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",E=b.node().appendChild(V(T,t.labelStyle,!0,!0));let N=E.getBBox();if(q(z().flowchart.htmlLabels)){const o=E.children[0],_=R(E);N=o.getBoundingClientRect(),_.attr("width",N.width),_.attr("height",N.height)}t.classData.annotations[0]&&(x+=N.height+n,h+=N.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const D=b.node().appendChild(V(k,t.labelStyle,!0,!0));R(D).attr("class","classTitle");let y=D.getBBox();if(q(z().flowchart.htmlLabels)){const o=D.children[0],_=R(D);y=o.getBoundingClientRect(),_.attr("width",y.width),_.attr("height",y.height)}x+=y.height+n,y.width>h&&(h=y.width);const u=[];t.classData.members.forEach(o=>{const _=o.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(/</g,"<").replace(/>/g,">"));const M=b.node().appendChild(V(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=M.getBBox();if(q(z().flowchart.htmlLabels)){const U=M.children[0],P=R(M);O=U.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>h&&(h=O.width),x+=O.height+n,u.push(M)}),x+=i;const d=[];if(t.classData.methods.forEach(o=>{const _=o.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(/</g,"<").replace(/>/g,">"));const M=b.node().appendChild(V(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=M.getBBox();if(q(z().flowchart.htmlLabels)){const U=M.children[0],P=R(M);O=U.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>h&&(h=O.width),x+=O.height+n,d.push(M)}),x+=i,L){let o=(h-N.width)/2;R(E).attr("transform","translate( "+(-1*h/2+o)+", "+-1*x/2+")"),m=N.height+n}let w=(h-y.width)/2;return R(D).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*x/2+m)+")"),m+=y.height+n,c.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-x/2-r+i+m).attr("y2",-x/2-r+i+m),m+=i,u.forEach(o=>{R(o).attr("transform","translate( "+-h/2+", "+(-1*x/2+m+i/2)+")");const _=o==null?void 0:o.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-x/2-r+i+m).attr("y2",-x/2-r+i+m),m+=i,d.forEach(o=>{R(o).attr("transform","translate( "+-h/2+", "+(-1*x/2+m)+")");const _=o==null?void 0:o.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(x/2)-r).attr("width",h+t.padding).attr("height",x+t.padding),B(t,l),t.intersect=function(o){return I.rect(t,o)},a},"class_box"),Gt={rhombus:Xt,composite:_s,question:Xt,rect:Es,labelRect:ks,rectWithTitle:Ts,choice:ps,circle:Ns,doublecircle:Cs,stadium:Ds,hexagon:fs,block_arrow:ys,rect_left_inv_arrow:xs,lean_right:bs,lean_left:ws,trapezoid:ms,inv_trapezoid:Ls,rect_right_inv_arrow:Ss,cylinder:vs,start:Bs,end:As,note:ds,subroutine:Is,fork:Vt,join:Vt,class_box:Os},ot={},Le=g(async(e,t,r)=>{let n,i;if(t.link){let s;z().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),i=await Gt[t.shape](n,t,r)}else i=await Gt[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),ot[t.id]=n,t.haveCallback&&ot[t.id].attr("class",ot[t.id].attr("class")+" clickable"),n},"insertNode"),Rs=g(e=>{const t=ot[e.id];S.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ct(e,t,r=!1){var b,m,L;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let s=0,a="",l;switch(n.type){case"round":s=5,a="rect";break;case"composite":s=0,a="composite",l=0;break;case"square":a="rect";break;case"diamond":a="question";break;case"hexagon":a="hexagon";break;case"block_arrow":a="block_arrow";break;case"odd":a="rect_left_inv_arrow";break;case"lean_right":a="lean_right";break;case"lean_left":a="lean_left";break;case"trapezoid":a="trapezoid";break;case"inv_trapezoid":a="inv_trapezoid";break;case"rect_left_inv_arrow":a="rect_left_inv_arrow";break;case"circle":a="circle";break;case"ellipse":a="ellipse";break;case"stadium":a="stadium";break;case"subroutine":a="subroutine";break;case"cylinder":a="cylinder";break;case"group":a="rect";break;case"doublecircle":a="doublecircle";break;default:a="rect"}const c=$e((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:a,labelText:f,rx:s,ry:s,class:i,style:c.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((L=(m=st())==null?void 0:m.block)==null?void 0:L.padding)??0}}g(Ct,"getNodeFromBlock");async function Se(e,t,r){const n=Ct(t,r,!1);if(n.type==="group")return;const i=st(),s=await Le(e,n,{config:i}),a=s.node().getBBox(),l=r.getBlock(n.id);l.size={width:a.width,height:a.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}g(Se,"calculateBlockSize");async function ve(e,t,r){const n=Ct(t,r,!0);if(r.getBlock(n.id).type!=="space"){const s=st();await Le(e,n,{config:s}),t.intersect=n==null?void 0:n.intersect,Rs(n)}}g(ve,"insertBlockPositioned");async function pt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await pt(e,i.children,r,n)}g(pt,"performOperations");async function Ee(e,t,r){await pt(e,t,r,Se)}g(Ee,"calculateBlockSizes");async function _e(e,t,r){await pt(e,t,r,ve)}g(_e,"insertBlocks");async function ke(e,t,r,n,i){const s=new Je({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const a of r)a.size&&s.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(const a of t)if(a.start&&a.end){const l=n.getBlock(a.start),c=n.getBlock(a.end);if(l!=null&&l.size&&(c!=null&&c.size)){const f=l.size,h=c.size,x=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];as(e,{v:a.start,w:a.end,name:a.id},{...a,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),a.label&&(await Qa(e,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ts({...a,x:x[1].x,y:x[1].y},{originalPath:x}))}}}g(ke,"insertEdges");var zs=g(function(e,t){return t.db.getClasses()},"getClasses"),Ms=g(async function(e,t,r,n){const{securityLevel:i,block:s}=st(),a=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const c=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?c.select(`[id="${t}"]`):R(`[id="${t}"]`);Ga(f,["point","circle","cross"],n.type,t);const x=a.getBlocks(),b=a.getBlocksFlat(),m=a.getEdges(),L=f.insert("g").attr("class","block");await Ee(L,x,a);const T=de(a);if(await _e(L,x,a),await ke(L,m,b,a,t),T){const E=T,N=Math.max(1,Math.round(.125*(E.width/E.height))),k=E.height+N+10,D=E.width+10,{useMaxWidth:y}=s;Ye(f,k,D,!!y),S.debug("Here Bounds",T,E),f.attr("viewBox",`${E.x-5} ${E.y-5} ${E.width+10} ${E.height+10}`)}},"draw"),js={draw:Ms,getClasses:zs},Ys={parser:fa,db:Oa,renderer:js,styles:za};export{Ys as diagram};
|
|
121
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,s=Math.abs(n-r.x),a=e.width/2;let l=r.x<t.x?a-s:a+s;const c=e.height/2,f=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(i-t.y)*a>Math.abs(n-t.x)*c){let x=r.y<t.y?t.y-c-i:i-c-t.y;l=h*x/f;const b={x:r.x<t.x?r.x+l:r.x-h+l,y:r.y<t.y?r.y+f-x:r.y-f+x};return l===0&&(b.x=t.x,b.y=t.y),h===0&&(b.x=t.x),f===0&&(b.y=t.y),S.debug(`abc89 topp/bott calc, Q ${f}, q ${x}, R ${h}, r ${l}`,b),b}else{r.x<t.x?l=t.x-a-n:l=n-a-t.x;let x=f*l/h,b=r.x<t.x?r.x+h-l:r.x-h+l,m=r.y<t.y?r.y+x:r.y-x;return S.debug(`sides calc abc89, Q ${f}, q ${x}, R ${h}, r ${l}`,{_x:b,_y:m}),l===0&&(b=t.x,m=t.y),h===0&&(b=t.x),f===0&&(m=t.y),{x:b,y:m}}},"intersection"),Ht=g((e,t)=>{S.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(!es(t,s)&&!i){const a=rs(t,n,s);let l=!1;r.forEach(c=>{l=l||c.x===a.x&&c.y===a.y}),r.some(c=>c.x===a.x&&c.y===a.y)||r.push(a),i=!0}else n=s,i||r.push(s)}),r},"cutPathAtIntersect"),as=g(function(e,t,r,n,i,s,a){let l=r.points;S.debug("abc88 InsertEdge: edge=",r,"e=",t);let c=!1;const f=s.node(t.v);var h=s.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(S.debug("to cluster abc88",n[r.toCluster]),l=Ht(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(S.debug("from cluster abc88",n[r.fromCluster]),l=Ht(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const x=l.filter(y=>!Number.isNaN(y.y));let b=Ve;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:L}=Ue(r),T=Xe().x(m).y(L).curve(b);let E;switch(r.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-thick";break;default:E=""}switch(r.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break}const N=e.append("path").attr("d",T(x)).attr("id",r.id).attr("class"," "+E+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),$a(N,r,k,a,i);let D={};return c&&(D.updatedPath=l),D.originalPath=r.points,D},"insertEdge"),ss=g(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),is=g((e,t,r)=>{const n=ss(e),i=2,s=t.height+2*r.padding,a=s/i,l=t.width+2*a+r.padding,c=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:a,y:0},{x:l/2,y:2*c},{x:l-a,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*c,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-a,y:-s},{x:l/2,y:-s-2*c},{x:a,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*c,y:-s/2},{x:0,y:-s/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:a,y:0},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:a,y:-s},{x:l-a,y:-s},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-a},{x:l,y:-s+a},{x:0,y:-s}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-a},{x:0,y:-s+a},{x:l,y:-s}]:n.has("right")&&n.has("left")?[{x:a,y:0},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s},{x:0,y:-s/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-c},{x:a,y:-c},{x:a,y:-s+c},{x:0,y:-s+c},{x:l/2,y:-s},{x:l,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c},{x:l,y:-c}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-a},{x:0,y:-s}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-a},{x:l,y:-s}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:n.has("right")?[{x:a,y:-c},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s+c}]:n.has("left")?[{x:a,y:0},{x:a,y:-c},{x:l-a,y:-c},{x:l-a,y:-s+c},{x:a,y:-s+c},{x:a,y:-s},{x:0,y:-s/2}]:n.has("up")?[{x:a,y:-c},{x:a,y:-s+c},{x:0,y:-s+c},{x:l/2,y:-s},{x:l,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-c},{x:a,y:-c},{x:a,y:-s+c},{x:l-a,y:-s+c},{x:l-a,y:-c},{x:l,y:-c}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var ns=fe;function ye(e,t,r,n){var i=e.x,s=e.y,a=i-n.x,l=s-n.y,c=Math.sqrt(t*t*l*l+r*r*a*a),f=Math.abs(t*r*a/c);n.x<i&&(f=-f);var h=Math.abs(t*r*l/c);return n.y<s&&(h=-h),{x:i+f,y:s+h}}g(ye,"intersectEllipse");var xe=ye;function be(e,t,r){return xe(e,t,t,r)}g(be,"intersectCircle");var ls=be;function we(e,t,r,n){var i,s,a,l,c,f,h,x,b,m,L,T,E,N,k;if(i=t.y-e.y,a=e.x-t.x,c=t.x*e.y-e.x*t.y,b=i*r.x+a*r.y+c,m=i*n.x+a*n.y+c,!(b!==0&&m!==0&&Et(b,m))&&(s=n.y-r.y,l=r.x-n.x,f=n.x*r.y-r.x*n.y,h=s*e.x+l*e.y+f,x=s*t.x+l*t.y+f,!(h!==0&&x!==0&&Et(h,x))&&(L=i*l-s*a,L!==0)))return T=Math.abs(L/2),E=a*f-l*c,N=E<0?(E-T)/L:(E+T)/L,E=s*c-i*f,k=E<0?(E-T)/L:(E+T)/L,{x:N,y:k}}g(we,"intersectLine");function Et(e,t){return e*t>0}g(Et,"sameSign");var cs=we,os=me;function me(e,t,r){var n=e.x,i=e.y,s=[],a=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){a=Math.min(a,L.x),l=Math.min(l,L.y)}):(a=Math.min(a,t.x),l=Math.min(l,t.y));for(var c=n-e.width/2-a,f=i-e.height/2-l,h=0;h<t.length;h++){var x=t[h],b=t[h<t.length-1?h+1:0],m=cs(e,r,{x:c+x.x,y:f+x.y},{x:c+b.x,y:f+b.y});m&&s.push(m)}return s.length?(s.length>1&&s.sort(function(L,T){var E=L.x-r.x,N=L.y-r.y,k=Math.sqrt(E*E+N*N),D=T.x-r.x,y=T.y-r.y,d=Math.sqrt(D*D+y*y);return k<d?-1:k===d?0:1}),s[0]):e}g(me,"intersectPolygon");var hs=g((e,t)=>{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,a=e.width/2,l=e.height/2,c,f;return Math.abs(s)*a>Math.abs(i)*l?(s<0&&(l=-l),c=s===0?0:l*i/s,f=l):(i<0&&(a=-a),c=a,f=i===0?0:a*s/i),{x:r+c,y:n+f}},"intersectRect"),gs=hs,I={node:ns,circle:ls,ellipse:xe,polygon:os,rect:gs},F=g(async(e,t,r,n)=>{const i=z();let s;const a=t.useHtmlLabels||q(i.flowchart.htmlLabels);r?s=r:s="node default";const l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=c.node();let x;t.labelType==="markdown"?x=ee(c,Ot(wt(f),i),{useHtmlLabels:a,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):x=h.appendChild(V(Ot(wt(f),i),t.labelStyle,!1,n));let b=x.getBBox();const m=t.padding/2;if(q(i.flowchart.htmlLabels)){const L=x.children[0],T=R(x),E=L.getElementsByTagName("img");if(E){const N=f.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...E].map(k=>new Promise(D=>{function y(){if(k.style.display="flex",k.style.flexDirection="column",N){const d=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(d,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";D(k)}g(y,"setupImage"),setTimeout(()=>{k.complete&&y()}),k.addEventListener("error",y),k.addEventListener("load",y)})))}b=L.getBoundingClientRect(),T.attr("width",b.width),T.attr("height",b.height)}return a?c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):c.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:c}},"labelHelper"),B=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function Z(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Z,"insertPolygonShape");var ds=g(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:s}=await F(e,t,"node "+t.classes,!0);S.info("Classes = ",t.classes);const a=n.insert("rect",":first-child");return a.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-s).attr("y",-i.height/2-s).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,a),t.intersect=function(l){return I.rect(t,l)},n},"note"),us=ds,Ut=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${Ut(e.classes)} ${Ut(e.class)}`,"getClassesFromNode"),Xt=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=i+s,l=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];S.info("Question main (Circle)");const c=Z(r,a,a,l);return c.attr("style",t.style),B(t,c),t.intersect=function(f){return S.warn("Intersect called"),I.polygon(t,l,f)},r},"question"),ps=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(a){return I.circle(t,14,a)},r},"choice"),fs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=4,s=n.height+t.padding,a=s/i,l=n.width+2*a+t.padding,c=[{x:a,y:0},{x:l-a,y:0},{x:l,y:-s/2},{x:l-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],f=Z(r,l,s,c);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return I.polygon(t,c,h)},r},"hexagon"),ys=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,s=n.height+2*t.padding,a=s/i,l=n.width+2*a+t.padding,c=is(t.directions,n,t),f=Z(r,l,s,c);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return I.polygon(t,c,h)},r},"block_arrow"),xs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Z(r,i,s,a).attr("style",t.style),t.width=i+s,t.height=s,t.intersect=function(c){return I.polygon(t,a,c)},r},"rect_left_inv_arrow"),bs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"lean_right"),ws=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"lean_left"),ms=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"trapezoid"),Ls=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"inv_trapezoid"),Ss=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"rect_right_inv_arrow"),vs=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=i/2,a=s/(2.5+i/50),l=n.height+a+t.padding,c="M 0,"+a+" a "+s+","+a+" 0,0,0 "+i+" 0 a "+s+","+a+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+a+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-i/2+","+-(l/2+a)+")");return B(t,f),t.intersect=function(h){const x=I.rect(t,h),b=x.x-t.x;if(s!=0&&(Math.abs(b)<t.width/2||Math.abs(b)==t.width/2&&Math.abs(x.y-t.y)>t.height/2-a)){let m=a*a*(1-b*b/(s*s));m!=0&&(m=Math.sqrt(m)),m=a-m,h.y-t.y>0&&(m=-m),x.y+=m}return x},r},"cylinder"),Es=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),s=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",f).attr("width",a).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ut(s,t.props.borders,a,l),h.delete("borders")),h.forEach(x=>{S.warn(`Unknown node property ${x}`)})}return B(t,s),t.intersect=function(h){return I.rect(t,h)},r},"rect"),_s=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),s=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",f).attr("width",a).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ut(s,t.props.borders,a,l),h.delete("borders")),h.forEach(x=>{S.warn(`Unknown node property ${x}`)})}return B(t,s),t.intersect=function(h){return I.rect(t,h)},r},"composite"),ks=g(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);S.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,s=0;if(n.attr("width",i).attr("height",s),r.attr("class","label edgeLabel"),t.props){const a=new Set(Object.keys(t.props));t.props.borders&&(ut(n,t.props.borders,i,s),a.delete("borders")),a.forEach(l=>{S.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(a){return I.rect(t,a)},r},"labelRect");function ut(e,t,r,n){const i=[],s=g(l=>{i.push(l,0)},"addBorder"),a=g(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(S.debug("add top border"),s(r)):a(r),t.includes("r")?(S.debug("add right border"),s(n)):a(n),t.includes("b")?(S.debug("add bottom border"),s(r)):a(r),t.includes("l")?(S.debug("add left border"),s(n)):a(n),e.attr("stroke-dasharray",i.join(" "))}g(ut,"applyNodePropertyBorders");var Ts=g((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),s=n.insert("line"),a=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,S.info("Label text abc79",c,l,typeof l=="object");const f=a.node().appendChild(V(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(q(z().flowchart.htmlLabels)){const T=f.children[0],E=R(f);h=T.getBoundingClientRect(),E.attr("width",h.width),E.attr("height",h.height)}S.info("Text 2",l);const x=l.slice(1,l.length);let b=f.getBBox();const m=a.node().appendChild(V(x.join?x.join("<br/>"):x,t.labelStyle,!0,!0));if(q(z().flowchart.htmlLabels)){const T=m.children[0],E=R(m);h=T.getBoundingClientRect(),E.attr("width",h.width),E.attr("height",h.height)}const L=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+L+5)+")"),R(f).attr("transform","translate( "+(h.width<b.width?0:-(b.width-h.width)/2)+", 0)"),h=a.node().getBBox(),a.attr("transform","translate("+-h.width/2+", "+(-h.height/2-L+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-L).attr("y",-h.height/2-L).attr("width",h.width+t.padding).attr("height",h.height+t.padding),s.attr("class","divider").attr("x1",-h.width/2-L).attr("x2",h.width/2+L).attr("y1",-h.height/2-L+b.height+L).attr("y2",-h.height/2-L+b.height+L),B(t,i),t.intersect=function(T){return I.rect(t,T)},n},"rectWithTitle"),Ds=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.height+t.padding,s=n.width+i/4+t.padding,a=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return B(t,a),t.intersect=function(l){return I.rect(t,l)},r},"stadium"),Ns=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,H(t,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),S.info("Circle main"),B(t,s),t.intersect=function(a){return S.info("Circle intersect",t,n.width/2+i,a),I.circle(t,n.width/2+i,a)},r},"circle"),Cs=g(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,H(t,void 0),!0),s=5,a=r.insert("g",":first-child"),l=a.insert("circle"),c=a.insert("circle");return a.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+s).attr("width",n.width+t.padding+s*2).attr("height",n.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),S.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return S.info("DoubleCircle intersect",t,n.width/2+i+s,f),I.circle(t,n.width/2+i+s,f)},r},"doublecircle"),Is=g(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,H(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,a=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=Z(r,i,s,a);return l.attr("style",t.style),B(t,l),t.intersect=function(c){return I.polygon(t,a,c)},r},"subroutine"),Bs=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return I.circle(t,7,i)},r},"start"),Vt=g((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,s=10;r==="LR"&&(i=10,s=70);const a=n.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return B(t,a),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return I.rect(t,l)},n},"forkJoin"),As=g((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(s){return I.circle(t,7,s)},r},"end"),Os=g((e,t)=>{var v;const r=t.padding/2,n=4,i=8;let s;t.classes?s="node "+t.classes:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),l=a.insert("rect",":first-child"),c=a.insert("line"),f=a.insert("line");let h=0,x=n;const b=a.insert("g").attr("class","label");let m=0;const L=(v=t.classData.annotations)==null?void 0:v[0],T=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",E=b.node().appendChild(V(T,t.labelStyle,!0,!0));let N=E.getBBox();if(q(z().flowchart.htmlLabels)){const o=E.children[0],_=R(E);N=o.getBoundingClientRect(),_.attr("width",N.width),_.attr("height",N.height)}t.classData.annotations[0]&&(x+=N.height+n,h+=N.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const D=b.node().appendChild(V(k,t.labelStyle,!0,!0));R(D).attr("class","classTitle");let y=D.getBBox();if(q(z().flowchart.htmlLabels)){const o=D.children[0],_=R(D);y=o.getBoundingClientRect(),_.attr("width",y.width),_.attr("height",y.height)}x+=y.height+n,y.width>h&&(h=y.width);const d=[];t.classData.members.forEach(o=>{const _=o.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(/</g,"<").replace(/>/g,">"));const M=b.node().appendChild(V(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=M.getBBox();if(q(z().flowchart.htmlLabels)){const U=M.children[0],P=R(M);O=U.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>h&&(h=O.width),x+=O.height+n,d.push(M)}),x+=i;const u=[];if(t.classData.methods.forEach(o=>{const _=o.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(/</g,"<").replace(/>/g,">"));const M=b.node().appendChild(V(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=M.getBBox();if(q(z().flowchart.htmlLabels)){const U=M.children[0],P=R(M);O=U.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>h&&(h=O.width),x+=O.height+n,u.push(M)}),x+=i,L){let o=(h-N.width)/2;R(E).attr("transform","translate( "+(-1*h/2+o)+", "+-1*x/2+")"),m=N.height+n}let w=(h-y.width)/2;return R(D).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*x/2+m)+")"),m+=y.height+n,c.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-x/2-r+i+m).attr("y2",-x/2-r+i+m),m+=i,d.forEach(o=>{R(o).attr("transform","translate( "+-h/2+", "+(-1*x/2+m+i/2)+")");const _=o==null?void 0:o.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-x/2-r+i+m).attr("y2",-x/2-r+i+m),m+=i,u.forEach(o=>{R(o).attr("transform","translate( "+-h/2+", "+(-1*x/2+m)+")");const _=o==null?void 0:o.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(x/2)-r).attr("width",h+t.padding).attr("height",x+t.padding),B(t,l),t.intersect=function(o){return I.rect(t,o)},a},"class_box"),Gt={rhombus:Xt,composite:_s,question:Xt,rect:Es,labelRect:ks,rectWithTitle:Ts,choice:ps,circle:Ns,doublecircle:Cs,stadium:Ds,hexagon:fs,block_arrow:ys,rect_left_inv_arrow:xs,lean_right:bs,lean_left:ws,trapezoid:ms,inv_trapezoid:Ls,rect_right_inv_arrow:Ss,cylinder:vs,start:Bs,end:As,note:us,subroutine:Is,fork:Vt,join:Vt,class_box:Os},ot={},Le=g(async(e,t,r)=>{let n,i;if(t.link){let s;z().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),i=await Gt[t.shape](n,t,r)}else i=await Gt[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),ot[t.id]=n,t.haveCallback&&ot[t.id].attr("class",ot[t.id].attr("class")+" clickable"),n},"insertNode"),Rs=g(e=>{const t=ot[e.id];S.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ct(e,t,r=!1){var b,m,L;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let s=0,a="",l;switch(n.type){case"round":s=5,a="rect";break;case"composite":s=0,a="composite",l=0;break;case"square":a="rect";break;case"diamond":a="question";break;case"hexagon":a="hexagon";break;case"block_arrow":a="block_arrow";break;case"odd":a="rect_left_inv_arrow";break;case"lean_right":a="lean_right";break;case"lean_left":a="lean_left";break;case"trapezoid":a="trapezoid";break;case"inv_trapezoid":a="inv_trapezoid";break;case"rect_left_inv_arrow":a="rect_left_inv_arrow";break;case"circle":a="circle";break;case"ellipse":a="ellipse";break;case"stadium":a="stadium";break;case"subroutine":a="subroutine";break;case"cylinder":a="cylinder";break;case"group":a="rect";break;case"doublecircle":a="doublecircle";break;default:a="rect"}const c=$e((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:a,labelText:f,rx:s,ry:s,class:i,style:c.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((L=(m=st())==null?void 0:m.block)==null?void 0:L.padding)??0}}g(Ct,"getNodeFromBlock");async function Se(e,t,r){const n=Ct(t,r,!1);if(n.type==="group")return;const i=st(),s=await Le(e,n,{config:i}),a=s.node().getBBox(),l=r.getBlock(n.id);l.size={width:a.width,height:a.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}g(Se,"calculateBlockSize");async function ve(e,t,r){const n=Ct(t,r,!0);if(r.getBlock(n.id).type!=="space"){const s=st();await Le(e,n,{config:s}),t.intersect=n==null?void 0:n.intersect,Rs(n)}}g(ve,"insertBlockPositioned");async function pt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await pt(e,i.children,r,n)}g(pt,"performOperations");async function Ee(e,t,r){await pt(e,t,r,Se)}g(Ee,"calculateBlockSizes");async function _e(e,t,r){await pt(e,t,r,ve)}g(_e,"insertBlocks");async function ke(e,t,r,n,i){const s=new Je({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const a of r)a.size&&s.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(const a of t)if(a.start&&a.end){const l=n.getBlock(a.start),c=n.getBlock(a.end);if(l!=null&&l.size&&(c!=null&&c.size)){const f=l.size,h=c.size,x=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];as(e,{v:a.start,w:a.end,name:a.id},{...a,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),a.label&&(await Qa(e,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),ts({...a,x:x[1].x,y:x[1].y},{originalPath:x}))}}}g(ke,"insertEdges");var zs=g(function(e,t){return t.db.getClasses()},"getClasses"),Ms=g(async function(e,t,r,n){const{securityLevel:i,block:s}=st(),a=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const c=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?c.select(`[id="${t}"]`):R(`[id="${t}"]`);Ga(f,["point","circle","cross"],n.type,t);const x=a.getBlocks(),b=a.getBlocksFlat(),m=a.getEdges(),L=f.insert("g").attr("class","block");await Ee(L,x,a);const T=ue(a);if(await _e(L,x,a),await ke(L,m,b,a,t),T){const E=T,N=Math.max(1,Math.round(.125*(E.width/E.height))),k=E.height+N+10,D=E.width+10,{useMaxWidth:y}=s;Ye(f,k,D,!!y),S.debug("Here Bounds",T,E),f.attr("viewBox",`${E.x-5} ${E.y-5} ${E.width+10} ${E.height+10}`)}},"draw"),js={draw:Ms,getClasses:zs},Ys={parser:fa,db:Oa,renderer:js,styles:za};export{Ys as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Se,d as De}from"./chunk-ASOPGD6M-BF4K1A-H.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as g,c as Dt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./main-xgsDUAqJ.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[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],Ot=[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],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[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:g(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:g(function(x,m,v,b,R,h,Rt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[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:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,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(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[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:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Rt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Rt[At]&&Rt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Rt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
|
|
1
|
+
import{g as Se,d as De}from"./chunk-ASOPGD6M-CgfyXIoW.js";import{s as Pe,g as Be,a as Ie,b as Me,_ as g,c as Dt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./main-CkEY2gMZ.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[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],Ot=[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],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[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:g(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:g(function(x,m,v,b,R,h,Rt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,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:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[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:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,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(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[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:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Rt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Rt[At]&&Rt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Rt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Rt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=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===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ah as o,ai as n}from"./main-CkEY2gMZ.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as n,d as r,e as d,l as g}from"./main-
|
|
1
|
+
import{_ as n,d as r,e as d,l as g}from"./main-CkEY2gMZ.js";var u=n((e,t)=>{let o;return t==="sandbox"&&(o=r("#i"+e)),(t==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${e}"]`)},"getDiagramElement"),b=n((e,t,o,i)=>{e.attr("class",o);const{width:a,height:s,x:h,y:x}=l(e,t);d(e,s,a,i);const c=w(h,x,a,s,t);e.attr("viewBox",c),g.debug(`viewBox configured: ${c} with padding: ${t}`)},"setupViewPortForSVG"),l=n((e,t)=>{var i;const o=((i=e.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+t*2,height:o.height+t*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((e,t,o,i,a)=>`${e-a} ${t-a} ${o} ${i}`,"createViewBox");export{u as g,b as s};
|