@layers-app/editor 0.3.11 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +6 -6
- package/dist/layers.-WGsbPEO.js +14 -0
- package/dist/layers.-wDyU9sN.js +118 -0
- package/dist/layers.0FtwCmdk.js +52 -0
- package/dist/layers.0RkUYii1.js +282 -0
- package/dist/layers.1EHoXd8e.js +8 -0
- package/dist/layers.2cerO4OS.js +139 -0
- package/dist/layers.3Ekf-o8F.js +39 -0
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.5Sr9IY96.js +9 -0
- package/dist/layers.78ekkCq0.js +116 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.9QK1wiQj.js +1 -0
- package/dist/layers.9jdDI2yV.js +36 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AEy2G-Gv.js +40 -0
- package/dist/layers.AIQle8wy.js +1 -0
- package/dist/layers.A_NuFq0j.js +2235 -0
- package/dist/layers.B0lp7rOz.js +9 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B1VZZIP7.js +21763 -0
- package/dist/layers.B2AGu32C.js +11692 -0
- package/dist/layers.B3CuqfYy.js +37 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B3xfUipV.js +2966 -0
- package/dist/layers.B4n4WelM.js +1 -0
- package/dist/layers.B4qkzU1u.js +41 -0
- package/dist/layers.B5bQ8hRv.js +70 -0
- package/dist/layers.B6YfcxJD.js +1 -0
- package/dist/layers.B7O9Ykf9.js +6 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BBXYbcFN.js +10 -0
- package/dist/layers.BBZL6QaK.js +8 -0
- package/dist/layers.BCbGsxxm.js +7 -0
- package/dist/layers.BE_DKuuD.js +790 -0
- package/dist/layers.BFlWA9Iz.js +373 -0
- package/dist/layers.BFxRJ3Li.js +1 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BLQfYqXT.js +39 -0
- package/dist/layers.BM0ksLnS.js +5 -0
- package/dist/layers.BNUbfOwd.js +42 -0
- package/dist/layers.BP3xLRrX.js +33 -0
- package/dist/layers.BQFScIff.js +9 -0
- package/dist/layers.BRu1ZkhL.js +6 -0
- package/dist/layers.BS1BSw0O.js +257 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BU5FG1HP.js +84 -0
- package/dist/layers.BUuBI6QS.js +41 -0
- package/dist/layers.BVrcjbG3.js +8 -0
- package/dist/layers.BW99L8Fl.js +39 -0
- package/dist/layers.BWj5iNQV.js +34 -0
- package/dist/layers.BYRpGhl3.js +11 -0
- package/dist/layers.BZ217a7U.js +40 -0
- package/dist/layers.Bb0NXUFw.js +39 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.BblO5S7z.js +5 -0
- package/dist/layers.BbpcdAWy.js +1 -0
- package/dist/layers.Bfw0Gunv.js +9148 -0
- package/dist/layers.BgOa2ZQq.js +7 -0
- package/dist/layers.Bh0aB-u7.js +59 -0
- package/dist/layers.BiCOjicn.js +32 -0
- package/dist/layers.BiJ8hfRt.js +1510 -0
- package/dist/layers.BirPY36J.js +268 -0
- package/dist/layers.Bit9KYIY.js +32 -0
- package/dist/layers.BjFHkSyo.js +37 -0
- package/dist/{layers.DPccTctI.js → layers.BkQdsQ8U.js} +17 -17
- package/dist/layers.BkrI3eMq.js +1089 -0
- package/dist/layers.BlPVzVNM.js +6 -0
- package/dist/layers.Bn7Yja2i.js +3 -0
- package/dist/layers.Bnu-owJj.js +61 -0
- package/dist/{layers.C125HTat.js → layers.BoIttUlh.js} +1 -1
- package/dist/layers.Bp_lUbdE.js +41 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.Bs7-WFjs.js +1283 -0
- package/dist/layers.BzRvQtZ0.js +11 -0
- package/dist/layers.C00LPdpd.js +437 -0
- package/dist/layers.C0q8oCjN.js +1034 -0
- package/dist/layers.C1iEaL9k.js +37 -0
- package/dist/layers.C1w3XBPW.js +230 -0
- package/dist/layers.C4ROEdAW.js +84 -0
- package/dist/layers.C4qaO0MD.js +10 -0
- package/dist/layers.C7lIplJU.js +247 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C996Xek1.js +2479 -0
- package/dist/layers.CAcpgnDk.js +9 -0
- package/dist/layers.CAwBq0yQ.js +10 -0
- package/dist/layers.CEmVEjbM.js +7 -0
- package/dist/layers.CFa6SgS0.js +38 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CHuQjPi1.js +32 -0
- package/dist/layers.CJBYVYBK.js +8 -0
- package/dist/layers.CLOKCltZ.js +35 -0
- package/dist/layers.COAF7f8g.js +1 -0
- package/dist/layers.COaiyaHl.js +1580 -0
- package/dist/layers.COhnMbFE.js +220 -0
- package/dist/layers.CQqtbI-S.js +122 -0
- package/dist/layers.CRWsKrSv.js +40 -0
- package/dist/layers.CSW2aYxs.js +1 -0
- package/dist/layers.CSfCebqe.js +207 -0
- package/dist/layers.CTzpQJrz.js +501 -0
- package/dist/layers.CX9eMlzX.js +6 -0
- package/dist/layers.CXUGZO8g.js +40 -0
- package/dist/layers.CYHkquLL.js +1 -0
- package/dist/layers.CYJyjqCg.js +7 -0
- package/dist/layers.C_0uL0lu.js +42 -0
- package/dist/layers.CbseH42B.js +5 -0
- package/dist/layers.CdvbuuVd.js +2 -0
- package/dist/layers.CeU6SAcT.js +8 -0
- package/dist/layers.Cef-VRJs.js +37 -0
- package/dist/layers.Cg3zhLTz.js +1 -0
- package/dist/layers.CldWERA-.js +1 -0
- package/dist/layers.Cle37JNX.js +1 -0
- package/dist/layers.CmLupkS6.js +186 -0
- package/dist/layers.Cn2QpKZw.js +51 -0
- package/dist/layers.CoVavTdv.js +1126 -0
- package/dist/layers.CoZpR7_r.js +40 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.CrZ6TV4m.js +1 -0
- package/dist/layers.CrpDpBIW.js +904 -0
- package/dist/layers.Cs24L6er.js +261 -0
- package/dist/layers.CsmOgd93.js +38 -0
- package/dist/layers.Ct-zQnmI.js +32 -0
- package/dist/layers.CuAZJoX1.js +42 -0
- package/dist/{layers.BnjxHNDK.js → layers.CylfN5iO.js} +85 -85
- package/dist/layers.CyxAbBDV.js +7 -0
- package/dist/layers.Czj3PJzZ.js +10 -0
- package/dist/layers.D-1CXIBI.js +19 -0
- package/dist/layers.D-EQ5B97.js +7 -0
- package/dist/layers.D-uwIUCE.js +139 -0
- package/dist/layers.D-xK8h4X.js +8 -0
- package/dist/layers.D0rE1hbF.js +10 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D2Jbdqtj.js +7 -0
- package/dist/layers.D3Qwcfa_.js +1619 -0
- package/dist/layers.D3sICpwv.js +8 -0
- package/dist/layers.D4DB55K_.js +2 -0
- package/dist/layers.D4RhFsg6.js +10 -0
- package/dist/layers.D4fGb2cV.js +1272 -0
- package/dist/layers.D4v0XyUf.js +1 -0
- package/dist/layers.D6SbX5Az.js +423 -0
- package/dist/layers.D6dwFhht.js +9 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D87gRG-J.js +1088 -0
- package/dist/layers.D8fb1iDb.js +10 -0
- package/dist/layers.D9JK3npg.js +41 -0
- package/dist/layers.DAvEslJc.js +33 -0
- package/dist/layers.DBOFmWi_.js +1359 -0
- package/dist/layers.DCAo6G5D.js +40 -0
- package/dist/layers.DGWfd9sT.js +5 -0
- package/dist/layers.DIc9Pn5-.js +96 -0
- package/dist/layers.DJVg69Yo.js +803 -0
- package/dist/layers.DLBD3WBx.js +11 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DPhgksD-.js +41 -0
- package/dist/layers.DPnpGXQm.js +2 -0
- package/dist/layers.DQ8aCG7v.js +769 -0
- package/dist/layers.DR14S1m9.js +161 -0
- package/dist/layers.DRFq8PR7.js +39 -0
- package/dist/layers.DRYGpdtc.js +48146 -0
- package/dist/layers.DSd23vw_.js +1 -0
- package/dist/layers.DSl3dgu7.js +7 -0
- package/dist/layers.DUYA7tE_.js +10 -0
- package/dist/layers.DVgohoWC.js +11 -0
- package/dist/layers.D_3fuwmS.js +1 -0
- package/dist/layers.D_ILz54C.js +41 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.Dd-Mdjt8.js +40 -0
- package/dist/layers.Dd9WE-Kq.js +1265 -0
- package/dist/layers.DdjaY7yq.js +9 -0
- package/dist/layers.DgJemaOm.js +65 -0
- package/dist/layers.Dgm8-XFN.js +960 -0
- package/dist/layers.DgwJ1eL7.js +13 -0
- package/dist/layers.DhZsCIrr.js +425 -0
- package/dist/layers.DipbuRcs.js +36 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.DjZdvQQY.js +1 -0
- package/dist/layers.DkyFv1Ys.js +35 -0
- package/dist/layers.Dmf-FkA-.js +4 -0
- package/dist/layers.DmgkuDwj.js +9 -0
- package/dist/layers.Dmrtdk6A.js +1 -0
- package/dist/layers.Dn02LanZ.js +931 -0
- package/dist/layers.Do3LJDis.js +202 -0
- package/dist/layers.DoI-3ssc.js +802 -0
- package/dist/layers.DobBKdZ6.js +32 -0
- package/dist/layers.DpzPbocR.js +39 -0
- package/dist/layers.Dq0wRjbC.js +35 -0
- package/dist/layers.Dqsk7GNe.js +10 -0
- package/dist/layers.DrTVlGxj.js +1 -0
- package/dist/layers.DukBaqf8.js +1 -0
- package/dist/layers.DvxaikrZ.js +10 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.DygycO7X.js +39 -0
- package/dist/{layers.VK3NB7Nd.js → layers.DzUJmmvD.js} +1 -1
- package/dist/layers.FoT1zSFE.js +42 -0
- package/dist/layers.HsplLW7l.js +4 -0
- package/dist/{layers.YZkXZvVS.js → layers.HstOwREP.js} +11432 -10897
- package/dist/layers.IKdQaUN6.js +11 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.K3yYYJdK.js +40 -0
- package/dist/layers.L1UaldnR.js +36 -0
- package/dist/layers.Lz059Um8.js +41 -0
- package/dist/layers.M6o7NygO.js +6 -0
- package/dist/layers.MLq12lxF.js +32 -0
- package/dist/layers.MczyPMMk.js +6 -0
- package/dist/layers.OGhIzIND.js +36 -0
- package/dist/layers.OH8pkzdf.js +1 -0
- package/dist/layers.OUHm0dZY.js +40 -0
- package/dist/layers.OeuRpLZr.js +41 -0
- package/dist/layers.PsWF_Poj.js +8 -0
- package/dist/layers.R7Qt9hQa.js +1 -0
- package/dist/layers.SwZPMavM.js +7 -0
- package/dist/layers.UHZ7LEG5.js +44 -0
- package/dist/layers.VAQxBGRz.js +42 -0
- package/dist/layers.WPo01EJ5.js +4 -0
- package/dist/layers.XJChT8Le.js +9 -0
- package/dist/layers.XMeRR-JR.js +39 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.bSw_jQ5U.js +40 -0
- package/dist/layers.bn1dbtN4.js +160 -0
- package/dist/layers.cdGjFrMq.js +9 -0
- package/dist/layers.cu7eSI3X.js +4 -0
- package/dist/layers.iBT5g_cH.js +320 -0
- package/dist/layers.igIdIxGe.js +9 -0
- package/dist/layers.j1hLqMc8.js +38 -0
- package/dist/layers.jrSryxFl.js +39 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.oQqeIYLp.js +21938 -0
- package/dist/layers.raic7pCl.js +793 -0
- package/dist/layers.srlypw1l.js +8 -0
- package/dist/layers.tqtFgs0l.js +1 -0
- package/dist/layers.uwhbxtz3.js +8 -0
- package/dist/layers.weZ4wJXB.js +5 -0
- package/dist/layers.wf8u33re.js +1 -0
- package/package.json +22 -15
- package/dist/layers.Cjs5EBWM.js +0 -343
- package/dist/layers.DZ8DrrVn.js +0 -53491
- package/dist/layers.QVaGPbs3.js +0 -161
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./layers.DIc9Pn5-.js"),re=require("./layers.CrZ6TV4m.js"),Ee=require("./layers.C1w3XBPW.js");var Nt=(function(){var e=function(_t,_,x,m){for(x=x||{},m=_t.length;m--;x[_t[m]]=_);return x},t=[1,24],a=[1,25],o=[1,26],l=[1,27],i=[1,28],s=[1,63],r=[1,64],n=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],E=[1,29],O=[1,30],D=[1,31],P=[1,32],N=[1,33],I=[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],it=[1,44],nt=[1,45],st=[1,46],at=[1,47],rt=[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],Ut=[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],wt=[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],v=[1,82],A=[1,83],k=[1,84],C=[1,85],T=[12,14,42],te=[12,14,33,42],St=[12,14,33,42,76,77,79,80],Et=[12,33],Ft=[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],Vt={trace:function(){},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:function(_,x,m,g,R,u,Ot){var y=u.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(u[y-3]);break;case 19:g.setTitle(u[y].substring(6)),this.$=u[y].substring(6);break;case 20:g.setAccDescription(u[y].substring(15)),this.$=u[y].substring(15);break;case 21:this.$=u[y].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=u[y].trim(),g.setAccDescription(this.$);break;case 28:case 29:u[y].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 30:g.addPersonOrSystemBoundary(...u[y]),this.$=u[y];break;case 31:u[y].splice(2,0,"CONTAINER"),g.addContainerBoundary(...u[y]),this.$=u[y];break;case 32:g.addDeploymentNode("node",...u[y]),this.$=u[y];break;case 33:g.addDeploymentNode("nodeL",...u[y]),this.$=u[y];break;case 34:g.addDeploymentNode("nodeR",...u[y]),this.$=u[y];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...u[y]),this.$=u[y];break;case 40:g.addPersonOrSystem("external_person",...u[y]),this.$=u[y];break;case 41:g.addPersonOrSystem("system",...u[y]),this.$=u[y];break;case 42:g.addPersonOrSystem("system_db",...u[y]),this.$=u[y];break;case 43:g.addPersonOrSystem("system_queue",...u[y]),this.$=u[y];break;case 44:g.addPersonOrSystem("external_system",...u[y]),this.$=u[y];break;case 45:g.addPersonOrSystem("external_system_db",...u[y]),this.$=u[y];break;case 46:g.addPersonOrSystem("external_system_queue",...u[y]),this.$=u[y];break;case 47:g.addContainer("container",...u[y]),this.$=u[y];break;case 48:g.addContainer("container_db",...u[y]),this.$=u[y];break;case 49:g.addContainer("container_queue",...u[y]),this.$=u[y];break;case 50:g.addContainer("external_container",...u[y]),this.$=u[y];break;case 51:g.addContainer("external_container_db",...u[y]),this.$=u[y];break;case 52:g.addContainer("external_container_queue",...u[y]),this.$=u[y];break;case 53:g.addComponent("component",...u[y]),this.$=u[y];break;case 54:g.addComponent("component_db",...u[y]),this.$=u[y];break;case 55:g.addComponent("component_queue",...u[y]),this.$=u[y];break;case 56:g.addComponent("external_component",...u[y]),this.$=u[y];break;case 57:g.addComponent("external_component_db",...u[y]),this.$=u[y];break;case 58:g.addComponent("external_component_queue",...u[y]),this.$=u[y];break;case 60:g.addRel("rel",...u[y]),this.$=u[y];break;case 61:g.addRel("birel",...u[y]),this.$=u[y];break;case 62:g.addRel("rel_u",...u[y]),this.$=u[y];break;case 63:g.addRel("rel_d",...u[y]),this.$=u[y];break;case 64:g.addRel("rel_l",...u[y]),this.$=u[y];break;case 65:g.addRel("rel_r",...u[y]),this.$=u[y];break;case 66:g.addRel("rel_b",...u[y]),this.$=u[y];break;case 67:u[y].splice(0,1),g.addRel("rel",...u[y]),this.$=u[y];break;case 68:g.updateElStyle("update_el_style",...u[y]),this.$=u[y];break;case 69:g.updateRelStyle("update_rel_style",...u[y]),this.$=u[y];break;case 70:g.updateLayoutConfig("update_layout_config",...u[y]),this.$=u[y];break;case 71:this.$=[u[y]];break;case 72:u[y].unshift(u[y-1]),this.$=u[y];break;case 73:case 75:this.$=u[y].trim();break;case 74:let vt={};vt[u[y-1].trim()]=u[y].trim(),this.$=vt;break;case 76:this.$="";break}},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:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:a,24:o,26:l,28:i,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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(Ut,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(wt,[2,19]),e(wt,[2,20]),{25:[1,78]},{27:[1,79]},e(wt,[2,23]),{35:80,75:81,76:v,77:A,79:k,80:C},{35:86,75:81,76:v,77:A,79:k,80:C},{35:87,75:81,76:v,77:A,79:k,80:C},{35:88,75:81,76:v,77:A,79:k,80:C},{35:89,75:81,76:v,77:A,79:k,80:C},{35:90,75:81,76:v,77:A,79:k,80:C},{35:91,75:81,76:v,77:A,79:k,80:C},{35:92,75:81,76:v,77:A,79:k,80:C},{35:93,75:81,76:v,77:A,79:k,80:C},{35:94,75:81,76:v,77:A,79:k,80:C},{35:95,75:81,76:v,77:A,79:k,80:C},{35:96,75:81,76:v,77:A,79:k,80:C},{35:97,75:81,76:v,77:A,79:k,80:C},{35:98,75:81,76:v,77:A,79:k,80:C},{35:99,75:81,76:v,77:A,79:k,80:C},{35:100,75:81,76:v,77:A,79:k,80:C},{35:101,75:81,76:v,77:A,79:k,80:C},{35:102,75:81,76:v,77:A,79:k,80:C},{35:103,75:81,76:v,77:A,79:k,80:C},{35:104,75:81,76:v,77:A,79:k,80:C},e(T,[2,59]),{35:105,75:81,76:v,77:A,79:k,80:C},{35:106,75:81,76:v,77:A,79:k,80:C},{35:107,75:81,76:v,77:A,79:k,80:C},{35:108,75:81,76:v,77:A,79:k,80:C},{35:109,75:81,76:v,77:A,79:k,80:C},{35:110,75:81,76:v,77:A,79:k,80:C},{35:111,75:81,76:v,77:A,79:k,80:C},{35:112,75:81,76:v,77:A,79:k,80:C},{35:113,75:81,76:v,77:A,79:k,80:C},{35:114,75:81,76:v,77:A,79:k,80:C},{35:115,75:81,76:v,77:A,79:k,80:C},{20:116,29:49,30:61,32:62,34:s,36:r,37:n,38:h,39:f,40:d,41:p,43:23,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,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:v,77:A,79:k,80:C},{35:120,75:81,76:v,77:A,79:k,80:C},{35:121,75:81,76:v,77:A,79:k,80:C},{35:122,75:81,76:v,77:A,79:k,80:C},{35:123,75:81,76:v,77:A,79:k,80:C},{35:124,75:81,76:v,77:A,79:k,80:C},{35:125,75:81,76:v,77:A,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Ut,[2,17],{21:22,19:130,22:t,23:a,24:o,26:l,28:i}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:a,24:o,26:l,28:i,34:s,36:r,37:n,38:h,39:f,40:d,41:p,44:E,45:O,46:D,47:P,48:N,49:I,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(wt,[2,21]),e(wt,[2,22]),e(T,[2,39]),e(te,[2,71],{75:81,35:132,76:v,77:A,79:k,80:C}),e(St,[2,73]),{78:[1,133]},e(St,[2,75]),e(St,[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(Et,[2,28]),e(Et,[2,29]),e(Et,[2,30]),e(Et,[2,31]),e(Et,[2,32]),e(Et,[2,33]),e(Et,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Ut,[2,18]),e(Ct,[2,38]),e(te,[2,72]),e(St,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ft,[2,25]),e(Ft,[2,26],{12:[1,138]}),e(Ft,[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:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],R=[null],u=[],Ot=this.table,y="",vt=0,ee=0,be=2,ie=1,_e=u.slice.call(arguments,1),S=Object.create(this.lexer),At={yy:{}};for(var Wt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wt)&&(At.yy[Wt]=this.yy[Wt]);S.setInput(_,At.yy),At.yy.lexer=S,At.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Xt=S.yylloc;u.push(Xt);var xe=S.options&&S.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(){var X;return X=g.pop()||S.lex()||ie,typeof X!="number"&&(X instanceof Array&&(g=X,X=g.pop()),X=x.symbols_[X]||X),X}for(var L,kt,B,Qt,Tt={},Pt,W,ne,Mt;;){if(kt=m[m.length-1],this.defaultActions[kt]?B=this.defaultActions[kt]:((L===null||typeof L>"u")&&(L=me()),B=Ot[kt]&&Ot[kt][L]),typeof B>"u"||!B.length||!B[0]){var Ht="";Mt=[];for(Pt in Ot[kt])this.terminals_[Pt]&&Pt>be&&Mt.push("'"+this.terminals_[Pt]+"'");S.showPosition?Ht="Parse error on line "+(vt+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+Mt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ht="Parse error on line "+(vt+1)+": Unexpected "+(L==ie?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ht,{text:S.match,token:this.terminals_[L]||L,line:S.yylineno,loc:Xt,expected:Mt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+L);switch(B[0]){case 1:m.push(L),R.push(S.yytext),u.push(S.yylloc),m.push(B[1]),L=null,ee=S.yyleng,y=S.yytext,vt=S.yylineno,Xt=S.yylloc;break;case 2:if(W=this.productions_[B[1]][1],Tt.$=R[R.length-W],Tt._$={first_line:u[u.length-(W||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(W||1)].first_column,last_column:u[u.length-1].last_column},xe&&(Tt._$.range=[u[u.length-(W||1)].range[0],u[u.length-1].range[1]]),Qt=this.performAction.apply(Tt,[y,ee,vt,At.yy,B[1],R,u].concat(_e)),typeof Qt<"u")return Qt;W&&(m=m.slice(0,-1*W*2),R=R.slice(0,-1*W),u=u.slice(0,-1*W)),m.push(this.productions_[B[1]][0]),R.push(Tt.$),u.push(Tt._$),ne=Ot[m[m.length-2]][m[m.length-1]],m.push(ne);break;case 3:return!0}}return!0}},ge=(function(){var _t={EOF:1,parseError:function(x,m){if(this.yy.parser)this.yy.parser.parseError(x,m);else throw new Error(x)},setInput:function(_,x){return this.yy=x||this.yy||{},this._input=_,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},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var x=_.length,m=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.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:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+`
|
|
5
|
+
`+x+"^"},test_match:function(_,x){var m,g,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),g=_[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,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(_[0].length),this.matched+=_[0],m=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var u in R)this[u]=R[u];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,x,m,g;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),u=0;u<R.length;u++)if(m=this._input.match(this.rules[R[u]]),m&&(!x||m[0].length>x[0].length)){if(x=m,g=u,this.options.backtrack_lexer){if(_=this.test_match(m,R[u]),_!==!1)return _;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(_=this.test_match(x,R[g]),_!==!1?_:!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})},lex:function(){var x=this.next();return x||this.lex()},begin:function(x){this.conditionStack.push(x)},popState:function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},pushState:function(x){this.begin(x)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(x,m,g,R){switch(g){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t})();Vt.lexer=ge;function zt(){this.yy={}}return zt.prototype=Vt,Vt.Parser=zt,new zt})();Nt.parser=Nt;const ve=Nt;let F=[],xt=[""],M="global",U="",z=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Dt=[],Jt="",Zt=!1,Bt=4,Yt=2;var le;const Ae=function(){return le},ke=function(e){le=w.sanitizeText$2(e,w.getConfig())},Ce=function(e,t,a,o,l,i,s,r,n){if(e==null||t===void 0||t===null||a===void 0||a===null||o===void 0||o===null)return;let h={};const f=Dt.find(d=>d.from===t&&d.to===a);if(f?h=f:Dt.push(h),h.type=e,h.from=t,h.to=a,h.label={text:o},l==null)h.techn={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]={text:p}}else h.techn={text:l};if(i==null)h.descr={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.descr={text:i};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.sprite=s;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];h[d]=p}else h.tags=r;if(typeof n=="object"){let[d,p]=Object.entries(n)[0];h[d]=p}else h.link=n;h.wrap=mt()},Te=function(e,t,a,o,l,i,s){if(t===null||a===null)return;let r={};const n=F.find(h=>h.alias===t);if(n&&t===n.alias?r=n:(r.alias=t,F.push(r)),a==null?r.label={text:""}:r.label={text:a},o==null)r.descr={text:""};else if(typeof o=="object"){let[h,f]=Object.entries(o)[0];r[h]={text:f}}else r.descr={text:o};if(typeof l=="object"){let[h,f]=Object.entries(l)[0];r[h]=f}else r.sprite=l;if(typeof i=="object"){let[h,f]=Object.entries(i)[0];r[h]=f}else r.tags=i;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];r[h]=f}else r.link=s;r.typeC4Shape={text:e},r.parentBoundary=M,r.wrap=mt()},we=function(e,t,a,o,l,i,s,r){if(t===null||a===null)return;let n={};const h=F.find(f=>f.alias===t);if(h&&t===h.alias?n=h:(n.alias=t,F.push(n)),a==null?n.label={text:""}:n.label={text:a},o==null)n.techn={text:""};else if(typeof o=="object"){let[f,d]=Object.entries(o)[0];n[f]={text:d}}else n.techn={text:o};if(l==null)n.descr={text:""};else if(typeof l=="object"){let[f,d]=Object.entries(l)[0];n[f]={text:d}}else n.descr={text:l};if(typeof i=="object"){let[f,d]=Object.entries(i)[0];n[f]=d}else n.sprite=i;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];n[f]=d}else n.tags=s;if(typeof r=="object"){let[f,d]=Object.entries(r)[0];n[f]=d}else n.link=r;n.wrap=mt(),n.typeC4Shape={text:e},n.parentBoundary=M},Oe=function(e,t,a,o,l,i,s,r){if(t===null||a===null)return;let n={};const h=F.find(f=>f.alias===t);if(h&&t===h.alias?n=h:(n.alias=t,F.push(n)),a==null?n.label={text:""}:n.label={text:a},o==null)n.techn={text:""};else if(typeof o=="object"){let[f,d]=Object.entries(o)[0];n[f]={text:d}}else n.techn={text:o};if(l==null)n.descr={text:""};else if(typeof l=="object"){let[f,d]=Object.entries(l)[0];n[f]={text:d}}else n.descr={text:l};if(typeof i=="object"){let[f,d]=Object.entries(i)[0];n[f]=d}else n.sprite=i;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];n[f]=d}else n.tags=s;if(typeof r=="object"){let[f,d]=Object.entries(r)[0];n[f]=d}else n.link=r;n.wrap=mt(),n.typeC4Shape={text:e},n.parentBoundary=M},Re=function(e,t,a,o,l){if(e===null||t===null)return;let i={};const s=z.find(r=>r.alias===e);if(s&&e===s.alias?i=s:(i.alias=e,z.push(i)),t==null?i.label={text:""}:i.label={text:t},a==null)i.type={text:"system"};else if(typeof a=="object"){let[r,n]=Object.entries(a)[0];i[r]={text:n}}else i.type={text:a};if(typeof o=="object"){let[r,n]=Object.entries(o)[0];i[r]=n}else i.tags=o;if(typeof l=="object"){let[r,n]=Object.entries(l)[0];i[r]=n}else i.link=l;i.parentBoundary=M,i.wrap=mt(),U=M,M=e,xt.push(U)},De=function(e,t,a,o,l){if(e===null||t===null)return;let i={};const s=z.find(r=>r.alias===e);if(s&&e===s.alias?i=s:(i.alias=e,z.push(i)),t==null?i.label={text:""}:i.label={text:t},a==null)i.type={text:"container"};else if(typeof a=="object"){let[r,n]=Object.entries(a)[0];i[r]={text:n}}else i.type={text:a};if(typeof o=="object"){let[r,n]=Object.entries(o)[0];i[r]=n}else i.tags=o;if(typeof l=="object"){let[r,n]=Object.entries(l)[0];i[r]=n}else i.link=l;i.parentBoundary=M,i.wrap=mt(),U=M,M=e,xt.push(U)},Se=function(e,t,a,o,l,i,s,r){if(t===null||a===null)return;let n={};const h=z.find(f=>f.alias===t);if(h&&t===h.alias?n=h:(n.alias=t,z.push(n)),a==null?n.label={text:""}:n.label={text:a},o==null)n.type={text:"node"};else if(typeof o=="object"){let[f,d]=Object.entries(o)[0];n[f]={text:d}}else n.type={text:o};if(l==null)n.descr={text:""};else if(typeof l=="object"){let[f,d]=Object.entries(l)[0];n[f]={text:d}}else n.descr={text:l};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];n[f]=d}else n.tags=s;if(typeof r=="object"){let[f,d]=Object.entries(r)[0];n[f]=d}else n.link=r;n.nodeType=e,n.parentBoundary=M,n.wrap=mt(),U=M,M=t,xt.push(U)},Pe=function(){M=U,xt.pop(),U=xt.pop(),xt.push(U)},Me=function(e,t,a,o,l,i,s,r,n,h,f){let d=F.find(p=>p.alias===t);if(!(d===void 0&&(d=z.find(p=>p.alias===t),d===void 0))){if(a!=null)if(typeof a=="object"){let[p,E]=Object.entries(a)[0];d[p]=E}else d.bgColor=a;if(o!=null)if(typeof o=="object"){let[p,E]=Object.entries(o)[0];d[p]=E}else d.fontColor=o;if(l!=null)if(typeof l=="object"){let[p,E]=Object.entries(l)[0];d[p]=E}else d.borderColor=l;if(i!=null)if(typeof i=="object"){let[p,E]=Object.entries(i)[0];d[p]=E}else d.shadowing=i;if(s!=null)if(typeof s=="object"){let[p,E]=Object.entries(s)[0];d[p]=E}else d.shape=s;if(r!=null)if(typeof r=="object"){let[p,E]=Object.entries(r)[0];d[p]=E}else d.sprite=r;if(n!=null)if(typeof n=="object"){let[p,E]=Object.entries(n)[0];d[p]=E}else d.techn=n;if(h!=null)if(typeof h=="object"){let[p,E]=Object.entries(h)[0];d[p]=E}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,E]=Object.entries(f)[0];d[p]=E}else d.legendSprite=f}},Le=function(e,t,a,o,l,i,s){const r=Dt.find(n=>n.from===t&&n.to===a);if(r!==void 0){if(o!=null)if(typeof o=="object"){let[n,h]=Object.entries(o)[0];r[n]=h}else r.textColor=o;if(l!=null)if(typeof l=="object"){let[n,h]=Object.entries(l)[0];r[n]=h}else r.lineColor=l;if(i!=null)if(typeof i=="object"){let[n,h]=Object.entries(i)[0];r[n]=parseInt(h)}else r.offsetX=parseInt(i);if(s!=null)if(typeof s=="object"){let[n,h]=Object.entries(s)[0];r[n]=parseInt(h)}else r.offsetY=parseInt(s)}},Ne=function(e,t,a){let o=Bt,l=Yt;if(typeof t=="object"){const i=Object.values(t)[0];o=parseInt(i)}else o=parseInt(t);if(typeof a=="object"){const i=Object.values(a)[0];l=parseInt(i)}else l=parseInt(a);o>=1&&(Bt=o),l>=1&&(Yt=l)},Be=function(){return Bt},Ye=function(){return Yt},Ie=function(){return M},je=function(){return U},oe=function(e){return e==null?F:F.filter(t=>t.parentBoundary===e)},Ue=function(e){return F.find(t=>t.alias===e)},Fe=function(e){return Object.keys(oe(e))},ce=function(e){return e==null?z:z.filter(t=>t.parentBoundary===e)},Ve=ce,ze=function(){return Dt},We=function(){return Jt},Xe=function(e){Zt=e},mt=function(){return Zt},Qe=function(){F=[],z=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],U="",M="global",xt=[""],Dt=[],xt=[""],Jt="",Zt=!1,Bt=4,Yt=2},He={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},qe={FILLED:0,OPEN:1},Ge={LEFTOF:0,RIGHTOF:1,OVER:2},Ke=function(e){Jt=w.sanitizeText$2(e,w.getConfig())},qt={addPersonOrSystem:Te,addPersonOrSystemBoundary:Re,addContainer:we,addContainerBoundary:De,addComponent:Oe,addDeploymentNode:Se,popBoundaryParseStack:Pe,addRel:Ce,updateElStyle:Me,updateRelStyle:Le,updateLayoutConfig:Ne,autoWrap:mt,setWrap:Xe,getC4ShapeArray:oe,getC4Shape:Ue,getC4ShapeKeys:Fe,getBoundaries:ce,getBoundarys:Ve,getCurrentBoundaryParse:Ie,getParentBoundaryParse:je,getRels:ze,getTitle:We,getC4Type:Ae,getC4ShapeInRow:Be,getC4BoundaryInRow:Ye,setAccTitle:w.setAccTitle,getAccTitle:w.getAccTitle,getAccDescription:w.getAccDescription,setAccDescription:w.setAccDescription,getConfig:()=>w.getConfig().c4,clear:Qe,LINETYPE:He,ARROWTYPE:qe,PLACEMENT:Ge,setTitle:Ke,setC4Type:ke},$t=function(e,t){return re.drawRect(e,t)},he=function(e,t,a,o,l,i){const s=e.append("image");s.attr("width",t),s.attr("height",a),s.attr("x",o),s.attr("y",l);let r=i.startsWith("data:image/png;base64")?i:Ee.distExports.sanitizeUrl(i);s.attr("xlink:href",r)},Je=(e,t,a)=>{const o=e.append("g");let l=0;for(let i of t){let s=i.textColor?i.textColor:"#444444",r=i.lineColor?i.lineColor:"#444444",n=i.offsetX?parseInt(i.offsetX):0,h=i.offsetY?parseInt(i.offsetY):0,f="";if(l===0){let p=o.append("line");p.attr("x1",i.startPoint.x),p.attr("y1",i.startPoint.y),p.attr("x2",i.endPoint.x),p.attr("y2",i.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",r),p.style("fill","none"),i.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(i.type==="birel"||i.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),l=-1}else{let p=o.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",r).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",i.startPoint.x).replaceAll("starty",i.startPoint.y).replaceAll("controlx",i.startPoint.x+(i.endPoint.x-i.startPoint.x)/2-(i.endPoint.x-i.startPoint.x)/4).replaceAll("controly",i.startPoint.y+(i.endPoint.y-i.startPoint.y)/2).replaceAll("stopx",i.endPoint.x).replaceAll("stopy",i.endPoint.y)),i.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(i.type==="birel"||i.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)")}let d=a.messageFont();Q(a)(i.label.text,o,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+n,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+h,i.label.width,i.label.height,{fill:s},d),i.techn&&i.techn.text!==""&&(d=a.messageFont(),Q(a)("["+i.techn.text+"]",o,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+n,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+a.messageFontSize+5+h,Math.max(i.label.width,i.techn.width),i.techn.height,{fill:s,"font-style":"italic"},d))}},Ze=function(e,t,a){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",i=t.borderColor?t.borderColor:"#444444",s=t.fontColor?t.fontColor:"black",r={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(r={"stroke-width":1});let n={x:t.x,y:t.y,fill:l,stroke:i,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:r};$t(o,n);let h=a.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,Q(a)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},h),t.type&&t.type.text!==""&&(h=a.boundaryFont(),h.fontColor=s,Q(a)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},h)),t.descr&&t.descr.text!==""&&(h=a.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=s,Q(a)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},h))},$e=function(e,t,a){var o;let l=t.bgColor?t.bgColor:a[t.typeC4Shape.text+"_bg_color"],i=t.borderColor?t.borderColor:a[t.typeC4Shape.text+"_border_color"],s=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const h=re.getNoteRect();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=t.x,h.y=t.y,h.fill=l,h.width=t.width,h.height=t.height,h.stroke=i,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},$t(n,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",l).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",l).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let f=o0(a,t.typeC4Shape.text);switch(n.append("text").attr("fill",s).attr("font-family",f.fontFamily).attr("font-size",f.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":he(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=a[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,Q(a)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:s},d),d=a[t.typeC4Shape.text+"Font"](),d.fontColor=s,t.techn&&((o=t.techn)==null?void 0:o.text)!==""?Q(a)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:s,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(a)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:s,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=a.personFont(),d.fontColor=s,Q(a)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:s},d)),t.height},t0=function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},e0=function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},i0=function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},n0=function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).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")},s0=function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},a0=function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},r0=function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},l0=function(e){const a=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);a.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),a.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},o0=(e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),Q=(function(){function e(l,i,s,r,n,h,f){const d=i.append("text").attr("x",s+n/2).attr("y",r+h/2+5).style("text-anchor","middle").text(l);o(d,f)}function t(l,i,s,r,n,h,f,d){const{fontSize:p,fontFamily:E,fontWeight:O}=d,D=l.split(w.common$1.lineBreakRegex);for(let P=0;P<D.length;P++){const N=P*p-p*(D.length-1)/2,I=i.append("text").attr("x",s+n/2).attr("y",r).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",O).style("font-family",E);I.append("tspan").attr("dy",N).text(D[P]).attr("alignment-baseline","mathematical"),o(I,f)}}function a(l,i,s,r,n,h,f,d){const p=i.append("switch"),O=p.append("foreignObject").attr("x",s).attr("y",r).attr("width",n).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");O.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(l),t(l,p,s,r,n,h,f,d),o(O,f)}function o(l,i){for(const s in i)i.hasOwnProperty(s)&&l.attr(s,i[s])}return function(l){return l.textPlacement==="fo"?a:l.textPlacement==="old"?e:t}})(),V={drawRect:$t,drawBoundary:Ze,drawC4Shape:$e,drawRels:Je,drawImage:he,insertArrowHead:n0,insertArrowEnd:s0,insertArrowFilledHead:a0,insertDynamicNumber:r0,insertArrowCrossHead:l0,insertDatabaseIcon:t0,insertComputerIcon:e0,insertClockIcon:i0};let It=0,jt=0,ue=4,Gt=2;Nt.yy=qt;let b={};class de{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Kt(t.db.getConfig())}setData(t,a,o,l){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=a,this.nextData.starty=this.data.starty=o,this.nextData.stopy=this.data.stopy=l}updateVal(t,a,o,l){t[a]===void 0?t[a]=o:t[a]=l(o,t[a])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let a=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,o=a+t.width,l=this.nextData.starty+t.margin*2,i=l+t.height;(a>=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ue)&&(a=this.nextData.startx+t.margin+b.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=a+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=l+t.height,this.nextData.cnt=1),t.x=a,t.y=l,this.updateVal(this.data,"startx",a,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",a,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Kt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const Kt=function(e){w.assignWithDepth$1(b,e),e.fontFamily&&(b.personFontFamily=b.systemFontFamily=b.messageFontFamily=e.fontFamily),e.fontSize&&(b.personFontSize=b.systemFontSize=b.messageFontSize=e.fontSize),e.fontWeight&&(b.personFontWeight=b.systemFontWeight=b.messageFontWeight=e.fontWeight)},Rt=(e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),Lt=e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),c0=e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight});function j(e,t,a,o,l){if(!t[e].width)if(a)t[e].text=w.wrapLabel(t[e].text,l,o),t[e].textLines=t[e].text.split(w.common$1.lineBreakRegex).length,t[e].width=l,t[e].height=w.calculateTextHeight(t[e].text,o);else{let i=t[e].text.split(w.common$1.lineBreakRegex);t[e].textLines=i.length;let s=0;t[e].height=0,t[e].width=0;for(const r of i)t[e].width=Math.max(w.calculateTextWidth(r,o),t[e].width),s=w.calculateTextHeight(r,o),t[e].height=t[e].height+s}}const fe=function(e,t,a){t.x=a.data.startx,t.y=a.data.starty,t.width=a.data.stopx-a.data.startx,t.height=a.data.stopy-a.data.starty,t.label.y=b.c4ShapeMargin-35;let o=t.wrap&&b.wrap,l=Lt(b);l.fontSize=l.fontSize+2,l.fontWeight="bold";let i=w.calculateTextWidth(t.label.text,l);j("label",t,o,l,i),V.drawBoundary(e,t,b)},pe=function(e,t,a,o){let l=0;for(const i of o){l=0;const s=a[i];let r=Rt(b,s.typeC4Shape.text);switch(r.fontSize=r.fontSize-2,s.typeC4Shape.width=w.calculateTextWidth("«"+s.typeC4Shape.text+"»",r),s.typeC4Shape.height=r.fontSize+2,s.typeC4Shape.Y=b.c4ShapePadding,l=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=l,l=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=l,l=s.image.Y+s.image.height);let n=s.wrap&&b.wrap,h=b.width-b.c4ShapePadding*2,f=Rt(b,s.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",j("label",s,n,f,h),s.label.Y=l+8,l=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let E=Rt(b,s.typeC4Shape.text);j("type",s,n,E,h),s.type.Y=l+5,l=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let E=Rt(b,s.techn.text);j("techn",s,n,E,h),s.techn.Y=l+5,l=s.techn.Y+s.techn.height}let d=l,p=s.label.width;if(s.descr&&s.descr.text!==""){let E=Rt(b,s.typeC4Shape.text);j("descr",s,n,E,h),s.descr.Y=l+20,l=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),d=l-s.descr.textLines*5}p=p+b.c4ShapePadding,s.width=Math.max(s.width||b.width,p,b.width),s.height=Math.max(s.height||b.height,d,b.height),s.margin=s.margin||b.c4ShapeMargin,e.insert(s),V.drawC4Shape(t,s,b)}e.bumpLastMargin(b.c4ShapeMargin)};class Y{constructor(t,a){this.x=t,this.y=a}}let se=function(e,t){let a=e.x,o=e.y,l=t.x,i=t.y,s=a+e.width/2,r=o+e.height/2,n=Math.abs(a-l),h=Math.abs(o-i),f=h/n,d=e.height/e.width,p=null;return o==i&&a<l?p=new Y(a+e.width,r):o==i&&a>l?p=new Y(a,r):a==l&&o<i?p=new Y(s,o+e.height):a==l&&o>i&&(p=new Y(s,o)),a>l&&o<i?d>=f?p=new Y(a,r+f*e.width/2):p=new Y(s-n/h*e.height/2,o+e.height):a<l&&o<i?d>=f?p=new Y(a+e.width,r+f*e.width/2):p=new Y(s+n/h*e.height/2,o+e.height):a<l&&o>i?d>=f?p=new Y(a+e.width,r-f*e.width/2):p=new Y(s+e.height/2*n/h,o):a>l&&o>i&&(d>=f?p=new Y(a,r-e.width/2*f):p=new Y(s-e.height/2*n/h,o)),p},h0=function(e,t){let a={x:0,y:0};a.x=t.x+t.width/2,a.y=t.y+t.height/2;let o=se(e,a);a.x=e.x+e.width/2,a.y=e.y+e.height/2;let l=se(t,a);return{startPoint:o,endPoint:l}};const u0=function(e,t,a,o){let l=0;for(let i of t){l=l+1;let s=i.wrap&&b.wrap,r=c0(b);o.db.getC4Type()==="C4Dynamic"&&(i.label.text=l+": "+i.label.text);let h=w.calculateTextWidth(i.label.text,r);j("label",i,s,r,h),i.techn&&i.techn.text!==""&&(h=w.calculateTextWidth(i.techn.text,r),j("techn",i,s,r,h)),i.descr&&i.descr.text!==""&&(h=w.calculateTextWidth(i.descr.text,r),j("descr",i,s,r,h));let f=a(i.from),d=a(i.to),p=h0(f,d);i.startPoint=p.startPoint,i.endPoint=p.endPoint}V.drawRels(e,t,b)};function ye(e,t,a,o,l){let i=new de(l);i.data.widthLimit=a.data.widthLimit/Math.min(Gt,o.length);for(let[s,r]of o.entries()){let n=0;r.image={width:0,height:0,Y:0},r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=n,n=r.image.Y+r.image.height);let h=r.wrap&&b.wrap,f=Lt(b);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",j("label",r,h,f,i.data.widthLimit),r.label.Y=n+8,n=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let O=Lt(b);j("type",r,h,O,i.data.widthLimit),r.type.Y=n+5,n=r.type.Y+r.type.height}if(r.descr&&r.descr.text!==""){let O=Lt(b);O.fontSize=O.fontSize-2,j("descr",r,h,O,i.data.widthLimit),r.descr.Y=n+20,n=r.descr.Y+r.descr.height}if(s==0||s%Gt===0){let O=a.data.startx+b.diagramMarginX,D=a.data.stopy+b.diagramMarginY+n;i.setData(O,O,D,D)}else{let O=i.data.stopx!==i.data.startx?i.data.stopx+b.diagramMarginX:i.data.startx,D=i.data.starty;i.setData(O,O,D,D)}i.name=r.alias;let d=l.db.getC4ShapeArray(r.alias),p=l.db.getC4ShapeKeys(r.alias);p.length>0&&pe(i,e,d,p),t=r.alias;let E=l.db.getBoundarys(t);E.length>0&&ye(e,t,i,E,l),r.alias!=="global"&&fe(e,r,i),a.data.stopy=Math.max(i.data.stopy+b.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(i.data.stopx+b.c4ShapeMargin,a.data.stopx),It=Math.max(It,a.data.stopx),jt=Math.max(jt,a.data.stopy)}}const d0=function(e,t,a,o){b=w.getConfig().c4;const l=w.getConfig().securityLevel;let i;l==="sandbox"&&(i=w.select("#i"+t));const s=l==="sandbox"?w.select(i.nodes()[0].contentDocument.body):w.select("body");let r=o.db;o.db.setWrap(b.wrap),ue=r.getC4ShapeInRow(),Gt=r.getC4BoundaryInRow(),w.log$1.debug(`C:${JSON.stringify(b,null,2)}`);const n=l==="sandbox"?s.select(`[id="${t}"]`):w.select(`[id="${t}"]`);V.insertComputerIcon(n),V.insertDatabaseIcon(n),V.insertClockIcon(n);let h=new de(o);h.setData(b.diagramMarginX,b.diagramMarginX,b.diagramMarginY,b.diagramMarginY),h.data.widthLimit=screen.availWidth,It=b.diagramMarginX,jt=b.diagramMarginY;const f=o.db.getTitle();let d=o.db.getBoundarys("");ye(n,"",h,d,o),V.insertArrowHead(n),V.insertArrowEnd(n),V.insertArrowCrossHead(n),V.insertArrowFilledHead(n),u0(n,o.db.getRels(),o.db.getC4Shape,o),h.data.stopx=It,h.data.stopy=jt;const p=h.data;let O=p.stopy-p.starty+2*b.diagramMarginY;const P=p.stopx-p.startx+2*b.diagramMarginX;f&&n.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*b.diagramMarginX).attr("y",p.starty+b.diagramMarginY),w.configureSvgSize(n,O,P,b.useMaxWidth);const N=f?60:0;n.attr("viewBox",p.startx-b.diagramMarginX+" -"+(b.diagramMarginY+N)+" "+P+" "+(O+N)),w.log$1.debug("models:",p)},ae={drawPersonOrSystemArray:pe,drawBoundary:fe,setConf:Kt,draw:d0},f0=e=>`.person {
|
|
7
|
+
stroke: ${e.personBorder};
|
|
8
|
+
fill: ${e.personBkg};
|
|
9
|
+
}
|
|
10
|
+
`,p0=f0,y0={parser:ve,db:qt,renderer:ae,styles:p0,init:({c4:e,wrap:t})=>{ae.setConf(e),qt.setWrap(t)}};exports.diagram=y0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=async e=>{const i=await e.getFile();return i.handle=e,i};var r=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const i=[];e.forEach((t,a)=>{i[a]={description:t.description||"",accept:{}},t.mimeTypes?t.mimeTypes.map(l=>{i[a].accept[l]=t.extensions||[]}):i[a].accept["*/*"]=t.extensions||[]});const s=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:i,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),c=await Promise.all(s.map(n));return e[0].multiple?c:c[0]};exports.default=r;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const bn=require("./layers.DIc9Pn5-.js"),zt={};function It(n,r){const t=zt,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return rt(n,e,u)}function rt(n,r,t){if(Tt(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Wn(n.children,r,t)}return Array.isArray(n)?Wn(n,r,t):""}function Wn(n,r,t){const e=[];let u=-1;for(;++u<n.length;)e[u]=rt(n[u],r,t);return e.join("")}function Tt(n){return!!(n&&typeof n=="object")}function tn(n,r,t,e){const u=n.length;let i=0,l;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i<e.length;)l=e.slice(i,i+1e4),l.unshift(r,0),n.splice(...l),i+=1e4,r+=1e4}function Y(n,r){return n.length>0?(tn(n,n.length,0,r),n):r}const Qn={}.hasOwnProperty;function Bt(n){const r={};let t=-1;for(;++t<n.length;)Ot(r,n[t]);return r}function Ot(n,r){let t;for(t in r){const u=(Qn.call(n,t)?n[t]:void 0)||(n[t]={}),i=r[t];let l;if(i)for(l in i){Qn.call(u,l)||(u[l]=[]);const a=i[l];Lt(u[l],Array.isArray(a)?a:a?[a]:[])}}}function Lt(n,r){let t=-1;const e=[];for(;++t<r.length;)(r[t].add==="after"?n:e).push(r[t]);tn(n,0,0,e)}const Dt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,nn=cn(/[A-Za-z]/),v=cn(/[\dA-Za-z]/),Pt=cn(/[#-'*+\--9=?A-Z^-~]/);function zn(n){return n!==null&&(n<32||n===127)}const In=cn(/\d/),_t=cn(/[\dA-Fa-f]/),Mt=cn(/[!-/:-@[-`{-~]/);function C(n){return n!==null&&n<-2}function Z(n){return n!==null&&(n<0||n===32)}function z(n){return n===-2||n===-1||n===32}const jt=cn(Dt),Rt=cn(/\s/);function cn(n){return r;function r(t){return t!==null&&n.test(String.fromCharCode(t))}}function L(n,r,t,e){const u=e?e-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(m){return z(m)?(n.enter(t),a(m)):r(m)}function a(m){return z(m)&&i++<u?(n.consume(m),a):(n.exit(t),r(m))}}const qt={tokenize:Ht};function Ht(n){const r=n.attempt(this.parser.constructs.contentInitial,e,u);let t;return r;function e(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),L(n,r,"linePrefix")}function u(a){return n.enter("paragraph"),i(a)}function i(a){const m=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=m),t=m,l(a)}function l(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return C(a)?(n.consume(a),n.exit("chunkText"),i):(n.consume(a),l)}}const Nt={tokenize:Vt},Un={tokenize:Wt};function Vt(n){const r=this,t=[];let e=0,u,i,l;return a;function a(F){if(e<t.length){const D=t[e];return r.containerState=D[1],n.attempt(D[0].continuation,m,c)(F)}return c(F)}function m(F){if(e++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&j();const D=r.events.length;let _=D,k;for(;_--;)if(r.events[_][0]==="exit"&&r.events[_][1].type==="chunkFlow"){k=r.events[_][1].end;break}b(e);let T=D;for(;T<r.events.length;)r.events[T][1].end=Object.assign({},k),T++;return tn(r.events,_+1,0,r.events.slice(D)),r.events.length=T,c(F)}return a(F)}function c(F){if(e===t.length){if(!u)return x(F);if(u.currentConstruct&&u.currentConstruct.concrete)return A(F);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Un,p,f)(F)}function p(F){return u&&j(),b(e),x(F)}function f(F){return r.parser.lazy[r.now().line]=e!==t.length,l=r.now().offset,A(F)}function x(F){return r.containerState={},n.attempt(Un,h,A)(F)}function h(F){return e++,t.push([r.currentConstruct,r.containerState]),x(F)}function A(F){if(F===null){u&&j(),b(0),n.consume(F);return}return u=u||r.parser.flow(r.now()),n.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:u}),I(F)}function I(F){if(F===null){M(n.exit("chunkFlow"),!0),b(0),n.consume(F);return}return C(F)?(n.consume(F),M(n.exit("chunkFlow")),e=0,r.interrupt=void 0,a):(n.consume(F),I)}function M(F,D){const _=r.sliceStream(F);if(D&&_.push(null),F.previous=i,i&&(i.next=F),i=F,u.defineSkip(F.start),u.write(_),r.parser.lazy[F.start.line]){let k=u.events.length;for(;k--;)if(u.events[k][1].start.offset<l&&(!u.events[k][1].end||u.events[k][1].end.offset>l))return;const T=r.events.length;let H=T,N,V;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(N){V=r.events[H][1].end;break}N=!0}for(b(e),k=T;k<r.events.length;)r.events[k][1].end=Object.assign({},V),k++;tn(r.events,H+1,0,r.events.slice(T)),r.events.length=k}}function b(F){let D=t.length;for(;D-- >F;){const _=t[D];r.containerState=_[1],_[0].exit.call(r,n)}t.length=F}function j(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(n,r,t){return L(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $n(n){if(n===null||Z(n)||Rt(n))return 1;if(jt(n))return 2}function Ln(n,r,t){const e=[];let u=-1;for(;++u<n.length;){const i=n[u].resolveAll;i&&!e.includes(i)&&(r=i(r,t),e.push(i))}return r}const Tn={name:"attention",tokenize:Ut,resolveAll:Qt};function Qt(n,r){let t=-1,e,u,i,l,a,m,c,p;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(e=t;e--;)if(n[e][0]==="exit"&&n[e][1].type==="attentionSequence"&&n[e][1]._open&&r.sliceSerialize(n[e][1]).charCodeAt(0)===r.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[e][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[e][1].end.offset-n[e][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;m=n[e][1].end.offset-n[e][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[e][1].end),x=Object.assign({},n[t][1].start);Zn(f,-m),Zn(x,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[e][1].end)},a={type:m>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:x},i={type:m>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:m>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},n[e][1].end=Object.assign({},l.start),n[t][1].start=Object.assign({},a.end),c=[],n[e][1].end.offset-n[e][1].start.offset&&(c=Y(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Y(c,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),c=Y(c,Ln(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Y(c,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,c=Y(c,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,tn(n,e-1,t-e+3,c),t=e+c.length-p-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function Ut(n,r){const t=this.parser.constructs.attentionMarkers.null,e=this.previous,u=$n(e);let i;return l;function l(m){return i=m,n.enter("attentionSequence"),a(m)}function a(m){if(m===i)return n.consume(m),a;const c=n.exit("attentionSequence"),p=$n(m),f=!p||p===2&&u||t.includes(m),x=!u||u===2&&p||t.includes(e);return c._open=!!(i===42?f:f&&(u||!x)),c._close=!!(i===42?x:x&&(p||!f)),r(m)}}function Zn(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const $t={name:"autolink",tokenize:Zt};function Zt(n,r,t){let e=0;return u;function u(h){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(h),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),i}function i(h){return nn(h)?(n.consume(h),l):c(h)}function l(h){return h===43||h===45||h===46||v(h)?(e=1,a(h)):c(h)}function a(h){return h===58?(n.consume(h),e=0,m):(h===43||h===45||h===46||v(h))&&e++<32?(n.consume(h),a):(e=0,c(h))}function m(h){return h===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(h),n.exit("autolinkMarker"),n.exit("autolink"),r):h===null||h===32||h===60||zn(h)?t(h):(n.consume(h),m)}function c(h){return h===64?(n.consume(h),p):Pt(h)?(n.consume(h),c):t(h)}function p(h){return v(h)?f(h):t(h)}function f(h){return h===46?(n.consume(h),e=0,p):h===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(h),n.exit("autolinkMarker"),n.exit("autolink"),r):x(h)}function x(h){if((h===45||v(h))&&e++<63){const A=h===45?x:f;return n.consume(h),A}return t(h)}}const Fn={tokenize:Yt,partial:!0};function Yt(n,r,t){return e;function e(i){return z(i)?L(n,u,"linePrefix")(i):u(i)}function u(i){return i===null||C(i)?r(i):t(i)}}const it={name:"blockQuote",tokenize:Gt,continuation:{tokenize:Jt},exit:Kt};function Gt(n,r,t){const e=this;return u;function u(l){if(l===62){const a=e.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(l),n.exit("blockQuoteMarker"),i}return t(l)}function i(l){return z(l)?(n.enter("blockQuotePrefixWhitespace"),n.consume(l),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(l))}}function Jt(n,r,t){const e=this;return u;function u(l){return z(l)?L(n,i,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return n.attempt(it,r,t)(l)}}function Kt(n){n.exit("blockQuote")}const ut={name:"characterEscape",tokenize:Xt};function Xt(n,r,t){return e;function e(i){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(i),n.exit("escapeMarker"),u}function u(i){return Mt(i)?(n.enter("characterEscapeValue"),n.consume(i),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):t(i)}}const Yn=document.createElement("i");function Dn(n){const r="&"+n+";";Yn.innerHTML=r;const t=Yn.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===r?!1:t}const lt={name:"characterReference",tokenize:vt};function vt(n,r,t){const e=this;let u=0,i,l;return a;function a(f){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),m}function m(f){return f===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(f),n.exit("characterReferenceMarkerNumeric"),c):(n.enter("characterReferenceValue"),i=31,l=v,p(f))}function c(f){return f===88||f===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(f),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),i=6,l=_t,p):(n.enter("characterReferenceValue"),i=7,l=In,p(f))}function p(f){if(f===59&&u){const x=n.exit("characterReferenceValue");return l===v&&!Dn(e.sliceSerialize(x))?t(f):(n.enter("characterReferenceMarker"),n.consume(f),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return l(f)&&u++<i?(n.consume(f),p):t(f)}}const Gn={tokenize:te,partial:!0},Jn={name:"codeFenced",tokenize:ne,concrete:!0};function ne(n,r,t){const e=this,u={tokenize:_,partial:!0};let i=0,l=0,a;return m;function m(k){return c(k)}function c(k){const T=e.events[e.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=k,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===a?(l++,n.consume(k),p):l<3?t(k):(n.exit("codeFencedFenceSequence"),z(k)?L(n,f,"whitespace")(k):f(k))}function f(k){return k===null||C(k)?(n.exit("codeFencedFence"),e.interrupt?r(k):n.check(Gn,I,D)(k)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||C(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),f(k)):z(k)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),L(n,h,"whitespace")(k)):k===96&&k===a?t(k):(n.consume(k),x)}function h(k){return k===null||C(k)?f(k):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),A(k))}function A(k){return k===null||C(k)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),f(k)):k===96&&k===a?t(k):(n.consume(k),A)}function I(k){return n.attempt(u,D,M)(k)}function M(k){return n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),b}function b(k){return i>0&&z(k)?L(n,j,"linePrefix",i+1)(k):j(k)}function j(k){return k===null||C(k)?n.check(Gn,I,D)(k):(n.enter("codeFlowValue"),F(k))}function F(k){return k===null||C(k)?(n.exit("codeFlowValue"),j(k)):(n.consume(k),F)}function D(k){return n.exit("codeFenced"),r(k)}function _(k,T,H){let N=0;return V;function V(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),y}function y(w){return k.enter("codeFencedFence"),z(w)?L(k,S,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):S(w)}function S(w){return w===a?(k.enter("codeFencedFenceSequence"),P(w)):H(w)}function P(w){return w===a?(N++,k.consume(w),P):N>=l?(k.exit("codeFencedFenceSequence"),z(w)?L(k,R,"whitespace")(w):R(w)):H(w)}function R(w){return w===null||C(w)?(k.exit("codeFencedFence"),T(w)):H(w)}}}function te(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const wn={name:"codeIndented",tokenize:re},ee={tokenize:ie,partial:!0};function re(n,r,t){const e=this;return u;function u(c){return n.enter("codeIndented"),L(n,i,"linePrefix",5)(c)}function i(c){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(c):t(c)}function l(c){return c===null?m(c):C(c)?n.attempt(ee,l,m)(c):(n.enter("codeFlowValue"),a(c))}function a(c){return c===null||C(c)?(n.exit("codeFlowValue"),l(c)):(n.consume(c),a)}function m(c){return n.exit("codeIndented"),r(c)}}function ie(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):L(n,i,"linePrefix",5)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):C(l)?u(l):t(l)}}const ue={name:"codeText",tokenize:oe,resolve:le,previous:ae};function le(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e<r;)if(n[e][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(e=t-1,r++;++e<=r;)u===void 0?e!==r&&n[e][1].type!=="lineEnding"&&(u=e):(e===r||n[e][1].type==="lineEnding")&&(n[u][1].type="codeTextData",e!==u+2&&(n[u][1].end=n[e-1][1].end,n.splice(u+2,e-u-2),r-=e-u-2,e=u+2),u=void 0);return n}function ae(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oe(n,r,t){let e=0,u,i;return l;function l(f){return n.enter("codeText"),n.enter("codeTextSequence"),a(f)}function a(f){return f===96?(n.consume(f),e++,a):(n.exit("codeTextSequence"),m(f))}function m(f){return f===null?t(f):f===32?(n.enter("space"),n.consume(f),n.exit("space"),m):f===96?(i=n.enter("codeTextSequence"),u=0,p(f)):C(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):(n.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||C(f)?(n.exit("codeTextData"),m(f)):(n.consume(f),c)}function p(f){return f===96?(n.consume(f),u++,p):u===e?(n.exit("codeTextSequence"),n.exit("codeText"),r(f)):(i.type="codeTextData",c(f))}}function at(n){const r={};let t=-1,e,u,i,l,a,m,c;for(;++t<n.length;){for(;t in r;)t=r[t];if(e=n[t],t&&e[1].type==="chunkFlow"&&n[t-1][1].type==="listItemPrefix"&&(m=e[1]._tokenizer.events,i=0,i<m.length&&m[i][1].type==="lineEndingBlank"&&(i+=2),i<m.length&&m[i][1].type==="content"))for(;++i<m.length&&m[i][1].type!=="content";)m[i][1].type==="chunkText"&&(m[i][1]._isInFirstContentOfListItem=!0,i++);if(e[0]==="enter")e[1].contentType&&(Object.assign(r,se(n,t)),t=r[t],c=!0);else if(e[1]._container){for(i=t,u=void 0;i--&&(l=n[i],l[1].type==="lineEnding"||l[1].type==="lineEndingBlank");)l[0]==="enter"&&(u&&(n[u][1].type="lineEndingBlank"),l[1].type="lineEnding",u=i);u&&(e[1].end=Object.assign({},n[u][1].start),a=n.slice(u,t),a.unshift(e),tn(n,u,t-u+1,a))}}return!c}function se(n,r){const t=n[r][1],e=n[r][2];let u=r-1;const i=[],l=t._tokenizer||e.parser[t.contentType](t.start),a=l.events,m=[],c={};let p,f,x=-1,h=t,A=0,I=0;const M=[I];for(;h;){for(;n[++u][1]!==h;);i.push(u),h._tokenizer||(p=e.sliceStream(h),h.next||p.push(null),f&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=t;++x<a.length;)a[x][0]==="exit"&&a[x-1][0]==="enter"&&a[x][1].type===a[x-1][1].type&&a[x][1].start.line!==a[x][1].end.line&&(I=x+1,M.push(I),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):M.pop(),x=M.length;x--;){const b=a.slice(M[x],M[x+1]),j=i.pop();m.unshift([j,j+b.length-1]),tn(n,j,2,b)}for(x=-1;++x<m.length;)c[A+m[x][0]]=A+m[x][1],A+=m[x][1]-m[x][0]-1;return c}const ce={tokenize:fe,resolve:pe},he={tokenize:me,partial:!0};function pe(n){return at(n),n}function fe(n,r){let t;return e;function e(a){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),u(a)}function u(a){return a===null?i(a):C(a)?n.check(he,l,i)(a):(n.consume(a),u)}function i(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function l(a){return n.consume(a),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function me(n,r,t){const e=this;return u;function u(l){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),L(n,i,"linePrefix")}function i(l){if(l===null||C(l))return t(l);const a=e.events[e.events.length-1];return!e.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function ot(n,r,t,e,u,i,l,a,m){const c=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(b){return b===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(b),n.exit(i),x):b===null||b===32||b===41||zn(b)?t(b):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),I(b))}function x(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(n.exit("chunkString"),n.exit(a),x(b)):b===null||b===60||C(b)?t(b):(n.consume(b),b===92?A:h)}function A(b){return b===60||b===62||b===92?(n.consume(b),h):h(b)}function I(b){return!p&&(b===null||b===41||Z(b))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(b)):p<c&&b===40?(n.consume(b),p++,I):b===41?(n.consume(b),p--,I):b===null||b===32||b===40||zn(b)?t(b):(n.consume(b),b===92?M:I)}function M(b){return b===40||b===41||b===92?(n.consume(b),I):I(b)}}function st(n,r,t,e,u,i){const l=this;let a=0,m;return c;function c(h){return n.enter(e),n.enter(u),n.consume(h),n.exit(u),n.enter(i),p}function p(h){return a>999||h===null||h===91||h===93&&!m||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(n.exit(i),n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):C(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||C(h)||a++>999?(n.exit("chunkString"),p(h)):(n.consume(h),m||(m=!z(h)),h===92?x:f)}function x(h){return h===91||h===92||h===93?(n.consume(h),a++,f):f(h)}}function ct(n,r,t,e,u,i){let l;return a;function a(x){return x===34||x===39||x===40?(n.enter(e),n.enter(u),n.consume(x),n.exit(u),l=x===40?41:x,m):t(x)}function m(x){return x===l?(n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):(n.enter(i),c(x))}function c(x){return x===l?(n.exit(i),m(l)):x===null?t(x):C(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),L(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||C(x)?(n.exit("chunkString"),c(x)):(n.consume(x),x===92?f:p)}function f(x){return x===l||x===92?(n.consume(x),p):p(x)}}function dn(n,r){let t;return e;function e(u){return C(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):z(u)?L(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function xn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xe={name:"definition",tokenize:ke},ge={tokenize:de,partial:!0};function ke(n,r,t){const e=this;let u;return i;function i(h){return n.enter("definition"),l(h)}function l(h){return st.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return u=xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),h===58?(n.enter("definitionMarker"),n.consume(h),n.exit("definitionMarker"),m):t(h)}function m(h){return Z(h)?dn(n,c)(h):c(h)}function c(h){return ot(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function p(h){return n.attempt(ge,f,f)(h)}function f(h){return z(h)?L(n,x,"whitespace")(h):x(h)}function x(h){return h===null||C(h)?(n.exit("definition"),e.parser.defined.push(u),r(h)):t(h)}}function de(n,r,t){return e;function e(a){return Z(a)?dn(n,u)(a):t(a)}function u(a){return ct(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return z(a)?L(n,l,"whitespace")(a):l(a)}function l(a){return a===null||C(a)?r(a):t(a)}}const be={name:"hardBreakEscape",tokenize:ye};function ye(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return C(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const Se={name:"headingAtx",tokenize:Ee,resolve:Fe};function Fe(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function Ee(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||Z(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||C(p)?(n.exit("atxHeading"),r(p)):z(p)?L(n,a,"whitespace")(p):(n.enter("atxHeadingText"),c(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function c(p){return p===null||p===35||Z(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),c)}}const Ce=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kn=["pre","script","style","textarea"],we={name:"htmlFlow",tokenize:Te,resolveTo:Ie,concrete:!0},Ae={tokenize:Oe,partial:!0},ze={tokenize:Be,partial:!0};function Ie(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Te(n,r,t){const e=this;let u,i,l,a,m;return c;function c(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),x):s===47?(n.consume(s),i=!0,I):s===63?(n.consume(s),u=3,e.interrupt?r:o):nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function x(s){return s===45?(n.consume(s),u=2,h):s===91?(n.consume(s),u=5,a=0,A):nn(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function h(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function A(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:S:A):t(s)}function I(s){return nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function M(s){if(s===null||s===47||s===62||Z(s)){const K=s===47,hn=l.toLowerCase();return!K&&!i&&Kn.includes(hn)?(u=1,e.interrupt?r(s):S(s)):Ce.includes(l.toLowerCase())?(u=6,K?(n.consume(s),b):e.interrupt?r(s):S(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?j(s):F(s))}return s===45||v(s)?(n.consume(s),l+=String.fromCharCode(s),M):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:S):t(s)}function j(s){return z(s)?(n.consume(s),j):V(s)}function F(s){return s===47?(n.consume(s),V):s===58||s===95||nn(s)?(n.consume(s),D):z(s)?(n.consume(s),F):V(s)}function D(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),D):_(s)}function _(s){return s===61?(n.consume(s),k):z(s)?(n.consume(s),_):F(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,T):z(s)?(n.consume(s),k):H(s)}function T(s){return s===m?(n.consume(s),m=null,N):s===null||C(s)?t(s):(n.consume(s),T)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Z(s)?_(s):(n.consume(s),H)}function N(s){return s===47||s===62||z(s)?F(s):t(s)}function V(s){return s===62?(n.consume(s),y):t(s)}function y(s){return s===null||C(s)?S(s):z(s)?(n.consume(s),y):t(s)}function S(s){return s===45&&u===2?(n.consume(s),U):s===60&&u===1?(n.consume(s),W):s===62&&u===4?(n.consume(s),J):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),en):C(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Ae,rn,P)(s)):s===null||C(s)?(n.exit("htmlFlowData"),P(s)):(n.consume(s),S)}function P(s){return n.check(ze,R,rn)(s)}function R(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),w}function w(s){return s===null||C(s)?P(s):(n.enter("htmlFlowData"),S(s))}function U(s){return s===45?(n.consume(s),o):S(s)}function W(s){return s===47?(n.consume(s),l="",G):S(s)}function G(s){if(s===62){const K=l.toLowerCase();return Kn.includes(K)?(n.consume(s),J):S(s)}return nn(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),G):S(s)}function en(s){return s===93?(n.consume(s),o):S(s)}function o(s){return s===62?(n.consume(s),J):s===45&&u===2?(n.consume(s),o):S(s)}function J(s){return s===null||C(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function Be(n,r,t){const e=this;return u;function u(l){return C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function Oe(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Fn,r,t)}}const Le={name:"htmlText",tokenize:De};function De(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),c):o===47?(n.consume(o),_):o===63?(n.consume(o),F):nn(o)?(n.consume(o),H):t(o)}function c(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,A):nn(o)?(n.consume(o),j):t(o)}function p(o){return o===45?(n.consume(o),h):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),x):C(o)?(l=f,W(o)):(n.consume(o),f)}function x(o){return o===45?(n.consume(o),h):f(o)}function h(o){return o===62?U(o):o===45?x(o):f(o)}function A(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?I:A):t(o)}function I(o){return o===null?t(o):o===93?(n.consume(o),M):C(o)?(l=I,W(o)):(n.consume(o),I)}function M(o){return o===93?(n.consume(o),b):I(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):I(o)}function j(o){return o===null||o===62?U(o):C(o)?(l=j,W(o)):(n.consume(o),j)}function F(o){return o===null?t(o):o===63?(n.consume(o),D):C(o)?(l=F,W(o)):(n.consume(o),F)}function D(o){return o===62?U(o):F(o)}function _(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):T(o)}function T(o){return C(o)?(l=T,W(o)):z(o)?(n.consume(o),T):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Z(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),V):C(o)?(l=N,W(o)):z(o)?(n.consume(o),N):U(o)}function V(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),V):y(o)}function y(o){return o===61?(n.consume(o),S):C(o)?(l=y,W(o)):z(o)?(n.consume(o),y):N(o)}function S(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,P):C(o)?(l=S,W(o)):z(o)?(n.consume(o),S):(n.consume(o),R)}function P(o){return o===u?(n.consume(o),u=void 0,w):o===null?t(o):C(o)?(l=P,W(o)):(n.consume(o),P)}function R(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Z(o)?N(o):(n.consume(o),R)}function w(o){return o===47||o===62||Z(o)?N(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function W(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return z(o)?L(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),l(o)}}const Pn={name:"labelEnd",tokenize:qe,resolveTo:Re,resolveAll:je},Pe={tokenize:He},_e={tokenize:Ne},Me={tokenize:Ve};function je(n){let r=-1;for(;++r<n.length;){const t=n[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(n.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return n}function Re(n,r){let t=n.length,e=0,u,i,l,a;for(;t--;)if(u=n[t][1],i){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(l){if(n[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(i=t,u.type!=="labelLink")){e=2;break}}else u.type==="labelEnd"&&(l=t);const m={type:n[i][1].type==="labelLink"?"link":"image",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)},c={type:"label",start:Object.assign({},n[i][1].start),end:Object.assign({},n[l][1].end)},p={type:"labelText",start:Object.assign({},n[i+e+2][1].end),end:Object.assign({},n[l-2][1].start)};return a=[["enter",m,r],["enter",c,r]],a=Y(a,n.slice(i+1,i+e+3)),a=Y(a,[["enter",p,r]]),a=Y(a,Ln(r.parser.constructs.insideSpan.null,n.slice(i+e+4,l-3),r)),a=Y(a,[["exit",p,r],n[l-2],n[l-1],["exit",c,r]]),a=Y(a,n.slice(l+1)),a=Y(a,[["exit",m,r]]),tn(n,i,n.length,a),n}function qe(n,r,t){const e=this;let u=e.events.length,i,l;for(;u--;)if((e.events[u][1].type==="labelImage"||e.events[u][1].type==="labelLink")&&!e.events[u][1]._balanced){i=e.events[u][1];break}return a;function a(x){return i?i._inactive?f(x):(l=e.parser.defined.includes(xn(e.sliceSerialize({start:i.end,end:e.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(x),n.exit("labelMarker"),n.exit("labelEnd"),m):t(x)}function m(x){return x===40?n.attempt(Pe,p,l?p:f)(x):x===91?n.attempt(_e,p,l?c:f)(x):l?p(x):f(x)}function c(x){return n.attempt(Me,p,f)(x)}function p(x){return r(x)}function f(x){return i._balanced=!0,t(x)}}function He(n,r,t){return e;function e(f){return n.enter("resource"),n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),u}function u(f){return Z(f)?dn(n,i)(f):i(f)}function i(f){return f===41?p(f):ot(n,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return Z(f)?dn(n,m)(f):p(f)}function a(f){return t(f)}function m(f){return f===34||f===39||f===40?ct(n,c,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):p(f)}function c(f){return Z(f)?dn(n,p)(f):p(f)}function p(f){return f===41?(n.enter("resourceMarker"),n.consume(f),n.exit("resourceMarker"),n.exit("resource"),r):t(f)}}function Ne(n,r,t){const e=this;return u;function u(a){return st.call(e,n,i,l,"reference","referenceMarker","referenceString")(a)}function i(a){return e.parser.defined.includes(xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)))?r(a):t(a)}function l(a){return t(a)}}function Ve(n,r,t){return e;function e(i){return n.enter("reference"),n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),u}function u(i){return i===93?(n.enter("referenceMarker"),n.consume(i),n.exit("referenceMarker"),n.exit("reference"),r):t(i)}}const We={name:"labelStartImage",tokenize:Qe,resolveAll:Pn.resolveAll};function Qe(n,r,t){const e=this;return u;function u(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),i}function i(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),l):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(a):r(a)}}const Ue={name:"labelStartLink",tokenize:$e,resolveAll:Pn.resolveAll};function $e(n,r,t){const e=this;return u;function u(l){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in e.parser.constructs?t(l):r(l)}}const An={name:"lineEnding",tokenize:Ze};function Ze(n,r){return t;function t(e){return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),L(n,r,"linePrefix")}}const yn={name:"thematicBreak",tokenize:Ye};function Ye(n,r,t){let e=0,u;return i;function i(c){return n.enter("thematicBreak"),l(c)}function l(c){return u=c,a(c)}function a(c){return c===u?(n.enter("thematicBreakSequence"),m(c)):e>=3&&(c===null||C(c))?(n.exit("thematicBreak"),r(c)):t(c)}function m(c){return c===u?(n.consume(c),e++,m):(n.exit("thematicBreakSequence"),z(c)?L(n,a,"whitespace")(c):a(c))}}const $={name:"list",tokenize:Ke,continuation:{tokenize:Xe},exit:nr},Ge={tokenize:tr,partial:!0},Je={tokenize:ve,partial:!0};function Ke(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(h){const A=e.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!e.containerState.marker||h===e.containerState.marker:In(h)){if(e.containerState.type||(e.containerState.type=A,n.enter(A,{_container:!0})),A==="listUnordered")return n.enter("listItemPrefix"),h===42||h===45?n.check(yn,t,c)(h):c(h);if(!e.interrupt||h===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(h)}return t(h)}function m(h){return In(h)&&++l<10?(n.consume(h),m):(!e.interrupt||l<2)&&(e.containerState.marker?h===e.containerState.marker:h===41||h===46)?(n.exit("listItemValue"),c(h)):t(h)}function c(h){return n.enter("listItemMarker"),n.consume(h),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||h,n.check(Fn,e.interrupt?t:p,n.attempt(Ge,x,f))}function p(h){return e.containerState.initialBlankLine=!0,i++,x(h)}function f(h){return z(h)?(n.enter("listItemPrefixWhitespace"),n.consume(h),n.exit("listItemPrefixWhitespace"),x):t(h)}function x(h){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(h)}}function Xe(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(Fn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,L(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!z(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Je,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,L(n,n.attempt($,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ve(n,r,t){const e=this;return L(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function nr(n){n.exit(this.containerState.type)}function tr(n,r,t){const e=this;return L(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(i){const l=e.events[e.events.length-1];return!z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const Xn={name:"setextUnderline",tokenize:rr,resolveTo:er};function er(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[i][1].end)):n[e][1]=l,n.push(["exit",l,r]),n}function rr(n,r,t){const e=this;let u;return i;function i(c){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=c,l(c)):t(c)}function l(c){return n.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===u?(n.consume(c),a):(n.exit("setextHeadingLineSequence"),z(c)?L(n,m,"lineSuffix")(c):m(c))}function m(c){return c===null||C(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}const ir={tokenize:ur};function ur(n){const r=this,t=n.attempt(Fn,e,n.attempt(this.parser.constructs.flowInitial,u,L(n,n.attempt(this.parser.constructs.flow,u,n.attempt(ce,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:pt()},ar=ht("string"),or=ht("text");function ht(n){return{tokenize:r,resolveAll:pt(n==="text"?sr:void 0)};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return c(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return c(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function c(p){if(p===null)return!0;const f=u[p];let x=-1;if(f)for(;++x<f.length;){const h=f[x];if(!h.previous||h.previous.call(e,e.previous))return!0}return!1}}}function pt(n){return r;function r(t,e){let u=-1,i;for(;++u<=t.length;)i===void 0?t[u]&&t[u][1].type==="data"&&(i=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==i+2&&(t[i][1].end=t[u-1][1].end,t.splice(i+2,u-i-2),u=i+2),i=void 0);return n?n(t,e):t}}function sr(n,r){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const e=n[t-1][1],u=r.sliceStream(e);let i=u.length,l=-1,a=0,m;for(;i--;){const c=u[i];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)m=!0,a++;else if(c!==-1){i++;break}}if(a){const c={type:t===n.length||m||a<2?"lineSuffix":"hardBreakTrailing",start:{line:e.end.line,column:e.end.column-a,offset:e.end.offset-a,_index:e.start._index+i,_bufferIndex:i?l:e.start._bufferIndex+l},end:Object.assign({},e.end)};e.end=Object.assign({},c.start),e.start.offset===e.end.offset?Object.assign(e,c):(n.splice(t,0,["enter",c,r],["exit",c,r]),t+=2)}t++}return n}function cr(n,r,t){let e=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},i=[];let l=[],a=[];const m={consume:j,enter:F,exit:D,attempt:T(_),check:T(k),interrupt:T(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:n,sliceStream:h,sliceSerialize:x,now:A,defineSkip:I,write:f};let p=r.tokenize.call(c,m);return r.resolveAll&&i.push(r),c;function f(y){return l=Y(l,y),M(),l[l.length-1]!==null?[]:(H(r,0),c.events=Ln(i,c.events,c),c.events)}function x(y,S){return pr(h(y),S)}function h(y){return hr(l,y)}function A(){const{line:y,column:S,offset:P,_index:R,_bufferIndex:w}=e;return{line:y,column:S,offset:P,_index:R,_bufferIndex:w}}function I(y){u[y.line]=y.column,V()}function M(){let y;for(;e._index<l.length;){const S=l[e._index];if(typeof S=="string")for(y=e._index,e._bufferIndex<0&&(e._bufferIndex=0);e._index===y&&e._bufferIndex<S.length;)b(S.charCodeAt(e._bufferIndex));else b(S)}}function b(y){p=p(y)}function j(y){C(y)?(e.line++,e.column=1,e.offset+=y===-3?2:1,V()):y!==-1&&(e.column++,e.offset++),e._bufferIndex<0?e._index++:(e._bufferIndex++,e._bufferIndex===l[e._index].length&&(e._bufferIndex=-1,e._index++)),c.previous=y}function F(y,S){const P=S||{};return P.type=y,P.start=A(),c.events.push(["enter",P,c]),a.push(P),P}function D(y){const S=a.pop();return S.end=A(),c.events.push(["exit",S,c]),S}function _(y,S){H(y,S.from)}function k(y,S){S.restore()}function T(y,S){return P;function P(R,w,U){let W,G,en,o;return Array.isArray(R)?rn(R):"tokenize"in R?rn([R]):J(R);function J(Q){return pn;function pn(an){const fn=an!==null&&Q[an],mn=an!==null&&Q.null,En=[...Array.isArray(fn)?fn:fn?[fn]:[],...Array.isArray(mn)?mn:mn?[mn]:[]];return rn(En)(an)}}function rn(Q){return W=Q,G=0,Q.length===0?U:s(Q[G])}function s(Q){return pn;function pn(an){return o=N(),en=Q,Q.partial||(c.currentConstruct=Q),Q.name&&c.parser.constructs.disable.null.includes(Q.name)?hn():Q.tokenize.call(S?Object.assign(Object.create(c),S):c,m,K,hn)(an)}}function K(Q){return y(en,o),w}function hn(Q){return o.restore(),++G<W.length?s(W[G]):U}}}function H(y,S){y.resolveAll&&!i.includes(y)&&i.push(y),y.resolve&&tn(c.events,S,c.events.length-S,y.resolve(c.events.slice(S),c)),y.resolveTo&&(c.events=y.resolveTo(c.events,c))}function N(){const y=A(),S=c.previous,P=c.currentConstruct,R=c.events.length,w=Array.from(a);return{restore:U,from:R};function U(){e=y,c.previous=S,c.currentConstruct=P,c.events.length=R,a=w,V()}}function V(){e.line in u&&e.column<2&&(e.column=u[e.line],e.offset+=u[e.line]-1)}}function hr(n,r){const t=r.start._index,e=r.start._bufferIndex,u=r.end._index,i=r.end._bufferIndex;let l;if(t===u)l=[n[t].slice(e,i)];else{if(l=n.slice(t,u),e>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function pr(n,r){let t=-1;const e=[];let u;for(;++t<n.length;){const i=n[t];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
2
|
+
`;break}case-3:{l=`\r
|
|
3
|
+
`;break}case-2:{l=r?" ":" ";break}case-1:{if(!r&&u)continue;l=" ";break}default:l=String.fromCharCode(i)}u=i===-2,e.push(l)}return e.join("")}const fr={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:it},mr={91:xe},xr={[-2]:wn,[-1]:wn,32:wn},gr={35:Se,42:yn,45:[Xn,yn],60:we,61:Xn,95:yn,96:Jn,126:Jn},kr={38:lt,92:ut},dr={[-5]:An,[-4]:An,[-3]:An,33:We,38:lt,42:Tn,60:[$t,Le],91:Ue,92:[be,ut],93:Pn,95:Tn,96:ue},br={null:[Tn,lr]},yr={null:[42,95]},Sr={null:[]},Fr=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yr,contentInitial:mr,disable:Sr,document:fr,flow:gr,flowInitial:xr,insideSpan:br,string:kr,text:dr},Symbol.toStringTag,{value:"Module"}));function Er(n){const t=Bt([Fr,...(n||{}).extensions||[]]),e={defined:[],lazy:{},constructs:t,content:u(qt),document:u(Nt),flow:u(ir),string:u(ar),text:u(or)};return e;function u(i){return l;function l(a){return cr(e,i,a)}}}const vn=/[\0\t\n\r]/g;function Cr(){let n=1,r="",t=!0,e;return u;function u(i,l,a){const m=[];let c,p,f,x,h;for(i=r+i.toString(l),f=0,r="",t&&(i.charCodeAt(0)===65279&&f++,t=void 0);f<i.length;){if(vn.lastIndex=f,c=vn.exec(i),x=c&&c.index!==void 0?c.index:i.length,h=i.charCodeAt(x),!c){r=i.slice(f);break}if(h===10&&f===x&&e)m.push(-3),e=void 0;else switch(e&&(m.push(-5),e=void 0),f<x&&(m.push(i.slice(f,x)),n+=x-f),h){case 0:{m.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,m.push(-2);n++<p;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:e=!0,n=1}f=x+1}return a&&(e&&m.push(-5),r&&m.push(r),m.push(null)),m}}function wr(n){for(;!at(n););return n}function ft(n,r){const t=Number.parseInt(n,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Ar=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zr(n){return n.replace(Ar,Ir)}function Ir(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){const u=t.charCodeAt(1),i=u===120||u===88;return ft(t.slice(i?2:1),i?16:10)}return Dn(t)||n}function Sn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?nt(n.position):"start"in n||"end"in n?nt(n):"line"in n||"column"in n?Bn(n):""}function Bn(n){return tt(n&&n.line)+":"+tt(n&&n.column)}function nt(n){return Bn(n&&n.start)+"-"+Bn(n&&n.end)}function tt(n){return n&&typeof n=="number"?n:1}const mt={}.hasOwnProperty,xt=function(n,r,t){return typeof r!="string"&&(t=r,r=void 0),Tr(t)(wr(Er(t).document().write(Cr()(n,r,!0))))};function Tr(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Nn),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(Rn),blockQuote:a(En),characterEscape:y,characterReference:y,codeFenced:a(jn),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:a(jn,m),codeText:a(dt,m),codeTextData:y,data:y,codeFlowValue:y,definition:a(bt),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:a(yt),hardBreakEscape:a(qn),hardBreakTrailing:a(qn),htmlFlow:a(Hn,m),htmlFlowData:y,htmlText:a(Hn,m),htmlTextData:y,image:a(St),label:m,link:a(Nn),listItem:a(Ft),listItemValue:A,listOrdered:a(Vn,h),listUnordered:a(Vn),paragraph:a(Et),reference:hn,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:a(Rn),strong:a(Ct),thematicBreak:a(At)},exit:{atxHeading:p(),atxHeadingSequence:T,autolink:p(),autolinkEmail:mn,autolinkProtocol:fn,blockQuote:p(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:pn,characterReferenceMarkerNumeric:pn,characterReferenceValue:an,codeFenced:p(j),codeFencedFence:b,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:S,codeIndented:p(F),codeText:p(W),codeTextData:S,data:S,definition:p(),definitionDestinationString:k,definitionLabelString:D,definitionTitleString:_,emphasis:p(),hardBreakEscape:p(R),hardBreakTrailing:p(R),htmlFlow:p(w),htmlFlowData:S,htmlText:p(U),htmlTextData:S,image:p(en),label:J,labelText:o,lineEnding:P,link:p(G),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Q,resourceDestinationString:rn,resourceTitleString:s,resource:K,setextHeading:p(V),setextHeadingLineSequence:N,setextHeadingText:H,strong:p(),thematicBreak:p()}};gt(r,(n||{}).mdastExtensions||[]);const t={};return e;function e(g){let d={type:"root",children:[]};const E={stack:[d],tokenStack:[],config:r,enter:c,exit:f,buffer:m,resume:x,setData:i,getData:l},B=[];let O=-1;for(;++O<g.length;)if(g[O][1].type==="listOrdered"||g[O][1].type==="listUnordered")if(g[O][0]==="enter")B.push(O);else{const X=B.pop();O=u(g,X,O)}for(O=-1;++O<g.length;){const X=r[g[O][0]];mt.call(X,g[O][1].type)&&X[g[O][1].type].call(Object.assign({sliceSerialize:g[O][2].sliceSerialize},E),g[O][1])}if(E.tokenStack.length>0){const X=E.tokenStack[E.tokenStack.length-1];(X[1]||et).call(E,void 0,X[0])}for(d.position={start:sn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:sn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},O=-1;++O<r.transforms.length;)d=r.transforms[O](d)||d;return d}function u(g,d,E){let B=d-1,O=-1,X=!1,on,un,gn,kn;for(;++B<=E;){const q=g[B];if(q[1].type==="listUnordered"||q[1].type==="listOrdered"||q[1].type==="blockQuote"?(q[0]==="enter"?O++:O--,kn=void 0):q[1].type==="lineEndingBlank"?q[0]==="enter"&&(on&&!kn&&!O&&!gn&&(gn=B),kn=void 0):q[1].type==="linePrefix"||q[1].type==="listItemValue"||q[1].type==="listItemMarker"||q[1].type==="listItemPrefix"||q[1].type==="listItemPrefixWhitespace"||(kn=void 0),!O&&q[0]==="enter"&&q[1].type==="listItemPrefix"||O===-1&&q[0]==="exit"&&(q[1].type==="listUnordered"||q[1].type==="listOrdered")){if(on){let Cn=B;for(un=void 0;Cn--;){const ln=g[Cn];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;un&&(g[un][1].type="lineEndingBlank",X=!0),ln[1].type="lineEnding",un=Cn}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}gn&&(!un||gn<un)&&(on._spread=!0),on.end=Object.assign({},un?g[un][1].start:q[1].end),g.splice(un||B,0,["exit",on,q[2]]),B++,E++}q[1].type==="listItemPrefix"&&(on={type:"listItem",_spread:!1,start:Object.assign({},q[1].start),end:void 0},g.splice(B,0,["enter",on,q[2]]),B++,E++,gn=void 0,kn=!0)}}return g[d][1]._spread=X,E}function i(g,d){t[g]=d}function l(g){return t[g]}function a(g,d){return E;function E(B){c.call(this,g(B),B),d&&d.call(this,B)}}function m(){this.stack.push({type:"fragment",children:[]})}function c(g,d,E){return this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([d,E]),g.position={start:sn(d.start)},g}function p(g){return d;function d(E){g&&g.call(this,E),f.call(this,E)}}function f(g,d){const E=this.stack.pop(),B=this.tokenStack.pop();if(B)B[0].type!==g.type&&(d?d.call(this,g,B[0]):(B[1]||et).call(this,g,B[0]));else throw new Error("Cannot close `"+g.type+"` ("+Sn({start:g.start,end:g.end})+"): it’s not open");return E.position.end=sn(g.end),E}function x(){return It(this.stack.pop())}function h(){i("expectingFirstListItemValue",!0)}function A(g){if(l("expectingFirstListItemValue")){const d=this.stack[this.stack.length-2];d.start=Number.parseInt(this.sliceSerialize(g),10),i("expectingFirstListItemValue")}}function I(){const g=this.resume(),d=this.stack[this.stack.length-1];d.lang=g}function M(){const g=this.resume(),d=this.stack[this.stack.length-1];d.meta=g}function b(){l("flowCodeInside")||(this.buffer(),i("flowCodeInside",!0))}function j(){const g=this.resume(),d=this.stack[this.stack.length-1];d.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),i("flowCodeInside")}function F(){const g=this.resume(),d=this.stack[this.stack.length-1];d.value=g.replace(/(\r?\n|\r)$/g,"")}function D(g){const d=this.resume(),E=this.stack[this.stack.length-1];E.label=d,E.identifier=xn(this.sliceSerialize(g)).toLowerCase()}function _(){const g=this.resume(),d=this.stack[this.stack.length-1];d.title=g}function k(){const g=this.resume(),d=this.stack[this.stack.length-1];d.url=g}function T(g){const d=this.stack[this.stack.length-1];if(!d.depth){const E=this.sliceSerialize(g).length;d.depth=E}}function H(){i("setextHeadingSlurpLineEnding",!0)}function N(g){const d=this.stack[this.stack.length-1];d.depth=this.sliceSerialize(g).charCodeAt(0)===61?1:2}function V(){i("setextHeadingSlurpLineEnding")}function y(g){const d=this.stack[this.stack.length-1];let E=d.children[d.children.length-1];(!E||E.type!=="text")&&(E=wt(),E.position={start:sn(g.start)},d.children.push(E)),this.stack.push(E)}function S(g){const d=this.stack.pop();d.value+=this.sliceSerialize(g),d.position.end=sn(g.end)}function P(g){const d=this.stack[this.stack.length-1];if(l("atHardBreak")){const E=d.children[d.children.length-1];E.position.end=sn(g.end),i("atHardBreak");return}!l("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(d.type)&&(y.call(this,g),S.call(this,g))}function R(){i("atHardBreak",!0)}function w(){const g=this.resume(),d=this.stack[this.stack.length-1];d.value=g}function U(){const g=this.resume(),d=this.stack[this.stack.length-1];d.value=g}function W(){const g=this.resume(),d=this.stack[this.stack.length-1];d.value=g}function G(){const g=this.stack[this.stack.length-1];if(l("inReference")){const d=l("referenceType")||"shortcut";g.type+="Reference",g.referenceType=d,delete g.url,delete g.title}else delete g.identifier,delete g.label;i("referenceType")}function en(){const g=this.stack[this.stack.length-1];if(l("inReference")){const d=l("referenceType")||"shortcut";g.type+="Reference",g.referenceType=d,delete g.url,delete g.title}else delete g.identifier,delete g.label;i("referenceType")}function o(g){const d=this.sliceSerialize(g),E=this.stack[this.stack.length-2];E.label=zr(d),E.identifier=xn(d).toLowerCase()}function J(){const g=this.stack[this.stack.length-1],d=this.resume(),E=this.stack[this.stack.length-1];if(i("inReference",!0),E.type==="link"){const B=g.children;E.children=B}else E.alt=d}function rn(){const g=this.resume(),d=this.stack[this.stack.length-1];d.url=g}function s(){const g=this.resume(),d=this.stack[this.stack.length-1];d.title=g}function K(){i("inReference")}function hn(){i("referenceType","collapsed")}function Q(g){const d=this.resume(),E=this.stack[this.stack.length-1];E.label=d,E.identifier=xn(this.sliceSerialize(g)).toLowerCase(),i("referenceType","full")}function pn(g){i("characterReferenceType",g.type)}function an(g){const d=this.sliceSerialize(g),E=l("characterReferenceType");let B;E?(B=ft(d,E==="characterReferenceMarkerNumeric"?10:16),i("characterReferenceType")):B=Dn(d);const O=this.stack.pop();O.value+=B,O.position.end=sn(g.end)}function fn(g){S.call(this,g);const d=this.stack[this.stack.length-1];d.url=this.sliceSerialize(g)}function mn(g){S.call(this,g);const d=this.stack[this.stack.length-1];d.url="mailto:"+this.sliceSerialize(g)}function En(){return{type:"blockquote",children:[]}}function jn(){return{type:"code",lang:null,meta:null,value:""}}function dt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function Rn(){return{type:"heading",depth:void 0,children:[]}}function qn(){return{type:"break"}}function Hn(){return{type:"html",value:""}}function St(){return{type:"image",title:null,url:"",alt:null}}function Nn(){return{type:"link",title:null,url:"",children:[]}}function Vn(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function Ft(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function wt(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function sn(n){return{line:n.line,column:n.column,offset:n.offset}}function gt(n,r){let t=-1;for(;++t<r.length;){const e=r[t];Array.isArray(e)?gt(n,e):Br(n,e)}}function Br(n,r){let t;for(t in r)if(mt.call(r,t)){if(t==="canContainEols"){const e=r[t];e&&n[t].push(...e)}else if(t==="transforms"){const e=r[t];e&&n[t].push(...e)}else if(t==="enter"||t==="exit"){const e=r[t];e&&Object.assign(n[t],e)}}}function et(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Sn({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Sn({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Sn({start:r.start,end:r.end})+") is still open")}function Or(n){const r=n.replace(/\n{2,}/g,`
|
|
4
|
+
`);return bn.dedent(r)}function Lr(n){const r=Or(n),{children:t}=xt(r),e=[[]];let u=0;function i(l,a="normal"){l.type==="text"?l.value.split(`
|
|
5
|
+
`).forEach((c,p)=>{p!==0&&(u++,e.push([])),c.split(" ").forEach(f=>{f&&e[u].push({content:f,type:a})})}):(l.type==="strong"||l.type==="emphasis")&&l.children.forEach(m=>{i(m,l.type)})}return t.forEach(l=>{l.type==="paragraph"&&l.children.forEach(a=>{i(a)})}),e}function Dr(n){const{children:r}=xt(n);function t(e){return e.type==="text"?e.value.replace(/\n/g,"<br/>"):e.type==="strong"?`<strong>${e.children.map(t).join("")}</strong>`:e.type==="emphasis"?`<em>${e.children.map(t).join("")}</em>`:e.type==="paragraph"?`<p>${e.children.map(t).join("")}</p>`:`Unsupported markdown: ${e.type}`}return r.map(t).join("")}function Pr(n){return Intl.Segmenter?[...new Intl.Segmenter().segment(n)].map(r=>r.segment):[...n]}function _r(n,r){const t=Pr(r.content);return kt(n,[],t,r.type)}function kt(n,r,t,e){if(t.length===0)return[{content:r.join(""),type:e},{content:"",type:e}];const[u,...i]=t,l=[...r,u];return n([{content:l.join(""),type:e}])?kt(n,l,i,e):(r.length===0&&u&&(r.push(u),t.shift()),[{content:r.join(""),type:e},{content:t.join(""),type:e}])}function Mr(n,r){if(n.some(({content:t})=>t.includes(`
|
|
6
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return On(n,r)}function On(n,r,t=[],e=[]){if(n.length===0)return e.length>0&&t.push(e),t.length>0?t:[];let u="";n[0].content===" "&&(u=" ",n.shift());const i=n.shift()??{content:" ",type:"normal"},l=[...e];if(u!==""&&l.push({content:u,type:"normal"}),l.push(i),r(l))return On(n,r,t,l);if(e.length>0)t.push(e),n.unshift(i);else if(i.content){const[a,m]=_r(r,i);t.push([a]),m.content&&n.unshift(m)}return On(n,r,t)}function jr(n,r){r&&n.attr("style",r)}function Rr(n,r,t,e,u=!1){const i=n.append("foreignObject"),l=i.append("xhtml:div"),a=r.label,m=r.isNode?"nodeLabel":"edgeLabel";l.html(bn.sanitizeText$2(`
|
|
7
|
+
<span class="${m} ${e}" `+(r.labelStyle?'style="'+r.labelStyle+'"':"")+">"+a+"</span>",bn.getConfig$1())),jr(l,r.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("max-width",t+"px"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),u&&l.attr("class","labelBkg");let c=l.node().getBoundingClientRect();return c.width===t&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",t+"px"),c=l.node().getBoundingClientRect()),i.style("width",c.width),i.style("height",c.height),i.node()}function _n(n,r,t){return n.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",r*t-.1+"em").attr("dy",t+"em")}function qr(n,r,t){const e=n.append("text"),u=_n(e,1,r);Mn(u,t);const i=u.node().getComputedTextLength();return e.remove(),i}function Hr(n,r,t){var e;const u=n.append("text"),i=_n(u,1,r);Mn(i,[{content:t,type:"normal"}]);const l=(e=i.node())==null?void 0:e.getBoundingClientRect();return l&&u.remove(),l}function Nr(n,r,t,e=!1){const i=r.append("g"),l=i.insert("rect").attr("class","background"),a=i.append("text").attr("y","-10.1");let m=0;for(const c of t){const p=x=>qr(i,1.1,x)<=n,f=p(c)?[c]:Mr(c,p);for(const x of f){const h=_n(a,m,1.1);Mn(h,x),m++}}if(e){const c=a.node().getBBox(),p=2;return l.attr("x",-p).attr("y",-p).attr("width",c.width+2*p).attr("height",c.height+2*p),i.node()}else return a.node()}function Mn(n,r){n.text(""),r.forEach((t,e)=>{const u=n.append("tspan").attr("font-style",t.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",t.type==="strong"?"bold":"normal");e===0?u.text(t.content):u.text(" "+t.content)})}const Vr=(n,r="",{style:t="",isTitle:e=!1,classes:u="",useHtmlLabels:i=!0,isNode:l=!0,width:a=200,addSvgBackground:m=!1}={})=>{if(bn.log$1.info("createText",r,t,e,u,i,l,m),i){const c=Dr(r),p={isNode:l,label:bn.decodeEntities(c).replace(/fa[blrs]?:fa-[\w-]+/g,x=>`<i class='${x.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return Rr(n,p,a,u,m)}else{const c=Lr(r);return Nr(a,n,c,m)}};exports.computeDimensionOfText=Hr;exports.createText=Vr;
|