@kimicode/cli 1.0.37 → 1.0.40
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/LICENSE.md +12 -0
- package/README.md +429 -24
- package/bin/stt/requirements.txt +32 -0
- package/bin/stt/stt_server.py +619 -0
- package/bin/tts/requirements.txt +21 -0
- package/bin/tts/tts_server.py +404 -0
- package/cli-wrapper.cjs +4 -0
- package/llms.txt +88 -0
- package/package.json +30 -11
- package/web/dist/assets/AssistantsView-BiUiWjhF.js +1 -0
- package/web/dist/assets/AutomationView-Dcf_yNaI.js +1 -0
- package/web/dist/assets/ChannelConfigView-BLnxsMGm.js +8 -0
- package/web/dist/assets/ConnectorsView-CX3E6X6c.js +1 -0
- package/web/dist/assets/DesignSystemView--x-P-lpD.js +1 -0
- package/web/dist/assets/Drawer-CjAgqH3B.js +1 -0
- package/web/dist/assets/FileTreeView-Chb_fzTK.js +11 -0
- package/web/dist/assets/HookConfigView-EafYlWdN.js +1 -0
- package/web/dist/assets/InputArea-BbHslX7b.js +50 -0
- package/web/dist/assets/ModelsView-CGN5Nljr.js +1 -0
- package/web/dist/assets/PluginsView-CDiJgvI8.js +2 -0
- package/web/dist/assets/ProjectsView-C5Usmwqy.js +1 -0
- package/web/dist/assets/SessionGrid-Drxg0r_u.js +4 -0
- package/web/dist/assets/SettingsModal-Cmts6aBG.js +10 -0
- package/web/dist/assets/Skeleton-Dsk6B0U3.js +1 -0
- package/web/dist/assets/SkillsView-TEDR_3XX.js +1 -0
- package/web/dist/assets/TemplatesTab-DtN5Kdgh.js +1 -0
- package/web/dist/assets/ToolsView-VukZnIt1.js +1 -0
- package/web/dist/assets/VizCardsSkeleton-C_GaEfXd.js +1 -0
- package/web/dist/assets/abnfDiagram-YUKMZFIV-BIFw6B_N.js +1 -0
- package/web/dist/assets/arc-BZQ951h9.js +1 -0
- package/web/dist/assets/architectureDiagram-47P4ROYG-BP5qiXzf.js +36 -0
- package/web/dist/assets/blockDiagram-E7TT5TSB-DtRpcE7F.js +140 -0
- package/web/dist/assets/c4Diagram-CRA5TL53-Gdzn8UBh.js +38 -0
- package/web/dist/assets/channel-BND6_KSH.js +1 -0
- package/web/dist/assets/chunk-2Q5K7J3B-3U6HMlsm.js +1 -0
- package/web/dist/assets/chunk-5VM5RSS4-CYl9mwa-.js +15 -0
- package/web/dist/assets/chunk-7TKQ45FW-Dn6ktcY5.js +1 -0
- package/web/dist/assets/chunk-AW2ZBBNX-De0QX6p1.js +88 -0
- package/web/dist/assets/chunk-FVRAUYC3-CpXDfvz4.js +2 -0
- package/web/dist/assets/chunk-HTAEGDNF-D1KDvcDd.js +1 -0
- package/web/dist/assets/chunk-JWPE2WC7-umm4A-fq.js +1 -0
- package/web/dist/assets/chunk-KQW6MTUR-JYH94hpE.js +1 -0
- package/web/dist/assets/chunk-XXDRQBXY-CSlCFByc.js +1 -0
- package/web/dist/assets/classDiagram-v2-K4WV4PDN-DnFwS0qN.js +217 -0
- package/web/dist/assets/cose-bilkent-JH36ORCC-BxUTUyep.js +1 -0
- package/web/dist/assets/cynefin-EF2NZ3EQ-CiMvulJr.js +141 -0
- package/web/dist/assets/cynefinDiagram-3GCD6N5R-DuXFORdW.js +62 -0
- package/web/dist/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/web/dist/assets/dagre-W4DXFKR2-DzMZHXci.js +4 -0
- package/web/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/web/dist/assets/diagram-2UJZ2QOL-B6tO5G1v.js +200 -0
- package/web/dist/assets/diagram-OVF4WLC6-DRZt8tGc.js +24 -0
- package/web/dist/assets/diagram-PFPMY2P6-DGh6IecR.js +30 -0
- package/web/dist/assets/diagram-UMYRVEAY-BLbnt0yT.js +24 -0
- package/web/dist/assets/diagram-YEKJPTXX-C-S5DVhj.js +41 -0
- package/web/dist/assets/diagram-ZIFT7M5P-JrGHTWbo.js +3 -0
- package/web/dist/assets/ebnfDiagram-VR2GEFS7-DPXA-YOi.js +1 -0
- package/web/dist/assets/elk-IJKZMXRS-CINeWt2W.js +27 -0
- package/web/dist/assets/erDiagram-O2IAPWRE-PPaHmqA1.js +99 -0
- package/web/dist/assets/flowDiagram-OXPTDLAJ-t-u0QXEA.js +213 -0
- package/web/dist/assets/ganttDiagram-R7TSEDQI-Bw49ZD_b.js +292 -0
- package/web/dist/assets/gitGraphDiagram-XJZIOB7I-BAfOqeeg.js +106 -0
- package/web/dist/assets/graph-Bn3Yngep.js +1 -0
- package/web/dist/assets/{icons-f1hlMKvD.js → icons-Bm_ZzSAy.js} +384 -144
- package/web/dist/assets/index-CeeLdENM.js +677 -0
- package/web/dist/assets/index-Ceez9lYk.css +1 -0
- package/web/dist/assets/infoDiagram-5W2HQ5XZ-Bv4RBxYW.js +2 -0
- package/web/dist/assets/init-Gi6I4Gst.js +1 -0
- package/web/dist/assets/ishikawaDiagram-K3B6WC7H-DEpj0bRp.js +70 -0
- package/web/dist/assets/journeyDiagram-COXZFDF6-MJu84Iiz.js +139 -0
- package/web/dist/assets/kanban-definition-P3RFRI5V-mlYSRALK.js +89 -0
- package/web/dist/assets/linear-5j9gt8MV.js +1 -0
- package/web/dist/assets/{markdown-DEtuzEyz.js → markdown-BWXjRrSw.js} +8 -8
- package/web/dist/assets/mermaid.core-DLb6eAON.js +314 -0
- package/web/dist/assets/mindmap-definition-LZFPQGKD-C9v_57Ex.js +96 -0
- package/web/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/web/dist/assets/{panels-Bn-2wCur.js → panels-BQOvnbWH.js} +1 -1
- package/web/dist/assets/pegDiagram-BGZESJAR-KQP26s3-.js +1 -0
- package/web/dist/assets/pieDiagram-CAPJLFHJ-DN3RQ_ih.js +39 -0
- package/web/dist/assets/profileChange-B7TaQ18u.js +1 -0
- package/web/dist/assets/quadrantDiagram-GDMTTRAM-BpL_ZL76.js +7 -0
- package/web/dist/assets/railroadDiagram-SM67HX2B-DZ-fPU85.js +1 -0
- package/web/dist/assets/{react-vendor-ClBKp0t-.js → react-vendor-C0HIWSpf.js} +1 -1
- package/web/dist/assets/requirementDiagram-X7JNWC4A-mKPGj64L.js +84 -0
- package/web/dist/assets/sankeyDiagram-UM26HJRW-Bs4xfjQP.js +40 -0
- package/web/dist/assets/sequenceDiagram-ZO4K6R2Y-BjUmzZaO.js +169 -0
- package/web/dist/assets/sizeCapture-INFHLROL-BXBM3j_Q.js +1 -0
- package/web/dist/assets/{state-xD58vmym.js → state-Kfon1nTr.js} +1 -1
- package/web/dist/assets/stateDiagram-v2-TBUQTH76-FGgFDGUU.js +291 -0
- package/web/dist/assets/sttLanguages-C7kVulzY.js +1 -0
- package/web/dist/assets/swimlanes-N4OXWK64-wkd_n4HU.js +1 -0
- package/web/dist/assets/swimlanesDiagram-K3J5GTZL-CKnwEuq_.js +8 -0
- package/web/dist/assets/timeline-definition-YOQAKGHF-DyBln1jw.js +120 -0
- package/web/dist/assets/usecaseDiagram-VIAY4XPW-Cqis3XHX.js +370 -0
- package/web/dist/assets/vennDiagram-BLWOH2XV-BaiFLOVS.js +34 -0
- package/web/dist/assets/wardleyDiagram-YMQ3BMBF-C4CzpJto.js +78 -0
- package/web/dist/assets/xychartDiagram-TAQBALBS-Dp1hfe3-.js +7 -0
- package/web/dist/figma-demo/product-1.jpg +0 -0
- package/web/dist/figma-demo/product-2.jpg +0 -0
- package/web/dist/figma-demo/trail-1.jpg +0 -0
- package/web/dist/figma-demo/trail-2.jpg +0 -0
- package/web/dist/figma-demo/trail-3.jpg +0 -0
- package/web/dist/fonts/OFL-Inter.txt +93 -0
- package/web/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/web/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/web/dist/icons/icon-180.png +0 -0
- package/web/dist/icons/icon-192.png +0 -0
- package/web/dist/icons/icon-512.png +0 -0
- package/web/dist/icons/icon-maskable-512.png +0 -0
- package/web/dist/index.html +39 -9
- package/web/dist/manifest.webmanifest +16 -0
- package/web/dist/assets/AssistantsView-OMdgsTIj.js +0 -1
- package/web/dist/assets/AutomationView-BPwjLbkL.js +0 -1
- package/web/dist/assets/ChannelConfigView-JDljUn42.js +0 -8
- package/web/dist/assets/ConnectorsView-AemNT1Ae.js +0 -1
- package/web/dist/assets/FileTreeView-DYx-0jFV.js +0 -11
- package/web/dist/assets/HookConfigView-CS1QqgPx.js +0 -1
- package/web/dist/assets/ModelsView-B3nHezvJ.js +0 -1
- package/web/dist/assets/PluginsView-C4Xc70ec.js +0 -1
- package/web/dist/assets/SessionGrid-C9-LeJH0.js +0 -47
- package/web/dist/assets/SettingsModal-CjWT1C66.js +0 -4
- package/web/dist/assets/SkillsView-DTZyXald.js +0 -1
- package/web/dist/assets/TemplatesTab-CE-CfCf2.js +0 -1
- package/web/dist/assets/ThreeScene-CMqkpyKO.js +0 -2863
- package/web/dist/assets/ThreeScene-DvOrMIoG.css +0 -1
- package/web/dist/assets/ToolsView-CrEHDTEO.js +0 -1
- package/web/dist/assets/index-BCHbHIbw.css +0 -1
- package/web/dist/assets/index-u1vYyqna.js +0 -592
- package/web/dist/assets/sttLanguages-BNRptAQA.js +0 -1
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CeeLdENM.js","assets/markdown-BWXjRrSw.js","assets/icons-Bm_ZzSAy.js","assets/react-vendor-C0HIWSpf.js","assets/state-Kfon1nTr.js","assets/panels-BQOvnbWH.js","assets/index-Ceez9lYk.css","assets/elk-IJKZMXRS-CINeWt2W.js","assets/chunk-HTAEGDNF-D1KDvcDd.js","assets/chunk-FVRAUYC3-CpXDfvz4.js","assets/graph-Bn3Yngep.js","assets/dagre-W4DXFKR2-DzMZHXci.js","assets/swimlanes-N4OXWK64-wkd_n4HU.js","assets/cose-bilkent-JH36ORCC-BxUTUyep.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-CRA5TL53-Gdzn8UBh.js","assets/chunk-7TKQ45FW-Dn6ktcY5.js","assets/flowDiagram-OXPTDLAJ-t-u0QXEA.js","assets/chunk-5VM5RSS4-CYl9mwa-.js","assets/chunk-XXDRQBXY-CSlCFByc.js","assets/chunk-KQW6MTUR-JYH94hpE.js","assets/channel-BND6_KSH.js","assets/diagram-2UJZ2QOL-B6tO5G1v.js","assets/swimlanesDiagram-K3J5GTZL-CKnwEuq_.js","assets/erDiagram-O2IAPWRE-PPaHmqA1.js","assets/gitGraphDiagram-XJZIOB7I-BAfOqeeg.js","assets/chunk-2Q5K7J3B-3U6HMlsm.js","assets/chunk-JWPE2WC7-umm4A-fq.js","assets/cynefin-EF2NZ3EQ-CiMvulJr.js","assets/ganttDiagram-R7TSEDQI-Bw49ZD_b.js","assets/linear-5j9gt8MV.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5W2HQ5XZ-Bv4RBxYW.js","assets/pieDiagram-CAPJLFHJ-DN3RQ_ih.js","assets/arc-BZQ951h9.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-GDMTTRAM-BpL_ZL76.js","assets/xychartDiagram-TAQBALBS-Dp1hfe3-.js","assets/requirementDiagram-X7JNWC4A-mKPGj64L.js","assets/sequenceDiagram-ZO4K6R2Y-BjUmzZaO.js","assets/classDiagram-v2-K4WV4PDN-DnFwS0qN.js","assets/stateDiagram-v2-TBUQTH76-FGgFDGUU.js","assets/journeyDiagram-COXZFDF6-MJu84Iiz.js","assets/timeline-definition-YOQAKGHF-DyBln1jw.js","assets/mindmap-definition-LZFPQGKD-C9v_57Ex.js","assets/kanban-definition-P3RFRI5V-mlYSRALK.js","assets/sankeyDiagram-UM26HJRW-Bs4xfjQP.js","assets/diagram-UMYRVEAY-BLbnt0yT.js","assets/diagram-YEKJPTXX-C-S5DVhj.js","assets/blockDiagram-E7TT5TSB-DtRpcE7F.js","assets/diagram-PFPMY2P6-DGh6IecR.js","assets/architectureDiagram-47P4ROYG-BP5qiXzf.js","assets/diagram-ZIFT7M5P-JrGHTWbo.js","assets/ishikawaDiagram-K3B6WC7H-DEpj0bRp.js","assets/vennDiagram-BLWOH2XV-BaiFLOVS.js","assets/diagram-OVF4WLC6-DRZt8tGc.js","assets/usecaseDiagram-VIAY4XPW-Cqis3XHX.js","assets/wardleyDiagram-YMQ3BMBF-C4CzpJto.js","assets/cynefinDiagram-3GCD6N5R-DuXFORdW.js","assets/railroadDiagram-SM67HX2B-DZ-fPU85.js","assets/chunk-AW2ZBBNX-De0QX6p1.js","assets/ebnfDiagram-VR2GEFS7-DPXA-YOi.js","assets/abnfDiagram-YUKMZFIV-BIFw6B_N.js","assets/pegDiagram-BGZESJAR-KQP26s3-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Iy=Object.defineProperty;var Dy=(e,t,r)=>t in e?Iy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vt=(e,t,r)=>Dy(e,typeof t!="symbol"?t+"":t,r);import{_ as qt}from"./index-CeeLdENM.js";import{g as Py}from"./icons-Bm_ZzSAy.js";var od=Object.defineProperty,p=(e,t)=>od(e,"name",{value:t,configurable:!0}),Ry=(e,t)=>{for(var r in t)od(e,r,{get:t[r],enumerable:!0})},la={exports:{}},qy=la.exports,Ih;function Ny(){return Ih||(Ih=1,(function(e,t){(function(r,i){e.exports=i()})(qy,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",c="hour",h="day",l="week",u="month",f="quarter",d="year",m="date",y="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var M=["th","st","nd","rd"],v=E%100;return"["+E+(M[(v-20)%10]||M[v]||M[0])+"]"}},k=function(E,M,v){var P=String(E);return!P||P.length>=M?E:""+Array(M+1-P.length).join(v)+E},T={s:k,z:function(E){var M=-E.utcOffset(),v=Math.abs(M),P=Math.floor(v/60),$=v%60;return(M<=0?"+":"-")+k(P,2,"0")+":"+k($,2,"0")},m:function E(M,v){if(M.date()<v.date())return-E(v,M);var P=12*(v.year()-M.year())+(v.month()-M.month()),$=M.clone().add(P,u),j=v-$<0,V=M.clone().add(P+(j?-1:1),u);return+(-(P+(v-$)/(j?$-V:V-$))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:d,w:l,d:h,D:m,h:c,m:n,s:o,ms:a,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},B="en",L={};L[B]=b;var A="$isDayjsObject",F=function(E){return E instanceof tt||!(!E||!E[A])},z=function E(M,v,P){var $;if(!M)return B;if(typeof M=="string"){var j=M.toLowerCase();L[j]&&($=j),v&&(L[j]=v,$=j);var V=M.split("-");if(!$&&V.length>1)return E(V[0])}else{var dt=M.name;L[dt]=M,$=dt}return!P&&$&&(B=$),$||!P&&B},R=function(E,M){if(F(E))return E.clone();var v=typeof M=="object"?M:{};return v.date=E,v.args=arguments,new tt(v)},q=T;q.l=z,q.i=F,q.w=function(E,M){return R(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var tt=(function(){function E(v){this.$L=z(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[A]=!0}var M=E.prototype;return M.parse=function(v){this.$d=(function(P){var $=P.date,j=P.utc;if($===null)return new Date(NaN);if(q.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var V=$.match(C);if(V){var dt=V[2]-1||0,lt=(V[7]||"0").substring(0,3);return j?new Date(Date.UTC(V[1],dt,V[3]||1,V[4]||0,V[5]||0,V[6]||0,lt)):new Date(V[1],dt,V[3]||1,V[4]||0,V[5]||0,V[6]||0,lt)}}return new Date($)})(v),this.init()},M.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},M.$utils=function(){return q},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(v,P){var $=R(v);return this.startOf(P)<=$&&$<=this.endOf(P)},M.isAfter=function(v,P){return R(v)<this.startOf(P)},M.isBefore=function(v,P){return this.endOf(P)<R(v)},M.$g=function(v,P,$){return q.u(v)?this[P]:this.set($,v)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(v,P){var $=this,j=!!q.u(P)||P,V=q.p(v),dt=function(Bt,ut){var bt=q.w($.$u?Date.UTC($.$y,ut,Bt):new Date($.$y,ut,Bt),$);return j?bt:bt.endOf(h)},lt=function(Bt,ut){return q.w($.toDate()[Bt].apply($.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ut)),$)},mt=this.$W,nt=this.$M,wt=this.$D,At="set"+(this.$u?"UTC":"");switch(V){case d:return j?dt(1,0):dt(31,11);case u:return j?dt(1,nt):dt(0,nt+1);case l:var Et=this.$locale().weekStart||0,Nt=(mt<Et?mt+7:mt)-Et;return dt(j?wt-Nt:wt+(6-Nt),nt);case h:case m:return lt(At+"Hours",0);case c:return lt(At+"Minutes",1);case n:return lt(At+"Seconds",2);case o:return lt(At+"Milliseconds",3);default:return this.clone()}},M.endOf=function(v){return this.startOf(v,!1)},M.$set=function(v,P){var $,j=q.p(v),V="set"+(this.$u?"UTC":""),dt=($={},$[h]=V+"Date",$[m]=V+"Date",$[u]=V+"Month",$[d]=V+"FullYear",$[c]=V+"Hours",$[n]=V+"Minutes",$[o]=V+"Seconds",$[a]=V+"Milliseconds",$)[j],lt=j===h?this.$D+(P-this.$W):P;if(j===u||j===d){var mt=this.clone().set(m,1);mt.$d[dt](lt),mt.init(),this.$d=mt.set(m,Math.min(this.$D,mt.daysInMonth())).$d}else dt&&this.$d[dt](lt);return this.init(),this},M.set=function(v,P){return this.clone().$set(v,P)},M.get=function(v){return this[q.p(v)]()},M.add=function(v,P){var $,j=this;v=Number(v);var V=q.p(P),dt=function(nt){var wt=R(j);return q.w(wt.date(wt.date()+Math.round(nt*v)),j)};if(V===u)return this.set(u,this.$M+v);if(V===d)return this.set(d,this.$y+v);if(V===h)return dt(1);if(V===l)return dt(7);var lt=($={},$[n]=i,$[c]=s,$[o]=r,$)[V]||1,mt=this.$d.getTime()+v*lt;return q.w(mt,this)},M.subtract=function(v,P){return this.add(-1*v,P)},M.format=function(v){var P=this,$=this.$locale();if(!this.isValid())return $.invalidDate||y;var j=v||"YYYY-MM-DDTHH:mm:ssZ",V=q.z(this),dt=this.$H,lt=this.$m,mt=this.$M,nt=$.weekdays,wt=$.months,At=$.meridiem,Et=function(ut,bt,Mt,Rt){return ut&&(ut[bt]||ut(P,j))||Mt[bt].slice(0,Rt)},Nt=function(ut){return q.s(dt%12||12,ut,"0")},Bt=At||function(ut,bt,Mt){var Rt=ut<12?"AM":"PM";return Mt?Rt.toLowerCase():Rt};return j.replace(x,(function(ut,bt){return bt||(function(Mt){switch(Mt){case"YY":return String(P.$y).slice(-2);case"YYYY":return q.s(P.$y,4,"0");case"M":return mt+1;case"MM":return q.s(mt+1,2,"0");case"MMM":return Et($.monthsShort,mt,wt,3);case"MMMM":return Et(wt,mt);case"D":return P.$D;case"DD":return q.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return Et($.weekdaysMin,P.$W,nt,2);case"ddd":return Et($.weekdaysShort,P.$W,nt,3);case"dddd":return nt[P.$W];case"H":return String(dt);case"HH":return q.s(dt,2,"0");case"h":return Nt(1);case"hh":return Nt(2);case"a":return Bt(dt,lt,!0);case"A":return Bt(dt,lt,!1);case"m":return String(lt);case"mm":return q.s(lt,2,"0");case"s":return String(P.$s);case"ss":return q.s(P.$s,2,"0");case"SSS":return q.s(P.$ms,3,"0");case"Z":return V}return null})(ut)||V.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(v,P,$){var j,V=this,dt=q.p(P),lt=R(v),mt=(lt.utcOffset()-this.utcOffset())*i,nt=this-lt,wt=function(){return q.m(V,lt)};switch(dt){case d:j=wt()/12;break;case u:j=wt();break;case f:j=wt()/3;break;case l:j=(nt-mt)/6048e5;break;case h:j=(nt-mt)/864e5;break;case c:j=nt/s;break;case n:j=nt/i;break;case o:j=nt/r;break;default:j=nt}return $?j:q.a(j)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(v,P){if(!v)return this.$L;var $=this.clone(),j=z(v,P,!0);return j&&($.$L=j),$},M.clone=function(){return q.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E})(),N=tt.prototype;return R.prototype=N,[["$ms",a],["$s",o],["$m",n],["$H",c],["$W",h],["$M",u],["$y",d],["$D",m]].forEach((function(E){N[E[1]]=function(M){return this.$g(M,E[0],E[1])}})),R.extend=function(E,M){return E.$i||(E(M,tt,R),E.$i=!0),R},R.locale=z,R.isDayjs=F,R.unix=function(E){return R(1e3*E)},R.en=L[B],R.Ls=L,R.p={},R}))})(la)),la.exports}var Wy=Ny();const zy=Py(Wy);var mr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},J={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},sl=p(function(e="fatal"){let t=mr.fatal;typeof e=="string"?e.toLowerCase()in mr&&(t=mr[e]):typeof e=="number"&&(t=e),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},t<=mr.fatal&&(J.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=mr.error&&(J.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=mr.warn&&(J.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=mr.info&&(J.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=mr.debug&&(J.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=mr.trace&&(J.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=p(e=>`%c${zy().format("ss.SSS")} : ${e} : `,"format");const ha={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return ha.hue2rgb(a,s,e+1/3)*255;case"g":return ha.hue2rgb(a,s,e)*255;case"b":return ha.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,c=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return c*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Hy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Yy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},It={channel:ha,lang:Hy,unit:Yy},Mr={};for(let e=0;e<=255;e++)Mr[e]=It.unit.dec2hex(e);const ge={ALL:0,RGB:1,HSL:2};let Uy=class{constructor(){this.type=ge.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ge.ALL}is(t){return this.type===t}};class jy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Uy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ge.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=It.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=It.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=It.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=It.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=It.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=It.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ge.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ge.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ge.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ge.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ge.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ge.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ge.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ge.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Va=new jy({r:0,g:0,b:0,a:0},"transparent"),xi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(xi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,c=o?8:4,h=a?0:-1,l=o?255:15;return Va.set({r:(i>>c*(h+3)&l)*n,g:(i>>c*(h+2)&l)*n,b:(i>>c*(h+1)&l)*n,a:a?(i&l)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Mr[Math.round(t)]}${Mr[Math.round(r)]}${Mr[Math.round(i)]}${Mr[Math.round(s*255)]}`:`#${Mr[Math.round(t)]}${Mr[Math.round(r)]}${Mr[Math.round(i)]}`}},Gr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Gr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return It.channel.clamp.h(parseFloat(r)*.9);case"rad":return It.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return It.channel.clamp.h(parseFloat(r)*360)}}return It.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Gr.re);if(!r)return;const[,i,s,a,o,n]=r;return Va.set({h:Gr._hue2deg(i),s:It.channel.clamp.s(parseFloat(s)),l:It.channel.clamp.l(parseFloat(a)),a:o?It.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%, ${s})`:`hsl(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%)`}},xs={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=xs.colors[e];if(t)return xi.parse(t)},stringify:e=>{const t=xi.stringify(e);for(const r in xs.colors)if(xs.colors[r]===t)return r}},ls={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ls.re);if(!r)return;const[,i,s,a,o,n,c,h,l]=r;return Va.set({r:It.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:It.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:It.channel.clamp.b(c?parseFloat(n)*2.55:parseFloat(n)),a:h?It.channel.clamp.a(l?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)}, ${It.lang.round(s)})`:`rgb(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)})`}},lr={format:{keyword:xs,hex:xi,rgb:ls,rgba:ls,hsl:Gr,hsla:Gr},parse:e=>{if(typeof e!="string")return e;const t=xi.parse(e)||ls.parse(e)||Gr.parse(e)||xs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ge.HSL)||e.data.r===void 0?Gr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ls.stringify(e):xi.stringify(e)},nd=(e,t)=>{const r=lr.parse(e);for(const i in t)r[i]=It.channel.clamp[i](t[i]);return lr.stringify(r)},Ir=(e,t,r=0,i=1)=>{if(typeof e!="number")return nd(e,{a:t});const s=Va.set({r:It.channel.clamp.r(e),g:It.channel.clamp.g(t),b:It.channel.clamp.b(r),a:It.channel.clamp.a(i)});return lr.stringify(s)},Gy=e=>{const{r:t,g:r,b:i}=lr.parse(e),s=.2126*It.channel.toLinear(t)+.7152*It.channel.toLinear(r)+.0722*It.channel.toLinear(i);return It.lang.round(s)},Xy=e=>Gy(e)>=.5,Le=e=>!Xy(e),ld=(e,t,r)=>{const i=lr.parse(e),s=i[t],a=It.channel.clamp[t](s+r);return s!==a&&(i[t]=a),lr.stringify(i)},Y=(e,t)=>ld(e,"l",t),U=(e,t)=>ld(e,"l",-t),w=(e,t)=>{const r=lr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return nd(e,i)},Vy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=lr.parse(e),{r:n,g:c,b:h,a:l}=lr.parse(t),u=r/100,f=u*2-1,d=o-l,y=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,C=1-y,x=i*y+n*C,b=s*y+c*C,k=a*y+h*C,T=o*u+l*(1-u);return Ir(x,b,k,T)},O=(e,t=100)=>{const r=lr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Vy(r,e,t)};/*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */function Dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Zy(e){if(Array.isArray(e))return e}function Ky(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],c=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);c=!0);}catch(l){h=!0,s=l}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function Qy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function Jy(e,t){return Zy(e)||Ky(e,t)||t0(e,t)||Qy()}function t0(e,t){if(e){if(typeof e=="string")return Dh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dh(e,t):void 0}}const hd=Object.entries,Ph=Object.setPrototypeOf,e0=Object.isFrozen,r0=Object.getPrototypeOf,i0=Object.getOwnPropertyDescriptor;let le=Object.freeze,he=Object.seal,pi=Object.create,cd=typeof Reflect<"u"&&Reflect,yn=cd.apply,xn=cd.construct;le||(le=function(t){return t});he||(he=function(t){return t});yn||(yn=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});xn||(xn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Yr=oe(Array.prototype.forEach),s0=oe(Array.prototype.lastIndexOf),Rh=oe(Array.prototype.pop),Ki=oe(Array.prototype.push),a0=oe(Array.prototype.splice),Ci=Array.isArray,hs=oe(String.prototype.toLowerCase),wo=oe(String.prototype.toString),qh=oe(String.prototype.match),Qi=oe(String.prototype.replace),Nh=oe(String.prototype.indexOf),o0=oe(String.prototype.trim),n0=oe(Number.prototype.toString),l0=oe(Boolean.prototype.toString),Wh=typeof BigInt>"u"?null:oe(BigInt.prototype.toString),zh=typeof Symbol>"u"?null:oe(Symbol.prototype.toString),Be=oe(Object.prototype.hasOwnProperty),Ji=oe(Object.prototype.toString),pe=oe(RegExp.prototype.test),Fr=h0(TypeError);function oe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return yn(e,t,i)}}function h0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return xn(e,r)}}function Ut(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hs;if(Ph&&Ph(e,null),!Ci(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(e0(t)||(t[i]=a),s=a)}e[s]=!0}return e}function c0(e){for(let t=0;t<e.length;t++)Be(e,t)||(e[t]=null);return e}function $e(e){const t=pi(null);for(const i of hd(e)){var r=Jy(i,2);const s=r[0],a=r[1];Be(e,s)&&(Ci(a)?t[s]=c0(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=$e(a):t[s]=a)}return t}function u0(e){switch(typeof e){case"string":return e;case"number":return n0(e);case"boolean":return l0(e);case"bigint":return Wh?Wh(e):"0";case"symbol":return zh?zh(e):"Symbol()";case"undefined":return Ji(e);case"function":case"object":{if(e===null)return Ji(e);const t=e,r=Ne(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ji(i)}return Ji(e)}default:return Ji(e)}}function Ne(e,t){for(;e!==null;){const i=i0(e,t);if(i){if(i.get)return oe(i.get);if(typeof i.value=="function")return oe(i.value)}e=r0(e)}function r(){return null}return r}function d0(e){try{return pe(e,""),!0}catch{return!1}}const Hh=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),So=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),To=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),f0=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),_o=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),p0=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yh=le(["#text"]),Uh=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Bo=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jh=le(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gs=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g0=he(/{{[\w\W]*|^[\w\W]*}}/g),m0=he(/<%[\w\W]*|^[\w\W]*%>/g),y0=he(/\${[\w\W]*/g),x0=he(/^data-[\-\w.\u00B7-\uFFFF]+$/),C0=he(/^aria-[\-\w]+$/),Gh=he(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),b0=he(/^(?:\w+script|data):/i),k0=he(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),w0=he(/^html$/i),S0=he(/^[a-z][.\w]*(-[.\w]+)+$/i),Xh=he(/<[/\w!]/g),Vh=he(/<[/\w]/g),T0=he(/<\/no(script|embed|frames)/i),_0=he(/\/>/i),Ee={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ud=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],B0=le(Ut({},ud)),v0=(function(){const e={};return Yr(ud,t=>{e[t]=he(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),le(e)})(),L0=function(){return typeof window>"u"?null:window},F0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Zh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ar=function(t,r,i,s){return Be(t,r)&&Ci(t[r])?Ut(s.base?$e(s.base):{},t[r],s.transform):i},vo=function(t,r,i){const s=Be(t,r)?t[r]:void 0;return s&&typeof s=="object"?$e(s):i()};function dd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L0();const t=ot=>dd(ot);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==Ee.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,l=e.trustedTypes,u=n.prototype,f=Ne(u,"cloneNode"),d=Ne(u,"remove"),m=Ne(u,"removeAttributeNode"),y=Ne(u,"nextSibling"),C=Ne(u,"childNodes"),x=Ne(u,"parentNode"),b=Ne(u,"shadowRoot"),k=Ne(u,"attributes"),T=o&&o.prototype?Ne(o.prototype,"nodeType"):null,B=o&&o.prototype?Ne(o.prototype,"nodeName"):null,L=o&&o.prototype?Ne(o.prototype,"ownerDocument"):null,A=function(_){return T?T(_):_.nodeType},F=function(_){return B?B(_):_.nodeName};if(typeof a=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let z,R="",q,tt=!1,N=0;const E=function(){if(N>0)throw Fr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(_){E(),N++;try{return z.createHTML(_)}finally{N--}},v=function(_){E(),N++;try{return z.createScriptURL(_)}finally{N--}},P=function(){return tt||(q=F0(l,s),tt=!0),q},$=r,j=$.implementation,V=$.createNodeIterator,dt=$.createDocumentFragment,lt=$.getElementsByTagName,mt=i.importNode;let nt=Zh();t.isSupported=typeof hd=="function"&&typeof x=="function"&&j&&j.createHTMLDocument!==void 0;const wt=g0,At=m0,Et=y0,Nt=x0,Bt=C0,ut=b0,bt=k0,Mt=S0;let Rt=Gh,Lt=null;const H=Ut({},[...Hh,...So,...To,..._o,...Yh]);let kt=null;const xe=Ut({},[...Uh,...Bo,...jh,...Gs]);let te=Object.seal(pi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ue=null,pr=null;const Ce=Object.seal(pi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Br=!0,be=!0,vr=!1,gr=!0,ke=!1,Fe=!0,g=!1,I=!1,X=null,K=null,G=!1,st=!1,S=!1,W=!1,rt=!0,Z=!1;const Q="user-content-";let it=!0,et=!1,xt={},gt=null;const _t=Ut({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let vt=null;const Wt=Ut({},["audio","video","img","source","image","track"]);let Xt=null;const Xi=Ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",tr="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xhtml";let si=er,po=!1,go=null;const Cy=Ut({},[Je,tr,er],wo),bh=le(["mi","mo","mn","ms","mtext"]);let mo=Ut({},bh);const kh=le(["annotation-xml"]);let yo=Ut({},kh);const by=Ut({},["title","style","font","a","script"]);let Vi=null;const ky=["application/xhtml+xml","text/html"],wy="text/html";let ee=null,ai=null;const Sy=r.createElement("form"),wh=function(_){return _ instanceof RegExp||_ instanceof Function},xo=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ai&&ai===_)return;(!_||typeof _!="object")&&(_={}),_=$e(_),Vi=ky.indexOf(_.PARSER_MEDIA_TYPE)===-1?wy:_.PARSER_MEDIA_TYPE,ee=Vi==="application/xhtml+xml"?wo:hs,Lt=Ar(_,"ALLOWED_TAGS",H,{transform:ee}),kt=Ar(_,"ALLOWED_ATTR",xe,{transform:ee}),go=Ar(_,"ALLOWED_NAMESPACES",Cy,{transform:wo}),Xt=Ar(_,"ADD_URI_SAFE_ATTR",Xi,{transform:ee,base:Xi}),vt=Ar(_,"ADD_DATA_URI_TAGS",Wt,{transform:ee,base:Wt}),gt=Ar(_,"FORBID_CONTENTS",_t,{transform:ee}),Ue=Ar(_,"FORBID_TAGS",$e({}),{transform:ee}),pr=Ar(_,"FORBID_ATTR",$e({}),{transform:ee}),xt=Be(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?$e(_.USE_PROFILES):_.USE_PROFILES:!1,Br=_.ALLOW_ARIA_ATTR!==!1,be=_.ALLOW_DATA_ATTR!==!1,vr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,gr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=_.SAFE_FOR_TEMPLATES||!1,Fe=_.SAFE_FOR_XML!==!1,g=_.WHOLE_DOCUMENT||!1,st=_.RETURN_DOM||!1,S=_.RETURN_DOM_FRAGMENT||!1,W=_.RETURN_TRUSTED_TYPE||!1,G=_.FORCE_BODY||!1,rt=_.SANITIZE_DOM!==!1,Z=_.SANITIZE_NAMED_PROPS||!1,it=_.KEEP_CONTENT!==!1,et=_.IN_PLACE||!1,Rt=d0(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Gh,si=typeof _.NAMESPACE=="string"?_.NAMESPACE:er,mo=vo(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ut({},bh)),yo=vo(_,"HTML_INTEGRATION_POINTS",()=>Ut({},kh));const D=vo(_,"CUSTOM_ELEMENT_HANDLING",()=>pi(null));if(te=pi(null),Be(D,"tagNameCheck")&&wh(D.tagNameCheck)&&(te.tagNameCheck=D.tagNameCheck),Be(D,"attributeNameCheck")&&wh(D.attributeNameCheck)&&(te.attributeNameCheck=D.attributeNameCheck),Be(D,"allowCustomizedBuiltInElements")&&typeof D.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=D.allowCustomizedBuiltInElements),he(te),ke&&(be=!1),S&&(st=!0),xt&&(Lt=Ut({},Yh),kt=pi(null),xt.html===!0&&(Ut(Lt,Hh),Ut(kt,Uh)),xt.svg===!0&&(Ut(Lt,So),Ut(kt,Bo),Ut(kt,Gs)),xt.svgFilters===!0&&(Ut(Lt,To),Ut(kt,Bo),Ut(kt,Gs)),xt.mathMl===!0&&(Ut(Lt,_o),Ut(kt,jh),Ut(kt,Gs))),Ce.tagCheck=null,Ce.attributeCheck=null,Be(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?Ce.tagCheck=_.ADD_TAGS:Ci(_.ADD_TAGS)&&(Lt===H&&(Lt=$e(Lt)),Ut(Lt,_.ADD_TAGS,ee))),Be(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?Ce.attributeCheck=_.ADD_ATTR:Ci(_.ADD_ATTR)&&(kt===xe&&(kt=$e(kt)),Ut(kt,_.ADD_ATTR,ee))),Be(_,"ADD_FORBID_CONTENTS")&&Ci(_.ADD_FORBID_CONTENTS)&&(gt===_t&&(gt=$e(gt)),Ut(gt,_.ADD_FORBID_CONTENTS,ee)),it&&(Lt["#text"]=!0),g&&Ut(Lt,["html","head","body"]),Lt.table&&(Ut(Lt,["tbody"]),delete Ue.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const at=z;z=_.TRUSTED_TYPES_POLICY;try{R=M("")}catch(ht){throw z=at,ht}}else _.TRUSTED_TYPES_POLICY===null?(z=void 0,R=""):(z===void 0&&(z=P()),z&&typeof R=="string"&&(R=M("")));le&&le(_),ai=_},Sh=Ut({},[...So,...To,...f0]),Th=Ut({},[..._o,...p0]),Ty=function(_,D,at){return D.namespaceURI===er?_==="svg":D.namespaceURI===Je?_==="svg"&&(at==="annotation-xml"||mo[at]):!!Sh[_]},_y=function(_,D,at){return D.namespaceURI===er?_==="math":D.namespaceURI===tr?_==="math"&&yo[at]:!!Th[_]},By=function(_,D,at){return D.namespaceURI===tr&&!yo[at]||D.namespaceURI===Je&&!mo[at]?!1:!Th[_]&&(by[_]||!Sh[_])},vy=function(_){let D=x(_);(!D||!D.tagName)&&(D={namespaceURI:si,tagName:"template"});const at=hs(_.tagName),ht=hs(D.tagName);return go[_.namespaceURI]?_.namespaceURI===tr?Ty(at,D,ht):_.namespaceURI===Je?_y(at,D,ht):_.namespaceURI===er?By(at,D,ht):!!(Vi==="application/xhtml+xml"&&go[_.namespaceURI]):!1},Lr=function(_){Ki(t.removed,{element:_});try{x(_).removeChild(_)}catch{if(d(_),!x(_))throw Fr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_h=function(_,D,at){try{m(_,D)}catch{try{_.removeAttribute(at)}catch{}}},Ws=function(_){zs(_);const D=C(_);if(D){const ht=[];Yr(D,Ft=>{Ki(ht,Ft)}),Yr(ht,Ft=>{try{d(Ft)}catch{}})}const at=k(_);if(at)for(let ht=at.length-1;ht>=0;--ht){const Ft=at[ht],zt=Ft&&Ft.name;typeof zt=="string"&&_h(_,Ft,zt)}},zr=function(_,D,at){if(!at)try{at=D.getAttributeNode(_)}catch{at=null}Ki(t.removed,{attribute:at||null,from:D});try{at?m(D,at):D.removeAttribute(_)}catch{try{D.removeAttribute(_)}catch{}}if(_==="is")if(st||S)try{Lr(D)}catch{}else try{D.setAttribute(_,"")}catch{}},Ly=function(_){const D=k(_);if(D)for(let at=D.length-1;at>=0;--at){const ht=D[at],Ft=ht&&ht.name;typeof Ft!="string"||kt[ee(Ft)]||_h(_,ht,Ft)}},zs=function(_){const D=[_];for(;D.length>0;){const at=D.pop();A(at)===Ee.element&&Ly(at);const ht=C(at);if(ht)for(let Ft=ht.length-1;Ft>=0;--Ft)D.push(ht[Ft])}},Bh=function(_,D){return Fe?_==="patchsrc"?!0:_==="for"&&D!=="label"&&D!=="output":!1},Fy=function(_){if(!Fe)return;const D=[_];for(;D.length>0;){const at=D.pop(),ht=A(at);if(ht===Ee.processingInstruction||ht===Ee.comment&&pe(Vh,at.data)){try{d(at)}catch{}continue}if(ht===Ee.element){const zt=at,Yt=ee(F(at));try{zt.hasAttribute&&zt.hasAttribute("patchsrc")&&zt.removeAttribute("patchsrc"),zt.hasAttribute&&zt.hasAttribute("for")&&Bh("for",Yt)&&zt.removeAttribute("for")}catch{}}const Ft=C(at);if(Ft)for(let zt=Ft.length-1;zt>=0;--zt)D.push(Ft[zt])}},vh=function(_){let D=null,at=null;if(G)_="<remove></remove>"+_;else{const zt=qh(_,/^[\r\n\t ]+/);at=zt&&zt[0]}Vi==="application/xhtml+xml"&&si===er&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const ht=z?M(_):_;if(si===er)try{D=new h().parseFromString(ht,Vi)}catch{}if(!D||!D.documentElement){D=j.createDocument(si,"template",null);try{D.documentElement.innerHTML=po?R:ht}catch{}}const Ft=D.body||D.documentElement;return _&&at&&Ft.insertBefore(r.createTextNode(at),Ft.childNodes[0]||null),si===er?lt.call(D,g?"html":"body")[0]:g?D.documentElement:Ft},Lh=function(_){const D=L?L(_):_.ownerDocument;return V.call(D||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Hs=function(_){return _=Qi(_,wt," "),_=Qi(_,At," "),_=Qi(_,Et," "),_},Co=function(_){var D;_.normalize();const at=L?L(_):_.ownerDocument,ht=V.call(at||_,_,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ft=ht.nextNode();for(;Ft;)Ft.data=Hs(Ft.data),Ft=ht.nextNode();const zt=(D=_.querySelectorAll)===null||D===void 0?void 0:D.call(_,"template");zt&&Yr(zt,Yt=>{oi(Yt.content)&&Co(Yt.content)})},Ys=function(_){const D=B?B(_):null;return typeof D!="string"||ee(D)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==k(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==T(_)||_.childNodes!==C(_)},oi=function(_){if(!T||typeof _!="object"||_===null)return!1;try{return T(_)===Ee.documentFragment}catch{return!1}},Zi=function(_){if(!T||typeof _!="object"||_===null)return!1;try{return typeof T(_)=="number"}catch{return!1}};function rr(ot,_,D){ot.length!==0&&Yr(ot,at=>{at.call(t,_,D,ai)})}const Ay=function(_,D){return!!(Fe&&_.hasChildNodes()&&!Zi(_.firstElementChild)&&pe(Xh,_.textContent)&&pe(Xh,_.innerHTML)||Fe&&_.namespaceURI===er&&B0[D]&&(Zi(_.firstElementChild)||typeof _.textContent=="string"&&pe(v0[D],_.textContent))||_.nodeType===Ee.processingInstruction||Fe&&_.nodeType===Ee.comment&&pe(Vh,_.data))},Us=function(_,D){if(_ instanceof RegExp)return pe(_,D);if(_ instanceof Function){for(var at=arguments.length,ht=new Array(at>2?at-2:0),Ft=2;Ft<at;Ft++)ht[Ft-2]=arguments[Ft];return!!_(D,...ht)}return!1},Ey=function(_,D,at){if(!Ue[D]&&Mh(D)&&Us(te.tagNameCheck,D))return!1;if(it&&!gt[D]){const ht=x(_),Ft=C(_);if(Ft&&ht){const zt=Ft.length;for(let Yt=zt-1;Yt>=0;--Yt){const Qt=_===at?f(Ft[Yt],!0):Ft[Yt];ht.insertBefore(Qt,y(_))}}}return Lr(_),!0},Fh=function(_,D,at,ht){return _.length===0?D:D===at||D===ht?$e(D):D},ni=function(_,D){return _===D||x(_)!==null?!1:(et&&zs(_),!0)},Ah=function(_,D){if(rr(nt.beforeSanitizeElements,_,null),ni(_,D))return!0;if(Ys(_))return Lr(_),!0;const at=ee(F(_));if(Lt=Fh(nt.uponSanitizeElement,Lt,H,X),rr(nt.uponSanitizeElement,_,{tagName:at,allowedTags:Lt}),ni(_,D))return!0;if(Ay(_,at))return Lr(_),!0;if(Ue[at]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(at))&&!Lt[at]){const ht=Ey(_,at,D);return ht===!1&&(rr(nt.afterSanitizeElements,_,null),ni(_,D))?!0:ht}if(A(_)===Ee.element&&!vy(_)||(at==="noscript"||at==="noembed"||at==="noframes")&&pe(T0,_.innerHTML))return Lr(_),!0;if(ke&&_.nodeType===Ee.text){const ht=Hs(_.textContent);_.textContent!==ht&&(Ki(t.removed,{element:_.cloneNode()}),_.textContent=ht)}return rr(nt.afterSanitizeElements,_,null),ni(_,D)},Eh=function(_,D,at){if(pr[D]||Bh(D,_)||rt&&(D==="id"||D==="name")&&(at in r||at in Sy))return!1;const ht=kt[D]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(D,_);return be&&pe(Nt,D)||Br&&pe(Bt,D)?!0:ht?Xt[D]||pe(Rt,Qi(at,bt,""))||(D==="src"||D==="xlink:href"||D==="href")&&_!=="script"&&Nh(at,"data:")===0&&vt[_]||vr&&!pe(ut,Qi(at,bt,""))?!0:!at:Mh(_)&&Us(te.tagNameCheck,_)&&Us(te.attributeNameCheck,D,_)||D==="is"&&te.allowCustomizedBuiltInElements&&Us(te.tagNameCheck,at)},My=Ut({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mh=function(_){return!My[hs(_)]&&pe(Mt,_)},$y=function(_,D,at,ht){if(z&&typeof l=="object"&&typeof l.getAttributeType=="function"&&!at)switch(l.getAttributeType(_,D)){case"TrustedHTML":return M(ht);case"TrustedScriptURL":return v(ht)}return ht},Oy=function(_,D,at,ht){try{return at?_.setAttributeNS(at,D,ht):_.setAttribute(D,ht),Ys(_)?(Lr(_),!1):!0}catch{return zr(D,_),!1}},$h=function(_,D){if(rr(nt.beforeSanitizeAttributes,_,null),ni(_,D))return;const at=_.attributes;if(!at||Ys(_))return;kt=Fh(nt.uponSanitizeAttribute,kt,xe,K);const ht={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt,forceKeepAttr:void 0};let Ft=at.length;const zt=ee(_.nodeName);for(;Ft--;){const Yt=at[Ft],Qt=Yt.name,Re=Yt.namespaceURI,Ae=Yt.value,li=ee(Qt),ko=Ae;let we=Qt==="value"?ko:o0(ko),Oh=!1;if(ht.attrName=li,ht.attrValue=we,ht.keepAttr=!0,ht.forceKeepAttr=void 0,rr(nt.uponSanitizeAttribute,_,ht),we=ht.attrValue,Z&&(li==="id"||li==="name")&&Nh(we,Q)!==0&&(zr(Qt,_,Yt),we=Q+we,Oh=!0),Fe&&pe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,we)){zr(Qt,_,Yt);continue}if(li==="attributename"&&qh(we,"href")){zr(Qt,_,Yt);continue}if(!ht.forceKeepAttr){if(!ht.keepAttr){zr(Qt,_,Yt);continue}if(!gr&&pe(_0,we)){zr(Qt,_,Yt);continue}if(ke&&(we=Hs(we)),!Eh(zt,li,we)){zr(Qt,_,Yt);continue}we=$y(zt,li,Re,we),we!==ko&&Oy(_,Qt,Re,we)&&Oh&&Rh(t.removed)}}rr(nt.afterSanitizeAttributes,_,null),ni(_,D)},js=function(_){let D=null;const at=Lh(_);for(rr(nt.beforeSanitizeShadowDOM,_,null);D=at.nextNode();)if(rr(nt.uponSanitizeShadowNode,D,null),Ah(D,_),$h(D,_),oi(D.content)&&js(D.content),A(D)===Ee.element){const ht=b(D);oi(ht)&&(bo(ht),js(ht))}rr(nt.afterSanitizeShadowDOM,_,null)},bo=function(_){const D=[{node:_,shadow:null}];for(;D.length>0;){const at=D.pop();if(at.shadow){js(at.shadow);continue}const ht=at.node,Ft=A(ht)===Ee.element,zt=C(ht);if(zt)for(let Yt=zt.length-1;Yt>=0;--Yt)D.push({node:zt[Yt],shadow:null});if(Ft){const Yt=B?B(ht):null;if(typeof Yt=="string"&&ee(Yt)==="template"){const Qt=ht.content;oi(Qt)&&D.push({node:Qt,shadow:null})}}if(Ft){const Yt=b(ht);oi(Yt)&&D.push({node:null,shadow:Yt},{node:Yt,shadow:null})}}};return t.sanitize=function(ot){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,at=null,ht=null,Ft=null;if(po=!ot,po&&(ot="<!-->"),typeof ot!="string"&&!Zi(ot)&&(ot=u0(ot),typeof ot!="string"))throw Fr("dirty is not a string, aborting");if(!t.isSupported)return ot;I?(Lt=X,kt=K):xo(_),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(Lt=$e(Lt)),nt.uponSanitizeAttribute.length>0&&(kt=$e(kt)),t.removed=[];const zt=et&&typeof ot!="string"&&Zi(ot);if(zt){Fy(ot);const Re=F(ot);if(typeof Re=="string"){const Ae=ee(Re);if(!Lt[Ae]||Ue[Ae])throw Ws(ot),Fr("root node is forbidden and cannot be sanitized in-place")}if(Ys(ot))throw Ws(ot),Fr("root node is clobbered and cannot be sanitized in-place");try{bo(ot)}catch(Ae){throw Ws(ot),Ae}}else if(Zi(ot))D=vh("<!---->"),at=D.ownerDocument.importNode(ot,!0),at.nodeType===Ee.element&&at.nodeName==="BODY"||at.nodeName==="HTML"?D=at:D.appendChild(at),bo(D);else{if(!st&&!ke&&!g&&ot.indexOf("<")===-1)return z&&W?M(ot):ot;if(D=vh(ot),!D)return st?null:W?R:""}D&&G&&Lr(D.firstChild);const Yt=zt?ot:D;try{const Re=Lh(Yt);for(;ht=Re.nextNode();)Ah(ht,Yt),$h(ht,Yt),oi(ht.content)&&js(ht.content)}catch(Re){throw zt&&(Ws(ot),Yr(t.removed,Ae=>{Ae.element&&zs(Ae.element)})),Re}if(zt){let Re=!1;if(Yr(t.removed,Ae=>{Ae.element&&(Ae.element===ot&&(Re=!0),zs(Ae.element))}),Re)throw Fr("a node selected for removal could not be safely returned; refusing to sanitize in place");return ke&&Co(ot),ot}if(st){if(ke&&Co(D),S)for(Ft=dt.call(D.ownerDocument);D.firstChild;)Ft.appendChild(D.firstChild);else Ft=D;return(kt.shadowroot||kt.shadowrootmode)&&(Ft=mt.call(i,Ft,!0)),Ft}let Qt=g?D.outerHTML:D.innerHTML;return g&&Lt["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&pe(w0,D.ownerDocument.doctype.name)&&(Qt="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
|
|
4
|
+
`+Qt),ke&&(Qt=Hs(Qt)),z&&W?M(Qt):Qt},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xo(ot),I=!0,X=Lt,K=kt},t.clearConfig=function(){ai=null,I=!1,X=null,K=null,z=q,R=""},t.isValidAttribute=function(ot,_,D){ai||xo({});const at=ee(ot),ht=ee(_);return Eh(at,ht,D)},t.addHook=function(ot,_){typeof _=="function"&&Be(nt,ot)&&Ki(nt[ot],_)},t.removeHook=function(ot,_){if(Be(nt,ot)){if(_!==void 0){const D=s0(nt[ot],_);return D===-1?void 0:a0(nt[ot],D,1)[0]}return Rh(nt[ot])}},t.removeHooks=function(ot){Be(nt,ot)&&(nt[ot]=[])},t.removeAllHooks=function(){nt=Zh()},t}var Pi=dd(),Cs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ka=/\s/,A0=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const a=e.indexOf(`
|
|
5
|
+
`,s);if(a===-1)break;let o=s;for(;o>r&&ka.test(e[o-1]);)o--;t+=e.slice(r,o)+`
|
|
6
|
+
`,r=a+1,i=r}return t+e.slice(r)},"stripAnyComments"),ca=p(e=>e===`
|
|
7
|
+
`||e==="\r","isLineBreak"),E0=p((e,t)=>{let r=-1;for(let i=t;i<e.length&&ka.test(e[i]);i++)ca(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),fd=p(e=>{let t=0;for(;t<e.length&&ka.test(e[t])&&!ca(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let l=t+3;l<e.length&&ka.test(e[l]);l++)ca(e[l])&&i.push(l);if(i.length===0)return;const s=`${r}---`,a=p(l=>ca(e[l])&&e.startsWith(s,l+1)?E0(e,l+1+s.length):-1,"closingEnd"),o=i[0]+1;let n=-1;for(let l=o;l<e.length;l++)a(l)!==-1&&(n=l);if(n===-1)return;let c=i[0];for(const l of i)l<n&&(c=l);const h=c+1;for(let l=h;l<=n;l++){const u=a(l);if(u!==-1)return{indent:r,body:e.slice(h,l),length:u+1}}},"matchFrontMatter"),wi,pd=(wi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(wi,"UnknownDiagramError"),wi),Qr={},Za=p(function(e,t){const r=fd(e);e=A0((r?e.slice(r.length):e).replace(Cs,""));for(const[i,{detector:s}]of Object.entries(Qr))if(s(e,t))return i;throw new pd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Cn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)gd(t,r,i)},"registerLazyLoadedDiagrams"),gd=p((e,t,r)=>{Qr[e]&&J.warn(`Detector with key ${e} already exists. Overwriting.`),Qr[e]={detector:t,loader:r},J.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),M0=p(e=>Qr[e].loader,"getDiagramLoader"),bn=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>bn(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=bn(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),se=bn,hr="#ffffff",cr="#f2f2f2",Ot=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Kh=p(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Ke=p((e,t)=>Kh(e)&&Kh(t)?{...e,...t}:t,"applyOverride"),Si,$0=(Si=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,c,h,l,u,f,d,m,y,C,x,b,k,T,B,L,A,F,z,R,q,tt,N,E,M,v,P,$,j,V,dt,lt,mt,nt,wt,At,Et,Nt,Bt,ut,bt,Mt,Rt,Lt,H;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],75);else for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],25);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleInv"+kt]=this["cScaleInv"+kt]||O(this["cScale"+kt]);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this.darkMode?this["cScalePeer"+kt]=this["cScalePeer"+kt]||Y(this["cScale"+kt],10):this["cScalePeer"+kt]=this["cScalePeer"+kt]||U(this["cScale"+kt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleLabel"+kt]=this["cScaleLabel"+kt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let kt=0;kt<5;kt++)this["surface"+kt]=this["surface"+kt]||w(this.mainBkg,{h:180,s:-15,l:t*(5+kt*3)}),this["surfacePeer"+kt]=this["surfacePeer"+kt]||w(this.mainBkg,{h:180,s:-15,l:t*(8+kt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((c=this.cynefin)==null?void 0:c.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((l=this.cynefin)==null?void 0:l.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((tt=this.wardley)==null?void 0:tt.axisColor)||this.lineColor,axisTextColor:((N=this.wardley)==null?void 0:N.axisTextColor)||this.primaryTextColor,gridColor:((E=this.wardley)==null?void 0:E.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((P=this.wardley)==null?void 0:P.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((j=this.wardley)==null?void 0:j.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((dt=this.wardley)==null?void 0:dt.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((mt=this.xyChart)==null?void 0:mt.backgroundColor)||this.background,titleColor:((nt=this.xyChart)==null?void 0:nt.titleColor)||this.primaryTextColor,dataLabelColor:((wt=this.xyChart)==null?void 0:wt.dataLabelColor)||this.primaryTextColor,legendTextColor:((At=this.xyChart)==null?void 0:At.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Nt=this.xyChart)==null?void 0:Nt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((ut=this.xyChart)==null?void 0:ut.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Mt=this.xyChart)==null?void 0:Mt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((H=this.xyChart)==null?void 0:H.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(Si,"Theme"),Si),O0=p(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),Ti,I0=(Ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(O("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Ir(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ir(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,c,h,l,u,f,d,m,y,C,x,b,k,T,B,L,A,F,z,R,q,tt,N,E,M,v,P,$,j,V,dt,lt,mt,nt,wt,At,Et,Nt,Bt,ut,bt,Mt,Rt,Lt;this.secondBkg=Y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Y(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=O(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||O(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10);for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,s:-30,l:-(-10+H*4)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,s:-30,l:-(-7+H*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??Y(this["cScale"+H],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((R=this.xyChart)==null?void 0:R.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((tt=this.xyChart)==null?void 0:tt.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((N=this.radar)==null?void 0:N.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((j=this.radar)==null?void 0:j.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((dt=this.radar)==null?void 0:dt.legendBoxSize)||12,legendFontSize:((lt=this.radar)==null?void 0:lt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((mt=this.wardley)==null?void 0:mt.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((wt=this.wardley)==null?void 0:wt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Et=this.wardley)==null?void 0:Et.componentFill)||this.mainBkg,componentStroke:((Nt=this.wardley)==null?void 0:Nt.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ut=this.wardley)==null?void 0:ut.linkStroke)||this.lineColor,evolutionStroke:((bt=this.wardley)==null?void 0:bt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Mt=this.wardley)==null?void 0:Mt.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Lt=this.wardley)==null?void 0:Lt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Ti,"Theme"),Ti),D0=p(e=>{const t=new I0;return t.calculate(e),t},"getThemeVariables"),_i,P0=(_i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ir(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,c,h,l,u,f,d,m,y,C,x,b,k,T,B,L,A,F,z,R,q,tt,N,E,M,v,P,$,j,V,dt,lt,mt,nt,wt,At,Et,Nt,Bt,ut,bt,Mt,Rt,Lt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||w(this["cScale"+H],{h:180});for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,l:-(7+H*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||O(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||O(this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((j=this.wardley)==null?void 0:j.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((dt=this.wardley)==null?void 0:dt.annotationFill)||this.background},this.xyChart={backgroundColor:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((mt=this.xyChart)==null?void 0:mt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Mt=this.xyChart)==null?void 0:Mt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Lt=this.xyChart)==null?void 0:Lt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(O(this.git0),25),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(_i,"Theme"),_i),R0=p(e=>{const t=new P0;return t.calculate(e),t},"getThemeVariables"),Bi,q0=(Bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Y("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.primaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,c,h,l,u,f,d,m,y,C,x,b,k,T,B,L,A,F,z,R,q,tt,N,E,M,v,P,$,j,V,dt,lt,mt,nt,wt,At,Et,Nt,Bt,ut,bt,Mt,Rt,Lt;this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||w(this["cScale"+H],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{h:30,s:-30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{h:30,s:-30,l:-(8+H*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((j=this.wardley)==null?void 0:j.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((dt=this.wardley)==null?void 0:dt.annotationFill)||this.background},this.xyChart={backgroundColor:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((mt=this.xyChart)==null?void 0:mt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((wt=this.xyChart)==null?void 0:wt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((bt=this.xyChart)==null?void 0:bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Mt=this.xyChart)==null?void 0:Mt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Lt=this.xyChart)==null?void 0:Lt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Bi,"Theme"),Bi),N0=p(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),vi,W0=(vi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,c,h,l,u,f,d,m,y,C,x,b,k,T,B,L,A,F,z,R,q,tt,N,E,M,v,P,$,j,V,dt,lt,mt,nt,wt,At,Et,Nt,Bt,ut,bt,Mt,Rt,Lt;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||O(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this.darkMode?this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10):this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||w(this.mainBkg,{l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||w(this.mainBkg,{l:-(8+H*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??this["cScale"+H];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((R=this.xyChart)==null?void 0:R.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((tt=this.xyChart)==null?void 0:tt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((N=this.radar)==null?void 0:N.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((j=this.radar)==null?void 0:j.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((dt=this.radar)==null?void 0:dt.legendBoxSize)||12,legendFontSize:((lt=this.radar)==null?void 0:lt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((mt=this.wardley)==null?void 0:mt.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((wt=this.wardley)==null?void 0:wt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Et=this.wardley)==null?void 0:Et.componentFill)||this.background,componentStroke:((Nt=this.wardley)==null?void 0:Nt.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ut=this.wardley)==null?void 0:ut.linkStroke)||this.lineColor,evolutionStroke:((bt=this.wardley)==null?void 0:bt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Mt=this.wardley)==null?void 0:Mt.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Lt=this.wardley)==null?void 0:Lt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(vi,"Theme"),vi),z0=p(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),Li,H0=(Li=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,c,h,l,u,f,d,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Le(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||w(t,{h:30}),this.cScale4=this.cScale4||w(t,{h:60}),this.cScale5=this.cScale5||w(t,{h:90}),this.cScale6=this.cScale6||w(t,{h:120}),this.cScale7=this.cScale7||w(t,{h:150}),this.cScale8=this.cScale8||w(t,{h:210,l:150}),this.cScale9=this.cScale9||w(t,{h:270}),this.cScale10=this.cScale10||w(t,{h:300}),this.cScale11=this.cScale11||w(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||O(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Li,"Theme"),Li),Y0=p(e=>{const t=new H0;return t.calculate(e),t},"getThemeVariables"),Fi,U0=(Fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(O("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,c,h,l,u,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||O(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Fi,"Theme"),Fi),j0=p(e=>{const t=new U0;return t.calculate(e),t},"getThemeVariables"),Ai,G0=(Ai=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,c,h,l,u,f,d,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Le(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=U(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||O(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Ai,"Theme"),Ai),X0=p(e=>{const t=new G0;return t.calculate(e),t},"getThemeVariables"),Ei,V0=(Ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(O("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,c,h,l,u,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||O(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Ei,"Theme"),Ei),Z0=p(e=>{const t=new V0;return t.calculate(e),t},"getThemeVariables"),Mi,K0=(Mi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){var a,o,n,c,h,l,u,f,d,m,y,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Le(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||O(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Y(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||U(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||w(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor;for(let x=0;x<8;x++)this["fillType"+x]=this["fillType"+x]||this.bkgColorArray[x];for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["pie"+(x+1)]=this["pie"+(x+1)]||this["cScale"+x];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let x=0;x<8;x++)this["venn"+(x+1)]=this["venn"+(x+1)]??this.borderColorArray[x%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p(Mi,"Theme"),Mi),Q0=p(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),$i,J0=($i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(O("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){var i,s,a,o,n,c,h,l,u,f,d,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||O(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||Y(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||U(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=U(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((y,C)=>{this["fillType"+C]=this["fillType"+C]||y});for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["pie"+(y+1)]=this["pie"+(y+1)]||this["cScale"+y];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let y=0;y<8;y++)this["venn"+(y+1)]=this["venn"+(y+1)]??this.borderColorArray[y%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Le(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,legendTextColor:((a=this.xyChart)==null?void 0:a.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ke(this[i],t[i])})}},p($i,"Theme"),$i),tx=p(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),kr={base:{getThemeVariables:O0},dark:{getThemeVariables:D0},default:{getThemeVariables:R0},forest:{getThemeVariables:N0},neutral:{getThemeVariables:z0},neo:{getThemeVariables:Y0},"neo-dark":{getThemeVariables:j0},redux:{getThemeVariables:X0},"redux-dark":{getThemeVariables:Z0},"redux-color":{getThemeVariables:Q0},"redux-dark-color":{getThemeVariables:tx}},re={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},id,sd,ad,md={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:kr.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:(id=re.class)==null?void 0:id.theme,look:(sd=re.class)==null?void 0:sd.look,layout:(ad=re.class)==null?void 0:ad.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},eventmodeling:{...re.eventmodeling},treeView:{...re.treeView,useWidth:void 0},radar:{...re.radar},usecase:{...re.usecase},railroad:{...re.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...re.ishikawa},sankey:{...re.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...re.venn},cynefin:{...re.cynefin}},yd=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...yd(e[i],"")]:[...r,t+i],[]),"keyify"),ex=new Set(yd(md,"")),al=md,rx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},ix=p(e=>rx[e]??e,"getDiagramConfigKey"),sx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},ax=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(J.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),wa=p(e=>{if(J.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>wa(t));return}for(const t of Object.keys(e)){if(J.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!ex.has(t)||e[t]==null){J.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=sx[t];i?ax(e[t],i):(J.debug("sanitizing object",t),wa(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(J.debug("sanitizing css option",t),e[t]=xd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}J.debug("After sanitization",e)}},"sanitizeDirective"),xd=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Dr=Object.freeze(al),ox=["theme","look","layout"],nx=new Set(["classic","handDrawn","neo"]),lx=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(kr,t):e!=="look"||nx.has(t),"isUsableAppearance"),hx=p((e,t,r)=>{if(!e)return;const i=e[t];return[i==null?void 0:i[r],e[r]].find(s=>s!==void 0&&lx(r,s))},"readAppearance"),ur=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Se=se({},Dr),Sa,Ta={},wr=[],bs=se({},Dr),ks,cx=p((e,t)=>{if(!ks)return;const r=[t,...[...wr].reverse(),Ta,Dr],i=e[ks];for(const s of ox)for(const a of r){const o=hx(a,ks,s);if(o!==void 0){e[s]=o,(i==null?void 0:i[s])!==void 0&&(i[s]=o);break}}},"resolveAppearance"),zi=p((e,t)=>{let r=se({},e),i={};for(const a of t)kd(a),i=se(i,a);if(r=se(r,i),cx(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(kr,r.theme)){const a=se({},Sa),o=se(a.themeVariables||{},i.themeVariables);r.themeVariables=kr[r.theme].getThemeVariables(o)}return bs=r,mx(bs),bs},"updateCurrentConfig"),ol=p(e=>{ks=e===void 0?void 0:ix(e),zi(Se,wr)},"setDiagramConfigScope"),ux=p(e=>(Se=se({},Dr),Se=se(Se,e),Ta=se({},e),e.theme&&Object.hasOwn(kr,e.theme)&&(Se.themeVariables=kr[e.theme].getThemeVariables(e.themeVariables)),zi(Se,wr),Se),"setSiteConfig"),dx=p(e=>{Sa=se({},e)},"saveConfigFromInitialize"),fx=p(e=>(Se=se(Se,e),Ta=se(Ta,e),zi(Se,wr),Se),"updateSiteConfig"),Cd=p(()=>se({},Se),"getSiteConfig"),bd=p(e=>(zi(bs,[e]),Kt()),"setConfig"),Kt=p(()=>se({},bs),"getConfig"),kd=p(e=>{e&&(["secure",...Se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(J.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&kd(e[t])}))},"sanitize"),px=p(e=>{var t;wa(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),wr.push(e),zi(Se,wr)},"addDirective"),_a=p((e=Se)=>{wr=[],ks=void 0,zi(e,wr)},"reset"),gx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Qh={},wd=p(e=>{Qh[e]||(J.warn(gx[e]),Qh[e]=!0)},"issueWarning"),mx=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&wd("LAZY_LOAD_DEPRECATED")},"checkConfig"),zL=p(()=>{let e={};Sa&&(e=se(e,Sa));for(const t of wr)e=se(e,t);return e},"getUserDefinedConfig"),ce=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&wd("FLOWCHART_HTML_LABELS_DEPRECATED"),ur(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ms=/<\/?br\s*\/?>/gi,yx=new RegExp(Ms.source,"i"),xx=p(e=>e?_d(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Cx=(()=>{let e=!1;return()=>{e||(Sd(),e=!0)}})();function Sd(){const e="data-temp-href-target";Pi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Pi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Sd,"setupDompurifyHooks");var Td=p(e=>(Cx(),Pi.sanitize(e)),"removeScript"),Jh=p((e,t)=>{if(ce(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Td(e):r!=="loose"&&(e=_d(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Sx(e))}return e},"sanitizeMore"),ze=p((e,t)=>e&&(t.dompurifyConfig?e=Pi.sanitize(Jh(e,t),t.dompurifyConfig).toString():e=Pi.sanitize(Jh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),bx=p((e,t)=>typeof e=="string"?ze(e,t):e.flat().map(r=>ze(r,t)),"sanitizeTextOrArray"),kx=p(e=>yx.test(e),"hasBreaks"),wx=p(e=>e.split(Ms),"splitBreaks"),Sx=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),_d=p(e=>e.replace(Ms,"#br#"),"breakToPlaceholder"),Tx=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),_x=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Bx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),tc=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];vx(a,o)&&(s=a+","+o,i++,r.pop())}r.push(Lx(s))}return r.join("")},"parseGenericTypes"),kn=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),vx=p((e,t)=>{const r=kn(e,"~"),i=kn(t,"~");return r===1&&i===1},"shouldCombineSets"),Lx=p(e=>{const t=kn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ec=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wn=/\$\$(.*?)\$\$/g,_s=p(e=>{var t;return(((t=e.match(wn))==null?void 0:t.length)??0)>0},"hasKatex"),HL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Bd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Fx=p(async(e,t)=>{if(!_s(e))return e;if(!(ec()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wn,"MathML is unsupported in this environment.");{const{default:r}=await qt(async()=>{const{default:s}=await import("./index-CeeLdENM.js").then(a=>a.b1);return{default:s}},__vite__mapDeps([0,1,2,3,4,5,6])),i=t.forceLegacyMathML||!ec()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ms).map(s=>_s(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(wn,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Bd=p(async(e,t)=>ze(await Fx(e,t),t),"renderKatexSanitized"),$s={getRows:xx,sanitizeText:ze,sanitizeTextOrArray:bx,hasBreaks:kx,splitBreaks:wx,lineBreakRegex:Ms,removeScript:Td,getUrl:Tx,evaluate:ur,getMax:_x,getMin:Bx},Ax=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Ex=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),vd=p(function(e,t,r,i){const s=Ex(t,r,i);Ax(e,s)},"configureSvgSize"),Mx=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;J.info(`SVG bounds: ${a}x${o}`,s);let n=0,c=0;J.info(`Graph bounds: ${n}x${c}`,e),n=a+r*2,c=o+r*2,J.info(`Calculated bounds: ${n}x${c}`),vd(t,c,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ua={};function Sn(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
8
|
+
`)}p(Sn,"cssStyleSheetToString");var $x=p((e,t,r,i)=>{let s="";return e in ua&&ua[e]?s=ua[e]({...r,svgId:i}):J.warn(`No theme found for ${e}`),`& {
|
|
9
|
+
font-family: ${r.fontFamily};
|
|
10
|
+
font-size: ${r.fontSize};
|
|
11
|
+
fill: ${r.textColor}
|
|
12
|
+
}
|
|
13
|
+
@keyframes edge-animation-frame {
|
|
14
|
+
from {
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@keyframes dash {
|
|
19
|
+
to {
|
|
20
|
+
stroke-dashoffset: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
& .edge-animation-slow {
|
|
24
|
+
stroke-dasharray: 9,5 !important;
|
|
25
|
+
stroke-dashoffset: 900;
|
|
26
|
+
animation: dash 50s linear infinite;
|
|
27
|
+
stroke-linecap: round;
|
|
28
|
+
}
|
|
29
|
+
& .edge-animation-fast {
|
|
30
|
+
stroke-dasharray: 9,5 !important;
|
|
31
|
+
stroke-dashoffset: 900;
|
|
32
|
+
animation: dash 20s linear infinite;
|
|
33
|
+
stroke-linecap: round;
|
|
34
|
+
}
|
|
35
|
+
/* Classes common for multiple diagrams */
|
|
36
|
+
|
|
37
|
+
& .error-icon {
|
|
38
|
+
fill: ${r.errorBkgColor};
|
|
39
|
+
}
|
|
40
|
+
& .error-text {
|
|
41
|
+
fill: ${r.errorTextColor};
|
|
42
|
+
stroke: ${r.errorTextColor};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .edge-thickness-normal {
|
|
46
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
47
|
+
}
|
|
48
|
+
& .edge-thickness-thick {
|
|
49
|
+
stroke-width: 3.5px
|
|
50
|
+
}
|
|
51
|
+
& .edge-pattern-solid {
|
|
52
|
+
stroke-dasharray: 0;
|
|
53
|
+
}
|
|
54
|
+
& .edge-thickness-invisible {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
& .edge-pattern-dashed{
|
|
59
|
+
stroke-dasharray: 3;
|
|
60
|
+
}
|
|
61
|
+
.edge-pattern-dotted {
|
|
62
|
+
stroke-dasharray: 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .marker {
|
|
66
|
+
fill: ${r.lineColor};
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
& .marker.cross {
|
|
70
|
+
stroke: ${r.lineColor};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& svg {
|
|
74
|
+
font-family: ${r.fontFamily};
|
|
75
|
+
font-size: ${r.fontSize};
|
|
76
|
+
}
|
|
77
|
+
& p {
|
|
78
|
+
margin: 0
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${s}
|
|
82
|
+
.node .neo-node {
|
|
83
|
+
stroke: ${r.nodeBorder};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
87
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
88
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
89
|
+
}
|
|
90
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
91
|
+
filter: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
[data-look="neo"].node path {
|
|
96
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
97
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-look="neo"].node .outer-path {
|
|
101
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-look="neo"].node .neo-line path {
|
|
105
|
+
stroke: ${r.nodeBorder};
|
|
106
|
+
filter: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-look="neo"].node circle{
|
|
110
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
111
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-look="neo"].node circle .state-start{
|
|
115
|
+
fill: #000000;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-look="neo"].icon-shape .icon {
|
|
119
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
120
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
124
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
125
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
${t}
|
|
129
|
+
`},"getStyles"),Ox=p((e,t)=>{t!==void 0&&(ua[e]=t)},"addStylesForDiagram"),Ix=$x,Ld={};Ry(Ld,{clear:()=>Dx,getAccDescription:()=>Nx,getAccTitle:()=>Rx,getDiagramTitle:()=>zx,setAccDescription:()=>qx,setAccTitle:()=>Px,setDiagramTitle:()=>Wx});var nl="",ll="",hl="",cl=p(e=>ze(e,Kt()),"sanitizeText"),Dx=p(()=>{nl="",hl="",ll=""},"clear"),Px=p(e=>{nl=cl(e).replace(/^\s+/g,"")},"setAccTitle"),Rx=p(()=>nl,"getAccTitle"),qx=p(e=>{hl=cl(e).replace(/\n\s+/g,`
|
|
130
|
+
`)},"setAccDescription"),Nx=p(()=>hl,"getAccDescription"),Wx=p(e=>{ll=cl(e)},"setDiagramTitle"),zx=p(()=>ll,"getDiagramTitle"),rc=J,Hx=sl,Pt=Kt,YL=bd,UL=Dr,ul=p(e=>ze(e,Pt()),"sanitizeText"),Yx=Mx,Ux=p(()=>Ld,"getCommonDb"),Ba={},va=p((e,t,r)=>{var i;Ba[e]&&rc.warn(`Diagram with id ${e} already registered. Overwriting.`),Ba[e]=t,r&&gd(e,r),Ox(e,t.styles),(i=t.injectUtils)==null||i.call(t,rc,Hx,Pt,ul,Yx,Ux(),()=>{})},"registerDiagram"),Tn=p(e=>{if(e in Ba)return Ba[e];throw new jx(e)},"getDiagram"),Oi,jx=(Oi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Oi,"DiagramNotFoundError"),Oi),Gx={value:()=>{}};function Fd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new da(r)}function da(e){this._=e}function Xx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}da.prototype=Fd.prototype={constructor:da,on:function(e,t){var r=this._,i=Xx(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=Vx(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=ic(r[s],e.name,t);else if(t==null)for(s in r)r[s]=ic(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new da(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function Vx(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function ic(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=Gx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var _n="http://www.w3.org/1999/xhtml";const sc={svg:"http://www.w3.org/2000/svg",xhtml:_n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ka(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),sc.hasOwnProperty(t)?{space:sc[t],local:e}:e}function Zx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===_n&&t.documentElement.namespaceURI===_n?t.createElement(e):t.createElementNS(r,e)}}function Kx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ad(e){var t=Ka(e);return(t.local?Kx:Zx)(t)}function Qx(){}function dl(e){return e==null?Qx:function(){return this.querySelector(e)}}function Jx(e){typeof e!="function"&&(e=dl(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),c,h,l=0;l<o;++l)(c=a[l])&&(h=e.call(c,c.__data__,l,a))&&("__data__"in c&&(h.__data__=c.__data__),n[l]=h);return new Ie(i,this._parents)}function tC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function eC(){return[]}function Ed(e){return e==null?eC:function(){return this.querySelectorAll(e)}}function rC(e){return function(){return tC(e.apply(this,arguments))}}function iC(e){typeof e=="function"?e=rC(e):e=Ed(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,c,h=0;h<n;++h)(c=o[h])&&(i.push(e.call(c,c.__data__,h,o)),s.push(c));return new Ie(i,s)}function Md(e){return function(){return this.matches(e)}}function $d(e){return function(t){return t.matches(e)}}var sC=Array.prototype.find;function aC(e){return function(){return sC.call(this.children,e)}}function oC(){return this.firstElementChild}function nC(e){return this.select(e==null?oC:aC(typeof e=="function"?e:$d(e)))}var lC=Array.prototype.filter;function hC(){return Array.from(this.children)}function cC(e){return function(){return lC.call(this.children,e)}}function uC(e){return this.selectAll(e==null?hC:cC(typeof e=="function"?e:$d(e)))}function dC(e){typeof e!="function"&&(e=Md(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],c,h=0;h<o;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&n.push(c);return new Ie(i,this._parents)}function Od(e){return new Array(e.length)}function fC(){return new Ie(this._enter||this._groups.map(Od),this._parents)}function La(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}La.prototype={constructor:La,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function pC(e){return function(){return e}}function gC(e,t,r,i,s,a){for(var o=0,n,c=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new La(e,a[o]);for(;o<c;++o)(n=t[o])&&(s[o]=n)}function mC(e,t,r,i,s,a,o){var n,c,h=new Map,l=t.length,u=a.length,f=new Array(l),d;for(n=0;n<l;++n)(c=t[n])&&(f[n]=d=o.call(c,c.__data__,n,t)+"",h.has(d)?s[n]=c:h.set(d,c));for(n=0;n<u;++n)d=o.call(e,a[n],n,a)+"",(c=h.get(d))?(i[n]=c,c.__data__=a[n],h.delete(d)):r[n]=new La(e,a[n]);for(n=0;n<l;++n)(c=t[n])&&h.get(f[n])===c&&(s[n]=c)}function yC(e){return e.__data__}function xC(e,t){if(!arguments.length)return Array.from(this,yC);var r=t?mC:gC,i=this._parents,s=this._groups;typeof e!="function"&&(e=pC(e));for(var a=s.length,o=new Array(a),n=new Array(a),c=new Array(a),h=0;h<a;++h){var l=i[h],u=s[h],f=u.length,d=CC(e.call(l,l&&l.__data__,h,i)),m=d.length,y=n[h]=new Array(m),C=o[h]=new Array(m),x=c[h]=new Array(f);r(l,u,y,C,x,d,t);for(var b=0,k=0,T,B;b<m;++b)if(T=y[b]){for(b>=k&&(k=b+1);!(B=C[k])&&++k<m;);T._next=B||null}}return o=new Ie(o,i),o._enter=n,o._exit=c,o}function CC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bC(){return new Ie(this._exit||this._groups.map(Od),this._parents)}function kC(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function wC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),c=0;c<o;++c)for(var h=r[c],l=i[c],u=h.length,f=n[c]=new Array(u),d,m=0;m<u;++m)(d=h[m]||l[m])&&(f[m]=d);for(;c<s;++c)n[c]=r[c];return new Ie(n,this._parents)}function SC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function TC(e){e||(e=_C);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,c=s[a]=new Array(n),h,l=0;l<n;++l)(h=o[l])&&(c[l]=h);c.sort(t)}return new Ie(s,this._parents).order()}function _C(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function BC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vC(){return Array.from(this)}function LC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function FC(){let e=0;for(const t of this)++e;return e}function AC(){return!this.node()}function EC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function MC(e){return function(){this.removeAttribute(e)}}function $C(e){return function(){this.removeAttributeNS(e.space,e.local)}}function OC(e,t){return function(){this.setAttribute(e,t)}}function IC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function DC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function PC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function RC(e,t){var r=Ka(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?$C:MC:typeof t=="function"?r.local?PC:DC:r.local?IC:OC)(r,t))}function Id(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qC(e){return function(){this.style.removeProperty(e)}}function NC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function WC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function zC(e,t,r){return arguments.length>1?this.each((t==null?qC:typeof t=="function"?WC:NC)(e,t,r??"")):Ri(this.node(),e)}function Ri(e,t){return e.style.getPropertyValue(t)||Id(e).getComputedStyle(e,null).getPropertyValue(t)}function HC(e){return function(){delete this[e]}}function YC(e,t){return function(){this[e]=t}}function UC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function jC(e,t){return arguments.length>1?this.each((t==null?HC:typeof t=="function"?UC:YC)(e,t)):this.node()[e]}function Dd(e){return e.trim().split(/^|\s+/)}function fl(e){return e.classList||new Pd(e)}function Pd(e){this._node=e,this._names=Dd(e.getAttribute("class")||"")}Pd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Rd(e,t){for(var r=fl(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function qd(e,t){for(var r=fl(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function GC(e){return function(){Rd(this,e)}}function XC(e){return function(){qd(this,e)}}function VC(e,t){return function(){(t.apply(this,arguments)?Rd:qd)(this,e)}}function ZC(e,t){var r=Dd(e+"");if(arguments.length<2){for(var i=fl(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?VC:t?GC:XC)(r,t))}function KC(){this.textContent=""}function QC(e){return function(){this.textContent=e}}function JC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tb(e){return arguments.length?this.each(e==null?KC:(typeof e=="function"?JC:QC)(e)):this.node().textContent}function eb(){this.innerHTML=""}function rb(e){return function(){this.innerHTML=e}}function ib(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function sb(e){return arguments.length?this.each(e==null?eb:(typeof e=="function"?ib:rb)(e)):this.node().innerHTML}function ab(){this.nextSibling&&this.parentNode.appendChild(this)}function ob(){return this.each(ab)}function nb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lb(){return this.each(nb)}function hb(e){var t=typeof e=="function"?e:Ad(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function cb(){return null}function ub(e,t){var r=typeof e=="function"?e:Ad(e),i=t==null?cb:typeof t=="function"?t:dl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function db(){var e=this.parentNode;e&&e.removeChild(this)}function fb(){return this.each(db)}function pb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mb(e){return this.select(e?gb:pb)}function yb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function xb(e){return function(t){e.call(this,t,this.__data__)}}function Cb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function bb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function kb(e,t,r){return function(){var i=this.__on,s,a=xb(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function wb(e,t,r){var i=Cb(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var c=0,h=n.length,l;c<h;++c)for(s=0,l=n[c];s<a;++s)if((o=i[s]).type===l.type&&o.name===l.name)return l.value}return}for(n=t?kb:bb,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Nd(e,t,r){var i=Id(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Sb(e,t){return function(){return Nd(this,e,t)}}function Tb(e,t){return function(){return Nd(this,e,t.apply(this,arguments))}}function _b(e,t){return this.each((typeof t=="function"?Tb:Sb)(e,t))}function*Bb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var Wd=[null];function Ie(e,t){this._groups=e,this._parents=t}function Os(){return new Ie([[document.documentElement]],Wd)}function vb(){return this}Ie.prototype=Os.prototype={constructor:Ie,select:Jx,selectAll:iC,selectChild:nC,selectChildren:uC,filter:dC,data:xC,enter:fC,exit:bC,join:kC,merge:wC,selection:vb,order:SC,sort:TC,call:BC,nodes:vC,node:LC,size:FC,empty:AC,each:EC,attr:RC,style:zC,property:jC,classed:ZC,text:tb,html:sb,raise:ob,lower:lb,append:hb,insert:ub,remove:fb,clone:mb,datum:yb,on:wb,dispatch:_b,[Symbol.iterator]:Bb};function Dt(e){return typeof e=="string"?new Ie([[document.querySelector(e)]],[document.documentElement]):new Ie([[e]],Wd)}function pl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zd(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Is(){}var Bs=.7,Fa=1/Bs,bi="\\s*([+-]?\\d+)\\s*",vs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lb=/^#([0-9a-f]{3,8})$/,Fb=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),Ab=new RegExp(`^rgb\\(${nr},${nr},${nr}\\)$`),Eb=new RegExp(`^rgba\\(${bi},${bi},${bi},${vs}\\)$`),Mb=new RegExp(`^rgba\\(${nr},${nr},${nr},${vs}\\)$`),$b=new RegExp(`^hsl\\(${vs},${nr},${nr}\\)$`),Ob=new RegExp(`^hsla\\(${vs},${nr},${nr},${vs}\\)$`),ac={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};pl(Is,Ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oc,formatHex:oc,formatHex8:Ib,formatHsl:Db,formatRgb:nc,toString:nc});function oc(){return this.rgb().formatHex()}function Ib(){return this.rgb().formatHex8()}function Db(){return Hd(this).formatHsl()}function nc(){return this.rgb().formatRgb()}function Ls(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Lb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?lc(t):r===3?new ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Fb.exec(e))?new ve(t[1],t[2],t[3],1):(t=Ab.exec(e))?new ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Eb.exec(e))?Xs(t[1],t[2],t[3],t[4]):(t=Mb.exec(e))?Xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$b.exec(e))?uc(t[1],t[2]/100,t[3]/100,1):(t=Ob.exec(e))?uc(t[1],t[2]/100,t[3]/100,t[4]):ac.hasOwnProperty(e)?lc(ac[e]):e==="transparent"?new ve(NaN,NaN,NaN,0):null}function lc(e){return new ve(e>>16&255,e>>8&255,e&255,1)}function Xs(e,t,r,i){return i<=0&&(e=t=r=NaN),new ve(e,t,r,i)}function Pb(e){return e instanceof Is||(e=Ls(e)),e?(e=e.rgb(),new ve(e.r,e.g,e.b,e.opacity)):new ve}function Bn(e,t,r,i){return arguments.length===1?Pb(e):new ve(e,t,r,i??1)}function ve(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}pl(ve,Bn,zd(Is,{brighter(e){return e=e==null?Fa:Math.pow(Fa,e),new ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bs:Math.pow(Bs,e),new ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ve(Vr(this.r),Vr(this.g),Vr(this.b),Aa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hc,formatHex:hc,formatHex8:Rb,formatRgb:cc,toString:cc}));function hc(){return`#${Xr(this.r)}${Xr(this.g)}${Xr(this.b)}`}function Rb(){return`#${Xr(this.r)}${Xr(this.g)}${Xr(this.b)}${Xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function cc(){const e=Aa(this.opacity);return`${e===1?"rgb(":"rgba("}${Vr(this.r)}, ${Vr(this.g)}, ${Vr(this.b)}${e===1?")":`, ${e})`}`}function Aa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xr(e){return e=Vr(e),(e<16?"0":"")+e.toString(16)}function uc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,r,i)}function Hd(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof Is||(e=Ls(e)),!e)return new Ve;if(e instanceof Ve)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,c=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=c<.5?a+s:2-a-s,o*=60):n=c>0&&c<1?0:o,new Ve(o,n,c,e.opacity)}function qb(e,t,r,i){return arguments.length===1?Hd(e):new Ve(e,t,r,i??1)}function Ve(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}pl(Ve,qb,zd(Is,{brighter(e){return e=e==null?Fa:Math.pow(Fa,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bs:Math.pow(Bs,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new ve(Lo(e>=240?e-240:e+120,s,i),Lo(e,s,i),Lo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Ve(dc(this.h),Vs(this.s),Vs(this.l),Aa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Aa(this.opacity);return`${e===1?"hsl(":"hsla("}${dc(this.h)}, ${Vs(this.s)*100}%, ${Vs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dc(e){return e=(e||0)%360,e<0?e+360:e}function Vs(e){return Math.max(0,Math.min(1,e||0))}function Lo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const gl=e=>()=>e;function Yd(e,t){return function(r){return e+r*t}}function Nb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function jL(e,t){var r=t-e;return r?Yd(e,r>180||r<-180?r-360*Math.round(r/360):r):gl(isNaN(e)?t:e)}function Wb(e){return(e=+e)==1?Ud:function(t,r){return r-t?Nb(t,r,e):gl(isNaN(t)?r:t)}}function Ud(e,t){var r=t-e;return r?Yd(e,r):gl(isNaN(e)?t:e)}const fc=(function e(t){var r=Wb(t);function i(s,a){var o=r((s=Bn(s)).r,(a=Bn(a)).r),n=r(s.g,a.g),c=r(s.b,a.b),h=Ud(s.opacity,a.opacity);return function(l){return s.r=o(l),s.g=n(l),s.b=c(l),s.opacity=h(l),s+""}}return i.gamma=e,i})(1);function $r(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var vn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fo=new RegExp(vn.source,"g");function zb(e){return function(){return e}}function Hb(e){return function(t){return e(t)+""}}function Yb(e,t){var r=vn.lastIndex=Fo.lastIndex=0,i,s,a,o=-1,n=[],c=[];for(e=e+"",t=t+"";(i=vn.exec(e))&&(s=Fo.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,c.push({i:o,x:$r(i,s)})),r=Fo.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?c[0]?Hb(c[0].x):zb(t):(t=c.length,function(h){for(var l=0,u;l<t;++l)n[(u=c[l]).i]=u.x(h);return n.join("")})}var pc=180/Math.PI,Ln={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jd(e,t,r,i,s,a){var o,n,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,c/=n),e*i<t*r&&(e=-e,t=-t,c=-c,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*pc,skewX:Math.atan(c)*pc,scaleX:o,scaleY:n}}var Zs;function Ub(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ln:jd(t.a,t.b,t.c,t.d,t.e,t.f)}function jb(e){return e==null||(Zs||(Zs=document.createElementNS("http://www.w3.org/2000/svg","g")),Zs.setAttribute("transform",e),!(e=Zs.transform.baseVal.consolidate()))?Ln:(e=e.matrix,jd(e.a,e.b,e.c,e.d,e.e,e.f))}function Gd(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,l,u,f,d,m){if(h!==u||l!==f){var y=d.push("translate(",null,t,null,r);m.push({i:y-4,x:$r(h,u)},{i:y-2,x:$r(l,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(h,l,u,f){h!==l?(h-l>180?l+=360:l-h>180&&(h+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:$r(h,l)})):l&&u.push(s(u)+"rotate("+l+i)}function n(h,l,u,f){h!==l?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:$r(h,l)}):l&&u.push(s(u)+"skewX("+l+i)}function c(h,l,u,f,d,m){if(h!==u||l!==f){var y=d.push(s(d)+"scale(",null,",",null,")");m.push({i:y-4,x:$r(h,u)},{i:y-2,x:$r(l,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(h,l){var u=[],f=[];return h=e(h),l=e(l),a(h.translateX,h.translateY,l.translateX,l.translateY,u,f),o(h.rotate,l.rotate,u,f),n(h.skewX,l.skewX,u,f),c(h.scaleX,h.scaleY,l.scaleX,l.scaleY,u,f),h=l=null,function(d){for(var m=-1,y=f.length,C;++m<y;)u[(C=f[m]).i]=C.x(d);return u.join("")}}}var Gb=Gd(Ub,"px, ","px)","deg)"),Xb=Gd(jb,", ",")",")"),qi=0,cs=0,ts=0,Xd=1e3,Ea,us,Ma=0,Jr=0,Qa=0,Fs=typeof performance=="object"&&performance.now?performance:Date,Vd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ml(){return Jr||(Vd(Vb),Jr=Fs.now()+Qa)}function Vb(){Jr=0}function $a(){this._call=this._time=this._next=null}$a.prototype=Zd.prototype={constructor:$a,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ml():+r)+(t==null?0:+t),!this._next&&us!==this&&(us?us._next=this:Ea=this,us=this),this._call=e,this._time=r,Fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fn())}};function Zd(e,t,r){var i=new $a;return i.restart(e,t,r),i}function Zb(){ml(),++qi;for(var e=Ea,t;e;)(t=Jr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qi}function gc(){Jr=(Ma=Fs.now())+Qa,qi=cs=0;try{Zb()}finally{qi=0,Qb(),Jr=0}}function Kb(){var e=Fs.now(),t=e-Ma;t>Xd&&(Qa-=t,Ma=e)}function Qb(){for(var e,t=Ea,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ea=r);us=e,Fn(i)}function Fn(e){if(!qi){cs&&(cs=clearTimeout(cs));var t=e-Jr;t>24?(e<1/0&&(cs=setTimeout(gc,e-Fs.now()-Qa)),ts&&(ts=clearInterval(ts))):(ts||(Ma=Fs.now(),ts=setInterval(Kb,Xd)),qi=1,Vd(gc))}}function mc(e,t,r){var i=new $a;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Jb=Fd("start","end","cancel","interrupt"),tk=[],Kd=0,yc=1,An=2,fa=3,xc=4,En=5,pa=6;function Ja(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;ek(e,r,{name:t,index:i,group:s,on:Jb,tween:tk,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Kd})}function yl(e,t){var r=Qe(e,t);if(r.state>Kd)throw new Error("too late; already scheduled");return r}function dr(e,t){var r=Qe(e,t);if(r.state>fa)throw new Error("too late; already running");return r}function Qe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function ek(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Zd(a,0,r.time);function a(h){r.state=yc,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var l,u,f,d;if(r.state!==yc)return c();for(l in i)if(d=i[l],d.name===r.name){if(d.state===fa)return mc(o);d.state===xc?(d.state=pa,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[l]):+l<t&&(d.state=pa,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[l])}if(mc(function(){r.state===fa&&(r.state=xc,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=An,r.on.call("start",e,e.__data__,r.index,r.group),r.state===An){for(r.state=fa,s=new Array(f=r.tween.length),l=0,u=-1;l<f;++l)(d=r.tween[l].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var l=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(c),r.state=En,1),u=-1,f=s.length;++u<f;)s[u].call(e,l);r.state===En&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=pa,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function rk(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>An&&i.state<En,i.state=pa,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function ik(e){return this.each(function(){rk(this,e)})}function sk(e,t){var r,i;return function(){var s=dr(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function ak(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=dr(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},c=0,h=s.length;c<h;++c)if(s[c].name===t){s[c]=n;break}c===h&&s.push(n)}a.tween=s}}function ok(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Qe(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?sk:ak)(r,e,t))}function xl(e,t,r){var i=e._id;return e.each(function(){var s=dr(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Qe(s,i).value[t]}}function Qd(e,t){var r;return(typeof t=="number"?$r:t instanceof Ls?fc:(r=Ls(t))?(t=r,fc):Yb)(e,t)}function nk(e){return function(){this.removeAttribute(e)}}function lk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hk(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function ck(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function uk(e,t,r){var i,s,a;return function(){var o,n=r(this),c;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=n+"",o===c?null:o===i&&c===s?a:(s=c,a=t(i=o,n)))}}function dk(e,t,r){var i,s,a;return function(){var o,n=r(this),c;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=n+"",o===c?null:o===i&&c===s?a:(s=c,a=t(i=o,n)))}}function fk(e,t){var r=Ka(e),i=r==="transform"?Xb:Qd;return this.attrTween(e,typeof t=="function"?(r.local?dk:uk)(r,i,xl(this,"attr."+e,t)):t==null?(r.local?lk:nk)(r):(r.local?ck:hk)(r,i,t))}function pk(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function gk(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function mk(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&gk(e,a)),r}return s._value=t,s}function yk(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&pk(e,a)),r}return s._value=t,s}function xk(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ka(e);return this.tween(r,(i.local?mk:yk)(i,t))}function Ck(e,t){return function(){yl(this,e).delay=+t.apply(this,arguments)}}function bk(e,t){return t=+t,function(){yl(this,e).delay=t}}function kk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ck:bk)(t,e)):Qe(this.node(),t).delay}function wk(e,t){return function(){dr(this,e).duration=+t.apply(this,arguments)}}function Sk(e,t){return t=+t,function(){dr(this,e).duration=t}}function Tk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?wk:Sk)(t,e)):Qe(this.node(),t).duration}function _k(e,t){if(typeof t!="function")throw new Error;return function(){dr(this,e).ease=t}}function Bk(e){var t=this._id;return arguments.length?this.each(_k(t,e)):Qe(this.node(),t).ease}function vk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;dr(this,e).ease=r}}function Lk(e){if(typeof e!="function")throw new Error;return this.each(vk(this._id,e))}function Fk(e){typeof e!="function"&&(e=Md(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],c,h=0;h<o;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&n.push(c);return new Sr(i,this._parents,this._name,this._id)}function Ak(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var c=t[n],h=r[n],l=c.length,u=o[n]=new Array(l),f,d=0;d<l;++d)(f=c[d]||h[d])&&(u[d]=f);for(;n<i;++n)o[n]=t[n];return new Sr(o,this._parents,this._name,this._id)}function Ek(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Mk(e,t,r){var i,s,a=Ek(t)?yl:dr;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function $k(e,t){var r=this._id;return arguments.length<2?Qe(this.node(),r).on.on(e):this.each(Mk(r,e,t))}function Ok(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ik(){return this.on("end.remove",Ok(this._id))}function Dk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=dl(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],c=n.length,h=a[o]=new Array(c),l,u,f=0;f<c;++f)(l=n[f])&&(u=e.call(l,l.__data__,f,n))&&("__data__"in l&&(u.__data__=l.__data__),h[f]=u,Ja(h[f],t,r,f,h,Qe(l,r)));return new Sr(a,this._parents,t,r)}function Pk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ed(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var c=i[n],h=c.length,l,u=0;u<h;++u)if(l=c[u]){for(var f=e.call(l,l.__data__,u,c),d,m=Qe(l,r),y=0,C=f.length;y<C;++y)(d=f[y])&&Ja(d,t,r,y,f,m);a.push(f),o.push(l)}return new Sr(a,o,t,r)}var Rk=Os.prototype.constructor;function qk(){return new Rk(this._groups,this._parents)}function Nk(e,t){var r,i,s;return function(){var a=Ri(this,e),o=(this.style.removeProperty(e),Ri(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function Jd(e){return function(){this.style.removeProperty(e)}}function Wk(e,t,r){var i,s=r+"",a;return function(){var o=Ri(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function zk(e,t,r){var i,s,a;return function(){var o=Ri(this,e),n=r(this),c=n+"";return n==null&&(c=n=(this.style.removeProperty(e),Ri(this,e))),o===c?null:o===i&&c===s?a:(s=c,a=t(i=o,n))}}function Hk(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var c=dr(this,e),h=c.on,l=c.value[a]==null?n||(n=Jd(t)):void 0;(h!==r||s!==l)&&(i=(r=h).copy()).on(o,s=l),c.on=i}}function Yk(e,t,r){var i=(e+="")=="transform"?Gb:Qd;return t==null?this.styleTween(e,Nk(e,i)).on("end.style."+e,Jd(e)):typeof t=="function"?this.styleTween(e,zk(e,i,xl(this,"style."+e,t))).each(Hk(this._id,e)):this.styleTween(e,Wk(e,i,t),r).on("end.style."+e,null)}function Uk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function jk(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Uk(e,o,r)),i}return a._value=t,a}function Gk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,jk(e,t,r??""))}function Xk(e){return function(){this.textContent=e}}function Vk(e){return function(){var t=e(this);this.textContent=t??""}}function Zk(e){return this.tween("text",typeof e=="function"?Vk(xl(this,"text",e)):Xk(e==null?"":e+""))}function Kk(e){return function(t){this.textContent=e.call(this,t)}}function Qk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Kk(s)),t}return i._value=e,i}function Jk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Qk(e))}function t1(){for(var e=this._name,t=this._id,r=tf(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,c,h=0;h<n;++h)if(c=o[h]){var l=Qe(c,t);Ja(c,e,r,h,o,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Sr(i,this._parents,e,r)}function e1(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},c={value:function(){--s===0&&a()}};r.each(function(){var h=dr(this,i),l=h.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(c)),h.on=t}),s===0&&a()})}var r1=0;function Sr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function tf(){return++r1}var yr=Os.prototype;Sr.prototype={constructor:Sr,select:Dk,selectAll:Pk,selectChild:yr.selectChild,selectChildren:yr.selectChildren,filter:Fk,merge:Ak,selection:qk,transition:t1,call:yr.call,nodes:yr.nodes,node:yr.node,size:yr.size,empty:yr.empty,each:yr.each,on:$k,attr:fk,attrTween:xk,style:Yk,styleTween:Gk,text:Zk,textTween:Jk,remove:Ik,tween:ok,delay:kk,duration:Tk,ease:Bk,easeVarying:Lk,end:e1,[Symbol.iterator]:yr[Symbol.iterator]};function i1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var s1={time:null,delay:0,duration:250,ease:i1};function a1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function o1(e){var t,r;e instanceof Sr?(t=e._id,e=e._name):(t=tf(),(r=s1).time=ml(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,c,h=0;h<n;++h)(c=o[h])&&Ja(c,e,t,h,o,r||a1(c,t));return new Sr(i,this._parents,e,t)}Os.prototype.interrupt=ik;Os.prototype.transition=o1;const Mn=Math.PI,$n=2*Mn,Ur=1e-6,n1=$n-Ur;function ef(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function l1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ef;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class h1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ef:l1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,c=i-t,h=s-r,l=o-t,u=n-r,f=l*l+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Ur)if(!(Math.abs(u*c-h*l)>Ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,m=s-n,y=c*c+h*h,C=d*d+m*m,x=Math.sqrt(y),b=Math.sqrt(f),k=a*Math.tan((Mn-Math.acos((y+f-C)/(2*x*b)))/2),T=k/b,B=k/x;Math.abs(T-1)>Ur&&this._append`L${t+T*l},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*d>l*m)},${this._x1=t+B*c},${this._y1=r+B*h}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),c=i*Math.sin(s),h=t+n,l=r+c,u=1^o,f=o?s-a:a-s;this._x1===null?this._append`M${h},${l}`:(Math.abs(this._x1-h)>Ur||Math.abs(this._y1-l)>Ur)&&this._append`L${h},${l}`,i&&(f<0&&(f=f%$n+$n),f>n1?this._append`A${i},${i},0,1,${u},${t-n},${r-c}A${i},${i},0,1,${u},${this._x1=h},${this._y1=l}`:f>Ur&&this._append`A${i},${i},0,${+(f>=Mn)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function hi(e){return function(){return e}}const GL=Math.abs,XL=Math.atan2,VL=Math.cos,ZL=Math.max,KL=Math.min,QL=Math.sin,JL=Math.sqrt,Cc=1e-12,Cl=Math.PI,bc=Cl/2,tF=2*Cl;function eF(e){return e>1?0:e<-1?Cl:Math.acos(e)}function rF(e){return e>=1?bc:e<=-1?-bc:Math.asin(e)}function c1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new h1(t)}function u1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rf(e){this._context=e}rf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ws(e){return new rf(e)}function d1(e){return e[0]}function f1(e){return e[1]}function p1(e,t){var r=hi(!0),i=null,s=ws,a=null,o=c1(n);e=typeof e=="function"?e:e===void 0?d1:hi(e),t=typeof t=="function"?t:t===void 0?f1:hi(t);function n(c){var h,l=(c=u1(c)).length,u,f=!1,d;for(i==null&&(a=s(d=o())),h=0;h<=l;++h)!(h<l&&r(u=c[h],h,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(u,h,c),+t(u,h,c));if(d)return a=null,d+""||null}return n.x=function(c){return arguments.length?(e=typeof c=="function"?c:hi(+c),n):e},n.y=function(c){return arguments.length?(t=typeof c=="function"?c:hi(+c),n):t},n.defined=function(c){return arguments.length?(r=typeof c=="function"?c:hi(!!c),n):r},n.curve=function(c){return arguments.length?(s=c,i!=null&&(a=s(i)),n):s},n.context=function(c){return arguments.length?(c==null?i=a=null:a=s(i=c),n):i},n}class sf{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function af(e){return new sf(e,!0)}function of(e){return new sf(e,!1)}function Pr(){}function Oa(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function to(e){this._context=e}to.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Oa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function On(e){return new to(e)}function nf(e){this._context=e}nf.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function g1(e){return new nf(e)}function lf(e){this._context=e}lf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Oa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function m1(e){return new lf(e)}function hf(e,t){this._basis=new to(e),this._beta=t}hf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,c;++n<=r;)c=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+c*a),this._beta*t[n]+(1-this._beta)*(s+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const y1=(function e(t){function r(i){return t===1?new to(i):new hf(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ia(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function bl(e,t){this._context=e,this._k=(1-t)/6}bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ia(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ia(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cf=(function e(t){function r(i){return new bl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function kl(e,t){this._context=e,this._k=(1-t)/6}kl.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ia(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const x1=(function e(t){function r(i){return new kl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wl(e,t){this._context=e,this._k=(1-t)/6}wl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ia(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const C1=(function e(t){function r(i){return new wl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Sl(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Cc){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Cc){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/l,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function uf(e,t){this._context=e,this._alpha=t}uf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Sl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const df=(function e(t){function r(i){return t?new uf(i,t):new bl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ff(e,t){this._context=e,this._alpha=t}ff.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Sl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const b1=(function e(t){function r(i){return t?new ff(i,t):new kl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pf(e,t){this._context=e,this._alpha=t}pf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Sl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const k1=(function e(t){function r(i){return t?new pf(i,t):new wl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function gf(e){this._context=e}gf.prototype={areaStart:Pr,areaEnd:Pr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function w1(e){return new gf(e)}function kc(e){return e<0?-1:1}function wc(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(kc(a)+kc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Sc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ao(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function Da(e){this._context=e}Da.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ao(this,this._t0,Sc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ao(this,Sc(this,r=wc(this,e,t)),r);break;default:Ao(this,this._t0,r=wc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function mf(e){this._context=new yf(e)}(mf.prototype=Object.create(Da.prototype)).point=function(e,t){Da.prototype.point.call(this,t,e)};function yf(e){this._context=e}yf.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function xf(e){return new Da(e)}function Cf(e){return new mf(e)}function bf(e){this._context=e}bf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Tc(e),s=Tc(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Tc(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function kf(e){return new bf(e)}function eo(e,t){this._context=e,this._t=t}eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function wf(e){return new eo(e,.5)}function Sf(e){return new eo(e,0)}function Tf(e){return new eo(e,1)}function ds(e,t,r){this.k=e,this.x=t,this.y=r}ds.prototype={constructor:ds,scale:function(e){return e===1?this:new ds(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ds(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ds.prototype;var S1=p(e=>{var s;const{securityLevel:t}=Pt();let r=Dt("body");if(t==="sandbox"){const o=((s=Dt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Dt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function _f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(_f,"getDefaultExportFromCjs");var fe={},Ks={},Er={},_c;function Hi(){if(_c)return Er;_c=1;function e(o){return typeof o>"u"||o===null}p(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}p(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}p(r,"toArray");function i(o,n){if(n){const c=Object.keys(n);for(let h=0,l=c.length;h<l;h+=1){const u=c[h];o[u]=n[u]}}return o}p(i,"extend");function s(o,n){let c="";for(let h=0;h<n;h+=1)c+=o;return c}p(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return p(a,"isNegativeZero"),Er.isNothing=e,Er.isObject=t,Er.toArray=r,Er.repeat=s,Er.isNegativeZero=a,Er.extend=i,Er}p(Hi,"requireCommon");var Eo,Bc;function Yi(){if(Bc)return Eo;Bc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
131
|
+
|
|
132
|
+
`+r.mark.snippet),a+" "+s):a}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Eo=t,Eo}p(Yi,"requireException");var Mo,vc;function Bf(){if(vc)return Mo;vc=1;const e=Hi();function t(s,a,o,n,c){let h="",l="";const u=Math.floor(c/2)-1;return n-a>u&&(h=" ... ",a=n-u+h.length),o-n>u&&(l=" ...",o=n+u-l.length),{str:h+s.slice(a,o).replace(/\t/g,"→")+l,pos:n-a+h.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const o=/\r?\n|\r|\0/g,n=[0],c=[];let h,l=-1;for(;h=o.exec(s.buffer);)c.push(h.index),n.push(h.index+h[0].length),s.position<=h.index&&l<0&&(l=n.length-2);l<0&&(l=n.length-1);let u="";const f=Math.min(s.line+a.linesAfter,c.length).toString().length,d=a.maxLength-(a.indent+f+3);for(let y=1;y<=a.linesBefore&&!(l-y<0);y++){const C=t(s.buffer,n[l-y],c[l-y],s.position-(n[l]-n[l-y]),d);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),f)+" | "+C.str+`
|
|
133
|
+
`+u}const m=t(s.buffer,n[l],c[l],s.position,d);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),f)+" | "+m.str+`
|
|
134
|
+
`,u+=e.repeat("-",a.indent+f+3+m.pos)+`^
|
|
135
|
+
`;for(let y=1;y<=a.linesAfter&&!(l+y>=c.length);y++){const C=t(s.buffer,n[l+y],c[l+y],s.position-(n[l]-n[l+y]),d);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),f)+" | "+C.str+`
|
|
136
|
+
`}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),Mo=i,Mo}p(Bf,"requireSnippet");var $o,Lc;function ye(){if(Lc)return $o;Lc=1;const e=Yi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const o={};return a!==null&&Object.keys(a).forEach(function(n){a[n].forEach(function(c){o[String(c)]=n})}),o}p(i,"compileStyleAliases");function s(a,o){if(o=o||{},Object.keys(o).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=o,this.tag=a,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),$o=s,$o}p(ye,"requireType");var Oo,Fc;function Tl(){if(Fc)return Oo;Fc=1;const e=Yi(),t=ye();function r(a,o){const n=[];return a[o].forEach(function(c){let h=n.length;n.forEach(function(l,u){l.tag===c.tag&&l.kind===c.kind&&l.multi===c.multi&&(h=u)}),n[h]=c}),n}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(n){n.multi?(a.multi[n.kind].push(n),a.multi.fallback.push(n)):a[n.kind][n.tag]=a.fallback[n.tag]=n}p(o,"collectType");for(let n=0,c=arguments.length;n<c;n+=1)arguments[n].forEach(o);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(o){let n=[],c=[];if(o instanceof t)c.push(o);else if(Array.isArray(o))c=c.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(n=n.concat(o.implicit)),o.explicit&&(c=c.concat(o.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const h=Object.create(s.prototype);return h.implicit=(this.implicit||[]).concat(n),h.explicit=(this.explicit||[]).concat(c),h.compiledImplicit=r(h,"implicit"),h.compiledExplicit=r(h,"explicit"),h.compiledTypeMap=i(h.compiledImplicit,h.compiledExplicit),h},"extend"),Oo=s,Oo}p(Tl,"requireSchema");var Io,Ac;function _l(){if(Ac)return Io;Ac=1;const e=ye();return Io=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Io}p(_l,"requireStr");var Do,Ec;function Bl(){if(Ec)return Do;Ec=1;const e=ye();return Do=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Do}p(Bl,"requireSeq");var Po,Mc;function vl(){if(Mc)return Po;Mc=1;const e=ye();return Po=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Po}p(vl,"requireMap");var Ro,$c;function Ll(){if($c)return Ro;$c=1;const e=Tl();return Ro=new e({explicit:[_l(),Bl(),vl()]}),Ro}p(Ll,"requireFailsafe");var qo,Oc;function Fl(){if(Oc)return qo;Oc=1;const e=ye();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),qo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),qo}p(Fl,"require_null");var No,Ic;function Al(){if(Ic)return No;Ic=1;const e=ye();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),No=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),No}p(Al,"requireBool");var Wo,Dc;function El(){if(Dc)return Wo;Dc=1;const e=Hi(),t=ye();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}p(r,"isHexCode");function i(h){return h>=48&&h<=55}p(i,"isOctCode");function s(h){return h>=48&&h<=57}p(s,"isDecCode");function a(h){if(h===null)return!1;const l=h.length;let u=0,f=!1;if(!l)return!1;let d=h[u];if((d==="-"||d==="+")&&(d=h[++u]),d==="0"){if(u+1===l)return!0;if(d=h[++u],d==="b"){for(u++;u<l;u++){if(d=h[u],d!=="0"&&d!=="1")return!1;f=!0}return f&&isFinite(o(h))}if(d==="x"){for(u++;u<l;u++){if(!r(h.charCodeAt(u)))return!1;f=!0}return f&&isFinite(o(h))}if(d==="o"){for(u++;u<l;u++){if(!i(h.charCodeAt(u)))return!1;f=!0}return f&&isFinite(o(h))}}for(;u<l;u++){if(!s(h.charCodeAt(u)))return!1;f=!0}return f?isFinite(o(h)):!1}p(a,"resolveYamlInteger");function o(h){let l=h,u=1,f=l[0];if((f==="-"||f==="+")&&(f==="-"&&(u=-1),l=l.slice(1),f=l[0]),l==="0")return 0;if(f==="0"){if(l[1]==="b")return u*parseInt(l.slice(2),2);if(l[1]==="x")return u*parseInt(l.slice(2),16);if(l[1]==="o")return u*parseInt(l.slice(2),8)}return u*parseInt(l,10)}p(o,"parseYamlInteger");function n(h){return o(h)}p(n,"constructYamlInteger");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!e.isNegativeZero(h)}return p(c,"isInteger"),Wo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:c,represent:{binary:p(function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:p(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:p(function(h){return h.toString(10)},"decimal"),hexadecimal:p(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Wo}p(El,"requireInt");var zo,Pc;function Ml(){if(Pc)return zo;Pc=1;const e=Hi(),t=ye(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:i.test(h)}p(s,"resolveYamlFloat");function a(h){let l=h.toLowerCase();const u=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:u*parseFloat(l,10)}p(a,"constructYamlFloat");const o=/^[-+]?[0-9]+e/;function n(h,l){if(isNaN(h))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";const u=h.toString(10);return o.test(u)?u.replace("e",".e"):u}p(n,"representYamlFloat");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return p(c,"isFloat"),zo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:n,defaultStyle:"lowercase"}),zo}p(Ml,"requireFloat");var Ho,Rc;function $l(){return Rc||(Rc=1,Ho=Ll().extend({implicit:[Fl(),Al(),El(),Ml()]})),Ho}p($l,"requireJson");var Yo,qc;function Ol(){return qc||(qc=1,Yo=$l()),Yo}p(Ol,"requireCore");var Uo,Nc;function Il(){if(Nc)return Uo;Nc=1;const e=ye(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}p(i,"resolveYamlTimestamp");function s(o){let n=0,c=null,h=t.exec(o);if(h===null&&(h=r.exec(o)),h===null)throw new Error("Date resolve error");const l=+h[1],u=+h[2]-1,f=+h[3];if(!h[4])return new Date(Date.UTC(l,u,f));const d=+h[4],m=+h[5],y=+h[6];if(h[7]){for(n=h[7].slice(0,3);n.length<3;)n+="0";n=+n}if(h[9]){const x=+h[10],b=+(h[11]||0);c=(x*60+b)*6e4,h[9]==="-"&&(c=-c)}const C=new Date(Date.UTC(l,u,f,d,m,y,n));return c&&C.setTime(C.getTime()-c),C}p(s,"constructYamlTimestamp");function a(o){return o.toISOString()}return p(a,"representYamlTimestamp"),Uo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),Uo}p(Il,"requireTimestamp");var jo,Wc;function Dl(){if(Wc)return jo;Wc=1;const e=ye();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),jo=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),jo}p(Dl,"requireMerge");var Go,zc;function Pl(){if(zc)return Go;zc=1;const e=ye(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
137
|
+
\r`;function r(o){if(o===null)return!1;let n=0;const c=o.length,h=t;for(let l=0;l<c;l++){const u=h.indexOf(o.charAt(l));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),c=n.length,h=t;let l=0;const u=[];for(let d=0;d<c;d++)d%4===0&&d&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|h.indexOf(n.charAt(d));const f=c%4*6;return f===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):f===18?(u.push(l>>10&255),u.push(l>>2&255)):f===12&&u.push(l>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function s(o){let n="",c=0;const h=o.length,l=t;for(let f=0;f<h;f++)f%3===0&&f&&(n+=l[c>>18&63],n+=l[c>>12&63],n+=l[c>>6&63],n+=l[c&63]),c=(c<<8)+o[f];const u=h%3;return u===0?(n+=l[c>>18&63],n+=l[c>>12&63],n+=l[c>>6&63],n+=l[c&63]):u===2?(n+=l[c>>10&63],n+=l[c>>4&63],n+=l[c<<2&63],n+=l[64]):u===1&&(n+=l[c>>2&63],n+=l[c<<4&63],n+=l[64],n+=l[64]),n}p(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return p(a,"isBinary"),Go=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),Go}p(Pl,"requireBinary");var Xo,Hc;function Rl(){if(Hc)return Xo;Hc=1;const e=ye(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let c=0,h=n.length;c<h;c+=1){const l=n[c];let u=!1;if(r.call(l)!=="[object Object]")return!1;let f;for(f in l)if(t.call(l,f))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(f)===-1)o.push(f);else return!1}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),Xo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Xo}p(Rl,"requireOmap");var Vo,Yc;function ql(){if(Yc)return Vo;Yc=1;const e=ye(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,c=a.length;n<c;n+=1){const h=a[n];if(t.call(h)!=="[object Object]")return!1;const l=Object.keys(h);if(l.length!==1)return!1;o[n]=[l[0],h[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,c=a.length;n<c;n+=1){const h=a[n],l=Object.keys(h);o[n]=[l[0],h[l[0]]]}return o}return p(i,"constructYamlPairs"),Vo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Vo}p(ql,"requirePairs");var Zo,Uc;function Nl(){if(Uc)return Zo;Uc=1;const e=ye(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),Zo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Zo}p(Nl,"requireSet");var Ko,jc;function ro(){return jc||(jc=1,Ko=Ol().extend({implicit:[Il(),Dl()],explicit:[Pl(),Rl(),ql(),Nl()]})),Ko}p(ro,"require_default");var Gc;function vf(){if(Gc)return Ks;Gc=1;const e=Hi(),t=Yi(),r=Bf(),i=ro(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,c=4,h=1,l=2,u=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(g){return Object.prototype.toString.call(g)}p(x,"_class");function b(g){return g===10||g===13}p(b,"isEol");function k(g){return g===9||g===32}p(k,"isWhiteSpace");function T(g){return g===9||g===32||g===10||g===13}p(T,"isWsOrEol");function B(g){return g===44||g===91||g===93||g===123||g===125}p(B,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const I=g|32;return I>=97&&I<=102?I-97+10:-1}p(L,"fromHexCode");function A(g){return g===120?2:g===117?4:g===85?8:0}p(A,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}p(F,"fromDecimalCode");function z(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
138
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(z,"simpleEscapeSequence");function R(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(R,"charFromCodepoint");function q(g,I,X){I==="__proto__"?Object.defineProperty(g,I,{configurable:!0,enumerable:!0,writable:!0,value:X}):g[I]=X}p(q,"setProperty");const tt=new Array(256),N=new Array(256);for(let g=0;g<256;g++)tt[g]=z(g)?1:0,N[g]=z(g);function E(g,I){this.input=g,this.filename=I.filename||null,this.schema=I.schema||i,this.onWarning=I.onWarning||null,this.legacy=I.legacy||!1,this.json=I.json||!1,this.listener=I.listener||null,this.maxDepth=typeof I.maxDepth=="number"?I.maxDepth:100,this.maxTotalMergeKeys=typeof I.maxTotalMergeKeys=="number"?I.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(E,"State");function M(g,I){const X={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return X.snippet=r(X),new t(I,X)}p(M,"generateError");function v(g,I){throw M(g,I)}p(v,"throwError");function P(g,I){g.onWarning&&g.onWarning.call(null,M(g,I))}p(P,"throwWarning");function $(g,I,X){const K=g.anchorMapTransactions;if(K.length!==0){const G=K[K.length-1];s.call(G,I)||(G[I]={existed:s.call(g.anchorMap,I),value:g.anchorMap[I]})}g.anchorMap[I]=X}p($,"storeAnchor");function j(g){g.anchorMapTransactions.push(Object.create(null))}p(j,"beginAnchorTransaction");function V(g){const I=g.anchorMapTransactions.pop(),X=g.anchorMapTransactions;if(X.length===0)return;const K=X[X.length-1],G=Object.keys(I);for(let st=0,S=G.length;st<S;st+=1){const W=G[st];s.call(K,W)||(K[W]=I[W])}}p(V,"commitAnchorTransaction");function dt(g){const I=g.anchorMapTransactions.pop(),X=Object.keys(I);for(let K=X.length-1;K>=0;K-=1){const G=I[X[K]];G.existed?g.anchorMap[X[K]]=G.value:delete g.anchorMap[X[K]]}}p(dt,"rollbackAnchorTransaction");function lt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}p(lt,"snapshotState");function mt(g,I){g.position=I.position,g.line=I.line,g.lineStart=I.lineStart,g.lineIndent=I.lineIndent,g.firstTabInLine=I.firstTabInLine,g.tag=I.tag,g.anchor=I.anchor,g.kind=I.kind,g.result=I.result}p(mt,"restoreState");const nt={YAML:p(function(I,X,K){I.version!==null&&v(I,"duplication of %YAML directive"),K.length!==1&&v(I,"YAML directive accepts exactly one argument");const G=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);G===null&&v(I,"ill-formed argument of the YAML directive");const st=parseInt(G[1],10),S=parseInt(G[2],10);st!==1&&v(I,"unacceptable YAML version of the document"),I.version=K[0],I.checkLineBreaks=S<2,S!==1&&S!==2&&P(I,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(I,X,K){let G;K.length!==2&&v(I,"TAG directive accepts exactly two arguments");const st=K[0];G=K[1],y.test(st)||v(I,"ill-formed tag handle (first argument) of the TAG directive"),s.call(I.tagMap,st)&&v(I,'there is a previously declared suffix for "'+st+'" tag handle'),C.test(G)||v(I,"ill-formed tag prefix (second argument) of the TAG directive");try{G=decodeURIComponent(G)}catch{v(I,"tag prefix is malformed: "+G)}I.tagMap[st]=G},"handleTagDirective")};function wt(g,I,X,K){if(I<X){const G=g.input.slice(I,X);if(K)for(let st=0,S=G.length;st<S;st+=1){const W=G.charCodeAt(st);W===9||W>=32&&W<=1114111||v(g,"expected valid JSON character")}else f.test(G)&&v(g,"the stream contains non-printable characters");g.result+=G}}p(wt,"captureSegment");function At(g,I,X,K){e.isObject(X)||v(g,"cannot merge mappings; the provided source object is unacceptable");const G=Object.keys(X);for(let st=0,S=G.length;st<S;st+=1){const W=G[st];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&v(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call(I,W)||(q(I,W,X[W]),K[W]=!0)}}p(At,"mergeMappings");function Et(g,I,X,K,G,st,S,W,rt){if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(let Z=0,Q=G.length;Z<Q;Z+=1)Array.isArray(G[Z])&&v(g,"nested arrays are not supported inside keys"),typeof G=="object"&&x(G[Z])==="[object Object]"&&(G[Z]="[object Object]")}if(typeof G=="object"&&x(G)==="[object Object]"&&(G="[object Object]"),G=String(G),I===null&&(I={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(st))for(let Z=0,Q=st.length;Z<Q;Z+=1)At(g,I,st[Z],X);else At(g,I,st,X);else!g.json&&!s.call(X,G)&&s.call(I,G)&&(g.line=S||g.line,g.lineStart=W||g.lineStart,g.position=rt||g.position,v(g,"duplicated mapping key")),q(I,G,st),delete X[G];return I}p(Et,"storeMappingPair");function Nt(g){const I=g.input.charCodeAt(g.position);I===10?g.position++:I===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):v(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(Nt,"readLineBreak");function Bt(g,I,X){let K=0,G=g.input.charCodeAt(g.position);for(;G!==0;){for(;k(G);)G===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),G=g.input.charCodeAt(++g.position);if(I&&G===35)do G=g.input.charCodeAt(++g.position);while(G!==10&&G!==13&&G!==0);if(b(G))for(Nt(g),G=g.input.charCodeAt(g.position),K++,g.lineIndent=0;G===32;)g.lineIndent++,G=g.input.charCodeAt(++g.position);else break}return X!==-1&&K!==0&&g.lineIndent<X&&P(g,"deficient indentation"),K}p(Bt,"skipSeparationSpace");function ut(g){let I=g.position,X=g.input.charCodeAt(I);return!!((X===45||X===46)&&X===g.input.charCodeAt(I+1)&&X===g.input.charCodeAt(I+2)&&(I+=3,X=g.input.charCodeAt(I),X===0||T(X)))}p(ut,"testDocumentSeparator");function bt(g,I){I===1?g.result+=" ":I>1&&(g.result+=e.repeat(`
|
|
139
|
+
`,I-1))}p(bt,"writeFoldedLines");function Mt(g,I,X){let K,G,st,S,W,rt;const Z=g.kind,Q=g.result;let it=g.input.charCodeAt(g.position);if(T(it)||B(it)||it===35||it===38||it===42||it===33||it===124||it===62||it===39||it===34||it===37||it===64||it===96)return!1;if(it===63||it===45){const et=g.input.charCodeAt(g.position+1);if(T(et)||X&&B(et))return!1}for(g.kind="scalar",g.result="",K=G=g.position,st=!1;it!==0;){if(it===58){const et=g.input.charCodeAt(g.position+1);if(T(et)||X&&B(et))break}else if(it===35){const et=g.input.charCodeAt(g.position-1);if(T(et))break}else{if(g.position===g.lineStart&&ut(g)||X&&B(it))break;if(b(it))if(S=g.line,W=g.lineStart,rt=g.lineIndent,Bt(g,!1,-1),g.lineIndent>=I){st=!0,it=g.input.charCodeAt(g.position);continue}else{g.position=G,g.line=S,g.lineStart=W,g.lineIndent=rt;break}}st&&(wt(g,K,G,!1),bt(g,g.line-S),K=G=g.position,st=!1),k(it)||(G=g.position+1),it=g.input.charCodeAt(++g.position)}return wt(g,K,G,!1),g.result?!0:(g.kind=Z,g.result=Q,!1)}p(Mt,"readPlainScalar");function Rt(g,I){let X,K,G=g.input.charCodeAt(g.position);if(G!==39)return!1;for(g.kind="scalar",g.result="",g.position++,X=K=g.position;(G=g.input.charCodeAt(g.position))!==0;)if(G===39)if(wt(g,X,g.position,!0),G=g.input.charCodeAt(++g.position),G===39)X=g.position,g.position++,K=g.position;else return!0;else b(G)?(wt(g,X,K,!0),bt(g,Bt(g,!1,I)),X=K=g.position):g.position===g.lineStart&&ut(g)?v(g,"unexpected end of the document within a single quoted scalar"):(g.position++,k(G)||(K=g.position));v(g,"unexpected end of the stream within a single quoted scalar")}p(Rt,"readSingleQuotedScalar");function Lt(g,I){let X,K,G,st=g.input.charCodeAt(g.position);if(st!==34)return!1;for(g.kind="scalar",g.result="",g.position++,X=K=g.position;(st=g.input.charCodeAt(g.position))!==0;){if(st===34)return wt(g,X,g.position,!0),g.position++,!0;if(st===92){if(wt(g,X,g.position,!0),st=g.input.charCodeAt(++g.position),b(st))Bt(g,!1,I);else if(st<256&&tt[st])g.result+=N[st],g.position++;else if((G=A(st))>0){let S=G,W=0;for(;S>0;S--)st=g.input.charCodeAt(++g.position),(G=L(st))>=0?W=(W<<4)+G:v(g,"expected hexadecimal character");g.result+=R(W),g.position++}else v(g,"unknown escape sequence");X=K=g.position}else b(st)?(wt(g,X,K,!0),bt(g,Bt(g,!1,I)),X=K=g.position):g.position===g.lineStart&&ut(g)?v(g,"unexpected end of the document within a double quoted scalar"):(g.position++,k(st)||(K=g.position))}v(g,"unexpected end of the stream within a double quoted scalar")}p(Lt,"readDoubleQuotedScalar");function H(g,I){let X=!0,K,G,st;const S=g.tag;let W;const rt=g.anchor;let Z,Q,it,et;const xt=Object.create(null);let gt,_t,vt,Wt=g.input.charCodeAt(g.position);if(Wt===91)Z=93,et=!1,W=[];else if(Wt===123)Z=125,et=!0,W={};else return!1;for(g.anchor!==null&&$(g,g.anchor,W),Wt=g.input.charCodeAt(++g.position);Wt!==0;){if(Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),Wt===Z)return g.position++,g.tag=S,g.anchor=rt,g.kind=et?"mapping":"sequence",g.result=W,!0;if(X?Wt===44&&v(g,"expected the node content, but found ','"):v(g,"missed comma between flow collection entries"),_t=gt=vt=null,Q=it=!1,Wt===63){const Xt=g.input.charCodeAt(g.position+1);T(Xt)&&(Q=it=!0,g.position++,Bt(g,!0,I))}K=g.line,G=g.lineStart,st=g.position,be(g,I,a,!1,!0),_t=g.tag,gt=g.result,Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),(it||g.line===K)&&Wt===58&&(Q=!0,Wt=g.input.charCodeAt(++g.position),Bt(g,!0,I),be(g,I,a,!1,!0),vt=g.result),et?Et(g,W,xt,_t,gt,vt,K,G,st):Q?W.push(Et(g,null,xt,_t,gt,vt,K,G,st)):W.push(gt),Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),Wt===44?(X=!0,Wt=g.input.charCodeAt(++g.position)):X=!1}v(g,"unexpected end of the stream within a flow collection")}p(H,"readFlowCollection");function kt(g,I){let X,K=h,G=!1,st=!1,S=I,W=0,rt=!1,Z,Q=g.input.charCodeAt(g.position);if(Q===124)X=!1;else if(Q===62)X=!0;else return!1;for(g.kind="scalar",g.result="";Q!==0;)if(Q=g.input.charCodeAt(++g.position),Q===43||Q===45)h===K?K=Q===43?u:l:v(g,"repeat of a chomping mode identifier");else if((Z=F(Q))>=0)Z===0?v(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):st?v(g,"repeat of an indentation width identifier"):(S=I+Z-1,st=!0);else break;if(k(Q)){do Q=g.input.charCodeAt(++g.position);while(k(Q));if(Q===35)do Q=g.input.charCodeAt(++g.position);while(!b(Q)&&Q!==0)}for(;Q!==0;){for(Nt(g),g.lineIndent=0,Q=g.input.charCodeAt(g.position);(!st||g.lineIndent<S)&&Q===32;)g.lineIndent++,Q=g.input.charCodeAt(++g.position);if(!st&&g.lineIndent>S&&(S=g.lineIndent),b(Q)){W++;continue}if(!st&&S===0&&v(g,"missing indentation for block scalar"),g.lineIndent<S){K===u?g.result+=e.repeat(`
|
|
140
|
+
`,G?1+W:W):K===h&&G&&(g.result+=`
|
|
141
|
+
`);break}X?k(Q)?(rt=!0,g.result+=e.repeat(`
|
|
142
|
+
`,G?1+W:W)):rt?(rt=!1,g.result+=e.repeat(`
|
|
143
|
+
`,W+1)):W===0?G&&(g.result+=" "):g.result+=e.repeat(`
|
|
144
|
+
`,W):g.result+=e.repeat(`
|
|
145
|
+
`,G?1+W:W),G=!0,st=!0,W=0;const it=g.position;for(;!b(Q)&&Q!==0;)Q=g.input.charCodeAt(++g.position);wt(g,it,g.position,!1)}return!0}p(kt,"readBlockScalar");function xe(g,I){const X=g.tag,K=g.anchor,G=[];let st=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&$(g,g.anchor,G);let S=g.input.charCodeAt(g.position);for(;S!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation")),S===45);){const W=g.input.charCodeAt(g.position+1);if(!T(W))break;if(st=!0,g.position++,Bt(g,!0,-1)&&g.lineIndent<=I){G.push(null),S=g.input.charCodeAt(g.position);continue}const rt=g.line;if(be(g,I,n,!1,!0),G.push(g.result),Bt(g,!0,-1),S=g.input.charCodeAt(g.position),(g.line===rt||g.lineIndent>I)&&S!==0)v(g,"bad indentation of a sequence entry");else if(g.lineIndent<I)break}return st?(g.tag=X,g.anchor=K,g.kind="sequence",g.result=G,!0):!1}p(xe,"readBlockSequence");function te(g,I,X){let K,G,st,S;const W=g.tag,rt=g.anchor,Z={},Q=Object.create(null);let it=null,et=null,xt=null,gt=!1,_t=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&$(g,g.anchor,Z);let vt=g.input.charCodeAt(g.position);for(;vt!==0;){!gt&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation"));const Wt=g.input.charCodeAt(g.position+1),Xt=g.line;if((vt===63||vt===58)&&T(Wt))vt===63?(gt&&(Et(g,Z,Q,it,et,null,G,st,S),it=et=xt=null),_t=!0,gt=!0,K=!0):gt?(gt=!1,K=!0):v(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,vt=Wt;else{if(G=g.line,st=g.lineStart,S=g.position,!be(g,X,o,!1,!0))break;if(g.line===Xt){for(vt=g.input.charCodeAt(g.position);k(vt);)vt=g.input.charCodeAt(++g.position);if(vt===58)vt=g.input.charCodeAt(++g.position),T(vt)||v(g,"a whitespace character is expected after the key-value separator within a block mapping"),gt&&(Et(g,Z,Q,it,et,null,G,st,S),it=et=xt=null),_t=!0,gt=!1,K=!1,it=g.tag,et=g.result;else if(_t)v(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=W,g.anchor=rt,!0}else if(_t)v(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=W,g.anchor=rt,!0}if((g.line===Xt||g.lineIndent>I)&&(gt&&(G=g.line,st=g.lineStart,S=g.position),be(g,I,c,!0,K)&&(gt?et=g.result:xt=g.result),gt||(Et(g,Z,Q,it,et,xt,G,st,S),it=et=xt=null),Bt(g,!0,-1),vt=g.input.charCodeAt(g.position)),(g.line===Xt||g.lineIndent>I)&&vt!==0)v(g,"bad indentation of a mapping entry");else if(g.lineIndent<I)break}return gt&&Et(g,Z,Q,it,et,null,G,st,S),_t&&(g.tag=W,g.anchor=rt,g.kind="mapping",g.result=Z),_t}p(te,"readBlockMapping");function Ue(g){let I=!1,X=!1,K,G,st=g.input.charCodeAt(g.position);if(st!==33)return!1;g.tag!==null&&v(g,"duplication of a tag property"),st=g.input.charCodeAt(++g.position),st===60?(I=!0,st=g.input.charCodeAt(++g.position)):st===33?(X=!0,K="!!",st=g.input.charCodeAt(++g.position)):K="!";let S=g.position;if(I){do st=g.input.charCodeAt(++g.position);while(st!==0&&st!==62);g.position<g.length?(G=g.input.slice(S,g.position),st=g.input.charCodeAt(++g.position)):v(g,"unexpected end of the stream within a verbatim tag")}else{for(;st!==0&&!T(st);)st===33&&(X?v(g,"tag suffix cannot contain exclamation marks"):(K=g.input.slice(S-1,g.position+1),y.test(K)||v(g,"named tag handle cannot contain such characters"),X=!0,S=g.position+1)),st=g.input.charCodeAt(++g.position);G=g.input.slice(S,g.position),m.test(G)&&v(g,"tag suffix cannot contain flow indicator characters")}G&&!C.test(G)&&v(g,"tag name cannot contain such characters: "+G);try{G=decodeURIComponent(G)}catch{v(g,"tag name is malformed: "+G)}return I?g.tag=G:s.call(g.tagMap,K)?g.tag=g.tagMap[K]+G:K==="!"?g.tag="!"+G:K==="!!"?g.tag="tag:yaml.org,2002:"+G:v(g,'undeclared tag handle "'+K+'"'),!0}p(Ue,"readTagProperty");function pr(g){let I=g.input.charCodeAt(g.position);if(I!==38)return!1;g.anchor!==null&&v(g,"duplication of an anchor property"),I=g.input.charCodeAt(++g.position);const X=g.position;for(;I!==0&&!T(I)&&!B(I);)I=g.input.charCodeAt(++g.position);return g.position===X&&v(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(X,g.position),!0}p(pr,"readAnchorProperty");function Ce(g){let I=g.input.charCodeAt(g.position);if(I!==42)return!1;I=g.input.charCodeAt(++g.position);const X=g.position;for(;I!==0&&!T(I)&&!B(I);)I=g.input.charCodeAt(++g.position);g.position===X&&v(g,"name of an alias node must contain at least one character");const K=g.input.slice(X,g.position);return s.call(g.anchorMap,K)||v(g,'unidentified alias "'+K+'"'),g.result=g.anchorMap[K],Bt(g,!0,-1),!0}p(Ce,"readAlias");function Br(g,I,X,K){const G=lt(g);return j(g),mt(g,I),g.tag=null,g.anchor=null,g.kind=null,g.result=null,te(g,X,K)&&g.kind==="mapping"?(V(g),!0):(dt(g),mt(g,G),!1)}p(Br,"tryReadBlockMappingFromProperty");function be(g,I,X,K,G){let st,S,W=1,rt=!1,Z=!1,Q=null,it,et,xt;g.depth>=g.maxDepth&&v(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const gt=st=S=c===X||n===X;if(K&&Bt(g,!0,-1)&&(rt=!0,g.lineIndent>I?W=1:g.lineIndent===I?W=0:g.lineIndent<I&&(W=-1)),W===1)for(;;){const _t=g.input.charCodeAt(g.position),vt=lt(g);if(rt&&(_t===33&&g.tag!==null||_t===38&&g.anchor!==null)||!Ue(g)&&!pr(g))break;Q===null&&(Q=vt),Bt(g,!0,-1)?(rt=!0,S=gt,g.lineIndent>I?W=1:g.lineIndent===I?W=0:g.lineIndent<I&&(W=-1)):S=!1}if(S&&(S=rt||G),W===1||c===X)if(a===X||o===X?et=I:et=I+1,xt=g.position-g.lineStart,W===1)if(S&&(xe(g,xt)||te(g,xt,et))||H(g,et))Z=!0;else{const _t=g.input.charCodeAt(g.position);Q!==null&>&&!S&&_t!==124&&_t!==62&&Br(g,Q,Q.position-Q.lineStart,et)||st&&kt(g,et)||Rt(g,et)||Lt(g,et)?Z=!0:Ce(g)?(Z=!0,(g.tag!==null||g.anchor!==null)&&v(g,"alias node should not have any properties")):Mt(g,et,a===X)&&(Z=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&$(g,g.anchor,g.result)}else W===0&&(Z=S&&xe(g,xt));if(g.tag===null)g.anchor!==null&&$(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&v(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let _t=0,vt=g.implicitTypes.length;_t<vt;_t+=1)if(it=g.implicitTypes[_t],it.resolve(g.result)){g.result=it.construct(g.result),g.tag=it.tag,g.anchor!==null&&$(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))it=g.typeMap[g.kind||"fallback"][g.tag];else{it=null;const _t=g.typeMap.multi[g.kind||"fallback"];for(let vt=0,Wt=_t.length;vt<Wt;vt+=1)if(g.tag.slice(0,_t[vt].tag.length)===_t[vt].tag){it=_t[vt];break}}it||v(g,"unknown tag !<"+g.tag+">"),g.result!==null&&it.kind!==g.kind&&v(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+it.kind+'", not "'+g.kind+'"'),it.resolve(g.result,g.tag)?(g.result=it.construct(g.result,g.tag),g.anchor!==null&&$(g,g.anchor,g.result)):v(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||Z}p(be,"composeNode");function vr(g){const I=g.position;let X=!1,K;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(K=g.input.charCodeAt(g.position))!==0&&(Bt(g,!0,-1),K=g.input.charCodeAt(g.position),!(g.lineIndent>0||K!==37));){X=!0,K=g.input.charCodeAt(++g.position);let G=g.position;for(;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);const st=g.input.slice(G,g.position),S=[];for(st.length<1&&v(g,"directive name must not be less than one character in length");K!==0;){for(;k(K);)K=g.input.charCodeAt(++g.position);if(K===35){do K=g.input.charCodeAt(++g.position);while(K!==0&&!b(K));break}if(b(K))break;for(G=g.position;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);S.push(g.input.slice(G,g.position))}K!==0&&Nt(g),s.call(nt,st)?nt[st](g,st,S):P(g,'unknown document directive "'+st+'"')}if(Bt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,Bt(g,!0,-1)):X&&v(g,"directives end mark is expected"),be(g,g.lineIndent-1,c,!1,!0),Bt(g,!0,-1),g.checkLineBreaks&&d.test(g.input.slice(I,g.position))&&P(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&ut(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,Bt(g,!0,-1));return}g.position<g.length-1&&v(g,"end of the stream or a document separator is expected")}p(vr,"readDocument");function gr(g,I){g=String(g),I=I||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
146
|
+
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const X=new E(g,I),K=g.indexOf("\0");for(K!==-1&&(X.position=K,v(X,"null byte is not allowed in input")),X.input+="\0";X.input.charCodeAt(X.position)===32;)X.lineIndent+=1,X.position+=1;for(;X.position<X.length-1;)vr(X);return X.documents}p(gr,"loadDocuments");function ke(g,I,X){I!==null&&typeof I=="object"&&typeof X>"u"&&(X=I,I=null);const K=gr(g,X);if(typeof I!="function")return K;for(let G=0,st=K.length;G<st;G+=1)I(K[G])}p(ke,"loadAll2");function Fe(g,I){const X=gr(g,I);if(X.length!==0){if(X.length===1)return X[0];throw new t("expected a single document in the stream, but found more")}}return p(Fe,"load2"),Ks.loadAll=ke,Ks.load=Fe,Ks}p(vf,"requireLoader");var Qo={},Xc;function Lf(){if(Xc)return Qo;Xc=1;const e=Hi(),t=Yi(),r=ro(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,c=13,h=32,l=33,u=34,f=35,d=37,m=38,y=39,C=42,x=44,b=45,k=58,T=61,B=62,L=63,A=64,F=91,z=93,R=96,q=123,tt=124,N=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function P(S,W){if(W===null)return{};const rt={},Z=Object.keys(W);for(let Q=0,it=Z.length;Q<it;Q+=1){let et=Z[Q],xt=String(W[et]);et.slice(0,2)==="!!"&&(et="tag:yaml.org,2002:"+et.slice(2));const gt=S.compiledTypeMap.fallback[et];gt&&s.call(gt.styleAliases,xt)&&(xt=gt.styleAliases[xt]),rt[et]=xt}return rt}p(P,"compileStyleMap");function $(S){let W,rt;const Z=S.toString(16).toUpperCase();if(S<=255)W="x",rt=2;else if(S<=65535)W="u",rt=4;else if(S<=4294967295)W="U",rt=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+W+e.repeat("0",rt-Z.length)+Z}p($,"encodeHex");const j=1,V=2;function dt(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=P(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?V:j,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(dt,"State");function lt(S,W){const rt=e.repeat(" ",W);let Z=0,Q="";const it=S.length;for(;Z<it;){let et;const xt=S.indexOf(`
|
|
147
|
+
`,Z);xt===-1?(et=S.slice(Z),Z=it):(et=S.slice(Z,xt+1),Z=xt+1),et.length&&et!==`
|
|
148
|
+
`&&(Q+=rt),Q+=et}return Q}p(lt,"indentString");function mt(S,W){return`
|
|
149
|
+
`+e.repeat(" ",S.indent*W)}p(mt,"generateNextLine");function nt(S,W){for(let rt=0,Z=S.implicitTypes.length;rt<Z;rt+=1)if(S.implicitTypes[rt].resolve(W))return!0;return!1}p(nt,"testImplicitResolving");function wt(S){return S===h||S===o}p(wt,"isWhitespace");function At(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}p(At,"isPrintable");function Et(S){return At(S)&&S!==a&&S!==c&&S!==n}p(Et,"isNsCharOrWhitespace");function Nt(S,W,rt){const Z=Et(S),Q=Z&&!wt(S);return(rt?Z:Z&&S!==x&&S!==F&&S!==z&&S!==q&&S!==N)&&S!==f&&!(W===k&&!Q)||Et(W)&&!wt(W)&&S===f||W===k&&Q}p(Nt,"isPlainSafe");function Bt(S){return At(S)&&S!==a&&!wt(S)&&S!==b&&S!==L&&S!==k&&S!==x&&S!==F&&S!==z&&S!==q&&S!==N&&S!==f&&S!==m&&S!==C&&S!==l&&S!==tt&&S!==T&&S!==B&&S!==y&&S!==u&&S!==d&&S!==A&&S!==R}p(Bt,"isPlainSafeFirst");function ut(S){return!wt(S)&&S!==k}p(ut,"isPlainSafeLast");function bt(S,W){const rt=S.charCodeAt(W);let Z;return rt>=55296&&rt<=56319&&W+1<S.length&&(Z=S.charCodeAt(W+1),Z>=56320&&Z<=57343)?(rt-55296)*1024+Z-56320+65536:rt}p(bt,"codePointAt");function Mt(S){return/^\n* /.test(S)}p(Mt,"needIndentIndicator");const Rt=1,Lt=2,H=3,kt=4,xe=5;function te(S,W,rt,Z,Q,it,et,xt){let gt,_t=0,vt=null,Wt=!1,Xt=!1;const Xi=Z!==-1;let Je=-1,tr=Bt(bt(S,0))&&ut(bt(S,S.length-1));if(W||et)for(gt=0;gt<S.length;_t>=65536?gt+=2:gt++){if(_t=bt(S,gt),!At(_t))return xe;tr=tr&&Nt(_t,vt,xt),vt=_t}else{for(gt=0;gt<S.length;_t>=65536?gt+=2:gt++){if(_t=bt(S,gt),_t===n)Wt=!0,Xi&&(Xt=Xt||gt-Je-1>Z&&S[Je+1]!==" ",Je=gt);else if(!At(_t))return xe;tr=tr&&Nt(_t,vt,xt),vt=_t}Xt=Xt||Xi&>-Je-1>Z&&S[Je+1]!==" "}return!Wt&&!Xt?tr&&!et&&!Q(S)?Rt:it===V?xe:Lt:rt>9&&Mt(S)?xe:et?it===V?xe:Lt:Xt?kt:H}p(te,"chooseScalarStyle");function Ue(S,W,rt,Z,Q){S.dump=(function(){if(W.length===0)return S.quotingType===V?'""':"''";if(!S.noCompatMode&&(M.indexOf(W)!==-1||v.test(W)))return S.quotingType===V?'"'+W+'"':"'"+W+"'";const it=S.indent*Math.max(1,rt),et=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-it),xt=Z||S.flowLevel>-1&&rt>=S.flowLevel;function gt(_t){return nt(S,_t)}switch(p(gt,"testAmbiguity"),te(W,xt,S.indent,et,gt,S.quotingType,S.forceQuotes&&!Z,Q)){case Rt:return W;case Lt:return"'"+W.replace(/'/g,"''")+"'";case H:return"|"+pr(W,S.indent)+Ce(lt(W,it));case kt:return">"+pr(W,S.indent)+Ce(lt(Br(W,et),it));case xe:return'"'+vr(W)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(Ue,"writeScalar");function pr(S,W){const rt=Mt(S)?String(W):"",Z=S[S.length-1]===`
|
|
150
|
+
`,it=Z&&(S[S.length-2]===`
|
|
151
|
+
`||S===`
|
|
152
|
+
`)?"+":Z?"":"-";return rt+it+`
|
|
153
|
+
`}p(pr,"blockHeader");function Ce(S){return S[S.length-1]===`
|
|
154
|
+
`?S.slice(0,-1):S}p(Ce,"dropEndingNewline");function Br(S,W){const rt=/(\n+)([^\n]*)/g;let Z=(function(){let xt=S.indexOf(`
|
|
155
|
+
`);return xt=xt!==-1?xt:S.length,rt.lastIndex=xt,be(S.slice(0,xt),W)})(),Q=S[0]===`
|
|
156
|
+
`||S[0]===" ",it,et;for(;et=rt.exec(S);){const xt=et[1],gt=et[2];it=gt[0]===" ",Z+=xt+(!Q&&!it&>!==""?`
|
|
157
|
+
`:"")+be(gt,W),Q=it}return Z}p(Br,"foldString");function be(S,W){if(S===""||S[0]===" ")return S;const rt=/ [^ ]/g;let Z,Q=0,it,et=0,xt=0,gt="";for(;Z=rt.exec(S);)xt=Z.index,xt-Q>W&&(it=et>Q?et:xt,gt+=`
|
|
158
|
+
`+S.slice(Q,it),Q=it+1),et=xt;return gt+=`
|
|
159
|
+
`,S.length-Q>W&&et>Q?gt+=S.slice(Q,et)+`
|
|
160
|
+
`+S.slice(et+1):gt+=S.slice(Q),gt.slice(1)}p(be,"foldLine");function vr(S){let W="",rt=0;for(let Z=0;Z<S.length;rt>=65536?Z+=2:Z++){rt=bt(S,Z);const Q=E[rt];!Q&&At(rt)?(W+=S[Z],rt>=65536&&(W+=S[Z+1])):W+=Q||$(rt)}return W}p(vr,"escapeString");function gr(S,W,rt){let Z="";const Q=S.tag;for(let it=0,et=rt.length;it<et;it+=1){let xt=rt[it];S.replacer&&(xt=S.replacer.call(rt,String(it),xt)),(X(S,W,xt,!1,!1)||typeof xt>"u"&&X(S,W,null,!1,!1))&&(Z!==""&&(Z+=","+(S.condenseFlow?"":" ")),Z+=S.dump)}S.tag=Q,S.dump="["+Z+"]"}p(gr,"writeFlowSequence");function ke(S,W,rt,Z){let Q="";const it=S.tag;for(let et=0,xt=rt.length;et<xt;et+=1){let gt=rt[et];S.replacer&&(gt=S.replacer.call(rt,String(et),gt)),(X(S,W+1,gt,!0,!0,!1,!0)||typeof gt>"u"&&X(S,W+1,null,!0,!0,!1,!0))&&((!Z||Q!=="")&&(Q+=mt(S,W)),S.dump&&n===S.dump.charCodeAt(0)?Q+="-":Q+="- ",Q+=S.dump)}S.tag=it,S.dump=Q||"[]"}p(ke,"writeBlockSequence");function Fe(S,W,rt){let Z="";const Q=S.tag,it=Object.keys(rt);for(let et=0,xt=it.length;et<xt;et+=1){let gt="";Z!==""&&(gt+=", "),S.condenseFlow&&(gt+='"');const _t=it[et];let vt=rt[_t];S.replacer&&(vt=S.replacer.call(rt,_t,vt)),X(S,W,_t,!1,!1)&&(S.dump.length>1024&&(gt+="? "),gt+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),X(S,W,vt,!1,!1)&&(gt+=S.dump,Z+=gt))}S.tag=Q,S.dump="{"+Z+"}"}p(Fe,"writeFlowMapping");function g(S,W,rt,Z){let Q="";const it=S.tag,et=Object.keys(rt);if(S.sortKeys===!0)et.sort();else if(typeof S.sortKeys=="function")et.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let xt=0,gt=et.length;xt<gt;xt+=1){let _t="";(!Z||Q!=="")&&(_t+=mt(S,W));const vt=et[xt];let Wt=rt[vt];if(S.replacer&&(Wt=S.replacer.call(rt,vt,Wt)),!X(S,W+1,vt,!0,!0,!0))continue;const Xt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Xt&&(S.dump&&n===S.dump.charCodeAt(0)?_t+="?":_t+="? "),_t+=S.dump,Xt&&(_t+=mt(S,W)),X(S,W+1,Wt,!0,Xt)&&(S.dump&&n===S.dump.charCodeAt(0)?_t+=":":_t+=": ",_t+=S.dump,Q+=_t)}S.tag=it,S.dump=Q||"{}"}p(g,"writeBlockMapping");function I(S,W,rt){const Z=rt?S.explicitTypes:S.implicitTypes;for(let Q=0,it=Z.length;Q<it;Q+=1){const et=Z[Q];if((et.instanceOf||et.predicate)&&(!et.instanceOf||typeof W=="object"&&W instanceof et.instanceOf)&&(!et.predicate||et.predicate(W))){if(rt?et.multi&&et.representName?S.tag=et.representName(W):S.tag=et.tag:S.tag="?",et.represent){const xt=S.styleMap[et.tag]||et.defaultStyle;let gt;if(i.call(et.represent)==="[object Function]")gt=et.represent(W,xt);else if(s.call(et.represent,xt))gt=et.represent[xt](W,xt);else throw new t("!<"+et.tag+'> tag resolver accepts not "'+xt+'" style');S.dump=gt}return!0}}return!1}p(I,"detectType");function X(S,W,rt,Z,Q,it,et){S.tag=null,S.dump=rt,I(S,rt,!1)||I(S,rt,!0);const xt=i.call(S.dump),gt=Z;Z&&(Z=S.flowLevel<0||S.flowLevel>W);const _t=xt==="[object Object]"||xt==="[object Array]";let vt,Wt;if(_t&&(vt=S.duplicates.indexOf(rt),Wt=vt!==-1),(S.tag!==null&&S.tag!=="?"||Wt||S.indent!==2&&W>0)&&(Q=!1),Wt&&S.usedDuplicates[vt])S.dump="*ref_"+vt;else{if(_t&&Wt&&!S.usedDuplicates[vt]&&(S.usedDuplicates[vt]=!0),xt==="[object Object]")Z&&Object.keys(S.dump).length!==0?(g(S,W,S.dump,Q),Wt&&(S.dump="&ref_"+vt+S.dump)):(Fe(S,W,S.dump),Wt&&(S.dump="&ref_"+vt+" "+S.dump));else if(xt==="[object Array]")Z&&S.dump.length!==0?(S.noArrayIndent&&!et&&W>0?ke(S,W-1,S.dump,Q):ke(S,W,S.dump,Q),Wt&&(S.dump="&ref_"+vt+S.dump)):(gr(S,W,S.dump),Wt&&(S.dump="&ref_"+vt+" "+S.dump));else if(xt==="[object String]")S.tag!=="?"&&Ue(S,S.dump,W,it,gt);else{if(xt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+xt)}if(S.tag!==null&&S.tag!=="?"){let Xt=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?Xt="!"+Xt:Xt.slice(0,18)==="tag:yaml.org,2002:"?Xt="!!"+Xt.slice(18):Xt="!<"+Xt+">",S.dump=Xt+" "+S.dump}}return!0}p(X,"writeNode");function K(S,W){const rt=[],Z=[];G(S,rt,Z);const Q=Z.length;for(let it=0;it<Q;it+=1)W.duplicates.push(rt[Z[it]]);W.usedDuplicates=new Array(Q)}p(K,"getDuplicateReferences");function G(S,W,rt){if(S!==null&&typeof S=="object"){const Z=W.indexOf(S);if(Z!==-1)rt.indexOf(Z)===-1&&rt.push(Z);else if(W.push(S),Array.isArray(S))for(let Q=0,it=S.length;Q<it;Q+=1)G(S[Q],W,rt);else{const Q=Object.keys(S);for(let it=0,et=Q.length;it<et;it+=1)G(S[Q[it]],W,rt)}}}p(G,"inspectNode");function st(S,W){W=W||{};const rt=new dt(W);rt.noRefs||K(S,rt);let Z=S;return rt.replacer&&(Z=rt.replacer.call({"":Z},"",Z)),X(rt,0,Z,!0,!0)?rt.dump+`
|
|
161
|
+
`:""}return p(st,"dump2"),Qo.dump=st,Qo}p(Lf,"requireDumper");var Vc;function Ff(){if(Vc)return fe;Vc=1;const e=vf(),t=Lf();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),fe.Type=ye(),fe.Schema=Tl(),fe.FAILSAFE_SCHEMA=Ll(),fe.JSON_SCHEMA=$l(),fe.CORE_SCHEMA=Ol(),fe.DEFAULT_SCHEMA=ro(),fe.load=e.load,fe.loadAll=e.loadAll,fe.dump=t.dump,fe.YAMLException=Yi(),fe.types={binary:Pl(),float:Ml(),map:vl(),null:Fl(),pairs:ql(),set:Nl(),timestamp:Il(),bool:Al(),int:El(),merge:Dl(),omap:Rl(),seq:Bl(),str:_l()},fe.safeLoad=r("safeLoad","load"),fe.safeLoadAll=r("safeLoadAll","loadAll"),fe.safeDump=r("safeDump","dump"),fe}p(Ff,"requireJsYaml");var T1=Ff(),_1=_f(T1),{Type:iF,Schema:sF,FAILSAFE_SCHEMA:aF,JSON_SCHEMA:B1,CORE_SCHEMA:oF,DEFAULT_SCHEMA:nF,load:v1,loadAll:lF,dump:hF,YAMLException:cF,types:uF,safeLoad:dF,safeLoadAll:fF,safeDump:pF}=_1,L1=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:a,gradientStop:o}=i??{},n=e.attr("id"),c=r!=null&&r.includes("dark")?"#FFFFFF":"#000000",h=p((u,f,d)=>e.append("defs").append("filter").attr("id",u).attr("height",f).attr("width",f).append("feDropShadow").attr("dx",d).attr("dy",d).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",c),"dropShadow");if(h(`${n}-drop-shadow`,"130%","4"),h(`${n}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");l.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)},"insertLookDefs"),F1=p(e=>{const{handDrawnSeed:t}=Pt();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),A1=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Wr=p(e=>{const t=E1([...e.cssCompiledStyles||[],...e.cssStyles||[],...A1(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),E1=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Af=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),yt=p(e=>{const{stylesArray:t}=Wr(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Af(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),ft=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=Pt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Wr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:o.get("stroke")||s,seed:i,strokeWidth:((c=o.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:M1(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),M1=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const $1=Object.freeze({left:0,top:0,width:16,height:16}),Pa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ef=Object.freeze({...$1,...Pa}),O1=Object.freeze({...Ef,body:"",hidden:!1}),I1=Object.freeze({width:null,height:null}),D1=Object.freeze({...I1,...Pa}),P1=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),c=s.pop(),h={provider:s.length>0?s[0]:i,prefix:c,name:n};return Jo(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Jo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Jo(n,r)?n:null}return null},Jo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function R1(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Zc(e,t){const r=R1(e,t);for(const i in O1)i in Pa?i in e&&!(i in r)&&(r[i]=Pa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function q1(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,c=n&&a(n);c&&(s[o]=[n].concat(c))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Kc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Zc(i[n]||s[n],a)}return o(t),r.forEach(o),Zc(e,a)}function N1(e,t){if(e.icons[t])return Kc(e,t,[]);const r=q1(e,[t])[t];return r?Kc(e,t,r):null}const W1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,z1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Qc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(W1);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=z1.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function H1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Y1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function U1(e,t,r){const i=H1(e);return Y1(i.defs,t+i.content+r)}const j1=e=>e==="unset"||e==="undefined"||e==="none";function G1(e,t){const r={...Ef,...e},i={...D1,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,b=y.vFlip;let k=y.rotate;x?b?k+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):b&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}k%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(a=U1(a,'<g transform="'+C.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,c=s.width,h=s.height;let l,u;o===null?(u=n===null?"1em":n==="auto"?h:n,l=Qc(u,c/h)):(l=o==="auto"?c:o,u=n===null?Qc(l,h/c):n==="auto"?h:n);const f={},d=(y,C)=>{j1(C)||(f[y]=C.toString())};d("width",l),d("height",u);const m=[s.left,s.top,c,h];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:a}}const X1=/\sid="(\S+)"/g,Jc=new Map;function V1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Jc.get(e)||0;return Jc.set(e,t+1),t?`${e}${t}`:e}function Z1(e){const t=[];let r;for(;r=X1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=V1(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function K1(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Q1={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},In=new Map,Mf=new Map,J1=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(J.debug("Registering icon pack:",t.name),"loader"in t)Mf.set(t.name,t.loader);else if("icons"in t)In.set(t.name,t.icons);else throw J.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),$f=p(async(e,t)=>{const r=P1(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=In.get(i);if(!s){const o=Mf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},In.set(i,s)}catch(n){throw J.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=N1(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Of=p(async e=>{try{return await $f(e),!0}catch{return!1}},"isIconAvailable"),Ui=p(async(e,t,r)=>{let i;try{i=await $f(e,t==null?void 0:t.fallbackPrefix)}catch(o){J.error(o),i=Q1}const s=G1(i,t),a=K1(Z1(s.body),{...s.attributes,...r});return ze(a,Kt())},"getIconSVG"),Qs={},ne={},tu;function t2(){return tu||(tu=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.BLANK_URL=ne.relativeFirstCharacters=ne.whitespaceEscapeCharsRegex=ne.urlSchemeRegex=ne.ctrlCharactersRegex=ne.htmlCtrlEntityRegex=ne.htmlEntitiesRegex=ne.invalidProtocolRegex=void 0,ne.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ne.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ne.htmlCtrlEntityRegex=/&(newline|tab);/gi,ne.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ne.urlSchemeRegex=/^.+(:|:)/gim,ne.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ne.relativeFirstCharacters=[".","/"],ne.BLANK_URL="about:blank"),ne}var eu;function e2(){if(eu)return Qs;eu=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.sanitizeUrl=a;var e=t2();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(c,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,c=s(o.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=s(c),n=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=c;if(!h)return e.BLANK_URL;if(t(h))return h;var l=h.trimStart(),u=l.match(e.urlSchemeRegex);if(!u)return h;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=l.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Qs}var r2=e2();function tn(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function i2(){}function If(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Wl(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const s2="[object RegExp]",Df="[object String]",Pf="[object Number]",Rf="[object Boolean]",qf="[object Arguments]",a2="[object Symbol]",o2="[object Date]",n2="[object Map]",l2="[object Set]",h2="[object Array]",c2="[object ArrayBuffer]",u2="[object Object]",d2="[object DataView]",f2="[object Uint8Array]",p2="[object Uint8ClampedArray]",g2="[object Uint16Array]",m2="[object Uint32Array]",y2="[object Int8Array]",x2="[object Int16Array]",C2="[object Int32Array]",b2="[object Float32Array]",k2="[object Float64Array]",ru=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function zl(e){return typeof ru.Buffer<"u"&&ru.Buffer.isBuffer(e)}function w2(e){return Number.isSafeInteger(e)&&e>=0}function Nf(e){return e!=null&&typeof e!="function"&&w2(e.length)}function S2(e){return e==="__proto__"}function Hl(e){return e==null||typeof e!="object"&&typeof e!="function"}function Yl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function T2(e,t){return yi(e,void 0,e,new Map,t)}function yi(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Hl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=yi(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,c]of e)o.set(n,yi(c,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(yi(n,void 0,r,i,s));return o}if(zl(e))return e.subarray();if(Yl(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=yi(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),je(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,je(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(typeof e=="object"&&_2(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),je(o,e,r,i,s),o}return e}function je(e,t,r=e,i,s){const a=[...Object.keys(t),...If(t)];for(let o=0;o<a.length;o++){const n=a[o],c=Object.getOwnPropertyDescriptor(e,n);(c==null||c.writable)&&(e[n]=yi(t[n],n,r,i,s))}}function _2(e){switch(Wl(e)){case qf:case h2:case c2:case d2:case Rf:case o2:case b2:case k2:case y2:case x2:case C2:case n2:case Pf:case u2:case s2:case l2:case Df:case a2:case f2:case p2:case g2:case m2:return!0;default:return!1}}function B2(e,t){return T2(e,(r,i,s,a)=>{if(typeof e=="object"){if(Wl(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),je(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Pf:case Df:case Rf:{const o=new e.constructor(e==null?void 0:e.valueOf());return je(o,e),o}case qf:{const o={};return je(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function iu(e){return B2(e)}function Dn(e){return e!==null&&typeof e=="object"&&Wl(e)==="[object Arguments]"}function Pn(e){return typeof e=="object"&&e!==null}function v2(e){return Pn(e)&&Nf(e)}function ga(e){return Yl(e)}function L2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Ds(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Ds.Cache||Map),r}Ds.Cache=Map;function F2(e){if(Hl(e))return e;if(Array.isArray(e)||Yl(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function A2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=ma(s,o,i,new Map)}return s}function ma(e,t,r,i){if(Hl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return F2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...If(t)];for(let a=0;a<s.length;a++){const o=s[a];if(S2(o))continue;let n=t[o],c=e[o];if(Dn(n)&&(n={...n}),Dn(c)&&(c={...c}),zl(n)&&(n=iu(n)),Array.isArray(n))if(Array.isArray(c)){const l=[],u=Reflect.ownKeys(c);for(let f=0;f<u.length;f++){const d=u[f];l[d]=c[d]}c=l}else if(v2(c)){const l=[];for(let u=0;u<c.length;u++)l[u]=c[u];c=l}else c=[];const h=r(c,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||Pn(c)&&Pn(n)&&(tn(c)||tn(n)||ga(c)||ga(n))?e[o]=ma(c,n,r,i):c==null&&tn(n)?e[o]=ma({},n,r,i):c==null&&ga(n)?e[o]=iu(n):(c===void 0||n!==void 0)&&(e[o]=n)}return e}function E2(e,...t){return A2(e,...t,i2)}function su(e){if(e==null)return!0;if(Nf(e))return typeof e.splice!="function"&&typeof e!="string"&&!zl(e)&&!ga(e)&&!Dn(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return L2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var M2="",$2={curveBasis:On,curveBasisClosed:g1,curveBasisOpen:m1,curveBumpX:af,curveBumpY:of,curveBundle:y1,curveCardinalClosed:x1,curveCardinalOpen:C1,curveCardinal:cf,curveCatmullRomClosed:b1,curveCatmullRomOpen:k1,curveCatmullRom:df,curveLinear:ws,curveLinearClosed:w1,curveMonotoneX:xf,curveMonotoneY:Cf,curveNatural:kf,curveStep:wf,curveStepAfter:Tf,curveStepBefore:Sf},O2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,I2=p(function(e,t){const r=Wf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);wa(o),i=se(i,[...o])}else i=r.args;if(!i)return;let s=Za(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Wf=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${O2.source})(?=[}][%]{2}).*
|
|
162
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Cs.exec(e))!==null;)if(a.index===Cs.lastIndex&&Cs.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:c})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return J.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),D2=p(function(e){return e.replace(Cs,"")},"removeDirectives"),P2=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Ul(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return $2[r]??t}p(Ul,"interpolateToCurve");function zf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?r2.sanitizeUrl(r):r}p(zf,"formatUrl");var R2=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){J.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function jl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(jl,"distance");function Hf(e){let t,r=0;e.forEach(s=>{r+=jl(s,t),t=s});const i=r/2;return Gl(e,i)}p(Hf,"traverseEdge");function Yf(e){return e.length===1?e[0]:Hf(e)}p(Yf,"calcLabelPosition");var au=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Gl=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=jl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:au((1-o)*r.x+o*s.x,5),y:au((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),q2=p((e,t,r)=>{J.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Gl(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Uf(e,t,r){const i=structuredClone(r);J.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Gl(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2):(c.x=Math.sin(n)*o+(i[0].x+a.x)/2,c.y=-Math.cos(n)*o+(i[0].y+a.y)/2),c}p(Uf,"calcTerminalLabelPosition");function jf(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(jf,"getStylesFromArray");var ou=0,N2=p(()=>(ou++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ou),"generateId");function Gf(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Gf,"makeRandomHex");var W2=p(e=>Gf(e.length),"random"),z2=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),H2=p(function(e,t){const r=t.text.replace($s.lineBreakRegex," "),[,i]=io(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),Y2=Ds((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),$s.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const c=Tr(`${o} `,r),h=Tr(a,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=U2(o,t,"-",r);s.push(a,...f),a=d}else h+c>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),U2=Ds((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,c)=>{const h=`${o}${n}`;if(Tr(h,i)>=t){const u=c+1,f=s.length===u,d=`${h}${r}`;a.push(f?h:d),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Xf(e,t){return Xl(e,t).height}p(Xf,"calculateTextHeight");function Tr(e,t){return Xl(e,t).width}p(Tr,"calculateTextWidth");var Xl=Ds((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=io(r),o=["sans-serif",i],n=e.split($s.lineBreakRegex),c=[],h=Dt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const l=h.append("svg");for(const f of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const C=z2();C.text=y||M2;const x=H2(l,C).style("font-size",a).style("font-weight",s).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}c.push(m)}l.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ii,j2=(Ii=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ii,"InitIDGenerator"),Ii),Js,G2=p(function(e){return Js=Js||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Js.innerHTML=e,unescape(Js.textContent)},"entityDecode");function Vl(e){return"str"in e}p(Vl,"isDetailedError");function Vf(e){return e instanceof Error?e.message:String(e)}p(Vf,"getErrorMessage");var X2=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),io=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Zl(e,t){return E2({},e,t)}p(Zl,"cleanAndMerge");var We={assignWithDepth:se,wrapLabel:Y2,calculateTextHeight:Xf,calculateTextWidth:Tr,calculateTextDimensions:Xl,cleanAndMerge:Zl,detectInit:I2,detectDirective:Wf,isSubstringInArray:P2,interpolateToCurve:Ul,calcLabelPosition:Yf,calcCardinalityPosition:q2,calcTerminalLabelPosition:Uf,formatUrl:zf,getStylesFromArray:jf,generateId:N2,random:W2,runFunc:R2,entityDecode:G2,insertTitle:X2,isLabelCoordinateInPath:Zf,parseFontSize:io,InitIDGenerator:j2},V2=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Rr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),gF=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ae(e){return e??null}p(ae,"handleUndefinedAttr");function Zf(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Zf,"isLabelCoordinateInPath");function Kl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ii=Kl();function Kf(e){ii=e}var Ss={exec:()=>null};function jt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Te.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var Z2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},K2=/^(?:[ \t]*(?:\n|$))+/,Q2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,J2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ps=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ql=/(?:[*+-]|\d{1,9}[.)])/,Qf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jf=jt(Qf).replace(/bull/g,Ql).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ew=jt(Qf).replace(/bull/g,Ql).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rw=/^[^\n]+/,th=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,iw=jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",th).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sw=jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ql).getRegex(),so="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",eh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,aw=jt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",eh).replace("tag",so).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tp=jt(Jl).replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex(),ow=jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tp).getRegex(),rh={blockquote:ow,code:Q2,def:iw,fences:J2,heading:tw,hr:Ps,html:aw,lheading:Jf,list:sw,newline:K2,paragraph:tp,table:Ss,text:rw},nu=jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex(),nw={...rh,lheading:ew,table:nu,paragraph:jt(Jl).replace("hr",Ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",so).getRegex()},lw={...rh,html:jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",eh).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ss,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jt(Jl).replace("hr",Ps).replace("heading",` *#{1,6} *[^
|
|
163
|
+
]`).replace("lheading",Jf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ep=/^( {2,}|\\)\n(?!\s*$)/,uw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ao=/[\p{P}\p{S}]/u,ih=/[\s\p{P}\p{S}]/u,rp=/[^\s\p{P}\p{S}]/u,dw=jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ih).getRegex(),ip=/(?!~)[\p{P}\p{S}]/u,fw=/(?!~)[\s\p{P}\p{S}]/u,pw=/(?:[^\s\p{P}\p{S}]|~)/u,gw=jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Z2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mw=jt(sp,"u").replace(/punct/g,ao).getRegex(),yw=jt(sp,"u").replace(/punct/g,ip).getRegex(),ap="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xw=jt(ap,"gu").replace(/notPunctSpace/g,rp).replace(/punctSpace/g,ih).replace(/punct/g,ao).getRegex(),Cw=jt(ap,"gu").replace(/notPunctSpace/g,pw).replace(/punctSpace/g,fw).replace(/punct/g,ip).getRegex(),bw=jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rp).replace(/punctSpace/g,ih).replace(/punct/g,ao).getRegex(),kw=jt(/\\(punct)/,"gu").replace(/punct/g,ao).getRegex(),ww=jt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Sw=jt(eh).replace("(?:-->|$)","-->").getRegex(),Tw=jt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Sw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ra=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,_w=jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ra).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),op=jt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ra).replace("ref",th).getRegex(),np=jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",th).getRegex(),Bw=jt("reflink|nolink(?!\\()","g").replace("reflink",op).replace("nolink",np).getRegex(),lu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sh={_backpedal:Ss,anyPunctuation:kw,autolink:ww,blockSkip:gw,br:ep,code:cw,del:Ss,emStrongLDelim:mw,emStrongRDelimAst:xw,emStrongRDelimUnd:bw,escape:hw,link:_w,nolink:np,punctuation:dw,reflink:op,reflinkSearch:Bw,tag:Tw,text:uw,url:Ss},vw={...sh,link:jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ra).getRegex(),reflink:jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ra).getRegex()},Rn={...sh,emStrongRDelimAst:Cw,emStrongLDelim:yw,url:jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",lu).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",lu).getRegex()},Lw={...Rn,br:jt(ep).replace("{2,}","*").getRegex(),text:jt(Rn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ta={normal:rh,gfm:nw,pedantic:lw},es={normal:sh,gfm:Rn,breaks:Lw,pedantic:vw},Fw={"&":"&","<":"<",">":">",'"':""","'":"'"},hu=e=>Fw[e];function ir(e,t){if(t){if(Te.escapeTest.test(e))return e.replace(Te.escapeReplace,hu)}else if(Te.escapeTestNoEncode.test(e))return e.replace(Te.escapeReplaceNoEncode,hu);return e}function cu(e){try{e=encodeURI(e).replace(Te.percentDecode,"%")}catch{return null}return e}function uu(e,t){var a;let r=e.replace(Te.findPipe,(o,n,c)=>{let h=!1,l=n;for(;--l>=0&&c[l]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Te.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Te.slashPipe,"|");return i}function rs(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Aw(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function du(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,c}function Ew(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
164
|
+
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
|
|
165
|
+
`)}var qa=class{constructor(t){Vt(this,"options");Vt(this,"rules");Vt(this,"lexer");this.options=t||ii}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:rs(i,`
|
|
166
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Ew(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=rs(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:rs(r[0],`
|
|
167
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=rs(r[0],`
|
|
168
|
+
`).split(`
|
|
169
|
+
`),s="",a="",o=[];for(;i.length>0;){let n=!1,c=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))c.push(i[h]),n=!0;else if(!n)c.push(i[h]);else break;i=i.slice(h);let l=c.join(`
|
|
170
|
+
`),u=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
171
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
172
|
+
${l}`:l,a=a?`${a}
|
|
173
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,y=m.raw+`
|
|
174
|
+
`+i.join(`
|
|
175
|
+
`),C=this.blockquote(y);o[o.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,a=a.substring(0,a.length-m.text.length)+C.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,y=m.raw+`
|
|
176
|
+
`+i.join(`
|
|
177
|
+
`),C=this.list(y);o[o.length-1]=C,s=s.substring(0,s.length-d.raw.length)+C.raw,a=a.substring(0,a.length-m.raw.length)+C.raw,i=y.substring(o.at(-1).raw.length).split(`
|
|
178
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,l="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let f=r[2].split(`
|
|
179
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
180
|
+
`,1)[0],m=!f.trim(),y=0;if(this.options.pedantic?(y=2,u=f.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=f.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(l+=d+`
|
|
181
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let A=t.split(`
|
|
182
|
+
`,1)[0],F;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||B.test(d)||L.test(d)||b.test(d)||k.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
|
|
183
|
+
`+F.slice(y);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||B.test(f)||k.test(f))break;u+=`
|
|
184
|
+
`+d}!m&&!d.trim()&&(m=!0),l+=A+`
|
|
185
|
+
`,t=t.substring(A.length+1),f=F.slice(y)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:l,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=l}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let l=a.items[h].tokens.filter(f=>f.type==="space"),u=l.length>0&&l.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=uu(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
186
|
+
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<i.length;c++)o.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:o.align[c]});for(let c of a)o.rows.push(uu(c,o.header.length).map((h,l)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[l]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
187
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=rs(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Aw(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),du(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return du(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,c=a,h=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+a);(s=l.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){c+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(c-=n,c>0)continue;n=Math.min(n,n+c+h);let u=[...s[0]][0].length,f=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ge=class qn{constructor(t){Vt(this,"tokens");Vt(this,"options");Vt(this,"state");Vt(this,"tokenizer");Vt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ii,this.options.tokenizer=this.options.tokenizer||new qa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Te,block:ta.normal,inline:es.normal};this.options.pedantic?(r.block=ta.pedantic,r.inline=es.pedantic):this.options.gfm&&(r.block=ta.gfm,this.options.breaks?r.inline=es.breaks:r.inline=es.gfm),this.tokenizer.rules=r}static get rules(){return{block:ta,inline:es}}static lex(t,r){return new qn(r).lex(t)}static lexInline(t,r){return new qn(r).inlineTokens(t)}lex(t){t=t.replace(Te.carriageReturn,`
|
|
188
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(Te.tabCharGlobal," ").replace(Te.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
189
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+n.raw,h.text+=`
|
|
192
|
+
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+n.raw,h.text+=`
|
|
195
|
+
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let c=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},l),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(c))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+n.raw,h.text+=`
|
|
198
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=c.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+n.raw,h.text+=`
|
|
201
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,h,l,u,f;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(l=this.options.extensions)==null?void 0:l.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((f=this.options.extensions)!=null&&f.startInline){let y=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},C),typeof x=="number"&&x>=0&&(y=Math.min(y,x))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},Na=class{constructor(t){Vt(this,"options");Vt(this,"parser");this.options=t||ii}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Te.notSpaceStart))==null?void 0:o[0],a=t.replace(Te.endingNewline,"")+`
|
|
202
|
+
`;return s?'<pre><code class="language-'+ir(s)+'">'+(i?a:ir(a,!0))+`</code></pre>
|
|
203
|
+
`:"<pre><code>"+(i?a:ir(a,!0))+`</code></pre>
|
|
204
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
205
|
+
${this.parser.parse(t)}</blockquote>
|
|
206
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
207
|
+
`}hr(t){return`<hr>
|
|
208
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let c=t.items[n];s+=this.listitem(c)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
209
|
+
`+s+"</"+a+`>
|
|
210
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+ir(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
211
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
212
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
213
|
+
<thead>
|
|
214
|
+
`+r+`</thead>
|
|
215
|
+
`+s+`</table>
|
|
216
|
+
`}tablerow({text:t}){return`<tr>
|
|
217
|
+
${t}</tr>
|
|
218
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
219
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ir(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=cu(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+ir(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=cu(t);if(a===null)return ir(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ir(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ir(t.text)}},ah=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Xe=class Nn{constructor(t){Vt(this,"options");Vt(this,"renderer");Vt(this,"textRenderer");this.options=t||ii,this.options.renderer=this.options.renderer||new Na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ah}static parse(t,r){return new Nn(r).parse(t)}static parseInline(t,r){return new Nn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,l=this.options.extensions.renderers[h.type].call({parser:this},h);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=l||"";continue}}let c=n;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let h=c,l=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],l+=`
|
|
220
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let c=n;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},na,fs=(na=class{constructor(t){Vt(this,"options");Vt(this,"block");this.options=t||ii}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ge.lex:Ge.lexInline}provideParser(){return this.block?Xe.parse:Xe.parseInline}},Vt(na,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Vt(na,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),na),Mw=class{constructor(...t){Vt(this,"defaults",Kl());Vt(this,"options",this.setOptions);Vt(this,"parse",this.parseMarkdown(!0));Vt(this,"parseInline",this.parseMarkdown(!1));Vt(this,"Parser",Xe);Vt(this,"Renderer",Na);Vt(this,"TextRenderer",ah);Vt(this,"Lexer",Ge);Vt(this,"Tokenizer",qa);Vt(this,"Hooks",fs);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let c of n.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of n.rows)for(let h of c)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(c=>{let h=n[c].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let c=a.renderer.apply(this,n);return c===!1&&(c=o.apply(this,n)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Na(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,c=i.renderer[n],h=a[n];a[n]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new qa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,c=i.tokenizer[n],h=a[n];a[n]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new fs;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,c=i.hooks[n],h=a[n];fs.passThroughHooks.has(o)?a[n]=l=>{if(this.defaults.async&&fs.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await c.call(a,l);return h.call(a,f)})();let u=c.call(a,l);return h.call(a,u)}:a[n]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(a,l);return f===!1&&(f=await h.apply(a,l)),f})();let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let c=[];return c.push(o.call(this,n)),a&&(c=c.concat(a.call(this,n))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ge.lex(t,r??this.defaults)}parser(t,r){return Xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,c=await(a.hooks?await a.hooks.provideLexer():t?Ge.lex:Ge.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let l=await(a.hooks?await a.hooks.provideParser():t?Xe.parse:Xe.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(l):l})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Ge.lex:Ge.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let c=(a.hooks?a.hooks.provideParser():t?Xe.parse:Xe.parseInline)(n,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
221
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ir(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ti=new Mw;function Gt(e,t){return ti.parse(e,t)}Gt.options=Gt.setOptions=function(e){return ti.setOptions(e),Gt.defaults=ti.defaults,Kf(Gt.defaults),Gt};Gt.getDefaults=Kl;Gt.defaults=ii;Gt.use=function(...e){return ti.use(...e),Gt.defaults=ti.defaults,Kf(Gt.defaults),Gt};Gt.walkTokens=function(e,t){return ti.walkTokens(e,t)};Gt.parseInline=ti.parseInline;Gt.Parser=Xe;Gt.parser=Xe.parse;Gt.Renderer=Na;Gt.TextRenderer=ah;Gt.Lexer=Ge;Gt.lexer=Ge.lex;Gt.Tokenizer=qa;Gt.Hooks=fs;Gt.parse=Gt;Gt.options;Gt.setOptions;Gt.use;Gt.walkTokens;Gt.parseInline;Xe.parse;Ge.lex;function lp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,c){var h=c.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(l){var u,f;return(f=(u=l.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var a=new RegExp(`
|
|
222
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
|
|
223
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,c){var h=o.match(/(?:^|\n)( *)$/),l=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
224
|
+
`)&&(u=String(n).split(`
|
|
225
|
+
`).map(function(f,d){return d===0?f:"".concat(l).concat(f)}).join(`
|
|
226
|
+
`)),o+=u+i[c+1]}),o}var Wn=typeof performance<"u"&&typeof performance.now=="function",ci=p(()=>Wn?performance.now():0,"now"),en="🧜 ",$w="Mermaid render",Ow="Mermaid",Iw={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Di;Di=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=ci();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ci()-i)}}async tick(t,r){if(!this.enabled)return r();const i=ci();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ci()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:ci(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Wn&&typeof performance.mark=="function")try{performance.mark(`${en}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=ci();if(t.duration=r-t.start,Wn&&typeof performance.measure=="function")try{performance.measure(`${en}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:$w,trackGroup:Ow,color:Iw[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],o=p((c,h)=>{const l=" ".repeat(h),u=c.duration.toFixed(1).padStart(8),f=i>0?`${(c.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${f} ${l}${c.name}`);for(const d of c.children)o(d,h+1);if(c.children.length>0){const d=c.children.reduce((y,C)=>y+C.duration,0),m=c.duration-d;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${l} (self)`)}}},"walk");o(t,0);const n=Object.keys(this.buckets);if(n.length>0){a.push("—— buckets (summed) ——");for(const c of n)a.push(`${this.buckets[c].toFixed(1).padStart(8)} ${c}`)}console.log(`${en}mermaid render profile · ${s}
|
|
227
|
+
${a.join(`
|
|
228
|
+
`)}`)}},p(Di,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});function hp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
229
|
+
`).replace(/\n{2,}/g,`
|
|
230
|
+
`);return lp(i)}p(hp,"preprocessMarkdown");function cp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(cp,"nonMarkdownToLines");function up(e,t={}){const r=hp(e,t),i=Gt.lexer(r),s=[[]];let a=0;function o(n,c="normal"){n.type==="text"?n.text.split(`
|
|
231
|
+
`).forEach((l,u)=>{u!==0&&(a++,s.push([])),l.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&s[a].push({content:f,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(up,"markdownToLines");function dp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(dp,"nonMarkdownToHTML");function fp(e,{markdownAutoWrap:t}={}){const r=Gt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(J.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(fp,"markdownToHTML");var Dw=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function i(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(h){for(var l;l=h.shift();)l()},"runTasks"),measure:p(function(h,l){var u=l?h.bind(l):h;return this.reads.push(u),s(this),u},"measure"),mutate:p(function(h,l){var u=l?h.bind(l):h;return this.writes.push(u),s(this),u},"mutate"),clear:p(function(h){return o(this.reads,h)||o(this.writes,h)},"clear"),extend:p(function(h){if(typeof h!="object")throw new Error("expected object");var l=Object.create(this);return n(l,h),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}p(s,"scheduleFlush");function a(h){var l=h.writes,u=h.reads,f;try{t("flushing reads",u.length),h.runTasks(u),t("flushing writes",l.length),h.runTasks(l)}catch(d){f=d}if(h.scheduled=!1,(u.length||l.length)&&s(h),f)if(t("task errored",f.message),h.catch)h.catch(f);else throw f}p(a,"flush");function o(h,l){var u=h.indexOf(l);return!!~u&&!!h.splice(u,1)}p(o,"remove");function n(h,l){for(var u in l)l.hasOwnProperty(u)&&(h[u]=l[u])}p(n,"mixin");var c=e.fastdom=e.fastdom||new i;return c})(typeof window<"u"?window:globalThis),pp={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return zn(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return zn(this,"measure",e,t)},"measure"),clear:p(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function zn(e,t,r,i){var s=e._tasks,a=e.fastdom,o,n=new Promise(function(c,h){o=a[t](function(){s.delete(n);try{c(i?r.call(i):r())}catch(l){h(l)}},i)});return s.set(n,o),n}p(zn,"create");var{initialize:kF,mutate:wF,measure:SF,clear:TF}=pp,Pw=pp,Rw=Dw.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Pw),ei=Rw;function gp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(gp,"splitTextToChars");function mp(e,t){const r=gp(t.content);return oh(e,[],r,t.type)}p(mp,"splitWordToFitWidth");function oh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?oh(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(oh,"splitWordToFitWidthRecursion");function yp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Wa(e,t)}p(yp,"splitLineToFitWidth");function Wa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return Wa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,c]=mp(t,a);r.push([n]),c.content&&e.unshift(c)}return Wa(e,t,r)}p(Wa,"splitLineToFitWidthRecursion");function Hn(e,t){t&&e.attr("style",t)}p(Hn,"applyStyle");var fu=16384;async function xp(e,t,r,i,s=!1,a=Kt(),o=0){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,fu)}px`),n.attr("height",`${Math.min(10*r,fu)}px`);const c=n.append("xhtml:div"),h=_s(t.label)?await Bd(t.label.replace($s.lineBreakRegex,`
|
|
233
|
+
`),a):ze(t.label,a),l=t.isNode?"nodeLabel":"edgeLabel",u=c.append("span");u.html(h),Hn(u,t.labelStyle),u.attr("class",`${l} ${i}`),Hn(c,t.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&c.attr("class","labelBkg");const f=await ei.measure(()=>c.node().getBoundingClientRect());return f.width===r?(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px")):f.width<o&&(c.style("display","table"),c.style("width",o+"px"),c.style("text-align","center")),n.node()}p(xp,"addHtmlSpan");function oo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(oo,"createTspan");function Cp(e,t,r){const i=e.append("text"),s=oo(i,1,t);no(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Cp,"computeWidthOfText");function qw(e,t,r){var o;const i=e.append("text"),s=oo(i,1,t);no(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(qw,"computeDimensionOfText");function bp(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),c=o.append("text").attr("y","-10.1");s&&c.attr("text-anchor","middle");let h=0;for(const l of r){const u=p(d=>Cp(o,1.1,d)<=e,"checkWidth"),f=u(l)?[l]:yp(l,u);for(const d of f){const m=oo(c,h,1.1,s);no(m,d),h++}}if(i){const l=c.node().getBBox(),u=2;return n.attr("x",l.x-u).attr("y",l.y-u).attr("width",l.width+2*u).attr("height",l.height+2*u),o.node()}else return c.node()}p(bp,"createFormattedText");function Yn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(Yn,"decodeHTMLEntities");function no(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(Yn(r.content)):s.text(" "+Yn(r.content))})}p(no,"updateTextContentAndStyles");async function kp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await Of(n)?await Ui(n,void 0,{class:"label-icon"}):`<i class='${ze(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(kp,"replaceIconSubstring");var De=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:c=200,minWidth:h=0,addSvgBackground:l=!1}={},u)=>{if(J.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",l),a){const f=o?fp(t,u):dp(t),d=await kp(Rr(f),u),m=t.replace(/\\\\/g,"\\"),y={isNode:n,label:_s(t)?m:d,labelStyle:r.replace("fill:","color:")};return await xp(e,y,c,s,l,u,h)}else{const f=Rr(t.replace(/<br\s*\/?>/g,"<br/>")),d=o?up(f.replace("<br>","<br/>"),u):cp(f),m=bp(c,e,d,t?l:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Dt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(m).select("text").attr("style",C)}return i?Dt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Dt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),Nw=new Set(["redux-color","redux-dark-color"]),Ww=12,zw=64,nh=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),Hw=p((e,t)=>e!=null&&Nw.has(e)&&nh(t),"isColorTheme"),Yw=/^[\w-]+$/,_F=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return Yw.test(t)?t:"classic"},"safeLook"),wp=p(e=>nh(e)?e.length:0,"paletteSlotCount"),BF=p((e,t)=>nh(t)?wp(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=zw?e:Ww,"colorSlotCount"),Ye=p((e,t,r,i)=>{if(t===void 0||!Hw(r,i))return;const s=t%wp(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function rn(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const c of e){const[h,l]=c;c[0]=(h-i)*o-(l-s)*n+i,c[1]=(h-i)*n+(l-s)*o+s}}}function Uw(e,t){return e[0]===t[0]&&e[1]===t[1]}function jw(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)rn(h,n,s);const c=(function(h,l,u){const f=[];for(const b of h){const k=[...b];Uw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];l=Math.max(l,.1);const m=[];for(const b of f)for(let k=0;k<b.length-1;k++){const T=b[k],B=b[k+1];if(T[1]!==B[1]){const L=Math.min(T[1],B[1]);m.push({ymin:L,ymax:Math.max(T[1],B[1]),x:L===T[1]?T[0]:B[0],islope:(B[0]-T[0])/(B[1]-T[1])})}}if(m.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!m.length)return d;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>C);k++)b=k;m.splice(0,b+1).forEach((k=>{y.push({s:C,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=C))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const T=y[b].edge,B=y[k].edge;d.push([[Math.round(T.x),C],[Math.round(B.x),C]])}C+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,a,i);if(s){for(const h of o)rn(h,n,-s);(function(h,l,u){const f=[];h.forEach((d=>f.push(...d))),rn(f,l,u)})(c,n,-s)}return c}function Rs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),jw(e,s,i,a||1)}class lh{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Rs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function lo(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Gw extends lh{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Rs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[h,l]of s)lo([h,l])&&o.push([[h[0]-n,h[1]+c],[...l]],[[h[0]+n,h[1]-c],[...l]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Xw extends lh{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class Vw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Rs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const c=lo(n),h=c/s,l=Math.ceil(h)-1,u=c-l*s,f=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<l;m++){const y=d+u+m*s,C=f-o+2*Math.random()*o,x=y-o+2*Math.random()*o,b=this.helper.ellipse(C,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Zw{constructor(t){this.helper=t}fillPolygons(t,r){const i=Rs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=lo(o),c=Math.floor(n/(i+s)),h=(n+s-c*(i+s))/2;let l=o[0],u=o[1];l[0]>u[0]&&(l=o[1],u=o[0]);const f=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let d=0;d<c;d++){const m=d*(i+s),y=m+i,C=[l[0]+m*Math.cos(f)+h*Math.cos(f),l[1]+m*Math.sin(f)+h*Math.sin(f)],x=[l[0]+y*Math.cos(f)+h*Math.cos(f),l[1]+y*Math.sin(f)+h*Math.sin(f)];a.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),a}}class Kw{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Rs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=lo(a),n=Math.round(o/(2*r));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const l=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[c[0]+f*Math.cos(l),c[1]+f*Math.sin(l)],C=[c[0]+d*Math.cos(l),c[1]+d*Math.sin(l)],x=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}})),s}}const _e={};class Qw{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Jw=0,sn=1,pu=2,ea={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function an(e,t){return e.type===t}function hh(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Jw,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:sn,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:pu,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!an(a,pu);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return hh("M0,0"+e);s++,o=ea[a.text],i=a.text}else an(a,sn)?o=ea[i]:(s++,o=ea[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let c=s;c<s+o;c++){const h=r[c];if(!an(h,sn))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof ea[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Sp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const c=n.map(((h,l)=>l%2?h+r:h+t));a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map(((h,l)=>l%2?h+r:h+t));a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const c=n.map(((h,l)=>l%2?h+r:h+t));a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Tp(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,c=0;for(const{key:h,data:l}of e){switch(h){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[a,o]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],n=l[2],c=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,s]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,s]});break;case"V":s=l[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=s+(s-c)):(u=i,f=s),t.push({key:"C",data:[u,f,...l]}),n=l[0],c=l[1],i=l[2],s=l[3];break}case"T":{const[u,f]=l;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-c)):(d=i,m=s);const y=i+2*(d-i)/3,C=s+2*(m-s)/3,x=u+2*(d-u)/3,b=f+2*(m-f)/3;t.push({key:"C",data:[y,C,x,b,u,f]}),n=d,c=m,i=u,s=f;break}case"Q":{const[u,f,d,m]=l,y=i+2*(u-i)/3,C=s+2*(f-s)/3,x=d+2*(u-d)/3,b=m+2*(f-m)/3;t.push({key:"C",data:[y,C,x,b,d,m]}),n=u,c=f,i=d,s=m;break}case"A":{const u=Math.abs(l[0]),f=Math.abs(l[1]),d=l[2],m=l[3],y=l[4],C=l[5],x=l[6];u===0||f===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(_p(i,s,C,x,u,f,d,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function is(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function _p(e,t,r,i,s,a,o,n,c,h){const l=(u=o,Math.PI*u/180);var u;let f=[],d=0,m=0,y=0,C=0;if(h)[d,m,y,C]=h;else{[e,t]=is(e,t,-l),[r,i]=is(r,i,-l);const N=(e-r)/2,E=(t-i)/2;let M=N*N/(s*s)+E*E/(a*a);M>1&&(M=Math.sqrt(M),s*=M,a*=M);const v=s*s,P=a*a,$=v*P-v*E*E-P*N*N,j=v*E*E+P*N*N,V=(n===c?-1:1)*Math.sqrt(Math.abs($/j));y=V*s*E/a+(e+r)/2,C=V*-a*N/s+(t+i)/2,d=Math.asin(parseFloat(((t-C)/a).toFixed(9))),m=Math.asin(parseFloat(((i-C)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),c&&d>m&&(d-=2*Math.PI),!c&&m>d&&(m-=2*Math.PI)}let x=m-d;if(Math.abs(x)>120*Math.PI/180){const N=m,E=r,M=i;m=c&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=_p(r=y+s*Math.cos(m),i=C+a*Math.sin(m),E,M,s,a,o,0,c,[m,N,y,C])}x=m-d;const b=Math.cos(d),k=Math.sin(d),T=Math.cos(m),B=Math.sin(m),L=Math.tan(x/4),A=4/3*s*L,F=4/3*a*L,z=[e,t],R=[e+A*k,t-F*b],q=[r+A*B,i-F*T],tt=[r,i];if(R[0]=2*z[0]-R[0],R[1]=2*z[1]-R[1],h)return[R,q,tt].concat(f);{f=[R,q,tt].concat(f);const N=[];for(let E=0;E<f.length;E+=3){const M=is(f[E][0],f[E][1],l),v=is(f[E+1][0],f[E+1][1],l),P=is(f[E+2][0],f[E+2][1],l);N.push([M[0],M[1],v[0],v[1],P[0],P[1]])}return N}}const tS={randOffset:function(e,t){return $t(e,t)},randOffsetWithRange:function(e,t,r){return za(e,t,r)},ellipse:function(e,t,r,i,s){const a=vp(r,i,s);return Un(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return qr(e,t,r,i,s,!0)}};function Bp(e,t,r,i,s){return{type:"path",ops:qr(e,t,r,i,s)}}function ya(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...qr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...qr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Bp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function eS(e,t,r,i,s){return(function(a,o){return ya(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function gu(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ra(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:ra(r[0],1.5*(1+.22*t.roughness),xu(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=ra(o,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:ra(o,1.5*(1+.22*t.roughness),xu(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of c)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function vp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return o+=$t(o*c,r),n+=$t(n*c,r),{increment:a,rx:o,ry:n}}function Un(e,t,r,i){const[s,a]=Cu(i.increment,e,t,i.rx,i.ry,1,i.increment*za(.1,za(.4,1,r),r),r);let o=Ha(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Cu(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Ha(n,null,r);o=o.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function mu(e,t,r,i,s,a,o,n,c){const h=e,l=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=$t(.01*u,c),f+=$t(.01*f,c);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const y=2*Math.PI/c.curveStepCount,C=Math.min(y/2,(m-d)/2),x=bu(C,h,l,u,f,d,m,1,c);if(!c.disableMultiStroke){const b=bu(C,h,l,u,f,d,m,1.5,c);x.push(...b)}return o&&(n?x.push(...qr(h,l,h+u*Math.cos(d),l+f*Math.sin(d),c),...qr(h,l,h+u*Math.cos(m),l+f*Math.sin(m),c)):x.push({op:"lineTo",data:[h,l]},{op:"lineTo",data:[h+u*Math.cos(d),l+f*Math.sin(d)]})),{type:"path",ops:x}}function yu(e,t){const r=Tp(Sp(hh(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...qr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[c,h,l,u,f,d]=n;i.push(...rS(c,h,l,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...qr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function on(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+$t(s,t),i[0][1]+$t(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+$t(s,t),i[o][1]+$t(s,t)]})}}return{type:"fillPath",ops:r}}function ui(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!_e[s])switch(s){case"zigzag":_e[s]||(_e[s]=new Gw(i));break;case"cross-hatch":_e[s]||(_e[s]=new Xw(i));break;case"dots":_e[s]||(_e[s]=new Vw(i));break;case"dashed":_e[s]||(_e[s]=new Zw(i));break;case"zigzag-line":_e[s]||(_e[s]=new Kw(i));break;default:s="hachure",_e[s]||(_e[s]=new lh(i))}return _e[s]})(t,tS).fillPolygons(e,t)}function xu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Lp(e){return e.randomizer||(e.randomizer=new Qw(e.seed||0)),e.randomizer.next()}function za(e,t,r,i=1){return r.roughness*i*(Lp(r)*(t-e)+e)}function $t(e,t,r=1){return za(-e,e,t,r)}function qr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=jn(e,t,r,i,s,!0,!1);if(o)return n;const c=jn(e,t,r,i,s,!0,!0);return n.concat(c)}function jn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let h=1;h=c<200?1:c>500?.4:-.0016668*c+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>n&&(l=c/10);const u=l/2,f=.2+.2*Lp(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=$t(d,s,h),m=$t(m,s,h);const y=[],C=()=>$t(u,s,h),x=()=>$t(l,s,h),b=s.preserveVertices;return o?y.push({op:"move",data:[e+(b?0:C()),t+(b?0:C())]}):y.push({op:"move",data:[e+(b?0:$t(l,s,h)),t+(b?0:$t(l,s,h))]}),o?y.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),m+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),m+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),m+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),m+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),y}function ra(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+$t(t,r),e[0][1]+$t(t,r)]),i.push([e[0][0]+$t(t,r),e[0][1]+$t(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+$t(t,r),e[s][1]+$t(t,r)]),s===e.length-1&&i.push([e[s][0]+$t(t,r),e[s][1]+$t(t,r)]);return Ha(i,null,r)}function Ha(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*e[n+1][0]-o*e[n-1][0])/6,c[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...jn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Cu(e,t,r,i,s,a,o,n){const c=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const u=[t+i*Math.cos(l),r+s*Math.sin(l)];c.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const l=$t(.5,n)-Math.PI/2;h.push([$t(a,n)+t+.9*i*Math.cos(l-e),$t(a,n)+r+.9*s*Math.sin(l-e)]);const u=2*Math.PI+l-.01;for(let f=l;f<u;f+=e){const d=[$t(a,n)+t+i*Math.cos(f),$t(a,n)+r+s*Math.sin(f)];c.push(d),h.push(d)}h.push([$t(a,n)+t+i*Math.cos(l+2*Math.PI+.5*o),$t(a,n)+r+s*Math.sin(l+2*Math.PI+.5*o)]),h.push([$t(a,n)+t+.98*i*Math.cos(l+o),$t(a,n)+r+.98*s*Math.sin(l+o)]),h.push([$t(a,n)+t+.9*i*Math.cos(l+.5*o),$t(a,n)+r+.9*s*Math.sin(l+.5*o)])}return[h,c]}function bu(e,t,r,i,s,a,o,n,c){const h=a+$t(.1,c),l=[];l.push([$t(n,c)+t+.9*i*Math.cos(h-e),$t(n,c)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)l.push([$t(n,c)+t+i*Math.cos(u),$t(n,c)+r+s*Math.sin(u)]);return l.push([t+i*Math.cos(o),r+s*Math.sin(o)]),l.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Ha(l,null,c)}function rS(e,t,r,i,s,a,o,n){const c=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let l=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[o[0],o[1]]}):c.push({op:"move",data:[o[0]+(f?0:$t(h[0],n)),o[1]+(f?0:$t(h[0],n))]}),l=f?[s,a]:[s+$t(h[d],n),a+$t(h[d],n)],c.push({op:"bcurveTo",data:[e+$t(h[d],n),t+$t(h[d],n),r+$t(h[d],n),i+$t(h[d],n),l[0],l[1]]});return c}function ss(e){return[...e]}function ku(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ss(e[0]),ss(e[1]),ss(e[2]),ss(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(ss(s[0]));for(let n=1;n+2<s.length;n++){const c=s[n];a[0]=[c[0],c[1]],a[1]=[c[0]+(o*s[n+1][0]-o*s[n-1][0])/6,c[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function xa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function iS(e,t,r){const i=xa(t,r);if(i===0)return xa(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),xa(e,jr(t,r,s))}function jr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Gn(e,t,r,i){const s=i||[];if((function(n,c){const h=n[c+0],l=n[c+1],u=n[c+2],f=n[c+3];let d=3*l[0]-2*h[0]-f[0];d*=d;let m=3*l[1]-2*h[1]-f[1];m*=m;let y=3*u[0]-2*f[0]-h[0];y*=y;let C=3*u[1]-2*f[1]-h[1];return C*=C,d<y&&(d=y),m<C&&(m=C),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(xa(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const c=e[t+0],h=e[t+1],l=e[t+2],u=e[t+3],f=jr(c,h,.5),d=jr(h,l,.5),m=jr(l,u,.5),y=jr(f,d,.5),C=jr(d,m,.5),x=jr(y,C,.5);Gn([c,f,y,x],0,r,s),Gn([x,C,m,u],0,r,s)}var a,o;return s}function sS(e,t){return Ya(e,0,e.length,t)}function Ya(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let c=0,h=1;for(let l=t+1;l<r-1;++l){const u=iS(e[l],o,n);u>c&&(c=u,h=l)}return Math.sqrt(c)>i?(Ya(e,t,h+1,i,a),Ya(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function nn(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Gn(e,3*a,t,i);return r&&r>0?Ya(i,0,i.length,r):i}const Me="none";class Ua{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Bp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],c=eS(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(on([h],o)):n.push(ui([h],o))}return o.stroke!==Me&&n.push(c),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],c=vp(i,s,o),h=Un(t,r,o,c);if(o.fill)if(o.fillStyle==="solid"){const l=Un(t,r,o,c).opset;l.type="fillPath",n.push(l)}else n.push(ui([h.estimatedPoints],o));return o.stroke!==Me&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ya(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,c){const h=this._o(c),l=[],u=mu(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const f=Object.assign({},h);f.disableMultiStroke=!0;const d=mu(t,r,i,s,a,o,!0,!1,f);d.type="fillPath",l.push(d)}else l.push((function(f,d,m,y,C,x,b){const k=f,T=d;let B=Math.abs(m/2),L=Math.abs(y/2);B+=$t(.01*B,b),L+=$t(.01*L,b);let A=C,F=x;for(;A<0;)A+=2*Math.PI,F+=2*Math.PI;F-A>2*Math.PI&&(A=0,F=2*Math.PI);const z=(F-A)/b.curveStepCount,R=[];for(let q=A;q<=F;q+=z)R.push([k+B*Math.cos(q),T+L*Math.sin(q)]);return R.push([k+B*Math.cos(F),T+L*Math.sin(F)]),R.push([k,T]),ui([R],b)})(t,r,i,s,a,o,h));return h.stroke!==Me&&l.push(u),this._d("arc",l,h)}curve(t,r){const i=this._o(r),s=[],a=gu(t,i);if(i.fill&&i.fill!==Me)if(i.fillStyle==="solid"){const o=gu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const h of c)h.length<3?o.push(...h):h.length===3?o.push(...nn(ku([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...nn(ku(h),10,(1+i.roughness)/2))}o.length&&s.push(ui([o],i))}return i.stroke!==Me&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=ya(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(on([t],i)):s.push(ui([t],i))),i.stroke!==Me&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Me,o=i.stroke!==Me,n=!!(i.simplification&&i.simplification<1),c=(function(l,u,f){const d=Tp(Sp(hh(l))),m=[];let y=[],C=[0,0],x=[];const b=()=>{x.length>=4&&y.push(...nn(x,u)),x=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of d)switch(B){case"M":k(),C=[L[0],L[1]],y.push(C);break;case"L":b(),y.push([L[0],L[1]]);break;case"C":if(!x.length){const A=y.length?y[y.length-1]:C;x.push([A[0],A[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),y.push([C[0],C[1]])}if(k(),!f)return m;const T=[];for(const B of m){const L=sS(B,f);L.length&&T.push(L)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=yu(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const l=yu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else s.push(on(c,i));else s.push(ui(c,i));return o&&(n?c.forEach((l=>{s.push(ya(l,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Me};break;case"fillPath":o={d:this.opsToPath(a),stroke:Me,strokeWidth:0,fill:i.fill||Me};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Me,strokeWidth:i,fill:Me}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class aS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ua(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,c){const h=this.gen.arc(t,r,i,s,a,o,n,c);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ia="http://www.w3.org/2000/svg";class oS{constructor(t,r){this.svg=t,this.gen=new Ua(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(ia,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=s.createElementNS(ia,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=s.createElementNS(ia,"path"),c.setAttribute("d",this.opsToPath(n,o)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(s,n,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(ia,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,c){const h=this.gen.arc(t,r,i,s,a,o,n,c);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var pt={canvas:(e,t)=>new aS(e,t),svg:(e,t)=>new oS(e,t),generator:e=>new Ua(e),newSeed:()=>Ua.newSeed()},nS=1,lS=3;async function ch(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!uh(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=Pt().fontSize?Pt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[c=al.fontSize]=io(o),h=c*n+"px";i.style.minWidth=h,i.style.maxWidth=h}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(ch,"configureLabelImages");function uh(e){var r;return e.nodeType===lS?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==nS||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(uh)}p(uh,"hasTextBesidesImages");var wu=3,hS=32,cS=p(async(e,t,r)=>{var x,b,k;const i=Pt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ae(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),c=t.width?Math.max(t.width-2*(t.padding??0),hS):((b=Pt().flowchart)==null?void 0:b.wrappingWidth)??200,l=((k=i.c4)==null?void 0:k.wrap)??!0?c:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async T=>{const B=a.append("g").attr("class",T.cssClass),L=await De(B,ze(Rr(T.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Dt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Dt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:B,box:B.node().getBBox()}})),f=Math.max(...u.map(({box:T})=>T.width),0);let d=0;for(const{el:T,box:B}of u)T.attr("transform",`translate(${f/2-B.x-B.width/2}, ${d-B.y})`),d+=B.height+wu;const m=u.length>0?d-wu:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-f/2}, ${-m/2})`);const y=a.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:a}},"c4LabelHelper"),Su=p((e,t)=>{const{x:r,y:i,width:s,height:a}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:a,top:i,left:r,bottom:i+a,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:a}},"withMinWidth"),Tt=p(async(e,t,r)=>{var m,y;if(t.stereotype!==void 0)return cS(e,t,r);let i;const s=t.useHtmlLabels||ur((m=Pt())==null?void 0:m.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",ae(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,h=t.labelType==="markdown",l=n&&!t.width?t.minWidth??0:0,u=await De(o,ze(Rr(n),Pt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((y=Pt().flowchart)==null?void 0:y.wrappingWidth),minWidth:l,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:h},Pt()),f=((t==null?void 0:t.padding)??0)/2;let d;if(s){const C=u.children[0],x=Dt(u);await ch(C),d=await ei.measure(()=>C.getBoundingClientRect()),d=Su(d,l),x.attr("width",d.width),x.attr("height",d.height)}else d=await ei.measure(()=>u.getBBox()),d=Su(d,l);return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:f,label:o}},"labelHelper"),Zr=p(async(e,t,r)=>{var c,h;const i=r.useHtmlLabels??ce(Pt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await De(s,ze(Rr(t),Pt()),{useHtmlLabels:i,width:r.width||((h=(c=Pt())==null?void 0:c.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(ce(Pt())){const l=a.children[0],u=Dt(a);n=await ei.measure(()=>l.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await ei.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),Ct=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),St=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Ht,"createPathFromPoints");function Nr(e,t,r,i,s,a){const o=[],c=r-e,h=i-t,l=c/a,u=2*Math.PI/l,f=t+h/2;for(let d=0;d<=50;d++){const m=d/50,y=e+m*c,C=f+s*Math.sin(u*(y-e));o.push({x:y,y:C})}return o}p(Nr,"generateFullSineWavePoints");function or(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(or,"generateCirclePoints");function Xn(e){const t=Array.from(e.childNodes).filter(c=>c.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");r.setAttribute("d",i);const s=t.find(c=>c.getAttribute("fill")!=="none"),a=t.find(c=>c.getAttribute("stroke")!=="none"),o=p((c,h)=>(c==null?void 0:c.getAttribute(h))??void 0,"getAttr");if(s){const c={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}if(a){const c={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(Xn,"mergePaths");var uS=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,c,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),c=a===0?0:n*s/a,h=n):(s<0&&(o=-o),c=o,h=s===0?0:o*a/s),{x:r+c,y:i+h}},"intersectRect"),_r=uS;function Fp(e,t){return e.intersect(t)}p(Fp,"intersectNode");var dS=Fp;function Ap(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,c=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/c);i.x<s&&(h=-h);var l=Math.abs(t*r*n/c);return i.y<a&&(l=-l),{x:s+h,y:a+l}}p(Ap,"intersectEllipse");var Ep=Ap;function Mp(e,t,r){return Ep(e,t,t,r)}p(Mp,"intersectCircle");var fS=Mp;function $p(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,c=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&c!==0&&Vn(n,c))return;const l=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=l*e.x+u*e.y+f,m=l*t.x+u*t.y+f;if(Math.abs(d)<h&&Math.abs(m)<h&&Vn(d,m))return;const y=s*u-l*a;if(y===0)return;const C=(a*f-u*o)/y,x=(l*o-s*f)/y;return{x:C,y:x}}}p($p,"intersectLine");function Vn(e,t){return e*t>0}p(Vn,"sameSign");var pS=$p;function Op(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){o=Math.min(o,l.x),n=Math.min(n,l.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let c=i-e.width/2-o,h=s-e.height/2-n;for(let l=0;l<t.length;l++){let u=t[l],f=t[l<t.length-1?l+1:0],d=pS(e,r,{x:c+u.x,y:h+u.y},{x:c+f.x,y:h+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(l,u){let f=l.x-r.x,d=l.y-r.y,m=Math.sqrt(f*f+d*d),y=u.x-r.x,C=u.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),a[0]):e}p(Op,"intersectPolygon");var gS=Op,ct={node:dS,circle:fS,ellipse:Ep,polygon:gS,rect:_r},Pe=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),mS=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=Pt(),n=ce(o);return await De(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),br=mS;function Ip(e,t){const{labelStyles:r}=yt(t);t.labelStyle=r;const i=St(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,c=pt.svg(a),h=ft(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const l=c.circle(0,0,o*2,h),u=a.insert(()=>l,":first-child");return u.attr("class","anchor").attr("style",ae(n)),Ct(t,u),t.intersect=function(f){return J.info("Circle intersect",t,o,f),ct.circle(t,o,f)},a}p(Ip,"anchor");function Zn(e,t,r,i,s,a,o){const c=(e+r)/2,h=(t+i)/2,l=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,m=f/a,y=Math.sqrt(d**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-y**2),x=c+C*a*Math.sin(l)*(o?-1:1),b=h-C*s*Math.cos(l)*(o?-1:1),k=Math.atan2((t-b)/a,(e-x)/s);let B=Math.atan2((i-b)/a,(r-x)/s)-k;o&&B<0&&(B+=2*Math.PI),!o&&B>0&&(B-=2*Math.PI);const L=[];for(let A=0;A<20;A++){const F=A/19,z=k+F*B,R=x+s*Math.cos(z),q=b+a*Math.sin(z);L.push({x:R,y:q})}return L}p(Zn,"generateArcPoints");function Dp(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Dp,"calculateArcSagitta");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(z=>z+o,"calcTotalHeight"),c=p(z=>{const R=z/2;return[R/(2.5+z/50),R]},"calcEllipseRadius"),{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:l.height),[f,d]=c(u),m=Dp(u,f,d),C=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+m-m,x=u,{cssStyles:b}=t,k=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...Zn(-C/2,-x/2,-C/2,x/2,f,d,!1),{x:C/2,y:x/2},...Zn(C/2,x/2,C/2,-x/2,f,d,!0)],T=pt.svg(h),B=ft(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Ht(k),A=T.path(L,B),F=h.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${f/2}, 0)`),Ct(t,F),t.intersect=function(z){return ct.polygon(t,k,z)},h}p(Pp,"bowTieRect");async function Rp(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=Math.max(o.width+h*2,t.width??0,80),u=Math.max(Math.min(l*.08,12),5),f=Math.max(o.height+h*2+u,t.height??0),d=-f/2+u,m=f/2,y=l*.72,C=[`M${-l/2},${d}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${l/2},${d}`,`A${l/2},${u} 0 0 0 ${-l/2},${d}`,"Z"].join(" "),{cssStyles:x}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const z=pt.svg(a).path(C,ft(t,{}));(A=b.node())==null||A.appendChild(z),x&&b.attr("style",x)}else b.append("path").attr("d",C).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",l/2).attr("ry",u).attr("style",`fill:none;stroke:${c};stroke-width:1px`),Ct(t,b);const k=d+(m-d)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`);const T=12,B=p((F,z,R)=>Array.from({length:T+1},(q,tt)=>{const N=Math.PI-tt*Math.PI/T;return{x:F*Math.cos(N),y:z+R*u*Math.sin(N)}}),"arc"),L=[...B(l/2,d,-1),...B(y/2,m,1).reverse()];return t.intersect=function(F){return ct.polygon(t,L,F)},a}p(Rp,"bucket");var Tu=20,_u=8,yS=80,xS=8;function qp(e){const{themeVariables:t}=Pt(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:xS,fill:r,stroke:i,cssClass:"collapsed-group"}}}p(qp,"getCollapsedStyle");async function Np(e,t){var A;const r=qp((A=t.metadata)==null?void 0:A.containerType),{fill:i,stroke:s}=r,{nodeStyles:a}=yt(t),{shapeSvg:o,bbox:n}=await Tt(e,t,St(t)),{theme:c,themeVariables:h}=Pt();Ye(o,t.colorIndex,c,h.borderColorArray);const l=t.padding??8,u=n.height,f=Math.max(n.width+l*2,yS,(t==null?void 0:t.width)??0),d=Math.max(u+_u+Tu+l*2,(t==null?void 0:t.height)??0),m=-f/2,y=-d/2,C=-28/2,x=o.select(".label");x&&(t.useHtmlLabels??ce(Pt())?x.attr("transform",`translate(${-n.width/2}, ${-n.height/2+C})`):x.attr("transform",`translate(0, ${-n.height/2+C})`));let b;if(t.look==="handDrawn"){const F=pt.svg(o),z=ft(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),R=F.path(Pe(m,y,f,d,r.rx),z);b=o.insert(()=>R,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ae(t.cssStyles))}else b=o.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",f).attr("height",d).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+l+u+_u;o.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",k).attr("x2",m+f-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const T=k+Tu/2,B=2.5,L=10;for(let F=-1;F<=1;F++)o.append("circle").attr("class","collapsed-indicator").attr("cx",F*L).attr("cy",T).attr("r",B).attr("fill",s);return Ct(t,b),t.calcIntersect=function(F,z){return ct.rect(F,z)},t.intersect=function(F){return ct.rect(t,F)},o}p(Np,"collapsedGroup");function fr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(fr,"insertPolygonShape");var CS=["right","left","up","down"],dh="point",bS=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),kS=p(e=>CS.filter(t=>e.has(t)).join("|")||dh,"getDirectionKey"),Bu={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[dh]:()=>[{x:0,y:0}]},wS=p((e,t,r,i)=>{const s=bS(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,c=i??t.width+2*n+2*a,h=kS(s);return(Bu[h]??Bu[dh])({height:o,midpoint:n,padding:a,width:c})},"getArrowPoints");async function Wp(e,t){const r=t,{shapeSvg:i,bbox:s}=await Tt(e,r,St(r)),a=r.padding??0,o=s.height+2*a,n=o/2,c=s.width+2*n+a,h=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&h>c?h:c,f=wS(r.directions??[],s,r,u),d=fr(i,u,o,f);return d.attr("style",r.style??null),Ct(r,d),r.intersect=function(m){return ct.polygon(r,f,m)},i}p(Wp,"block_arrow");async function zp(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=18,u=12,f=Math.max(o.width+h*2,t.width??0,90),d=Math.max(o.height+h*2+l,t.height??0),m=-d/2,{cssStyles:y}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=pt.svg(a).path(Pe(-f/2,m,f,d,u),ft(t,{}));(b=C.node())==null||b.appendChild(T),y&&C.attr("style",y)}else C.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);C.append("line").attr("x1",-f/2).attr("y1",m+l).attr("x2",f/2).attr("y2",m+l).attr("style",`stroke:${c};stroke-width:1px`);for(let k=0;k<3;k++)C.append("circle").attr("cx",-f/2+12+k*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${c};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-f/2+44).attr("y",m+4).attr("width",Math.max(f-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),Ct(t,C);const x=m+l+(d-l)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(k){return ct.rect(t,k)},a}p(zp,"browser");var sa=12;async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??c.width)+(t.look==="neo"?a*2:a+sa),l=((t==null?void 0:t.height)??c.height)+(t.look==="neo"?o*2:o),u=0,f=h,d=-l,m=0,y=[{x:u+sa,y:d},{x:f,y:d},{x:f,y:m},{x:u,y:m},{x:u,y:d+sa},{x:u+sa,y:d}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=pt.svg(n),k=ft(t,{}),T=Ht(y),B=b.path(T,k);C=n.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),x&&C.attr("style",x)}else C=fr(n,h,l,y);return i&&C.attr("style",i),Ct(t,C),t.intersect=function(b){return ct.polygon(t,y,b)},n}p(Hp,"card");function Yp(e,t){const{nodeStyles:r}=yt(t);t.label="";const i=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=pt.svg(i),c=ft(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=Ht(o),l=n.path(h,c),u=i.insert(()=>l,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return ct.polygon(t,o,f)},i}p(Yp,"choice");async function fh(e,t,r){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await Tt(e,t,St(t)),c=16,h=(r==null?void 0:r.padding)??n,l=Math.sqrt(o.width**2+o.height**2)/2,u=t.look==="neo"?l+c*2:l+h;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(a),y=ft(t,{}),C=m.circle(0,0,u*2,y);f=a.insert(()=>C,":first-child"),f.attr("class","basic label-container").attr("style",ae(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0);return Ct(t,f),t.calcIntersect=function(m,y){const C=m.width/2;return ct.circle(m,C,y)},t.intersect=function(m){return J.info("Circle intersect",t,u,m),ct.circle(t,u,m)},a}p(fh,"circle");async function Up(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await Tt(e,r,i),n=s.insert("rect",":first-child"),c=r.padding??0,h=r.positioned?r.width??0:a.width+c,l=r.positioned?r.height??0:a.height+c,u=r.positioned?-h/2:-a.width/2-o,f=r.positioned?-l/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",f).attr("width",h).attr("height",l),Ct(r,n),r.intersect=function(d){return ct.rect(r,d)},s}p(Up,"composite");async function jp(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=20,u=12,f=Math.max(o.width+h*2,t.width??0,90),d=Math.max(o.height+h*2+l,t.height??0),m=-d/2,{cssStyles:y}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=pt.svg(a).path(Pe(-f/2,m,f,d,u),ft(t,{}));(b=C.node())==null||b.appendChild(T),y&&C.attr("style",y)}else C.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);C.append("text").attr("x",-f/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"),Ct(t,C);const x=m+l+(d-l)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(k){return ct.rect(t,k)},a}p(jp,"consoleWindow");function Gp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
234
|
+
M ${s.x},${s.y} L ${o.x},${o.y}`}p(Gp,"createLine");function Xp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=pt.svg(s),c=ft(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=n.circle(0,0,a*2,c),l=Gp(a),u=n.path(l,c),f=s.insert(()=>h,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Ct(t,f),t.intersect=function(d){return J.info("crossedCircle intersect",t,{radius:a,point:d}),ct.circle(t,a,d)},s}p(Xp,"crossedCircle");function xr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(xr,"generateCirclePoints");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+n,l=a.height+c,u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...xr(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...xr(h/2+u*2,-u,u,20,-180,-270),...xr(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...xr(h/2,l/2,u,20,0,90)],m=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...xr(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...xr(h/2+h*.1,-u,u,20,-180,-270),...xr(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...xr(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2,y:l/2+u}],y=pt.svg(s),C=ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Ht(d).replace("Z",""),k=y.path(b,C),T=Ht(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(A){return ct.polygon(t,m,A)},s}p(Vp,"curlyBraceLeft");function Cr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:d,y:m})}return o}p(Cr,"generateCirclePoints");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...Cr(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...Cr(h/2+u*2,-u,u,20,-180,-270),...Cr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...Cr(h/2,l/2,u,20,0,90)],m=[{x:-h/2,y:-l/2-u},{x:h/2,y:-l/2-u},...Cr(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...Cr(h/2+u*2,-u,u,20,-180,-270),...Cr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...Cr(h/2,l/2,u,20,0,90),{x:h/2,y:l/2+u},{x:-h/2,y:l/2+u}],y=pt.svg(s),C=ft(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=Ht(d).replace("Z",""),k=y.path(b,C),T=Ht(m),B=y.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(A){return ct.polygon(t,m,A)},s}p(Zp,"curlyBraceRight");function ue(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);o.push({x:-d,y:-m})}return o}p(ue,"generateCirclePoints");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...ue(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...ue(h/2+u*2,-u,u,20,-180,-270),...ue(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...ue(h/2,l/2,u,20,0,90)],m=[...ue(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...ue(-h/2-u/2,-u,u,20,0,90),...ue(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...ue(-h/2+u+u/2,l/2,u,30,-180,-270)],y=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...ue(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...ue(h/2+u*2,-u,u,20,-180,-270),...ue(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...ue(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2-u-u/2,y:l/2+u},...ue(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...ue(-h/2-u/2,-u,u,20,0,90),...ue(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...ue(-h/2+u+u/2,l/2,u,30,-180,-270)],C=pt.svg(s),x=ft(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=Ht(d).replace("Z",""),T=C.path(k,x),L=Ht(m).replace("Z",""),A=C.path(L,x),F=Ht(y),z=C.path(F,{...x}),R=s.insert("g",":first-child");return R.insert(()=>z,":first-child").attr("stroke-opacity",0),R.insert(()=>T,":first-child"),R.insert(()=>A,":first-child"),R.attr("class","text"),f&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,R),t.intersect=function(q){return ct.polygon(t,y,q)},s}p(Kp,"curlyBraces");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,c=5,{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=Math.max(c,l.height+o*2,(t==null?void 0:t.height)??0),f=u/2,d=f-Math.sqrt(Math.max(0,f**2-(l.height/2)**2)),m=Math.max(u/4,d),y=Math.max(n,l.width+a*2+m*2,(l.width+a*2)*1.25,(t==null?void 0:t.width)??0),{cssStyles:C}=t,x=pt.svg(h),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,T=u,B=k-f,L=T/4,A=[{x:B,y:0},{x:L,y:0},{x:0,y:T/2},{x:L,y:T},{x:B,y:T},...or(-B,-T/2,f,50,270,90)],F=Ht(A),z=x.path(F,b),R=h.insert(()=>z,":first-child");return R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",i),R.attr("transform",`translate(${-y/2}, ${-u/2})`),Ct(t,R),t.intersect=function(q){return ct.polygon(t,A,q)},h}p(Qp,"curvedTrapezoid");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.padding??20,c=Math.max(a.width+n*2,t.width??0,100),h=Math.min(Math.max(c*.23,16),56),l=h*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*h-l):0),f=Math.min(c*.177,u*.45),d=u+2*h-l,m=-d/2,y=m+2*h-l,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const F=pt.svg(s),z=ft(t,{}),R=F.path(Pe(-c/2,y,c,u,f),z),q=F.circle(0,m+h,h*2,z);C.insert(()=>q,":first-child"),C.insert(()=>R,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-c/2).attr("y",y).attr("width",c).attr("height",u).attr("rx",f).attr("ry",f).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+h).attr("r",h).attr("style",i);Ct(t,C);const b=y+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const k=m+h,T=Math.asin(Math.min(1,(y-k)/h))*180/Math.PI,A=[...or(0,-k,h,24,180+T,-T),...or(-(-c/2+f),-(y+f),f,12,90,0),...or(-(-c/2+f),-(d/2-f),f,12,360,270),...or(-(c/2-f),-(d/2-f),f,12,270,180),...or(-(c/2-f),-(y+f),f,12,180,90)];return t.intersect=function(F){return ct.polygon(t,A,F)},s}p(Jp,"person");var SS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),TS=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),_S=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),vu=8,Lu=8;async function tg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<Lu&&(t.width=Lu)),t.height){const b=n/2/(2.5+n/50);t.height=t.height-a-b*3,t.height<vu&&(t.height=vu)}const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=Math.max(t.width??0,h.width)+o,f=u/2,d=f/(2.5+u/50),m=Math.max(t.height??0,h.height)+a+d;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=pt.svg(c),b=TS(0,0,u,m,f,d),k=_S(0,d,u,m,f,d),T=ft(t,{}),B=x.path(b,T),L=x.path(k,ft(t,{fill:"none"}));y=c.insert(()=>L,":first-child"),y=c.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=SS(0,0,u,m,f,d);y=c.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ae(C)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(m/2+d)})`),Ct(t,y),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(x){const b=ct.rect(t,x),k=b.x-(t.x??0);if(f!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-k*k/(f*f));T>0&&(T=Math.sqrt(T)),T=d-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},c}p(tg,"cylinder");async function ji(e,t,r){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await Tt(e,t,St(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,l=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const y=pt.svg(a),C=ft(t,{}),x=f||d?y.path(Pe(h,l,n,c,f||0),C):y.rectangle(h,l,n,c,C);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",ae(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",ae(f)).attr("ry",ae(d)).attr("x",h).attr("y",l).attr("width",n).attr("height",c);return Ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:c}),t.calcIntersect=function(y,C){return ct.rect(y,C)},t.intersect=function(y){return ct.rect(t,y)},a}p(ji,"drawRect");async function eg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,c={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await ji(e,t,c);if(t.look==="handDrawn"){const d=pt.svg(h),m=ft(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return h;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return h;return h.insert(()=>d.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),h.insert(()=>d.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),h}const l=h.select(".basic.label-container"),u=(Number(l.attr("width"))||o)??0,f=(Number(l.attr("height"))||n)??0;return u>0&&f>0&&l.attr("stroke-dasharray",`${u} ${f}`),h}p(eg,"datastore");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=n.width+s,l=n.height+a,u=l*.2,f=-h/2,d=-l/2-u/2,{cssStyles:m}=t,y=pt.svg(o),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=y.polygon(x.map(T=>[T.x,T.y]),C),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),c.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Ct(t,k),t.intersect=function(T){return ct.rect(t,T)},o}p(rg,"dividedRectangle");async function ig(e,t){var m,y;const{labelStyles:r,nodeStyles:i}=yt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.sqrt(c.width**2+c.height**2)/2,l=(t!=null&&t.width?(t==null?void 0:t.width)/2:h)+(o??0),u=l+s;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const C=pt.svg(n),x=ft(t,{roughness:.2,strokeWidth:2.5}),b=ft(t,{roughness:.2,strokeWidth:1.5}),k=C.circle(0,0,u*2,x),T=C.circle(0,0,l*2,b);f=n.insert("g",":first-child"),f.attr("class",ae(t.cssClasses)).attr("style",ae(d)),(m=f.node())==null||m.appendChild(k),(y=f.node())==null||y.appendChild(T)}else{f=n.insert("g",":first-child");const C=f.insert("circle",":first-child"),x=f.insert("circle");f.attr("class","basic label-container").attr("style",i),C.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return Ct(t,f),t.intersect=function(C){return J.info("DoubleCircle intersect",t,u,C),ct.circle(t,u,C)},n}p(ig,"doublecircle");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o}=await Tt(e,t,St(t)),{theme:n,themeVariables:c}=Pt();Ye(s,t.colorIndex,n,c.borderColorArray);const h=o??10,l=a.width/2+h*2,u=a.height/2+h*2;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(s),y=ft(t,{}),C=m.ellipse(0,0,l*2,u*2,y);f=s.insert(()=>C,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else f=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",u).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=u*2,Ct(t,f),t.calcIntersect=function(m,y){const C=m.width/2,x=m.height/2;return ct.ellipse(m,C,x,y)},t.intersect=function(m){return ct.ellipse(t,l,u,m)},s}p(sg,"usecaseEllipse");function ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=yt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,c=pt.svg(a),{nodeBorder:h}=r,l=ft(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const u=c.circle(0,0,o*2,l),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),Ct(t,f),t.intersect=function(d){return J.info("filledCircle intersect",t,{radius:o,point:d}),ct.circle(t,o,d)},a}p(ag,"filledCircle");var Fu=10,Au=10;async function og(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Fu&&(t.height=Fu),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<Au&&(t.width=Au));const{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),l=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=l,f=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:d}=t,m=pt.svg(o),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Ht(f),x=m.path(C,y),b=o.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=l,Ct(t,b),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return J.info("Triangle intersect",t,f,k),ct.polygon(t,f,k)},o}p(og,"flippedTriangle");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.padding??12,c=Math.max(a.width+n*2,t.width??0,90),h=a.height+n*2,l=Math.max(Math.min(h*.16,14),8),u=Math.max(h+l,t.height??0),f=u-l,d=Math.max(c*.38,28),m=-u/2,y=[{x:-c/2,y:m},{x:-c/2+d,y:m},{x:-c/2+d,y:m+l},{x:c/2,y:m+l},{x:c/2,y:u/2},{x:-c/2,y:u/2}],C=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:x}=t;let b;if(t.look==="handDrawn"){const B=pt.svg(s).path(C,ft(t,{}));b=s.insert(()=>B,":first-child").attr("class","basic label-container"),x&&b.attr("style",x)}else b=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,b):Ct(t,b,{width:c,height:u});const k=m+l+f/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(T){return ct.polygon(t,y,T)},s}p(ng,"folder");function lg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=yt(t);t.label="";const o=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);(r==="LR"||r==="RL")&&(c=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const l=-1*c/2,u=-1*h/2,f=pt.svg(o),d=ft(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=f.rectangle(l,u,c,h,d),y=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ct(t,y);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return ct.rect(t,x)},o}p(lg,"forkJoin");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:c,bbox:h}=await Tt(e,t,St(t)),l=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,u=l/2,f=u-Math.sqrt(Math.max(0,u**2-(h.height/2)**2)),d=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width)+f*2)+o*2,{cssStyles:m}=t,y=pt.svg(c),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-d/2,y:-l/2},{x:d/2-u,y:-l/2},...or(-d/2+u,0,u,50,90,270),{x:d/2-u,y:l/2},{x:-d/2,y:l/2}],b=Ht(x),k=y.path(b,C),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Ct(t,T),t.intersect=function(B){return J.info("Pill intersect",t,{radius:u,point:B}),ct.polygon(t,x,B)},c}p(hg,"halfRoundedRectangle");var BS=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,c=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-c}const{shapeSvg:l,bbox:u}=await Tt(e,t,St(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c,d=f/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,y=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-f/2},{x:m-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=pt.svg(l),k=ft(t,{}),T=BS(0,0,m,f,d),B=b.path(T,k);C=l.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),x&&C.attr("style",x)}else C=fr(l,m,f,y);return i&&C.attr("style",i),t.width=m,t.height=f,Ct(t,C),t.intersect=function(b){return ct.polygon(t,y,b)},l}p(cg,"hexagon");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Tt(e,t,St(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=pt.svg(s),h=ft(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=Ht(l),f=c.path(u,h),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Ct(t,d),t.intersect=function(m){return J.info("Pill intersect",t,{points:l}),ct.polygon(t,l,m)},s}p(ug,"hourglass");async function dg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:h,bbox:l,label:u}=await Tt(e,t,"icon-shape default"),f=t.pos==="t",d=n,m=n,{nodeBorder:y}=r,{stylesMap:C}=Wr(t),x=-m/2,b=-d/2,k=t.label?8:0,T=pt.svg(h),B=ft(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=T.rectangle(x,b,m,d,B),A=Math.max(m,l.width),F=d+l.height+k,z=T.rectangle(-A/2,-F/2,A,F,{...B,fill:"transparent",stroke:"none"}),R=h.insert(()=>L,":first-child"),q=h.insert(()=>z);if(t.icon){const tt=h.append("g");tt.html(`<g>${await Ui(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const N=tt.node().getBBox(),E=N.width,M=N.height,v=N.x,P=N.y;tt.attr("transform",`translate(${-E/2-v},${f?l.height/2+k/2-M/2-P:-l.height/2-k/2-M/2-P})`),tt.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-F/2:F/2-l.height})`),R.attr("transform",`translate(0,${f?l.height/2+k/2:-l.height/2-k/2})`),Ct(t,q),t.intersect=function(tt){if(J.info("iconSquare intersect",t,tt),!t.label)return ct.rect(t,tt);const N=t.x??0,E=t.y??0,M=t.height??0;let v=[];return f?v=[{x:N-l.width/2,y:E-M/2},{x:N+l.width/2,y:E-M/2},{x:N+l.width/2,y:E-M/2+l.height+k},{x:N+m/2,y:E-M/2+l.height+k},{x:N+m/2,y:E+M/2},{x:N-m/2,y:E+M/2},{x:N-m/2,y:E-M/2+l.height+k},{x:N-l.width/2,y:E-M/2+l.height+k}]:v=[{x:N-m/2,y:E-M/2},{x:N+m/2,y:E-M/2},{x:N+m/2,y:E-M/2+d},{x:N+l.width/2,y:E-M/2+d},{x:N+l.width/2/2,y:E+M/2},{x:N-l.width/2,y:E+M/2},{x:N-l.width/2,y:E-M/2+d},{x:N-m/2,y:E-M/2+d}],ct.polygon(t,v,tt)},h}p(dg,"icon");async function fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:h,bbox:l,label:u}=await Tt(e,t,"icon-shape default"),f=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Wr(t),b=pt.svg(h),k=ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=x.get("fill");k.stroke=T??C;const B=h.append("g");t.icon&&B.html(`<g>${await Ui(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),A=L.width,F=L.height,z=L.x,R=L.y,q=Math.max(A,F)*Math.SQRT2+f*2,tt=b.circle(0,0,q,k),N=Math.max(q,l.width),E=q+l.height+d,M=b.rectangle(-N/2,-E/2,N,E,{...k,fill:"transparent",stroke:"none"}),v=h.insert(()=>tt,":first-child"),P=h.insert(()=>M);return B.attr("transform",`translate(${-A/2-z},${m?l.height/2+d/2-F/2-R:-l.height/2-d/2-F/2-R})`),B.attr("style",`color: ${x.get("stroke")??y};`),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-E/2:E/2-l.height})`),v.attr("transform",`translate(0,${m?l.height/2+d/2:-l.height/2-d/2})`),Ct(t,P),t.intersect=function($){return J.info("iconSquare intersect",t,$),ct.rect(t,$)},h}p(fg,"iconCircle");async function pg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:f}=await Tt(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Wr(t),k=-y/2,T=-m/2,B=t.label?8:0,L=pt.svg(h),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??x;const z=L.path(Pe(k,T,y,m,5),A),R=Math.max(y,l.width),q=m+l.height+B,tt=L.rectangle(-R/2,-q/2,R,q,{...A,fill:"transparent",stroke:"none"}),N=h.insert(()=>z,":first-child").attr("class","icon-shape2"),E=h.insert(()=>tt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ui(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),P=v.width,$=v.height,j=v.x,V=v.y;M.attr("transform",`translate(${-P/2-j},${d?l.height/2+B/2-$/2-V:-l.height/2-B/2-$/2-V})`),M.attr("style",`color: ${b.get("stroke")??C};`)}return f.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-q/2:q/2-l.height})`),N.attr("transform",`translate(0,${d?l.height/2+B/2:-l.height/2-B/2})`),Ct(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ct.rect(t,M);const v=t.x??0,P=t.y??0,$=t.height??0;let j=[];return d?j=[{x:v-l.width/2,y:P-$/2},{x:v+l.width/2,y:P-$/2},{x:v+l.width/2,y:P-$/2+l.height+B},{x:v+y/2,y:P-$/2+l.height+B},{x:v+y/2,y:P+$/2},{x:v-y/2,y:P+$/2},{x:v-y/2,y:P-$/2+l.height+B},{x:v-l.width/2,y:P-$/2+l.height+B}]:j=[{x:v-y/2,y:P-$/2},{x:v+y/2,y:P-$/2},{x:v+y/2,y:P-$/2+m},{x:v+l.width/2,y:P-$/2+m},{x:v+l.width/2/2,y:P+$/2},{x:v-l.width/2,y:P+$/2},{x:v-l.width/2,y:P-$/2+m},{x:v-y/2,y:P-$/2+m}],ct.polygon(t,j,M)},h}p(pg,"iconRounded");async function gg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=yt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:f}=await Tt(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Wr(t),k=-y/2,T=-m/2,B=t.label?8:0,L=pt.svg(h),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??x;const z=L.path(Pe(k,T,y,m,.1),A),R=Math.max(y,l.width),q=m+l.height+B,tt=L.rectangle(-R/2,-q/2,R,q,{...A,fill:"transparent",stroke:"none"}),N=h.insert(()=>z,":first-child"),E=h.insert(()=>tt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ui(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),P=v.width,$=v.height,j=v.x,V=v.y;M.attr("transform",`translate(${-P/2-j},${d?l.height/2+B/2-$/2-V:-l.height/2-B/2-$/2-V})`),M.attr("style",`color: ${b.get("stroke")??C};`)}return f.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-q/2:q/2-l.height})`),N.attr("transform",`translate(0,${d?l.height/2+B/2:-l.height/2-B/2})`),Ct(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ct.rect(t,M);const v=t.x??0,P=t.y??0,$=t.height??0;let j=[];return d?j=[{x:v-l.width/2,y:P-$/2},{x:v+l.width/2,y:P-$/2},{x:v+l.width/2,y:P-$/2+l.height+B},{x:v+y/2,y:P-$/2+l.height+B},{x:v+y/2,y:P+$/2},{x:v-y/2,y:P+$/2},{x:v-y/2,y:P-$/2+l.height+B},{x:v-l.width/2,y:P-$/2+l.height+B}]:j=[{x:v-y/2,y:P-$/2},{x:v+y/2,y:P-$/2},{x:v+y/2,y:P-$/2+m},{x:v+l.width/2,y:P-$/2+m},{x:v+l.width/2/2,y:P+$/2},{x:v-l.width/2,y:P+$/2},{x:v-l.width/2,y:P-$/2+m},{x:v-y/2,y:P-$/2+m}],ct.polygon(t,j,M)},h}p(gg,"iconSquare");async function mg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=yt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,l=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:f,label:d}=await Tt(e,t,"image-shape default"),m=t.pos==="t",y=-h/2,C=-l/2,x=t.label?8:0,b=pt.svg(u),k=ft(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(y,C,h,l,k),B=Math.max(h,f.width),L=l+f.height+x,A=b.rectangle(-B/2,-L/2,B,L,{...k,fill:"none",stroke:"none"}),F=u.insert(()=>T,":first-child"),z=u.insert(()=>A);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",h),R.attr("height",l),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-h/2},${m?L/2-l:-L/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-l/2-f.height/2-x/2:l/2-f.height/2+x/2})`),F.attr("transform",`translate(0,${m?f.height/2+x/2:-f.height/2-x/2})`),Ct(t,z),t.intersect=function(R){if(J.info("iconSquare intersect",t,R),!t.label)return ct.rect(t,R);const q=t.x??0,tt=t.y??0,N=t.height??0;let E=[];return m?E=[{x:q-f.width/2,y:tt-N/2},{x:q+f.width/2,y:tt-N/2},{x:q+f.width/2,y:tt-N/2+f.height+x},{x:q+h/2,y:tt-N/2+f.height+x},{x:q+h/2,y:tt+N/2},{x:q-h/2,y:tt+N/2},{x:q-h/2,y:tt-N/2+f.height+x},{x:q-f.width/2,y:tt-N/2+f.height+x}]:E=[{x:q-h/2,y:tt-N/2},{x:q+h/2,y:tt-N/2},{x:q+h/2,y:tt-N/2+l},{x:q+f.width/2,y:tt-N/2+l},{x:q+f.width/2/2,y:tt+N/2},{x:q-f.width/2,y:tt+N/2},{x:q-f.width/2,y:tt-N/2+l},{x:q-h/2,y:tt-N/2+l}],ct.polygon(t,E,R)},u}p(mg,"imageSquare");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a*2,t.height??0),l=Math.max(c.width+o*2,(t.width??0)-h),u=[{x:0,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=ft(t,{}),C=Ht(u),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=fr(n,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,Ct(t,f),t.intersect=function(m){return ct.polygon(t,u,m)},n}p(yg,"inv_trapezoid");async function xg(e,t){const{shapeSvg:r,bbox:i,label:s}=await Tt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ct(t,a),t.intersect=function(c){return ct.rect(t,c)},r}p(xg,"labelRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+o,(t.width??0)-h),u=[{x:0,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:-(3*h)/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=ft(t,{}),C=Ht(u),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=fr(n,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,Ct(t,f),t.intersect=function(m){return ct.polygon(t,u,m)},n}p(Cg,"lean_left");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+o,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=ft(t,{}),C=Ht(u),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=fr(n,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,Ct(t,f),t.intersect=function(m){return ct.polygon(t,u,m)},n}p(bg,"lean_right");function kg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=7,h=[{x:o,y:0},{x:0,y:n+c/2},{x:o-2*c,y:n+c/2},{x:0,y:2*n},{x:o,y:n-c/2},{x:2*c,y:n-c/2}],l=pt.svg(s),u=ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=Ht(h),d=l.path(f,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),Ct(t,m),t.intersect=function(y){return J.info("lightningBolt intersect",t,y),ct.polygon(t,h,y)},s}p(kg,"lightningBolt");var vS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),LS=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),FS=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Eu=10,Mu=10;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-a,t.width<Mu&&(t.width=Mu);const k=x/2/(2.5+x/50);t.height=(t.height??0)-o-k*3,t.height<Eu&&(t.height=Eu)}const{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=l/2,f=u/(2.5+l/50),d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+f+o*2,m=d*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=pt.svg(n),b=LS(0,0,l,d,u,f,m),k=FS(0,f,l,d,u,f),T=ft(t,{}),B=x.path(b,T),L=x.path(k,T);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=vS(0,0,l,d,u,f,m);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ae(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-l/2}, ${-(d/2+f)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(x){const b=ct.rect(t,x),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(u*u));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},n}p(wg,"linedCylinder");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:m}=t,y=pt.svg(n),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-l/2-l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:d/2},...Nr(-l/2-l/2*.1,d/2,l/2+l/2*.1,d/2,f,.8),{x:l/2+l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:-d/2},{x:-l/2,y:-d/2},{x:-l/2,y:d/2*1.1},{x:-l/2,y:-d/2}],b=y.polygon(x.map(T=>[T.x,T.y]),C),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(c.x-(c.left??0))},${-u/2+(t.padding??0)-f-(c.y-(c.top??0))})`),Ct(t,k),t.intersect=function(T){return ct.polygon(t,x,T)},n}p(Sg,"linedWaveEdgedRect");var AS=56,ln=72,$u=8,Ou=2,ES=8,MS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Iu=Math.PI/3,Du=.6,hn=p((e,t)=>{const r=t*Du,i=t*Math.sqrt(1-Du**2),s=Math.cos(Iu),a=-Math.sin(Iu),o=r*-a,n=e+r*s,c=i*s,h=i*a;return`M ${o-c} ${n-h} L ${o+c} ${n+h}`},"businessMarkerPathForCircle"),$S={normal:hn(-24,12),hollow:hn(-23,9),awesome:hn(-21,13),icon:"M 12 -8 L 26 -26"},Pu=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),ph=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const n=pt.svg(e).path(r,ft(t,s?{fill:"none"}:{}));return e.insert(()=>n,":first-child").attr("class",i)}const a=e.append("path").attr("class",i).attr("d",r);return s&&a.attr("fill","none"),a},"appendActorPath"),OS=p((e,t,r,i,s,a,o=!1)=>{if(t.look==="handDrawn"){const h=pt.svg(e).circle(r,i,s*2,ft(t,o?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",a)}const n=e.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",s);return o&&n.attr("fill","none"),n},"appendActorCircle"),IS=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",$S[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function qs(e,t,r,i){const{labelStyles:s,nodeStyles:a}=yt(t);t.labelStyle=s;const o=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:n,bbox:c,label:h}=await Tt(e,o,St(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&n.attr("role","img").attr("aria-label",l),h.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:f}=Pt();Ye(n,t.colorIndex,u,f.borderColorArray);let d,m;if(t.stereotype){const F=await Zr(n,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});d=F.label.attr("class","label usecase-stereotype"),m=F.bbox}const y=n.append("g").attr("class",`usecase-actor-glyph ${MS[r]}`).attr("style",a||null);await i(y,t),IS(y,t,r);const C=t.padding??ES,x=(m==null?void 0:m.height)??0,b=ln+$u+c.height+(m?x+Ou:0),k=Math.max(AS,c.width,(m==null?void 0:m.width)??0)+C*2,T=b+C*2,B=-b/2;y.attr("transform",`translate(0,${B+ln/2})`);let L=B+ln+$u;d&&m&&(L+=x/2,Pu(d,m,L),L+=x/2+Ou),Pu(h,c,L+c.height/2);const A=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-T/2).attr("width",k).attr("height",T).attr("opacity",0).attr("aria-hidden","true");return Ct(t,A),t.intersect=F=>ct.rect(t,F),n}p(qs,"renderUsecaseActor");var DS=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Tg(e,t){return qs(e,t,"normal",(r,i)=>{ph(r,i,DS,"usecase-actor-stick")})}p(Tg,"usecaseActor");var PS=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function _g(e,t){return qs(e,t,"awesome",(r,i)=>{ph(r,i,PS,"usecase-actor-awesome-silhouette")})}p(_g,"usecaseActorAwesome");var RS=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Bg(e,t){return qs(e,t,"hollow",(r,i)=>{OS(r,i,0,-23,9,"usecase-actor-hollow-head",!0),ph(r,i,RS,"usecase-actor-hollow-body",!0)})}p(Bg,"usecaseActorHollow");var di=52,Ru=42,qu=-2,qS=p(async(e,t)=>{var h;const r=-di/2,i=qu-di/2;if(t.look==="handDrawn"){const u=pt.svg(e).rectangle(r,i,di,di,ft(t,{}));e.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",di).attr("height",di).attr("rx",4).attr("ry",4);const s=t.icon??"",a=await Of(s.includes(":")?s:`fa:${s}`),o=await Ui(s,{height:Ru,width:Ru,fallbackPrefix:"fa"}),n=e.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${o}</g>`),c=(h=n.node())==null?void 0:h.getBBox();c&&n.attr("transform",`translate(${-c.width/2-c.x},${qu-c.height/2-c.y})`)},"drawIconActor");async function vg(e,t){return qs(e,t,"icon",qS)}p(vg,"usecaseActorIcon");var Nu=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function Lg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const a=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:o,bbox:n,halfPadding:c,label:h}=await Tt(e,a,St(t,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:l,themeVariables:u}=Pt();Ye(o,t.colorIndex,l,u.borderColorArray);let f,d;if(r.stereotype){const N=await Zr(o,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=N.label.attr("class","label usecase-stereotype"),d=N.bbox}const m=d?2:0,y=n.height+((d==null?void 0:d.height)??0)+m,C=Math.max(n.width,(d==null?void 0:d.width)??0),x=c??10,b=C/2+x*2,k=y/2+x*2,T=Math.min(Math.max(x/5,1),x/2),B=C/2+T,L=b-T,A=B/b,F=L/b,z=k*Math.sqrt(Math.max(0,1-A*A)),R=-k*Math.sqrt(Math.max(0,1-F*F));f&&d&&Nu(f,d,-y/2+d.height/2),Nu(h,n,y/2-n.height/2);let q;if(t.look==="handDrawn"){const E=pt.svg(o).ellipse(0,0,b*2,k*2,ft(t,{}));q=o.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else q=o.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);o.append("path").attr("class","usecase-business-marker").attr("d",`M ${B} ${z} L ${L} ${R}`).attr("fill","none").attr("style",s||null);const tt=r.accessibleName??r.label;return tt&&o.attr("role","img").attr("aria-label",tt),Ct(t,q),t.calcIntersect=(N,E)=>ct.ellipse(N,N.width/2,N.height/2,E),t.intersect=N=>ct.ellipse(t,b,k,N),o}p(Lg,"usecaseBusiness");var cn=8,Wu=4,NS=1,un=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-a})`)},"positionLabel"),WS=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:NS},"numericStrokeWidth");async function Fg(e,t){var N;const r=t,{labelStyles:i,nodeStyles:s}=yt(t),{stylesMap:a}=Wr(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t,"usecase-json-table"));o.attr("role","img"),r.accessibleName&&o.attr("aria-label",r.accessibleName),c.attr("class","label usecase-json-title");const h=o.append("g").attr("class","usecase-json-table-grid"),l=[];for(const E of r.jsonRows??[]){const M=await Zr(h,E.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),v=await Zr(h,E.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:M.label.attr("class","label usecase-json-key"),bbox:M.bbox},value:{label:v.label.attr("class","label usecase-json-value"),bbox:v.bbox}})}const u=Math.max(0,...l.map(({key:E})=>E.bbox.width))+cn*2,f=Math.max(0,...l.map(({value:E})=>E.bbox.width))+cn*2,d=n.width+cn*2,m=Math.max(d,u+f),y=f+Math.max(0,m-u-f),C=n.height+Wu*2,x=l.map(({key:E,value:M})=>Math.max(E.bbox.height,M.bbox.height)+Wu*2),b=C+x.reduce((E,M)=>E+M,0),k=WS(a.get("stroke-width")),T=m+k*2,B=b+k*2,L=-m/2,A=-b/2,F=t.look==="handDrawn"?pt.svg(o):void 0,z=F?ft(t,{}):void 0,R=p((E,M,v,P,$,j)=>{if(F&&z){const V=F.rectangle(v,P,$,j,z);return E.insert(()=>V,":first-child").attr("class",M)}return E.insert("rect",":first-child").attr("class",M).attr("x",v).attr("y",P).attr("width",$).attr("height",j).attr("style",s)},"insertCell"),q=R(o,"label-container usecase-json-border",-T/2,-B/2,T,B);R(h,"usecase-json-cell usecase-json-title-cell",L,A,m,C),(N=h.node())==null||N.append(c.node()),un(c,n,0,A+C/2);let tt=A+C;return l.forEach(({key:E,value:M},v)=>{var j;const P=x[v],$=h.append("g").attr("class","usecase-json-row").attr("data-row-index",v).attr("transform",`translate(0,${tt})`);R($,"usecase-json-cell usecase-json-key-cell",L,0,u,P),R($,"usecase-json-cell usecase-json-value-cell",L+u,0,y,P),(j=$.node())==null||j.append(E.label.node(),M.label.node()),un(E.label,E.bbox,L+u/2,P/2),un(M.label,M.bbox,L+u+y/2,P/2),tt+=P}),Ct(t,q),t.intersect=E=>ct.rect(t,E),o}p(Fg,"usecaseJsonTable");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,m=f-2*n,y=-d/2,C=-m/2,{cssStyles:x}=t,b=pt.svg(c),k=ft(t,{}),T=[{x:y-n,y:C+n},{x:y-n,y:C+m+n},{x:y+d-n,y:C+m+n},{x:y+d-n,y:C+m},{x:y+d,y:C+m},{x:y+d,y:C+m-n},{x:y+d+n,y:C+m-n},{x:y+d+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],B=[{x:y,y:C+n},{x:y+d-n,y:C+n},{x:y+d-n,y:C+m},{x:y+d,y:C+m},{x:y+d,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Ht(T);let A=b.path(L,k);const F=Ht(B);let z=b.path(F,k);t.look!=="handDrawn"&&(A=Xn(A),z=Xn(z));const R=c.insert("g",":first-child");return R.insert(()=>A),R.insert(()=>z),R.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),Ct(t,R),t.intersect=function(q){return ct.polygon(t,T,q)},c}p(Ag,"multiRect");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=t.padding??0,c=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let l=!0;(t.width||t.height)&&(l=!1,t.width=((t==null?void 0:t.width)??0)-c*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+c*2,f=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?f/4:f/8,m=f+(l?d/2:-d/2),y=-u/2,C=-m/2,x=10,{cssStyles:b}=t,k=Nr(y-x,C+m+x,y+u-x,C+m+x,d,.8),T=k==null?void 0:k[k.length-1],B=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...k,{x:y+u-x,y:T.y-x},{x:y+u,y:T.y-x},{x:y+u,y:T.y-2*x},{x:y+u+x,y:T.y-2*x},{x:y+u+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],L=[{x:y,y:C+x},{x:y+u-x,y:C+x},{x:y+u-x,y:T.y-x},{x:y+u,y:T.y-x},{x:y+u,y:C},{x:y,y:C}],A=pt.svg(s),F=ft(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=Ht(B),R=A.path(z,F),q=Ht(L),tt=A.path(q,F),N=s.insert(()=>R,":first-child");return N.insert(()=>tt),N.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-d-(a.y-(a.top??0))})`),Ct(t,N),t.intersect=function(E){return ct.polygon(t,B,E)},s}p(Eg,"multiWaveEdgedRectangle");async function Mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i,t.useHtmlLabels||ce(Kt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,f=-l/2,{cssStyles:d}=t,m=pt.svg(o),y=ft(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(u,f,h,l,y),x=o.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),c.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,x),t.intersect=function(b){return ct.rect(t,b)},o}p(Mg,"note");var zS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),c=o+n,h=.5,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=pt.svg(s),m=ft(t,{}),y=zS(0,0,c),C=d.path(y,m);u=s.insert(()=>C,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),f&&u.attr("style",f)}else u=fr(s,c,c,l),u.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&u.attr("style",i),Ct(t,u),t.calcIntersect=function(d,m){const y=d.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return ct.polygon(d,C,m)},t.intersect=function(d){return this.calcIntersect(t,d)},s}p($g,"question");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=c.width+(t.look==="neo"?a*2:a),u=Math.max(c.height+(t.look==="neo"?o*2:o),t.height??0),f=u/4,m=-Math.max(l,(t.width??0)-f)/2,y=-u/2,C=y/2,x=[{x:m+C,y},{x:m,y:0},{x:m+C,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,k=pt.svg(n),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=Ht(x),L=k.path(B,T),A=n.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-C/2},0)`),h.attr("transform",`translate(${-C/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Ct(t,A),t.intersect=function(F){return ct.polygon(t,x,F)},n}p(Og,"rect_left_inv_arrow");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),c=t.description,h=t.label,l=await br(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ce(Pt())){const F=l.children[0],z=Dt(l);u=F.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}J.info("Text 2",c);const f=c||[],d=l.getBBox(),m=await br(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),y=m.children[0],C=Dt(m);u=y.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Dt(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),Dt(l).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),T=-u.width/2-x,B=-u.height/2-x;let L,A;if(t.look==="handDrawn"){const F=pt.svg(a),z=ft(t,{}),R=F.path(Pe(T,B,b,k,t.rx||0),z),q=F.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,z);A=a.insert(()=>(J.debug("Rough node insert CXC",R),q),":first-child"),L=a.insert(()=>(J.debug("Rough node insert CXC",R),R),":first-child")}else L=o.insert("rect",":first-child"),A=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Ct(t,L),t.intersect=function(F){return ct.rect(t,F)},a}p(Ig,"rectWithTitle");async function Dg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return ji(e,t,s)}p(Dg,"roundedRect");var Hr=8;async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Hr:Hr*2),l=((t==null?void 0:t.height)??n.height)+a*2,u=h-Hr,f=l,d=Hr-h/2,m=-l/2,{cssStyles:y}=t,C=pt.svg(o),x=ft(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+f},{x:d-Hr,y:m+f},{x:d-Hr,y:m},{x:d,y:m},{x:d,y:m+f}],k=C.polygon(b.map(B=>[B.x,B.y]),x),T=o.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",ae(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${Hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,T),t.intersect=function(B){return ct.rect(t,B)},o}p(Pg,"shadedProcess");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2)*1.5,f=l,d=u/1.5,m=-f/2,y=-d/2,{cssStyles:C}=t,x=pt.svg(n),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+d},{x:m+f,y:y+d},{x:m+f,y:y-d/2}],T=Ht(k),B=x.path(T,b),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-d/4+(t.padding??0)-(c.y-(c.top??0))})`),Ct(t,L),t.intersect=function(A){return ct.polygon(t,k,A)},n}p(Rg,"slopedRect");async function qg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},o=await ji(e,t,a);if(t.colorIndex!==void 0){const{theme:n,themeVariables:c}=Pt();Ye(o,t.colorIndex,n,c.borderColorArray)}return o}p(qg,"squareRect");var Kn=50,HS=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(Kn-1))),a=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-a),h:i}},"stadiumDimensions");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?40:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),{w:h,h:l}=HS(c,a,o),u=l/2,{cssStyles:f}=t,d=pt.svg(n),m=ft(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-l/2},{x:h/2-u,y:-l/2},...or(-h/2+u,0,u,Kn,90,270),{x:h/2-u,y:l/2},...or(h/2-u,0,u,Kn,270,450)],C=Ht(y),x=d.path(C,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Ct(t,b),t.intersect=function(k){return ct.polygon(t,y,k)},n}p(Ng,"stadium");async function Wg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ji(e,t,r)}p(Wg,"state");function zg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:c,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=pt.svg(l),f=ft(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=n??c,y=(t.width??0)*5/14,C=u.circle(0,0,y,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=l.insert(()=>d,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),s&&x.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const T=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",B=T?`${T}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${B})`)}return Ct(t,x),t.intersect=function(T){return ct.circle(t,(t.width??0)/2,T)},l}p(zg,"stateEnd");function Hg(e,t,{config:{themeVariables:r}}){var n,c;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const l=pt.svg(a).circle(0,0,t.width,F1(i));o=a.insert(()=>l),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((c=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:c.id)??"",l=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${l})`)}return Ct(t,o),t.intersect=function(h){return ct.circle(t,(t.width??7)/2,h)},a}p(Hg,"stateStart");var fi=8;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.width+2*fi+a,t.width??0),l=Math.max(c.height+o,t.height??0),u=h-2*fi,f=l,d=-h/2,m=-l/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const C=pt.svg(n),x=ft(t,{}),b=C.rectangle(d,m,u+16,f,x),k=C.line(d+fi,m,d+fi,m+f,x),T=C.line(d+fi+u,m,d+fi+u,m+f,x);n.insert(()=>k,":first-child"),n.insert(()=>T,":first-child");const B=n.insert(()=>b,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",ae(L)),Ct(t,B)}else{const C=fr(n,u,f,y);i&&C.attr("style",i),Ct(t,C)}return t.intersect=function(C){return ct.polygon(t,y,C)},n}p(Yg,"subroutine");var dn=.2;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-dn*(t.height+o*2),10));const{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,l=dn*h,u=dn*h,d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+l-l,m=h,y=-d/2,C=-m/2,{cssStyles:x}=t,b=pt.svg(n),k=ft(t,{}),T=[{x:y-l/2,y:C},{x:y+d+l/2,y:C},{x:y+d+l/2,y:C+m},{x:y-l/2,y:C+m}],B=[{x:y+d-l/2,y:C+m},{x:y+d+l/2,y:C+m},{x:y+d+l/2,y:C+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Ht(T),A=b.path(L,k),F=Ht(B),z=b.path(F,{...k,fillStyle:"solid"}),R=n.insert(()=>z,":first-child");return R.insert(()=>A,":first-child"),R.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),Ct(t,R),t.intersect=function(q){return ct.polygon(t,T,q)},n}p(Ug,"taggedRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await Tt(e,t,St(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/8,l=.2*n,u=.2*c,f=c+h,{cssStyles:d}=t,m=pt.svg(s),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:f/2},...Nr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,h,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-u*.4,k=[{x:x+n-l,y:(b+c)*1.3},{x:x+n,y:b+c-u},{x:x+n,y:(b+c)*.9},...Nr(x+n,(b+c)*1.25,x+n-l,(b+c)*1.3,-c*.02,.5)],T=Ht(C),B=m.path(T,y),L=Ht(k),A=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>A,":first-child");return F.insert(()=>B,":first-child"),F.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),Ct(t,F),t.intersect=function(z){return ct.polygon(t,C,z)},s}p(jg,"taggedWaveEdgedRectangle");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),c=-o/2,h=-n/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",o).attr("height",n),Ct(t,l),t.intersect=function(u){return ct.rect(t,u)},s}p(Gg,"text");var YS=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
235
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
236
|
+
l${r},0
|
|
237
|
+
a${s},${a} 0,0,1 0,${i}
|
|
238
|
+
M${r},${-i}
|
|
239
|
+
a${s},${a} 0,0,0 0,${i}
|
|
240
|
+
l${-r},0`,"createCylinderPathD"),US=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),jS=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),zu=5,Hu=10;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,o=t.height??0;if(t.height&&(t.height=t.height-a,t.height<zu&&(t.height=zu)),t.width){const x=o/2/(2.5+o/50);t.width=t.width-a-x*3,t.width<Hu&&(t.width=Hu)}const{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=Math.max(t.height??0,c.height)+a,u=l/2,f=u/(2.5+l/50),d=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=pt.svg(n),x=US(0,0,d,l,f,u),b=jS(0,0,d,l,f,u),k=C.path(x,ft(t,{})),T=C.path(b,ft(t,{fill:"none"}));y=n.insert(()=>T,":first-child"),y=n.insert(()=>k,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=YS(0,0,d,l,f,u);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ae(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",f),y.attr("transform",`translate(${-d/2}, ${l/2} )`),h.attr("transform",`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Ct(t,y),t.intersect=function(C){const x=ct.rect(t,C),b=x.y-(t.y??0);if(u!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-f)){let k=f*f*(1-b*b/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=f-k,C.x-(t.x??0)>0&&(k=-k),x.x+=k}return x},n}p(Xg,"tiltedCylinder");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+o,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=ft(t,{}),C=Ht(u),x=m.path(C,y);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=fr(n,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,Ct(t,f),t.intersect=function(m){return ct.polygon(t,u,m)},n}p(Vg,"trapezoid");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,c=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<c&&(t.height=c),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,{cssStyles:d}=t,m=pt.svg(h),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],x=Ht(C),b=m.path(x,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ct(t,k),t.intersect=function(T){return ct.polygon(t,C,T)},h}p(Zg,"trapezoidalPentagon");var Yu=10,Uu=10;async function Kg(e,t){var T;const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Uu&&(t.width=Uu),t.height=(t==null?void 0:t.height)??0,t.height<Yu&&(t.height=Yu));const{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=ur((T=Pt().flowchart)==null?void 0:T.htmlLabels),l=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:l+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:m}=t,y=pt.svg(o),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Ht(d),b=y.path(x,C),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=u,Ct(t,k),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(B){return J.info("Triangle intersect",t,d,B),ct.polygon(t,d,B)},o}p(Kg,"triangle");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?f/4:f/8,m=f+(n?d:-d),{cssStyles:y}=t,x=14-u,b=x>0?x/2:0,k=pt.svg(c),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=[{x:-u/2-b,y:m/2},...Nr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],L=Ht(B),A=k.path(L,T),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),l.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-f/2+(t.padding??0)-d-(h.y-(h.top??0))})`),Ct(t,F),t.intersect=function(z){return ct.polygon(t,B,z)},c}p(Qg,"waveEdgedRectangle");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,l=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o,u=l/8,f=l+u*2,{cssStyles:d}=t,m=pt.svg(n),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-h/2,y:f/2},...Nr(-h/2,f/2,h/2,f/2,u,1),{x:h/2,y:-f/2},...Nr(h/2,-f/2,-h/2,-f/2,u,-1)],x=Ht(C),b=m.path(x,y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Ct(t,k),t.intersect=function(T){return ct.polygon(t,C,T)},n}p(Jg,"waveRectangle");var Jt=10;async function tm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Jt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Jt,10));const{shapeSvg:o,bbox:n,label:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Jt,l=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+Jt,u=h-Jt,f=l-Jt,d=-u/2,m=-f/2,{cssStyles:y}=t,C=pt.svg(o),x=ft(t,{}),b=[{x:d-Jt,y:m-Jt},{x:d-Jt,y:m+f},{x:d+u,y:m+f},{x:d+u,y:m-Jt}],k=`M${d-Jt},${m-Jt} L${d+u},${m-Jt} L${d+u},${m+f} L${d-Jt},${m+f} L${d-Jt},${m-Jt}
|
|
241
|
+
M${d-Jt},${m} L${d+u},${m}
|
|
242
|
+
M${d},${m-Jt} L${d},${m+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(k,x),B=o.insert(()=>T,":first-child");return B.attr("transform",`translate(${Jt/2}, ${Jt/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(n.width/2)+Jt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Jt/2-(n.y-(n.top??0))})`),Ct(t,B),t.intersect=function(L){return ct.polygon(t,b,L)},o}p(tm,"windowPane");var ju=new Set(["redux-color","redux-dark-color"]),GS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function gh(e,t){var At,Et,Nt,Bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Kt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:c}=s;if(t.look==="handDrawn"){const{themeVariables:ut}=Kt(),{background:bt}=ut,Mt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${bt}`]};await gh(e,Mt)}const h=Kt();t.useHtmlLabels=h.htmlLabels;let l=((At=h.er)==null?void 0:At.diagramPadding)??10,u=((Et=h.er)==null?void 0:Et.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:m}=yt(t);if(r.attributes.length===0&&t.label){const ut={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};Tr(t.label,h)+ut.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const bt=await ji(e,t,ut);if(i!=null&&ju.has(i)){const Mt=r.colorIndex??0;bt.attr("data-color-id",`color-${Mt%c.length}`)}if(!ur(h.htmlLabels)){const Mt=bt.select("text"),Rt=(Nt=Mt.node())==null?void 0:Nt.getBBox();Mt.attr("transform",`translate(${-Rt.width/2}, 0)`)}return bt}h.htmlLabels||(l*=1.25,u*=1.25);let y=St(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await gi(C,t.label??"",h,0,0,["name"],d);x.height+=u;let b=0;const k=[],T=[];let B=0,L=0,A=0,F=0,z=!0,R=!0;for(const ut of r.attributes){const bt=await gi(C,ut.type,h,0,b,["attribute-type"],d);B=Math.max(B,bt.width+l);const Mt=await gi(C,ut.name,h,0,b,["attribute-name"],d);L=Math.max(L,Mt.width+l);const Rt=await gi(C,ut.keys.join(),h,0,b,["attribute-keys"],d);A=Math.max(A,Rt.width+l);const Lt=await gi(C,ut.comment,h,0,b,["attribute-comment"],d);F=Math.max(F,Lt.width+l);const H=Math.max(bt.height,Mt.height,Rt.height,Lt.height)+u;T.push({yOffset:b,rowHeight:H}),b+=H}let q=4;A<=l&&(z=!1,A=0,q--),F<=l&&(R=!1,F=0,q--);const tt=C.node().getBBox();if(x.width+l*2-(B+L+A+F)>0){const ut=x.width+l*2-(B+L+A+F);B+=ut/q,L+=ut/q,A>0&&(A+=ut/q),F>0&&(F+=ut/q)}const N=B+L+A+F,E=pt.svg(C),M=ft(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let v=0;T.length>0&&(v=T.reduce((ut,bt)=>ut+((bt==null?void 0:bt.rowHeight)??0),0));const P=Math.max(tt.width+l*2,(t==null?void 0:t.width)||0,N),$=Math.max((v??0)+x.height,(t==null?void 0:t.height)||0),j=-P/2,V=-$/2;if(C.selectAll("g:not(:first-child)").each((ut,bt,Mt)=>{const Rt=Dt(Mt[bt]),Lt=Rt.attr("transform");let H=0,kt=0;if(Lt){const te=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Lt);te&&(H=parseFloat(te[1]),kt=parseFloat(te[2]),Rt.attr("class").includes("attribute-name")?H+=B:Rt.attr("class").includes("attribute-keys")?H+=B+L:Rt.attr("class").includes("attribute-comment")&&(H+=B+L+A))}Rt.attr("transform",`translate(${j+l/2+H}, ${kt+V+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(V+u/2)+")"),i!=null&&ju.has(i)){const ut=r.colorIndex??0;C.attr("data-color-id",`color-${ut%c.length}`)}const dt=E.rectangle(j,V,P,$,M),lt=C.insert(()=>dt,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[ut,bt]of T.entries()){const Rt=(ut+1)%2===0&&bt.yOffset!==0,Lt=E.rectangle(j,x.height+V+(bt==null?void 0:bt.yOffset),P,bt==null?void 0:bt.rowHeight,{...M,fill:Rt?a:o,stroke:n});C.insert(()=>Lt,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}const mt=1e-4;let nt=mi(j,x.height+V,P+j,x.height+V,mt),wt=E.polygon(nt.map(ut=>[ut.x,ut.y]),M);if(C.insert(()=>wt).attr("class","divider"),nt=mi(B+j,x.height+V,B+j,$+V,mt),wt=E.polygon(nt.map(ut=>[ut.x,ut.y]),M),C.insert(()=>wt).attr("class","divider"),z){const ut=B+L+j;nt=mi(ut,x.height+V,ut,$+V,mt),wt=E.polygon(nt.map(bt=>[bt.x,bt.y]),M),C.insert(()=>wt).attr("class","divider")}if(R){const ut=B+L+A+j;nt=mi(ut,x.height+V,ut,$+V,mt),wt=E.polygon(nt.map(bt=>[bt.x,bt.y]),M),C.insert(()=>wt).attr("class","divider")}for(const ut of k){const bt=x.height+V+ut;nt=mi(j,bt,P+j,bt,mt),wt=E.polygon(nt.map(Mt=>[Mt.x,Mt.y]),M),C.insert(()=>wt).attr("class","divider")}if(Ct(t,lt),m&&t.look!=="handDrawn")if(i!=null&&GS.has(i))C.selectAll("path").attr("style",m);else{const ut=m.split(";"),bt=(Bt=ut==null?void 0:ut.filter(Mt=>Mt.includes("stroke")))==null?void 0:Bt.map(Mt=>`${Mt}`).join("; ");C.selectAll("path").attr("style",bt??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ut){return ct.rect(t,ut)},C}p(gh,"erBox");async function gi(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==tc(t)&&(t=tc(t),t=t.replaceAll("<","<").replaceAll(">",">"));const c=n.node().appendChild(await De(n,t,{width:Tr(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let l=c.children[0];for(l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">")}let h=c.getBBox();if(ur(r.htmlLabels)){const l=c.children[0];l.style.textAlign="start";const u=Dt(c);h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}p(gi,"addText");function mi(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(mi,"lineToPolygon");async function em(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",St(t)).attr("id",t.domId||t.id);let n=null,c=null,h=null,l=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ps(n,{text:`«${b}»`},0),u=n.node().getBBox().height}c=o.insert("g").attr("class","label-group text"),await ps(c,t,0,["font-weight: bolder"]);const m=c.node().getBBox();f=m.height,h=o.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await ps(h,b,y,[b.parseClassifier()]);y+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),l=o.insert("g").attr("class","methods-group text");let C=0;for(const b of t.methods){const k=await ps(l,b,C,[b.parseClassifier()]);C+=k+a}let x=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-m.width/2}, ${u})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+s*2})`),x=o.node().getBBox(),l.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(em,"textHelper");async function ps(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Kt();let o="useHtmlLabels"in t?t.useHtmlLabels:ur(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),_s(n)&&(o=!0);const c=await De(s,ul(Rr(n)),{width:Tr(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,l=1;if(o){const u=c.children[0],f=Dt(c);l=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(l+=u.innerHTML.split("<mrow>").length-1),await ch(u),h=u.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Dt(c).selectAll("tspan").attr("font-weight",""),l=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=c.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*l)+r)+")"),h.height}p(ps,"addText");async function rm(e,t){var v,P;const r=Pt(),{theme:i,themeVariables:s}=r,{useGradient:a,borderColorArray:o}=s,n=r.class.padding??12,c=n,h=t.useHtmlLabels??ur(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:f}=await em(e,t,r,h,c);Ye(u,t.colorIndex,i,o);const{labelStyles:d,nodeStyles:m}=yt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const y=((v=l.styles)==null?void 0:v.join(";"))||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=l.members.length===0&&l.methods.length===0&&!((P=r.class)!=null&&P.hideEmptyMembersBox),x=pt.svg(u),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,f.width);let T=Math.max(t.height??0,f.height);const B=(t.height??0)>f.height;l.members.length===0&&l.methods.length===0?T+=c:l.members.length>0&&l.methods.length===0&&(T+=c*2);const L=-k/2,A=-T/2;let F=C?n*2:l.members.length===0&&l.methods.length===0?-n:0;B&&(F=n*2);const z=x.rectangle(L-n,A-n-(C?n:l.members.length===0&&l.methods.length===0?-n/2:0),k+2*n,T+2*n+F,b),R=u.insert(()=>z,":first-child");R.attr("class","basic label-container outer-path");const q=R.node().getBBox(),tt=u.select(".annotation-group").node().getBBox().height-(C?n/2:0)||0,N=u.select(".label-group").node().getBBox().height-(C?n/2:0)||0,E=u.select(".members-group").node().getBBox().height-(C?n/2:0)||0,M=(tt+N+A+n-(A-n-(C?n:l.members.length===0&&l.methods.length===0?-n/2:0)))/2;if(u.selectAll(".text").each(($,j,V)=>{var At,Et;const dt=Dt(V[j]),lt=dt.attr("transform");let mt=0;if(lt){const Bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(lt);Bt&&(mt=parseFloat(Bt[2]))}let nt=mt+A+n-(C?n:l.members.length===0&&l.methods.length===0?-n/2:0);if(dt.attr("class").includes("methods-group")){const Nt=Math.max(E,c/2);B?nt=Math.max(M,tt+N+Nt+A+c*2+n)+c*2:nt=tt+N+Nt+A+c*4+n}l.members.length===0&&l.methods.length===0&&((At=r.class)!=null&&At.hideEmptyMembersBox)&&(l.annotations.length>0?nt=mt-c:nt=mt),h||(nt-=4);let wt=L;(dt.attr("class").includes("label-group")||dt.attr("class").includes("annotation-group"))&&(wt=-((Et=dt.node())==null?void 0:Et.getBBox().width)/2||0,u.selectAll("text").each(function(Nt,Bt,ut){window.getComputedStyle(ut[Bt]).textAnchor==="middle"&&(wt=0)})),dt.attr("transform",`translate(${wt}, ${nt})`)}),l.members.length>0||l.methods.length>0||C){const $=tt+N+A+n,j=x.line(q.x,$,q.x+q.width,$+.001,b);u.insert(()=>j).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(C||l.members.length>0||l.methods.length>0){const $=tt+N+E+A+c*2+n,j=x.line(q.x,B?Math.max(M,$):$,q.x+q.width,(B?Math.max(M,$):$)+.001,b);u.insert(()=>j).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",y),R.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",y),!h){const $=RegExp(/color\s*:\s*([^;]*)/),j=$.exec(y);if(j){const V=j[0].replace("color","fill");u.selectAll("tspan").attr("style",V)}else if(d){const V=$.exec(d);if(V){const dt=V[0].replace("color","fill");u.selectAll("tspan").attr("style",dt)}}}return Ct(t,R),t.intersect=function($){return ct.rect(t,$)},u}p(rm,"classBox");async function im(e,t){var q,tt;const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,c="verifyMethod"in t,h=St(t),l=Pt(),{themeVariables:u}=l,{borderColorArray:f,requirementEdgeLabelBackground:d}=u,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let C;c?C=await sr(y,`<<${s.type}>>`,0,t.labelStyle):C=await sr(y,"<<Element>>",0,t.labelStyle);let x=C;const b=await sr(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+n,c){const N=await sr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=N;const E=await sr(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=E;const M=await sr(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=M,await sr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const N=await sr(y,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,m);x+=N,await sr(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,m)}const k=(((q=y.node())==null?void 0:q.getBBox().width)??200)+o,T=(((tt=y.node())==null?void 0:tt.getBBox().height)??200)+o,B=-k/2,L=-T/2,A=pt.svg(y),F=ft(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=A.rectangle(B,L,k,T,F),R=y.insert(()=>z,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",i),f!=null&&f.length){const N=t.colorIndex??0;y.attr("data-color-id",`color-${N%f.length}`)}if(y.selectAll(".label").each((N,E,M)=>{const v=Dt(M[E]),P=v.attr("transform");let $=0,j=0;if(P){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);mt&&($=parseFloat(mt[1]),j=parseFloat(mt[2]))}const V=j-T/2;let dt=B+o/2;(E===0||E===1)&&(dt=$),v.attr("transform",`translate(${dt}, ${V+o})`)}),x>C+b+n){const N=L+C+b+n;let E;if(t.look==="neo"){const P=[[B,N],[B+k,N],[B+k,N+.001],[B,N+.001]];E=A.polygon(P,F)}else E=A.line(B,N,B+k,N,F);y.insert(()=>E).attr("class","divider")}return Ct(t,R),t.intersect=function(N){return ct.rect(t,N)},i&&t.look!=="handDrawn"&&(d||f!=null&&f.length)&&y.selectAll("path").attr("style",i),y}p(im,"requirementBox");async function sr(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=Pt(),n=o.htmlLabels??!0,c=await De(a,ul(Rr(t)),{width:Tr(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let h;if(n){const l=c.children[0],u=Dt(c);s==="start"&&Dt(l).style("text-align","left"),h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}else{const l=c.children[0];for(const u of l.children)i&&u.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const u of l.children)u.setAttribute("text-anchor","start")}h=c.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}p(sr,"addText");var XS=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function sm(e,t,{config:r}){var tt,N;const{labelStyles:i,nodeStyles:s}=yt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:c,label:h}=await Tt(e,t,St(t)),l=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((tt=r==null?void 0:r.kanban)!=null&&tt.ticketBaseUrl)&&(u=(N=r==null?void 0:r.kanban)==null?void 0:N.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;f?{label:m,bbox:y}=await Zr(f,"ticket"in t&&t.ticket||"",d):{label:m,bbox:y}=await Zr(n,"ticket"in t&&t.ticket||"",d);const{label:C,bbox:x}=await Zr(n,"assigned"in t&&t.assigned||"",d);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,T=Math.max(y.height,x.height)/2,B=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+T,L=-k/2,A=-B/2;h.attr("transform","translate("+(l-k/2)+", "+(-T-c.height/2)+")"),m.attr("transform","translate("+(l-k/2)+", "+(-T+c.height/2)+")"),C.attr("transform","translate("+(l+k/2-x.width-2*a)+", "+(-T+c.height/2)+")");let F;const{rx:z,ry:R}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const E=pt.svg(n),M=ft(t,{}),v=z||R?E.path(Pe(L,A,k,B,z||0),M):E.rectangle(L,A,k,B,M);F=n.insert(()=>v,":first-child"),F.attr("class","basic label-container").attr("style",q||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",R??5).attr("x",L).attr("y",A).attr("width",k).attr("height",B);const E="priority"in t&&t.priority;if(E){const M=n.append("line"),v=L+2,P=A+Math.floor((z??0)/2),$=A+B-Math.floor((z??0)/2);M.attr("x1",v).attr("y1",P).attr("x2",v).attr("y2",$).attr("stroke-width","4").attr("stroke",XS(E))}}return Ct(t,F),t.height=B,t.intersect=function(E){return ct.rect(t,E)},n}p(sm,"kanbanItem");async function am(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await Tt(e,t,St(t)),c=a.width+10*o,h=a.height+8*o,l=.15*c,{cssStyles:u}=t,f=a.width+20,d=a.height+20,m=Math.max(c,f),y=Math.max(h,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let C;const x=`M0 0
|
|
243
|
+
a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
|
|
244
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
245
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
246
|
+
a${l},${l} 1 0,0 ${m*.25},${y*.1}
|
|
247
|
+
|
|
248
|
+
a${l},${l} 1 0,0 ${m*.15},${y*.33}
|
|
249
|
+
a${l*.8},${l*.8} 1 0,0 0,${y*.34}
|
|
250
|
+
a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
|
|
251
|
+
|
|
252
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
|
|
253
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
254
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
255
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
256
|
+
|
|
257
|
+
a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
258
|
+
a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
|
|
259
|
+
a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
|
|
260
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=pt.svg(s),k=ft(t,{}),T=b.path(x,k);C=s.insert(()=>T,":first-child"),C.attr("class","basic label-container").attr("style",ae(u))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return C.attr("transform",`translate(${-m/2}, ${-y/2})`),Ct(t,C),t.calcIntersect=function(b,k){return ct.rect(b,k)},t.intersect=function(b){return J.info("Bang intersect",t,b),ct.rect(t,b)},s}p(am,"bang");async function om(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await Tt(e,t,St(t)),c=a.width+2*o,h=a.height+2*o,l=.15*c,u=.25*c,f=.35*c,d=.2*c,{cssStyles:m}=t;let y;const C=`M0 0
|
|
261
|
+
a${l},${l} 0 0,1 ${c*.25},${-1*c*.1}
|
|
262
|
+
a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
|
|
263
|
+
a${u},${u} 1 0,1 ${c*.35},${c*.2}
|
|
264
|
+
|
|
265
|
+
a${l},${l} 1 0,1 ${c*.15},${h*.35}
|
|
266
|
+
a${d},${d} 1 0,1 ${-1*c*.15},${h*.65}
|
|
267
|
+
|
|
268
|
+
a${u},${l} 1 0,1 ${-1*c*.25},${c*.15}
|
|
269
|
+
a${f},${f} 1 0,1 ${-1*c*.5},0
|
|
270
|
+
a${l},${l} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
271
|
+
|
|
272
|
+
a${l},${l} 1 0,1 ${-1*c*.1},${-1*h*.35}
|
|
273
|
+
a${d},${d} 1 0,1 ${c*.1},${-1*h*.65}
|
|
274
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=pt.svg(s),b=ft(t,{}),k=x.path(C,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",ae(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),Ct(t,y),t.calcIntersect=function(x,b){return ct.rect(x,b)},t.intersect=function(x){return J.info("Cloud intersect",t,x),ct.rect(t,x)},s}p(om,"cloud");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=yt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await Tt(e,t,St(t)),c=a.width+8*o,h=a.height+2*o,l=5,u=t.look==="neo"?`
|
|
275
|
+
M${-c/2} ${h/2-l}
|
|
276
|
+
v${-h+2*l}
|
|
277
|
+
q0,-${l} ${l},-${l}
|
|
278
|
+
h${c-2*l}
|
|
279
|
+
q${l},0 ${l},${l}
|
|
280
|
+
v${h-l}
|
|
281
|
+
H${-c/2}
|
|
282
|
+
Z
|
|
283
|
+
`:`
|
|
284
|
+
M${-c/2} ${h/2-l}
|
|
285
|
+
v${-h+2*l}
|
|
286
|
+
q0,-${l} ${l},-${l}
|
|
287
|
+
h${c-2*l}
|
|
288
|
+
q${l},0 ${l},${l}
|
|
289
|
+
v${h-2*l}
|
|
290
|
+
q0,${l} ${-l},${l}
|
|
291
|
+
h${-(c-2*l)}
|
|
292
|
+
q${-l},0 ${-l},${-l}
|
|
293
|
+
Z
|
|
294
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),Ct(t,f),t.calcIntersect=function(d,m){return ct.rect(d,m)},t.intersect=function(d){return ct.rect(t,d)},s}p(nm,"defaultMindmapNode");async function lm(e,t){const r={padding:t.padding??0};return fh(e,t,r)}p(lm,"mindmapCircle");var VS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:qg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Dg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ng},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Yg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:eg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:ng},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Rp},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:jp},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:zp},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Jp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:fh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:am},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:om},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$g},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:cg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Cg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Vg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:yg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ig},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Gg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Hp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Pg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:zg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ug},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Vp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Zp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Kp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:kg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:hg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Xg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:wg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Qp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:rg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Kg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:tm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ag},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Zg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:og},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Rg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Eg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ag},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Pp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Xp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ug},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Jg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Og},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Sg}],ZS=p(()=>{const t=[...Object.entries({state:Wg,choice:Yp,note:Mg,composite:Up,rectWithTitle:Ig,labelRect:xg,block_arrow:Wp,collapsedGroup:Np,iconSquare:gg,iconCircle:fg,icon:dg,iconRounded:pg,imageSquare:mg,anchor:Ip,kanbanItem:sm,mindmapCircle:lm,defaultMindmapNode:nm,classBox:rm,erBox:gh,requirementBox:im,usecaseActor:Tg,usecaseActorHollow:Bg,usecaseActorAwesome:_g,usecaseActorIcon:vg,usecaseBusiness:Lg,usecaseEllipse:sg,usecaseJsonTable:Fg}),...VS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),hm=ZS();function KS(e){return e in hm}p(KS,"isValidShape");var Ns=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),ho=new Map;async function cm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?hm[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",ae(t.look)),t.tooltip&&s.attr("title",t.tooltip),ho.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(cm,"insertNode");var vF=p((e,t)=>{ho.set(t.id,e)},"setNodeElem"),LF=p(()=>{ho.clear()},"clear"),FF=p(e=>{const t=ho.get(e.id);J.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),QS=p(async(e,t)=>{const r=Pt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:n,borderColorArray:c}=s,h=n,{labelStyles:l,nodeStyles:u,borderStyles:f,backgroundStyles:d}=yt(t),m=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);Ye(m,t.colorIndex,i,c);const y=ur(r.flowchart.htmlLabels),C=t.direction==="LR",x=m.insert("g").attr("class","cluster-label swimlane-label"),b=await De(x,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let k=b.getBBox();if(y){const M=b.children[0],v=Dt(b);k=M.getBoundingClientRect(),v.attr("width",k.width),v.attr("height",k.height)}const T=t.padding??0,B=t.width<=k.width+T?k.width+T:t.width;t.width<=k.width+T?t.diff=(B-t.width)/2-T:t.diff=-T;const L=t.height,A=t.y-L/2,F=t.y+L/2,z=t.x-B/2,R=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:A+L/3,q=C?4:0,tt=k.height+2*q;let N,E;if(C){const M=Math.max(tt,k.height+2*q),v=z+M,P=Math.max(0,B-M);if(t.look==="handDrawn"){const V=pt.svg(m),dt=ft(t,{roughness:.7,fill:o,stroke:h,seed:a}),lt=ft(t,{roughness:.7,fill:"none",stroke:h,seed:a}),mt=V.rectangle(z,A,M,L,dt);N=m.insert(()=>mt,":first-child").attr("class","swimlane-title");const nt=V.rectangle(v,A,P,L,lt);E=m.insert(()=>nt,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",f.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",u).attr("x",z).attr("y",A).attr("width",M).attr("height",L).attr("fill",o).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",v).attr("y",A).attr("width",P).attr("height",L).attr("fill","none").attr("stroke",h);const $=z+M/2,j=t.y;x.attr("transform",`translate(${$}, ${j}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{const M=Math.max(0,R-A),v=Math.min(tt,M),P=A+v,$=Math.max(0,F-P),j=t.x-B/2;if(t.look==="handDrawn"){const lt=pt.svg(m),mt=ft(t,{roughness:.7,fill:o,stroke:h,fillWeight:3,seed:a}),nt=ft(t,{roughness:.7,fill:"none",stroke:h,seed:a}),wt=lt.rectangle(j,A,B,v,mt);N=m.insert(()=>wt,":first-child").attr("class","swimlane-title");const At=lt.rectangle(j,P,B,$,nt);E=m.insert(()=>At,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",f.join(";")),N.select("path").attr("style",d.join(";").replace("fill","stroke"))}else N=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",u).attr("x",j).attr("y",A).attr("width",B).attr("height",v).attr("fill",o).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",j).attr("y",P).attr("width",B).attr("height",$).attr("fill","none").attr("stroke",h);const V=t.x-k.width/2,dt=A+(v-k.height)/2;x.attr("transform",`translate(${V}, ${dt})`)}if(J.trace("Swimlane data ",t,JSON.stringify(t)),l){const M=x.select("span");M&&M.attr("style",l)}return t.offsetX=0,t.width=B,t.height=L,t.offsetY=k.height-T/2,t.intersect=function(M){return _r(t,M)},{cluster:m,labelBBox:k}},"swimlane"),um=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Pt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:n,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l,borderStyles:u,backgroundStyles:f}=yt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ye(d,t.colorIndex,i,c);const m=ce(r),y=d.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await De(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):C=await br(y,t.label,t.labelStyle||"",!1,!0);let x=C.getBBox();if(ce(r)){const z=C.children[0],R=Dt(C);x=z.getBoundingClientRect(),R.attr("width",x.width),R.attr("height",x.height)}const b=t.width<=x.width+t.padding?x.width+t.padding:t.width;t.width<=x.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,T=t.x-b/2,B=t.y-k/2;J.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){const z=pt.svg(d),R=ft(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:a}),q=z.path(Pe(T,B,b,k,0),R);L=d.insert(()=>(J.debug("Rough node insert CXC",q),q),":first-child"),L.select("path:nth-child(2)").attr("style",u.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",B).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:A}=Ns(r);if(y.attr("transform",`translate(${t.x-x.width/2}, ${t.y-t.height/2+A})`),h){const z=y.select("span");z&&z.attr("style",h)}const F=L.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=x.height-t.padding/2,t.intersect=function(z){return _r(t,z)},{cluster:d,labelBBox:x}},"rect"),JS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return _r(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),tT=p(async(e,t)=>{const r=Pt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:o,borderColorArray:n,compositeBackground:c,compositeTitleBackground:h,nodeBorder:l}=s,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);Ye(u,t.colorIndex,i,n);const f=u.insert("g",":first-child"),d=u.insert("g").attr("class","cluster-label");let m=u.append("rect");const y=await br(d,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(ce(r)){const q=y.children[0],tt=Dt(y);C=q.getBoundingClientRect(),tt.attr("width",C.width),tt.attr("height",C.height)}const x=0*t.padding,b=x/2,k=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+x;t.width<=C.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+x,B=t.height+x-C.height-6,L=t.x-k/2,A=t.y-T/2;t.width=k;const F=t.y-t.height/2-b+C.height+2;let z;if(t.look==="handDrawn"){const q=t.cssClasses.includes("statediagram-cluster-alt"),tt=pt.svg(u),N=t.rx||t.ry?tt.path(Pe(L,A,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:l,seed:a}):tt.rectangle(L,A,k,T,{seed:a});z=u.insert(()=>N,":first-child");const E=tt.rectangle(L,F,k,B,{fill:q?o:c,fillStyle:q?"hachure":"solid",stroke:l,seed:a});z=u.insert(()=>N,":first-child"),m=u.insert(()=>E),z.attr("class","outer"),m.attr("class","inner")}else z=f.insert("rect",":first-child"),z.attr("class","outer").attr("x",L).attr("y",A).attr("width",k).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",L).attr("y",F).attr("width",k).attr("height",B);d.attr("transform",`translate(${t.x-C.width/2}, ${A+1-(ce(r)?0:3)})`);const R=z.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(q){return _r(t,q)},{cluster:u,labelBBox:C}},"roundedWithTitle"),eT=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Pt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:c,borderStyles:h,backgroundStyles:l}=yt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ce(r),d=u.insert("g").attr("class","cluster-label "),m=await De(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let y=m.getBBox();if(ce(r)){const A=m.children[0],F=Dt(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const C=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-C/2,k=t.y-x/2;J.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const A=pt.svg(u),F=ft(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=A.path(Pe(b,k,C,x,t.rx),F);T=u.insert(()=>(J.debug("Rough node insert CXC",z),z),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",l.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:B}=Ns(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const A=d.select("span");A&&A.attr("style",n)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return _r(t,A)},{cluster:u,labelBBox:y}},"kanbanSection"),rT=p((e,t)=>{const r=Pt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:o,nodeBorder:n,borderColorArray:c}=s,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ye(h,t.colorIndex,i,c);const l=h.insert("g",":first-child"),u=0*t.padding,f=t.width+u;t.diff=-t.padding;const d=t.height+u,m=t.x-f/2,y=t.y-d/2;t.width=f;let C;if(t.look==="handDrawn"){const k=pt.svg(h).rectangle(m,y,f,d,{fill:o??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});C=h.insert(()=>k,":first-child").attr("class","divider")}else{C=l.insert("rect",":first-child");let b="outer";t.look,b="divider",C.attr("class",b).attr("x",m).attr("y",y).attr("width",f).attr("height",d).attr("data-look",t.look)}const x=C.node().getBBox();return t.height=x.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return _r(t,b)},{cluster:h,labelBBox:{}}},"divider"),iT=p(async(e,t,r)=>{var B;J.info(`Creating ${r.cssClass} for `,t.id,t);const i=Pt(),{theme:s,themeVariables:a,handDrawnSeed:o}=i,{borderColorArray:n}=a,{labelStyles:c,borderStyles:h}=yt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);Ye(l,t.colorIndex,s,n);const u=ce(i),f=l.insert("g").attr("class","cluster-label");let d={width:0,height:0};const m=(B=t.label)==null?void 0:B.trim();if(m){let L;if(t.labelType==="markdown"?L=await De(f,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):L=await br(f,t.label,t.labelStyle||"",!1,!0),d=L.getBBox(),u){const A=L.children[0],F=Dt(L);d=A.getBoundingClientRect(),F.attr("width",d.width),F.attr("height",d.height)}}const y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,x=t.x-y/2,b=t.y-C/2;let k;if(t.look==="handDrawn"){const L=pt.svg(l),A=ft(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:o,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=L.path(Pe(x,b,y,C,r.rx),A);k=l.insert(()=>F,":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";"))}else k=l.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",x).attr("y",b).attr("width",y).attr("height",C).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:L}=Ns(i);if(f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+L})`),c){const A=f.select("span");A&&A.attr("style",c)}}const T=k.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=d.height-t.padding/2,t.intersect=function(L){return _r(t,L)},{cluster:l,labelBBox:d}},"createContainerGroup"),sT=p(async(e,t)=>{const{themeVariables:r}=Pt(),i=r.flowContainerStroke||r.secondaryBorderColor;return iT(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),aT=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,a=Math.max(e.width,t.width+i),o=r==="package"?Math.max(e.height,s+e.padding*2):e.height,n=e.x-a/2,c=e.y-o/2;return{boundaryType:r,width:a,height:o,x:n,y:c,bodyY:c+s,bodyHeight:o-s,tabHeight:s,tabWidth:r==="package"?Math.min(a,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),oT=p(async(e,t)=>{var N;J.info("Creating usecase system boundary for ",t.id,t);const r=Pt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:n,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l}=yt(t),{stylesMap:u}=Wr(t),f=t.boundaryType||"rect",d=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${f} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",f).attr("data-look",t.look);Ye(d,t.colorIndex,i,c);const m=ce(r),y=d.insert("g").attr("class","cluster-label system-boundary-title"),C=await De(y,t.label,{style:h,useHtmlLabels:m,isNode:!0});let x=C.getBBox();if(m){const E=C.children[0],M=Dt(C);x=E.getBoundingClientRect(),M.attr("width",x.width),M.attr("height",x.height)}const b=aT(t,x),{width:k,height:T,x:B,y:L,bodyY:A,bodyHeight:F,tabHeight:z,tabWidth:R}=b;t.diff=t.width<=x.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const q=ft(t,{fill:u.get("fill")||o,stroke:u.get("stroke")||n,strokeWidth:((N=u.get("stroke-width"))==null?void 0:N.replace("px",""))||1,seed:a});if(t.look==="handDrawn"){const E=pt.svg(d),M=E.rectangle(B,A,k,F,q);if(d.insert(()=>M,":first-child").attr("class","boundary-body label-container"),f==="package"){const v=E.rectangle(B,L,R,z,q);d.insert(()=>v,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else d.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",B).attr("y",A).attr("width",k).attr("height",F),f==="package"&&d.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",B).attr("y",L).attr("width",R).attr("height",z);const{subGraphTitleTopMargin:tt}=Ns(r);return f==="package"?y.attr("transform",`translate(${B+(R-x.width)/2}, ${L+(z-x.height)/2})`):y.attr("transform",`translate(${t.x-x.width/2}, ${L+tt})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=k,t.height=T,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(E){return _r(t,E)},{cluster:d,labelBBox:x}},"usecaseSystemBoundary"),nT=um,lT={rect:um,squareRect:nT,roundedWithTitle:tT,noteGroup:JS,divider:rT,kanbanSection:eT,flowGroup:sT,usecaseSystemBoundary:oT,swimlane:QS},hT=new Set(["noteGroup","divider"]),AF=p(e=>!hT.has(e??"rect"),"clusterPaintsTitle"),dm=new Map,cT=p(async(e,t)=>{const r=t.shape||"rect",i=await lT[r](e,t);return dm.set(t.id,i),i},"insertCluster"),EF=p(()=>{dm=new Map},"clear"),as=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),me={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Gu={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function gs(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Zt(e),t=Zt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(gs,"calculateDeltaAndAngle");var Zt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),uT=p(e=>({x:p(function(t,r,i){let s=0;const a=Zt(i[0]).x<Zt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(me,e.arrowTypeStart)){const{angle:d,deltaX:m}=gs(i[0],i[1]);s=me[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(me,e.arrowTypeEnd)){const{angle:d,deltaX:m}=gs(i[i.length-1],i[i.length-2]);s=me[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Zt(t).x-Zt(i[i.length-1]).x),n=Math.abs(Zt(t).y-Zt(i[i.length-1]).y),c=Math.abs(Zt(t).x-Zt(i[0]).x),h=Math.abs(Zt(t).y-Zt(i[0]).y),l=me[e.arrowTypeStart],u=me[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="right"?-1:1,s-=d}if(c<l&&c>0&&h<l){let d=l+f-c;d*=a==="right"?-1:1,s+=d}return Zt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Zt(i[0]).y<Zt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(me,e.arrowTypeStart)){const{angle:d,deltaY:m}=gs(i[0],i[1]);s=me[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(me,e.arrowTypeEnd)){const{angle:d,deltaY:m}=gs(i[i.length-1],i[i.length-2]);s=me[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Zt(t).y-Zt(i[i.length-1]).y),n=Math.abs(Zt(t).x-Zt(i[i.length-1]).x),c=Math.abs(Zt(t).y-Zt(i[0]).y),h=Math.abs(Zt(t).x-Zt(i[0]).x),l=me[e.arrowTypeStart],u=me[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=a==="up"?-1:1,s-=d}if(c<l&&c>0&&h<l){let d=l+f-c;d*=a==="up"?-1:1,s+=d}return Zt(t).y+s},"y")}),"getLineFunctionsWithOffset"),dT=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Xu(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Xu(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),fT={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},pT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Xu=p((e,t,r,i,s,a,o=!1,n)=>{var m;if(!r||r==="none")return;const c=fT[r],h=c&&pT.includes(c.type);if(!c){J.warn(`Unknown arrow type: ${r}`);return}const l=c.type,d=`${s}_${a}-${l}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),C=`${d}_${y}`;if(!document.getElementById(C)){const x=document.getElementById(d);if(x){const b=x.cloneNode(!0);b.id=C,b.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",n),c.fill&&T.setAttribute("fill",n)}),(m=x.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),gT=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Pt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),ja=new Map,de=new Map,MF=p(()=>{ja.clear(),de.clear()},"clear"),$F=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),os=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),mT=p(async(e,t)=>{const r=Pt();let i=ce(r);const{labelStyles:s}=yt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await De(e,t.label,{style:os(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),J.info("abc82",t,t.labelType);let l,u;if(i){const d=h.children[0],m=Dt(h);l=await ei.measure(()=>d.getBoundingClientRect()),u=l,m.attr("width",l.width),m.attr("height",l.height)}else{const d=Dt(h).select("text").node();await ei.measure(()=>{l=h.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=l})}o.attr("transform",as(u,i)),ja.set(t.id,a),t.width=l.width,t.height=l.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await br(m,t.startLabelLeft,os(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],b=Dt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startLeft=d,ys(f,t.startLabelLeft,C),ms(t,"startLeft",C)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await br(m,t.startLabelRight,os(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],b=Dt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startRight=d,ys(f,t.startLabelRight,C),ms(t,"startRight",C)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await br(m,t.endLabelLeft,os(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],b=Dt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endLeft=d,ys(f,t.endLabelLeft,C),ms(t,"endLeft",C)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await br(m,t.endLabelRight,os(t.labelStyle)||"",!1,!1);f=y;let C=y.getBBox();if(i){const x=y.children[0],b=Dt(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endRight=d,ys(f,t.endLabelRight,C),ms(t,"endRight",C)}return h},"insertEdgeLabel");function ms(e,t,r){e.terminalLabelSizes??(e.terminalLabelSizes={}),e.terminalLabelSizes[t]={width:r.width,height:r.height}}p(ms,"recordTerminalLabelSize");function ys(e,t,r){ce(Pt())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}p(ys,"setTerminalWidth");var yT=p((e,t)=>{let r=e.x,i=e.y;if(t!=null&&t.updatedPath){const s=We.calcLabelPosition(t.updatedPath);if(t.originalPath){const a=We.calcLabelPosition(t.originalPath);r=e.x+(s.x-a.x),i=e.y+(s.y-a.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),xT=p((e,t)=>{J.debug("Moving label abc88 ",e.id,e.label,ja.get(e.id),t);const r=Pt(),{subGraphTitleTotalMargin:i}=Ns(r);if(e.label){const a=ja.get(e.id),{x:o,y:n}=yT(e,t);J.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",o,",",n,") abc88"),a.attr("transform",`translate(${o}, ${n+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const a=de.get(e.id).startLeft;let o=e.x,n=e.y;if(s){const c=We.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);o=c.x,n=c.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=de.get(e.id).startRight;let o=e.x,n=e.y;if(s){const c=We.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);o=c.x,n=c.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=de.get(e.id).endLeft;let o=e.x,n=e.y;if(s){const c=We.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);o=c.x,n=c.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=de.get(e.id).endRight;let o=e.x,n=e.y;if(s){const c=We.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);o=c.x,n=c.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),CT=p((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),bT=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),kT=p((e,t,r)=>{J.debug(`intersection calc abc89:
|
|
295
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
296
|
+
insidePoint : ${JSON.stringify(r)}
|
|
297
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const c=e.height/2,h=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-s:s-c-t.y;n=l*u/h;const f={x:r.x<t.x?r.x+n:r.x-l+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(f.x=t.x,f.y=t.y),l===0&&(f.x=t.x),h===0&&(f.y=t.y),J.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${l}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/l,f=r.x<t.x?r.x+l-n:r.x-l+n,d=r.y<t.y?r.y+u:r.y-u;return J.debug(`sides calc abc89, Q ${h}, q ${u}, R ${l}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),l===0&&(f=t.x),h===0&&(d=t.y),{x:f,y:d}}},"intersection"),Vu=p((e,t)=>{J.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(J.info("abc88 checking point",a,t),!bT(t,a)&&!s){const o=kT(t,i,a);J.debug("abc88 inside",a,i,o),J.debug("abc88 intersection",o,t);let n=!1;r.forEach(c=>{n=n||c.x===o.x&&c.y===o.y}),r.some(c=>c.x===o.x&&c.y===o.y)?J.warn("abc88 no intersect",o,r):r.push(o),s=!0}else J.warn("abc88 outside",a,i),i=a,s||r.push(a)}),J.debug("returning points",r),r},"cutPathAtIntersect");function fm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(fm,"extractCornerPoints");var Zu=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),wT=p(function(e){const{cornerPointPositions:t}=fm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=Zu(s,o,5),c=Zu(a,o,5),h=c.x-n.x,l=c.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){J.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?f={x:h<0?n.x-d+u:n.x+d-u,y:l<0?n.y-u:n.y+u}:f={x:h<0?n.x-u:n.x+u,y:l<0?n.y-d+u:n.y+d-u}}else J.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),ST=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),c=Number.isFinite(n)?Math.max(0,n):0,h=Array(c).fill(`${s} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),TT=p(function(e,t,r,i,s,a,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:h}=Pt();let l=t.points,u=!1;const f=s;var d=a;const m=[];for(const j in t.cssCompiledStyles)Af(j)||m.push(t.cssCompiledStyles[j]);if(h==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(l)&&l.length>=2)if(l.length===2)l=[f.intersect(l[0]),d.intersect(l[1])];else{const j=l.slice(1,-1),V=j[0],dt=j[j.length-1],lt=.5,mt=Math.abs(l[l.length-1].x-dt.x)<lt&&Math.abs(l[l.length-1].y-dt.y)<lt,nt=f.intersect(V),wt=mt?dt:d.intersect(dt),At=Math.abs(wt.x-dt.x)<lt&&Math.abs(wt.y-dt.y)<lt,Nt=Math.abs(nt.x-V.x)<lt&&Math.abs(nt.y-V.y)<lt?[]:[nt],Bt=At?[]:[wt];l=[...Nt,...j,...Bt]}l=CT(t,l)}else d.intersect&&f.intersect&&!n&&(l=l.slice(1,t.points.length-1),l.unshift(f.intersect(l[0])),l.push(d.intersect(l[l.length-1])));const y=btoa(JSON.stringify(l));t.toCluster&&(J.info("to cluster abc88",r.get(t.toCluster)),l=Vu(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(J.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Vu(l.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=l.filter(j=>!Number.isNaN(j.y));const x=gT(t.curve);x!=="rounded"&&(C=wT(C));let b=ws;switch(x){case"linear":b=ws;break;case"basis":b=On;break;case"cardinal":b=cf;break;case"bumpX":b=af;break;case"bumpY":b=of;break;case"catmullRom":b=df;break;case"monotoneX":b=xf;break;case"monotoneY":b=Cf;break;case"natural":b=kf;break;case"step":b=wf;break;case"stepAfter":b=Tf;break;case"stepBefore":b=Sf;break;case"rounded":b=ws;break;default:b=On}const{x:k,y:T}=uT(t),B=p1().x(k).y(T).curve(b);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let A,F=x==="rounded"?pm(gm(C,t),5):B(C);const z=Array.isArray(t.style)?t.style:[t.style];let R=z.find(j=>j==null?void 0:j.startsWith("stroke:")),q="";t.animate&&(q="edge-animation-fast"),t.animation&&(q="edge-animation-"+t.animation);let tt=!1;if(t.look==="handDrawn"){const j=pt.svg(e);Object.assign([],C);const V=j.path(F,{roughness:.3,seed:c});L+=" transition",A=Dt(V).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",z?z.reduce((lt,mt)=>lt+";"+mt,""):"");let dt=A.attr("d");A.attr("d",dt),e.node().appendChild(A.node())}else{const j=m.join(";"),V=z?z.reduce((At,Et)=>At+Et+";",""):"",dt=(j?j+";"+V+";":V)+";"+(z?z.reduce((At,Et)=>At+";"+Et,""):"");A=e.append("path").attr("d",F).attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",dt),R=($=dt.match(/stroke:([^;]+)/))==null?void 0:$[1],tt=t.animate===!0||!!t.animation||j.includes("animation");const lt=A.node(),mt=typeof lt.getTotalLength=="function"?lt.getTotalLength():0,nt=Gu[t.arrowTypeStart]||0,wt=Gu[t.arrowTypeEnd]||0;if(t.look==="neo"&&!tt){const Et=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?ST(mt,nt,wt):`0 ${nt} ${mt-nt-wt} ${wt}`}; stroke-dashoffset: 0;`;A.attr("style",Et+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",t.id),A.attr("data-points",y),A.attr("data-look",ae(t.look)),t.showPoints&&C.forEach(j=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",j.x).attr("cy",j.y)});let N="";(Pt().flowchart.arrowMarkerAbsolute||Pt().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),J.info("arrowTypeStart",t.arrowTypeStart),J.info("arrowTypeEnd",t.arrowTypeEnd);const E=!tt&&(t==null?void 0:t.look)==="neo";dT(A,t,N,o,i,E,R);const M=Math.floor(l.length/2),v=l[M];We.isLabelCoordinateInPath(v,A.attr("d"))||(u=!0);let P={};return u&&(P.updatedPath=l),P.originalPath=t.points,P},"insertEdge");function pm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],c=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,l=o.y-n.y,u=c.x-o.x,f=c.y-o.y,d=Math.hypot(h,l),m=Math.hypot(u,f);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const y=h/d,C=l/d,x=u/m,b=f/m,k=y*x+C*b,T=Math.max(-1,Math.min(1,k)),B=Math.acos(T);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(B/2),d/2,m/2),A=o.x-y*L,F=o.y-C*L,z=o.x+x*L,R=o.y+b*L;r+=`L${A},${F}`,r+=`Q${o.x},${o.y} ${z},${R}`}}return r}p(pm,"generateRoundedPath");function Qn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Qn,"calculateDeltaAndAngle");function gm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&me[t.arrowTypeStart]){const s=me[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Qn(a,o),c=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+c,r[0].y=a.y+h}const i=e.length;if(i>=2&&me[t.arrowTypeEnd]){const s=me[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Qn(o,a),c=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-c,r[i-1].y=a.y-h}return r}p(gm,"applyMarkerOffsetsToPoints");var _T=p((e,t,r,i)=>{t.forEach(s=>{VT[s](e,r,i)})},"insertMarkers"),BT=p((e,t,r)=>{J.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),vT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),LT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),FT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),AT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),ET=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),MT=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),$T=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),OT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),IT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),DT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),PT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),RT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),qT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),NT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),WT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");c.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),c.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),zT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),HT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");c.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),c.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),YT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
298
|
+
L20,10
|
|
299
|
+
M20,10
|
|
300
|
+
L0,20`)},"requirement_arrow"),UT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
301
|
+
L20,10
|
|
302
|
+
M20,10
|
|
303
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),jT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),GT=p((e,t,r)=>{const i=Kt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),XT=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),VT={extension:BT,composition:vT,aggregation:LT,dependency:FT,lollipop:AT,point:ET,circle:MT,cross:$T,barb:OT,barbNeo:IT,hierarchy:XT,only_one:DT,zero_or_one:PT,one_or_more:RT,zero_or_more:qT,only_one_neo:NT,zero_or_one_neo:WT,one_or_more_neo:zT,zero_or_more_neo:HT,requirement_arrow:YT,requirement_contains:jT,requirement_arrow_neo:UT,requirement_contains_neo:GT},ZT=_T,KT={common:$s,getConfig:Kt,insertCluster:cT,insertEdge:TT,insertEdgeLabel:mT,insertMarkers:ZT,insertNode:cm,interpolateToCurve:Ul,labelHelper:Tt,log:J,positionEdgeLabel:xT},QT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],As=Object.create(null),mm=p(e=>{for(const t of e)As[t.name]=t},"registerLayoutLoaders"),JT=p(()=>{const e=p(async()=>await qt(()=>import("./elk-IJKZMXRS-CINeWt2W.js"),__vite__mapDeps([7,8,9,0,1,2,3,4,5,6,10])),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...QT.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),t_=p(()=>{mm([{name:"dagre",loader:p(async()=>await qt(()=>import("./dagre-W4DXFKR2-DzMZHXci.js"),__vite__mapDeps([11,9,0,1,2,3,4,5,6,10])),"loader")},{name:"swimlane",loader:p(async()=>await qt(()=>import("./swimlanes-N4OXWK64-wkd_n4HU.js"),__vite__mapDeps([12,8,9,0,1,2,3,4,5,6,10])),"loader")},{name:"cose-bilkent",loader:p(async()=>await qt(()=>import("./cose-bilkent-JH36ORCC-BxUTUyep.js"),__vite__mapDeps([13,14,2,0,1,3,4,5,6])),"loader")},...JT()])},"registerDefaultLayoutLoaders");t_();var OF=p(async(e,t)=>{if(!Object.hasOwn(As,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const s of e.nodes){const a=s.domId||s.id;s.domId=`${e.diagramId}-${a}`}const r=As[e.layoutAlgorithm],i=await r.loader();return L1(t,e.config),i.render(e,t,KT,{algorithm:r.algorithm})},"render"),fn="dagre",IF=p((e="",{fallback:t=fn}={})=>{if(Object.hasOwn(As,e))return e;for(const r of[t,fn])if(Object.hasOwn(As,r))return J.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${fn} is registered.`)},"getRegisteredLayoutAlgorithm"),mh="comm",ym="rule",xm="decl",e_="@media",r_="@import",i_="@supports",s_="@namespace",Jn="@keyframes",Cm="@layer",a_="@scope",o_=Math.abs,Ts=String.fromCharCode;function bm(e){return e.trim()}function tl(e,t,r){return e.replace(t,r)}function ki(e,t){return e.charCodeAt(t)|0}function Ni(e,t,r){return e.slice(t,r)}function ar(e){return e.length}function km(e){return e.length}function aa(e,t){return t.push(e),e}var co=1,Wi=1,wm=0,He=0,ie=0,Gi="";function yh(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:co,column:Wi,length:o,return:"",siblings:n}}function n_(){return ie}function l_(){return ie=He>0?ki(Gi,--He):0,Wi--,ie===10&&(Wi=1,co--),ie}function Ze(){return ie=He<wm?ki(Gi,He++):0,Wi++,ie===10&&(Wi=1,co++),ie}function Or(){return ki(Gi,He)}function Ca(){return He}function uo(e,t){return Ni(Gi,e,t)}function Es(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function h_(e){return co=Wi=1,wm=ar(Gi=e),He=0,[]}function c_(e){return Gi="",e}function pn(e){return bm(uo(He-1,el(e===91?e+2:e===40?e+1:e)))}function u_(e){for(;(ie=Or())&&ie<33;)Ze();return Es(e)>2||Es(ie)>3?"":" "}function d_(e,t){for(;--t&&Ze()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return uo(e,Ca()+(t<6&&Or()==32&&Ze()==32))}function el(e){for(;Ze();)switch(ie){case e:return He;case 34:case 39:e!==34&&e!==39&&el(ie);break;case 40:e===41&&el(e);break;case 92:Ze();break}return He}function f_(e,t){for(;Ze()&&e+ie!==57;)if(e+ie===84&&Or()===47)break;return"/*"+uo(t,He-1)+"*"+Ts(e===47?e:Ze())}function p_(e){for(;!Es(Or());)Ze();return uo(e,He)}function g_(e){return c_(ba("",null,null,null,[""],e=h_(e),0,[0],e))}function ba(e,t,r,i,s,a,o,n,c){for(var h=0,l=0,u=o,f=0,d=0,m=0,y=1,C=1,x=1,b=0,k=0,T="",B=s,L=a,A=i,F=T;C;)switch(m=k,k=Ze()){case 40:m!=108&&ki(F,u-1)==58?(b++,F+="("):F+=pn(k);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=pn(k);break;case 9:case 10:case 13:case 32:if(b>0){F+=Ts(k);break}F+=u_(m);break;case 92:F+=d_(Ca()-1,7);continue;case 47:switch(Or()){case 42:case 47:aa(m_(f_(Ze(),Ca()),t,r,c),c),(Es(m||1)==5||Es(Or()||1)==5)&&ar(F)&&Ni(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[h++]=ar(F)*x;case 125*y:case 59:case 0:if(b>0&&k){F+=Ts(k);break}switch(k){case 0:case 125:C=0;case 59+l:x==-1&&(F=tl(F,/\f/g,"")),d>0&&(ar(F)-u||y===0)&&aa(d>32?Qu(F+";",i,r,u-1,c):Qu(tl(F," ","")+";",i,r,u-2,c),c);break;case 59:F+=";";default:if(aa(A=Ku(F,t,r,h,l,s,n,T,B=[],L=[],u,a),a),k===123)if(l===0)ba(F,t,A,A,B,a,u,n,L);else{switch(f){case 99:if(ki(F,3)===110)break;case 108:if(ki(F,2)===97)break;default:l=0;case 100:case 109:case 115:}l?ba(e,A,A,i&&aa(Ku(e,A,A,0,0,s,n,T,s,B=[],u,L),L),s,L,u,n,i?B:L):ba(F,A,A,A,[""],L,0,n,L)}}h=l=d=0,y=x=1,T=F="",u=o;break;case 58:u=1+ar(F),d=m;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&l_()==125)continue}switch(F+=Ts(k),k*y){case 38:x=l>0?1:(F+="\f",-1);break;case 44:if(b>0)break;n[h++]=(ar(F)-1)*x,x=1;break;case 64:Or()===45&&(F+=pn(Ze())),f=Or(),l=u=ar(T=F+=p_(Ca())),k++;break;case 45:m===45&&ar(F)==2&&(y=0)}}return a}function Ku(e,t,r,i,s,a,o,n,c,h,l,u){for(var f=s-1,d=s===0?a:[""],m=km(d),y=0,C=0,x=0;y<i;++y)for(var b=0,k=Ni(e,f+1,f=o_(C=o[y])),T=e;b<m;++b)(T=bm(C>0?d[b]+" "+k:tl(k,/&\f/g,d[b])))&&(c[x++]=T);return yh(e,t,r,s===0?ym:n,c,h,l,u)}function m_(e,t,r,i){return yh(e,t,r,mh,Ts(n_()),Ni(e,2,-2),0,i)}function Qu(e,t,r,i,s){return yh(e,t,r,xm,Ni(e,0,i),Ni(e,i+1,-1),i,s)}function rl(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function y_(e,t,r,i){switch(e.type){case Cm:if(e.children.length)break;case r_:case s_:case xm:return e.return=e.return||e.value;case mh:return"";case Jn:return e.return=e.value+"{"+rl(e.children,i)+"}";case ym:if(!ar(e.value=e.props.join(",")))return""}return ar(r=rl(e.children,i))?e.return=e.value+"{"+r+"}":""}function x_(e){var t=km(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Sm="c4",C_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./c4Diagram-CRA5TL53-Gdzn8UBh.js");return{diagram:t}},__vite__mapDeps([15,16,0,1,2,3,4,5,6]));return{id:Sm,diagram:e}},"loader"),k_={id:Sm,detector:C_,loader:b_},w_=k_,Tm="flowchart-v2",S_=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),T_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./flowDiagram-OXPTDLAJ-t-u0QXEA.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([17,18,19,20,16,21]));return{id:Tm,diagram:e}},"loader"),__={id:Tm,detector:S_,loader:T_},B_=__,_m="agentflow",v_=p(e=>/^\s*agentflow-beta\b/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-2UJZ2QOL-B6tO5G1v.js");return{diagram:t}},__vite__mapDeps([22,18,19,20,16,21,0,1,2,3,4,5,6]));return{id:_m,diagram:e}},"loader"),F_={id:_m,detector:v_,loader:L_},A_=F_,Bm="swimlane",E_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),M_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-K3J5GTZL-CKnwEuq_.js");return{diagram:t}},__vite__mapDeps([23,17,18,19,20,16,21,0,1,2,3,4,5,6]));return{id:Bm,diagram:e}},"loader"),$_={id:Bm,detector:E_,loader:M_},O_=$_,vm="er",I_=p(e=>/^\s*erDiagram/.test(e),"detector"),D_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./erDiagram-O2IAPWRE-PPaHmqA1.js");return{diagram:t}},__vite__mapDeps([24,19,20,21,0,1,2,3,4,5,6]));return{id:vm,diagram:e}},"loader"),P_={id:vm,detector:I_,loader:D_},R_=P_,Lm="gitGraph",q_=p(e=>/^\s*gitGraph/.test(e),"detector"),N_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-XJZIOB7I-BAfOqeeg.js");return{diagram:t}},__vite__mapDeps([25,26,27,28,0,1,2,3,4,5,6]));return{id:Lm,diagram:e}},"loader"),W_={id:Lm,detector:q_,loader:N_},z_=W_,Fm="gantt",H_=p(e=>/^\s*gantt/.test(e),"detector"),Y_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./ganttDiagram-R7TSEDQI-Bw49ZD_b.js");return{diagram:t}},__vite__mapDeps([29,2,30,31,32,0,1,3,4,5,6]));return{id:Fm,diagram:e}},"loader"),U_={id:Fm,detector:H_,loader:Y_},j_=U_,Am="info",G_=p(e=>/^\s*info/.test(e),"detector"),X_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./infoDiagram-5W2HQ5XZ-Bv4RBxYW.js");return{diagram:t}},__vite__mapDeps([33,28,0,1,2,3,4,5,6]));return{id:Am,diagram:e}},"loader"),V_={id:Am,detector:G_,loader:X_},Em="pie",Z_=p(e=>/^\s*pie/.test(e),"detector"),K_=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./pieDiagram-CAPJLFHJ-DN3RQ_ih.js");return{diagram:t}},__vite__mapDeps([34,27,28,0,1,2,3,4,5,6,35,36,31]));return{id:Em,diagram:e}},"loader"),Q_={id:Em,detector:Z_,loader:K_},Mm="quadrantChart",J_=p(e=>/^\s*quadrantChart/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./quadrantDiagram-GDMTTRAM-BpL_ZL76.js");return{diagram:t}},__vite__mapDeps([37,30,31,32,0,1,2,3,4,5,6]));return{id:Mm,diagram:e}},"loader"),eB={id:Mm,detector:J_,loader:tB},rB=eB,$m="xychart",iB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./xychartDiagram-TAQBALBS-Dp1hfe3-.js");return{diagram:t}},__vite__mapDeps([38,31,36,30,32,0,1,2,3,4,5,6]));return{id:$m,diagram:e}},"loader"),aB={id:$m,detector:iB,loader:sB},oB=aB,Om="requirement",nB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),lB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./requirementDiagram-X7JNWC4A-mKPGj64L.js");return{diagram:t}},__vite__mapDeps([39,19,20,0,1,2,3,4,5,6]));return{id:Om,diagram:e}},"loader"),hB={id:Om,detector:nB,loader:lB},cB=hB,Im="sequence",uB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),dB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./sequenceDiagram-ZO4K6R2Y-BjUmzZaO.js");return{diagram:t}},__vite__mapDeps([40,26,16,0,1,2,3,4,5,6]));return{id:Im,diagram:e}},"loader"),fB={id:Im,detector:uB,loader:dB},pB=fB,Dm="classDiagram",gB=p(e=>/^\s*classDiagram/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./classDiagram-v2-K4WV4PDN-DnFwS0qN.js");return{diagram:t}},__vite__mapDeps([41,18,19,20,16,0,1,2,3,4,5,6]));return{id:Dm,diagram:e}},"loader"),yB={id:Dm,detector:gB,loader:mB},xB=yB,Pm="stateDiagram",CB=p(e=>/^\s*stateDiagram/.test(e),"detector"),bB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-TBUQTH76-FGgFDGUU.js");return{diagram:t}},__vite__mapDeps([42,19,20,16,0,1,2,3,4,5,6]));return{id:Pm,diagram:e}},"loader"),kB={id:Pm,detector:CB,loader:bB},wB=kB,Rm="journey",SB=p(e=>/^\s*journey/.test(e),"detector"),TB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./journeyDiagram-COXZFDF6-MJu84Iiz.js");return{diagram:t}},__vite__mapDeps([43,18,16,35,0,1,2,3,4,5,6]));return{id:Rm,diagram:e}},"loader"),_B={id:Rm,detector:SB,loader:TB},BB=_B,oa=4,ns=75,vB=p(e=>{const t=[];for(const s of e.split(/\s+/)){let a=[...s];for(;a.length>ns;)t.push(a.slice(0,ns).join("")),a=a.slice(ns);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const s of t){const a=i?`${i} ${s}`:s;[...a].length>ns?(r.push(i),i=s):i=a}if(i&&r.push(i),r.length>oa){r.length=oa;const s=r[oa-1]??"";r[oa-1]=`${[...s].slice(0,ns-3).join("")}...`}return r},"wrapErrorMessage"),LB=p((e,t,r,i)=>{var c,h;J.debug(`rendering svg for syntax error
|
|
304
|
+
`);const s=S1(t),a=s.append("g"),o=vB(((h=i==null?void 0:(c=i.db).getErrorMessage)==null?void 0:h.call(c))??""),n=o.length>0?500+o.length*56:512;s.attr("viewBox",`0 0 2412 ${n}`),vd(s,100,n,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),o.forEach((l,u)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+u*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),qm={draw:LB},FB=qm,gn,AB={clear(){gn=void 0},setErrorMessage(e){gn=e},getErrorMessage(){return gn}},EB={db:AB,renderer:qm,parser:{parse:p(()=>{},"parse")}},MB=EB,Nm="flowchart-elk",$B=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),OB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./flowDiagram-OXPTDLAJ-t-u0QXEA.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([17,18,19,20,16,21]));return{id:Nm,diagram:e}},"loader"),IB={id:Nm,detector:$B,loader:OB},DB=IB,Wm="timeline",PB=p(e=>/^\s*timeline/.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./timeline-definition-YOQAKGHF-DyBln1jw.js");return{diagram:t}},__vite__mapDeps([44,35,0,1,2,3,4,5,6]));return{id:Wm,diagram:e}},"loader"),qB={id:Wm,detector:PB,loader:RB},NB=qB,zm="mindmap",WB=p(e=>/^\s*mindmap/.test(e),"detector"),zB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./mindmap-definition-LZFPQGKD-C9v_57Ex.js");return{diagram:t}},__vite__mapDeps([45,19,20,0,1,2,3,4,5,6]));return{id:zm,diagram:e}},"loader"),HB={id:zm,detector:WB,loader:zB},YB=HB,Hm="kanban",UB=p(e=>/^\s*kanban/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./kanban-definition-P3RFRI5V-mlYSRALK.js");return{diagram:t}},__vite__mapDeps([46,18,0,1,2,3,4,5,6]));return{id:Hm,diagram:e}},"loader"),GB={id:Hm,detector:UB,loader:jB},XB=GB,Ym="sankey",VB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./sankeyDiagram-UM26HJRW-Bs4xfjQP.js");return{diagram:t}},__vite__mapDeps([47,36,31,0,1,2,3,4,5,6]));return{id:Ym,diagram:e}},"loader"),KB={id:Ym,detector:VB,loader:ZB},QB=KB,Um="packet",JB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-UMYRVEAY-BLbnt0yT.js");return{diagram:t}},__vite__mapDeps([48,27,28,0,1,2,3,4,5,6]));return{id:Um,diagram:e}},"loader"),ev={id:Um,detector:JB,loader:tv},jm="radar",rv=p(e=>/^\s*radar-beta/.test(e),"detector"),iv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-YEKJPTXX-C-S5DVhj.js");return{diagram:t}},__vite__mapDeps([49,27,28,0,1,2,3,4,5,6]));return{id:jm,diagram:e}},"loader"),sv={id:jm,detector:rv,loader:iv},Gm="block",av=p(e=>/^\s*block(-beta)?/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./blockDiagram-E7TT5TSB-DtRpcE7F.js");return{diagram:t}},__vite__mapDeps([50,18,10,21,0,1,2,3,4,5,6]));return{id:Gm,diagram:e}},"loader"),nv={id:Gm,detector:av,loader:ov},lv=nv,Xm="treeView",hv=p(e=>/^\s*treeView-beta/.test(e),"detector"),cv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-PFPMY2P6-DGh6IecR.js");return{diagram:t}},__vite__mapDeps([51,26,27,28,0,1,2,3,4,5,6]));return{id:Xm,diagram:e}},"loader"),uv={id:Xm,detector:hv,loader:cv},dv=uv,Vm="architecture",fv=p(e=>/^\s*architecture/.test(e),"detector"),pv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./architectureDiagram-47P4ROYG-BP5qiXzf.js");return{diagram:t}},__vite__mapDeps([52,27,28,0,1,2,3,4,5,6,14]));return{id:Vm,diagram:e}},"loader"),gv={id:Vm,detector:fv,loader:pv},mv=gv,Zm="eventmodeling",yv=p(e=>/^\s*eventmodeling/.test(e),"detector"),xv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-ZIFT7M5P-JrGHTWbo.js");return{diagram:t}},__vite__mapDeps([53,27,28,0,1,2,3,4,5,6]));return{id:Zm,diagram:e}},"loader"),Cv={id:Zm,detector:yv,loader:xv},bv=Cv,Km="ishikawa",kv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-K3B6WC7H-DEpj0bRp.js");return{diagram:t}},__vite__mapDeps([54,0,1,2,3,4,5,6]));return{id:Km,diagram:e}},"loader"),Sv={id:Km,detector:kv,loader:wv},Qm="venn",Tv=p(e=>/^\s*venn-beta/.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./vennDiagram-BLWOH2XV-BaiFLOVS.js");return{diagram:t}},__vite__mapDeps([55,0,1,2,3,4,5,6]));return{id:Qm,diagram:e}},"loader"),Bv={id:Qm,detector:Tv,loader:_v},vv=Bv,Jm="treemap",Lv=p(e=>/^\s*treemap/.test(e),"detector"),Fv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./diagram-OVF4WLC6-DRZt8tGc.js");return{diagram:t}},__vite__mapDeps([56,27,20,28,0,1,2,3,4,5,6,32,36,31]));return{id:Jm,diagram:e}},"loader"),Av={id:Jm,detector:Lv,loader:Fv},ty="usecase",Ev=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),Mv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./usecaseDiagram-VIAY4XPW-Cqis3XHX.js");return{diagram:t}},__vite__mapDeps([57,19,20,0,1,2,3,4,5,6]));return{id:ty,diagram:e}},"loader"),$v={id:ty,detector:Ev,loader:Mv},ey="wardley",Ov=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Iv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YMQ3BMBF-C4CzpJto.js");return{diagram:t}},__vite__mapDeps([58,27,28,0,1,2,3,4,5,6]));return{id:ey,diagram:e}},"loader"),Dv={id:ey,detector:Ov,loader:Iv},Pv=Dv,ry="cynefin",Rv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),qv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./cynefinDiagram-3GCD6N5R-DuXFORdW.js");return{diagram:t}},__vite__mapDeps([59,27,28,0,1,2,3,4,5,6]));return{id:ry,diagram:e}},"loader"),Nv={id:ry,detector:Rv,loader:qv},iy="railroad",Wv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),zv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./railroadDiagram-SM67HX2B-DZ-fPU85.js");return{diagram:t}},__vite__mapDeps([60,61,27,28,0,1,2,3,4,5,6]));return{id:iy,diagram:e}},"loader"),Hv={id:iy,detector:Wv,loader:zv},sy="railroadEbnf",Yv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Uv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./ebnfDiagram-VR2GEFS7-DPXA-YOi.js");return{diagram:t}},__vite__mapDeps([62,61,27,28,0,1,2,3,4,5,6]));return{id:sy,diagram:e}},"loader"),jv={id:sy,detector:Yv,loader:Uv},ay="railroadAbnf",Gv=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Xv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./abnfDiagram-YUKMZFIV-BIFw6B_N.js");return{diagram:t}},__vite__mapDeps([63,61,27,28,0,1,2,3,4,5,6]));return{id:ay,diagram:e}},"loader"),Vv={id:ay,detector:Gv,loader:Xv},oy="railroadPeg",Zv=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Kv=p(async()=>{const{diagram:e}=await qt(async()=>{const{diagram:t}=await import("./pegDiagram-BGZESJAR-KQP26s3-.js");return{diagram:t}},__vite__mapDeps([64,61,27,28,0,1,2,3,4,5,6]));return{id:oy,diagram:e}},"loader"),Qv={id:oy,detector:Zv,loader:Kv},Ju=!1,fo=p(()=>{Ju||(Ju=!0,va("error",MB,e=>e.toLowerCase().trim()==="error"),va("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Cn(DB,YB,mv),Cn(A_,w_,XB,xB,R_,j_,V_,Q_,cB,pB,O_,B_,NB,z_,wB,BB,rB,QB,ev,oB,lv,bv,dv,sv,Sv,Av,Hv,jv,Vv,Qv,vv,Pv,Nv,$v))},"addDiagrams"),Jv=p(async()=>{J.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Qr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Tn(r)}catch{try{const{diagram:a,id:o}=await s();va(o,a,i)}catch(a){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Qr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){J.error(`Failed to load ${t.length} external diagrams`);for(const r of t)J.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),tL="graphics-document document";function ny(e,t){e.attr("role",tL),t!==""&&e.attr("aria-roledescription",t)}p(ny,"setA11yDiagramInfo");function ly(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(ly,"addSVGa11yTitleDescription");var Kr,Ga=(Kr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var f,d,m;const i=typeof t=="string"?{cleaned:t}:t,s=Kt(),a=Za(i.cleaned,s);try{Tn(a)}catch{const y=M0(a);if(!y)throw new pd(`Diagram ${a} not found.`);const{id:C,diagram:x}=await y();va(C,x)}const{db:o,parser:n,renderer:c,init:h}=Tn(a);n.parser&&(n.parser.yy=o),(f=o.clear)==null||f.call(o),h==null||h(s),r.title&&((d=o.setDiagramTitle)==null||d.call(o,r.title));let l=i.cleaned;if(o.preserveCommentsWhenParsing&&i.withComments){const y=s.maxTextSize??al.maxTextSize;i.withComments.length>y?J.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${y}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const u=V2(l)+`
|
|
305
|
+
`;return i.frontmatterLineOffset&&((m=o.setFrontmatterLineOffset)==null||m.call(o,i.frontmatterLineOffset)),await n.parse(u),new Kr(a,u,o,n,c)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Kr,"Diagram"),Kr),td=[],eL=p(()=>{td.forEach(e=>{e()}),td=[]},"attachFunctions"),rL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function hy(e){const t=fd(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
|
|
306
|
+
`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
|
|
307
|
+
`):t.body;let s=v1(i,{schema:B1})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t.length),metadata:a}}p(hy,"extractFrontMatter");var iL=p(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),sL=p(e=>{const{text:t,metadata:r}=hy(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),aL=p(e=>{const t=We.detectInit(e)??{},r=We.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:D2(e),directive:t}},"processDirectives");function xh(e){const t=e,r=iL(e),i=sL(r),s=aL(i.text),a=Zl(i.config,s.directive),o=s.text,n=rL(o),c=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:n,withComments:o,frontmatterLineOffset:c},title:i.title,config:a}}p(xh,"preprocessDiagram");function cy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(cy,"toBase64");var oL=5e4,nL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",lL="sandbox",hL="loose",cL="http://www.w3.org/2000/svg",uL="http://www.w3.org/1999/xlink",dL="http://www.w3.org/1999/xhtml",fL="100%",pL="100%",gL="border:0;margin:0;",mL="margin:0",yL="allow-top-navigation-by-user-activation allow-popups",xL='The "iframe" tag is not supported by your browser.',CL=["foreignobject"],bL=["dominant-baseline"];function Ch(e){const t=xh(e);_a();let r;try{r=Za(t.code.cleaned,Kt())}catch{r=void 0}return ol(r),px(t.config??{}),t}p(Ch,"processAndSetConfigs");async function uy(e,t){fo();try{const{code:r,config:i}=Ch(e);return{diagramType:(await Ga.fromText(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}finally{ol(void 0)}}p(uy,"parse");var ed=p((e,t,r=[])=>{const i=xd(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),kL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ce(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{su(c.styles)||n.forEach(h=>{r.insertRule(ed(c.id,h,c.styles),r.cssRules.length)}),su(c.textStyles)||r.insertRule(ed(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Sn(s)+`
|
|
309
|
+
`}else i+=`${e.themeCSS}
|
|
310
|
+
`;return i+Sn(r)},"createCssStyles"),wL=p((e,t)=>rl(g_(`${e}{${t}}`),x_([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Jn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[e_,i_,Cm,a_,"@container","@starting-style"],Jn].includes(i.type)||(J.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=mh))},"addNamespace"),y_])),"compileCSS"),SL=p((e,t,r,i)=>{const s=kL(e,r),a=Ix(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return wL(i,a)},"createUserStyles"),TL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Rr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),_L=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":pL,i=cy(`<body style="${mL}">${e}</body>`);return`<iframe style="width:${fL};height:${r};${gL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${yL}">
|
|
311
|
+
${xL}
|
|
312
|
+
</iframe>`},"putIntoIFrame"),rd=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",cL);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function il(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(il,"sandboxedIframe");var BL=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),vL=p(async function(e,t,r){var E,M,v,P,$,j,V,dt;fo();const i=Ch(t);let s=i.code;t=s.cleaned;const a=Kt();J.debug(a),t.length>((a==null?void 0:a.maxTextSize)??oL)&&(t=nL,s={raw:t,cleaned:t});const o=`#${e}`,n="i"+e,c="#"+n,h="d"+e,l="#"+h,u=p(()=>{const mt=Dt(d?c:l).node();mt&&"remove"in mt&&mt.remove()},"removeTempElements");let f=Dt(document.body);const d=a.securityLevel===lL,m=a.securityLevel===hL,y=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const lt=il(Dt(r),n);f=Dt(lt.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Dt(r);rd(f,e,h,`font-family: ${y}`,uL)}else{if(BL(document,e,h,n),d){const lt=il(Dt(document.body),n);f=Dt(lt.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Dt("body");rd(f,e,h)}let C,x;try{C=await Ga.fromText(s,{title:i.title})}catch(lt){if(a.suppressErrorRendering)throw u(),lt;C=await Ga.fromText("error"),x=lt,(M=(E=C.db).setErrorMessage)==null||M.call(E,Vf(lt))}const b=f.select(l).node(),k=C.type,T=b.firstChild,B=T.firstChild,L=(P=(v=C.renderer).getClasses)==null?void 0:P.call(v,t,C),A=SL(a,k,L,o),F=document.createElement("style");F.innerHTML=A,T.insertBefore(F,B);try{await C.renderer.draw(t,e,"12.1.0",C)}catch(lt){throw a.suppressErrorRendering?u():FB.draw(t,e,"12.1.0"),lt}const z=f.select(`${l} svg`),R=(j=($=C.db).getAccTitle)==null?void 0:j.call($),q=(dt=(V=C.db).getAccDescription)==null?void 0:dt.call(V);fy(k,z,R,q);const N=p(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",dL);let lt=f.select(l).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),lt=TL(lt,d,ur(a.arrowMarkerAbsolute)),d){const mt=f.select(l+" svg").node();lt=_L(lt,mt)}else m||(lt=Pi.sanitize(lt,{ADD_TAGS:CL,ADD_ATTR:bL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return eL(),lt},"serializeSvg")();if(x)throw x;return u(),{diagramType:k,svg:N,bindFunctions:C.db.bindFunctions}},"renderDiagram"),LL=p(async function(e,t,r){try{return await vL(e,t,r)}finally{ol(void 0)}},"render");function dy(e={}){var s;const t=se({},e);t!=null&&t.fontFamily&&!((s=t.themeVariables)!=null&&s.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),dx(t);const r=Dr.theme;t!=null&&t.theme&&Object.hasOwn(kr,t.theme)?t.themeVariables=kr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=kr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?ux(t):Cd();sl(i.logLevel),fo()}p(dy,"initialize");var FL=p((e,t={})=>{const{code:r}=xh(e);return Ga.fromText(r,t)},"getDiagramFromText");function fy(e,t,r,i){ny(t,e),ly(t,r,i,t.attr("id"))}p(fy,"addA11yInfo");var ri=Object.freeze({render:LL,parse:uy,getDiagramFromText:FL,initialize:dy,getConfig:Kt,setConfig:bd,getSiteConfig:Cd,updateSiteConfig:fx,reset:p(()=>{_a()},"reset"),globalReset:p(()=>{_a(Dr)},"globalReset"),defaultConfig:Dr});sl(Kt().logLevel);_a(Kt());var AL=p((e,t,r)=>{J.warn(e),Vl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),py=p(async function(e={querySelector:".mermaid"}){try{await EL(e)}catch(t){if(Vl(t)&&J.error(t.str),Oe.parseError&&Oe.parseError(t),!e.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),t}},"run"),EL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ri.getConfig();J.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");J.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(J.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),ri.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new We.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const c of Array.from(s)){if(J.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=c.innerHTML,o=lp(We.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=We.detectInit(o);l&&J.debug("Detected early reinit: ",l);try{const{svg:u,bindFunctions:f}=await xy(h,o,c);c.innerHTML=u,e&&await e(h),f&&f(c)}catch(u){AL(u,n,Oe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),gy=p(function(e){ri.initialize(e)},"initialize"),ML=p(async function(e,t,r){J.warn("mermaid.init is deprecated. Please use run instead."),e&&gy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await py(i)},"init"),$L=p(async(e,{lazyLoad:t=!0}={})=>{fo(),Cn(...e),t===!1&&await Jv()},"registerExternalDiagrams"),my=p(function(){if(Oe.startOnLoad){const{startOnLoad:e}=ri.getConfig();e&&Oe.run().catch(t=>J.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",my,!1);var OL=p(function(e){Oe.parseError=e},"setParseErrorHandler"),Xa=[],mn=!1,yy=p(async()=>{if(!mn){for(mn=!0;Xa.length>0;){const e=Xa.shift();if(e)try{await e()}catch(t){J.error("Error executing queue",t)}}mn=!1}},"executeQueue"),IL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{ri.parse(e,t).then(n=>{a(n),r(n)},n=>{var c;J.error("Error parsing",n),(c=Oe.parseError)==null||c.call(Oe,n),o(n),i(n)})}),"performCall");Xa.push(s),yy().catch(i)}),"parse"),xy=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{ri.render(e,t,r).then(c=>{o(c),i(c)},c=>{var h;J.error("Error parsing",c),(h=Oe.parseError)==null||h.call(Oe,c),n(c),s(c)})}),"performCall");Xa.push(a),yy().catch(s)}),"render"),DL=p(()=>Object.keys(Qr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Oe={startOnLoad:!0,mermaidAPI:ri,parse:IL,render:xy,init:ML,run:py,registerExternalDiagrams:$L,registerLayoutLoaders:mm,initialize:gy,parseError:void 0,contentLoaded:my,setParseErrorHandler:OL,detectType:Za,registerIconPacks:J1,getRegisteredDiagramsMetadata:DL},PL=Oe;/*! Check if previously processed *//*!
|
|
313
|
+
* Wait for document loaded before starting the execution
|
|
314
|
+
*/const DF=Object.freeze(Object.defineProperty({__proto__:null,default:PL},Symbol.toStringTag,{value:"Module"}));export{bc as $,gF as A,Pi as B,lr as C,Dx as D,UL as E,Hw as F,_F as G,nh as H,BF as I,B1 as J,Ir as K,Nw as L,wp as M,Ry as N,Kt as O,Yx as P,Zl as Q,al as R,W2 as S,S1 as T,It as U,c1 as V,Cl as W,VL as X,QL as Y,hi as Z,p as _,Rx as a,b2 as a$,Cc as a0,tF as a1,JL as a2,KL as a3,GL as a4,XL as a5,ZL as a6,rF as a7,eF as a8,R0 as a9,$F as aA,ja as aB,mT as aC,Ns as aD,yT as aE,de as aF,Tt as aG,qw as aH,p1 as aI,Hl as aJ,Wl as aK,ga as aL,m2 as aM,g2 as aN,p2 as aO,f2 as aP,a2 as aQ,Df as aR,l2 as aS,s2 as aT,u2 as aU,Pf as aV,n2 as aW,C2 as aX,x2 as aY,y2 as aZ,k2 as a_,_s as aa,HL as ab,io as ac,M2 as ad,Tx as ae,Bd as af,tc as ag,N2 as ah,Le as ai,Y as aj,U as ak,Mx as al,Ld as am,cT as an,cm as ao,FF as ap,Ui as aq,J1 as ar,Xl as as,pt as at,me as au,ZT as av,LF as aw,MF as ax,EF as ay,TT as az,Px as b,o2 as b0,Rf as b1,d2 as b2,c2 as b3,h2 as b4,qf as b5,L1 as b6,xT as b7,jf as b8,Ye as b9,DF as bA,ld as ba,u1 as bb,zL as bc,ws as bd,AF as be,Gu as bf,De as bg,Q1 as bh,gl as bi,$r as bj,Ls as bk,fc as bl,Yb as bm,yt as bn,Af as bo,ve as bp,Pb as bq,pl as br,zd as bs,Is as bt,Ud as bu,jL as bv,zy as bw,up as bx,Ct as by,vF as bz,Pt as c,vd as d,se as e,Tr as f,Nx as g,hm as h,ct as i,ze as j,Dt as k,J as l,$s as m,Xf as n,Ms as o,r2 as p,YL as q,IF as r,qx as s,OF as t,We as u,Wx as v,Y2 as w,zx as x,v1 as y,KS as z};
|