grimoire3d 0.0.0-dev.798f2ad → 0.0.0-dev.dbe8204
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/README.md +28 -124
- package/cli/cli.js +348 -0
- package/cli/content.js +382 -0
- package/cli/cover-options.d.ts +15 -0
- package/cli/cover-options.js +105 -0
- package/cli/markdown.js +139 -0
- package/cli/markup.d.ts +3 -0
- package/cli/markup.js +60 -0
- package/cli/routes.d.ts +6 -0
- package/cli/routes.js +19 -0
- package/cli/static-pages.js +467 -0
- package/cli/video-url.d.ts +5 -0
- package/cli/video-url.js +51 -0
- package/dist/BookViewer-CwCn-LTn.js +332 -0
- package/dist/components/BookModel.d.ts +20 -0
- package/dist/components/BookViewer.d.ts +17 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +5 -0
- package/dist/grimoire3d.css +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4 -0
- package/dist/main.d.ts +1 -0
- package/dist/site/assets/BookReader-BxKrexRZ.js +2 -0
- package/dist/site/assets/BookScene-DN1_Kxe3.js +4045 -0
- package/dist/site/assets/MermaidDiagram-Dma3Cwvn.js +312 -0
- package/dist/site/assets/PageMarkdown-C-gI_dXg.js +37 -0
- package/dist/site/assets/abnfDiagram-S7VZAUFO-BIA2ezcb.js +1 -0
- package/dist/site/assets/alcove-cyX4Tv3E.avif +0 -0
- package/dist/site/assets/architectureDiagram-YGSQEFNW-DMB5UtEZ.js +36 -0
- package/dist/site/assets/blockDiagram-APKKGZFW-CeBSUSaW.js +140 -0
- package/dist/site/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
- package/dist/site/assets/c4Diagram-KJ2TOQU5-BmBo2PHu.js +38 -0
- package/dist/site/assets/catalog-07-UR91A.avif +0 -0
- package/dist/site/assets/chunk-2Q5K7J3B-BDgDFVbx.js +1 -0
- package/dist/site/assets/chunk-5VM5RSS4-CCNs5Q1j.js +15 -0
- package/dist/site/assets/chunk-HFQBQIA3-B8uXoLoT.js +1 -0
- package/dist/site/assets/chunk-JWPE2WC7-BiKy7CcD.js +1 -0
- package/dist/site/assets/chunk-KQLB2F66-D_kpUTKA.js +2 -0
- package/dist/site/assets/chunk-KS47KZWR-C_s_qnHf.js +1 -0
- package/dist/site/assets/chunk-OY52VR5R-D8f7gl4W.js +88 -0
- package/dist/site/assets/chunk-TU62E6Q5-Bm44Znlj.js +1 -0
- package/dist/site/assets/chunk-XXDRQBXY-ChLLr56_.js +1 -0
- package/dist/site/assets/classDiagram-v2-L25IHNXF-DwKi-r2i.js +217 -0
- package/dist/site/assets/cose-bilkent-JH36ORCC-8N6YUm1i.js +1 -0
- package/dist/site/assets/cover-blue-Bh8Xp4T5.avif +0 -0
- package/dist/site/assets/cover-blue-mobile-YcuYIg0I.avif +0 -0
- package/dist/site/assets/cover-green-By13JjUx.avif +0 -0
- package/dist/site/assets/cover-green-mobile-BNTgNt7v.avif +0 -0
- package/dist/site/assets/cover-red-mobile-DHOCz3wI.avif +0 -0
- package/dist/site/assets/cover-red-qvZEk3PI.avif +0 -0
- package/dist/site/assets/cynefin-EF2NZ3EQ-Df5ATUPb.js +141 -0
- package/dist/site/assets/cynefinDiagram-L36ESFBY-DmAbfxAU.js +62 -0
- package/dist/site/assets/cytoscape.esm-BHa1VTXv.js +321 -0
- package/dist/site/assets/d3-scale-4DPf7zan.js +1 -0
- package/dist/site/assets/dagre-SPEB5RXH-B_2grAE7.js +4 -0
- package/dist/site/assets/diagram-3B7GL73J-C9FXwDlf.js +200 -0
- package/dist/site/assets/diagram-DNEMPZML-DflAT3gr.js +24 -0
- package/dist/site/assets/diagram-L3MUGCDN-B04gjrM_.js +41 -0
- package/dist/site/assets/diagram-LA4NIPWU-cfWJg8HX.js +24 -0
- package/dist/site/assets/diagram-MHCOC4E2-jRbOs2Df.js +3 -0
- package/dist/site/assets/diagram-XPFHEONP-yR45xV59.js +30 -0
- package/dist/site/assets/ebnfDiagram-UZSYDL2S-DlmNJUx4.js +1 -0
- package/dist/site/assets/elk-XV6XMXQE-cHLdRN7u.js +27 -0
- package/dist/site/assets/erDiagram-EYBAPDEH-7HsRsmBI.js +99 -0
- package/dist/site/assets/es-DoLiZPBX.js +2 -0
- package/dist/site/assets/favicon-C9YRygge.png +0 -0
- package/dist/site/assets/flowDiagram-MALGAFMO-DoJjw4RA.js +213 -0
- package/dist/site/assets/ganttDiagram-23REXITY-D2uZtX_8.js +292 -0
- package/dist/site/assets/gitGraphDiagram-STJD7YCW-CjftfLRK.js +106 -0
- package/dist/site/assets/graph-D8UmR1vK.js +1 -0
- package/dist/site/assets/index-CqcyU6rA.js +1 -0
- package/dist/site/assets/index-DWW-KDWe.css +1 -0
- package/dist/site/assets/infoDiagram-KBXO4MBG-HN-1tqq1.js +2 -0
- package/dist/site/assets/ishikawaDiagram-M35NCXHK-DcnRwsO0.js +70 -0
- package/dist/site/assets/journeyDiagram-OPLOXDXO-CMZGp8mG.js +139 -0
- package/dist/site/assets/kanban-definition-BZKZHSQY-C9vGS-EW.js +89 -0
- package/dist/site/assets/katex-DLSO0Xi6.js +257 -0
- package/dist/site/assets/mindmap-definition-I2QAS2VK-R2SGME7R.js +98 -0
- package/dist/site/assets/mobile-cabinet-BUr9vtlo.avif +0 -0
- package/dist/site/assets/mobile-cabinet-sm-pauJUfRH.avif +0 -0
- package/dist/site/assets/mobile-paper-DF0CuLes.avif +0 -0
- package/dist/site/assets/mobile-paper-sm-77eJHX6h.avif +0 -0
- package/dist/site/assets/open-nWGD2hyb.glb +0 -0
- package/dist/site/assets/pegDiagram-FD4XPPHP-eDMY4Hpd.js +1 -0
- package/dist/site/assets/pieDiagram-J4AKIIQI-DoHNiqwi.js +39 -0
- package/dist/site/assets/quadrantDiagram-XTYBLID2-Bz5idec8.js +7 -0
- package/dist/site/assets/railroadDiagram-MRQ6NCDL-DHJisW8P.js +1 -0
- package/dist/site/assets/requirementDiagram-Y7LWUY3S-5aETRIZz.js +84 -0
- package/dist/site/assets/resting-amber-BSjsErIg.avif +0 -0
- package/dist/site/assets/resting-black-DDQ4XMJI.avif +0 -0
- package/dist/site/assets/resting-blue-DDOT8IQ8.avif +0 -0
- package/dist/site/assets/resting-green-DkRrV8eX.avif +0 -0
- package/dist/site/assets/resting-ivory-CEqoG5yI.avif +0 -0
- package/dist/site/assets/resting-plum-B-8tkSmP.avif +0 -0
- package/dist/site/assets/resting-red-D0hLpMpz.avif +0 -0
- package/dist/site/assets/resting-slate-CH8Z_Rky.avif +0 -0
- package/dist/site/assets/resting-teal-CGt6jFmT.avif +0 -0
- package/dist/site/assets/resting-walnut-t3WgHgUO.avif +0 -0
- package/dist/site/assets/sankeyDiagram-WGJFYUXA-C7O4v9rg.js +40 -0
- package/dist/site/assets/search-stage-B8cH1AE_.avif +0 -0
- package/dist/site/assets/search-stage-mobile-BZ58ew4F.avif +0 -0
- package/dist/site/assets/sequenceDiagram-5NDRBG5M-D4sVU6s6.js +169 -0
- package/dist/site/assets/sizeCapture-INFHLROL-Bi2DkFS3.js +1 -0
- package/dist/site/assets/stateDiagram-v2-FJ4FJNEA-WqXK7YOd.js +291 -0
- package/dist/site/assets/swimlanes-UMQ2AFYF-Czo9WyoV.js +1 -0
- package/dist/site/assets/swimlanesDiagram-OMPLPG4O-BH5aEx0X.js +8 -0
- package/dist/site/assets/three-core-Dkab0Vtn.js +40 -0
- package/dist/site/assets/timeline-definition-SEUHKTQE-KGKDZW_q.js +120 -0
- package/dist/site/assets/usecaseDiagram-AFA6YXN4-S0_9S22K.js +370 -0
- package/dist/site/assets/vennDiagram-NNMJR3RB-DJOjLlbA.js +34 -0
- package/dist/site/assets/wardleyDiagram-S7YFUSEH-BnzYzY-n.js +78 -0
- package/dist/site/assets/xychartDiagram-GGNKY7IX-CKOVznoa.js +7 -0
- package/dist/site/index.html +14 -0
- package/dist/types/index.d.ts +163 -0
- package/package.json +27 -11
- package/dist/grimoire3d.js +0 -82093
- package/dist/grimoire3d.umd.cjs +0 -4470
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk-XV6XMXQE-cHLdRN7u.js","./chunk-KS47KZWR-C_s_qnHf.js","./chunk-KQLB2F66-D_kpUTKA.js","./index-CqcyU6rA.js","./index-DWW-KDWe.css","./graph-D8UmR1vK.js","./PageMarkdown-C-gI_dXg.js","./dagre-SPEB5RXH-B_2grAE7.js","./swimlanes-UMQ2AFYF-Czo9WyoV.js","./cose-bilkent-JH36ORCC-8N6YUm1i.js","./cytoscape.esm-BHa1VTXv.js","./c4Diagram-KJ2TOQU5-BmBo2PHu.js","./chunk-HFQBQIA3-B8uXoLoT.js","./flowDiagram-MALGAFMO-DoJjw4RA.js","./chunk-5VM5RSS4-CCNs5Q1j.js","./chunk-XXDRQBXY-ChLLr56_.js","./chunk-TU62E6Q5-Bm44Znlj.js","./diagram-3B7GL73J-C9FXwDlf.js","./swimlanesDiagram-OMPLPG4O-BH5aEx0X.js","./erDiagram-EYBAPDEH-7HsRsmBI.js","./gitGraphDiagram-STJD7YCW-CjftfLRK.js","./chunk-2Q5K7J3B-BDgDFVbx.js","./chunk-JWPE2WC7-BiKy7CcD.js","./cynefin-EF2NZ3EQ-Df5ATUPb.js","./ganttDiagram-23REXITY-D2uZtX_8.js","./d3-scale-4DPf7zan.js","./infoDiagram-KBXO4MBG-HN-1tqq1.js","./pieDiagram-J4AKIIQI-DoHNiqwi.js","./quadrantDiagram-XTYBLID2-Bz5idec8.js","./xychartDiagram-GGNKY7IX-CKOVznoa.js","./requirementDiagram-Y7LWUY3S-5aETRIZz.js","./sequenceDiagram-5NDRBG5M-D4sVU6s6.js","./classDiagram-v2-L25IHNXF-DwKi-r2i.js","./stateDiagram-v2-FJ4FJNEA-WqXK7YOd.js","./journeyDiagram-OPLOXDXO-CMZGp8mG.js","./timeline-definition-SEUHKTQE-KGKDZW_q.js","./mindmap-definition-I2QAS2VK-R2SGME7R.js","./kanban-definition-BZKZHSQY-C9vGS-EW.js","./sankeyDiagram-WGJFYUXA-C7O4v9rg.js","./diagram-DNEMPZML-DflAT3gr.js","./diagram-L3MUGCDN-B04gjrM_.js","./blockDiagram-APKKGZFW-CeBSUSaW.js","./diagram-XPFHEONP-yR45xV59.js","./architectureDiagram-YGSQEFNW-DMB5UtEZ.js","./diagram-MHCOC4E2-jRbOs2Df.js","./ishikawaDiagram-M35NCXHK-DcnRwsO0.js","./vennDiagram-NNMJR3RB-DJOjLlbA.js","./diagram-LA4NIPWU-cfWJg8HX.js","./usecaseDiagram-AFA6YXN4-S0_9S22K.js","./wardleyDiagram-S7YFUSEH-BnzYzY-n.js","./cynefinDiagram-L36ESFBY-DmAbfxAU.js","./railroadDiagram-MRQ6NCDL-DHJisW8P.js","./chunk-OY52VR5R-D8f7gl4W.js","./ebnfDiagram-UZSYDL2S-DlmNJUx4.js","./abnfDiagram-S7VZAUFO-BIA2ezcb.js","./pegDiagram-FD4XPPHP-eDMY4Hpd.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b as Vo,_ as Dt,T as hs,d as Cs,F as Ah,a as Ut,X as Qy,A as Jy,U as t0,$ as e0}from"./index-CqcyU6rA.js";import{g as r0}from"./PageMarkdown-C-gI_dXg.js";const i0=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],s0=Vo("expand",i0);const o0=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],a0=Vo("maximize-2",o0);const n0=[["path",{d:"M5 12h14",key:"1ays0h"}]],l0=Vo("minus",n0);const h0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c0=Vo("plus",h0);function Eh(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 d0(e){if(Array.isArray(e))return e}function u0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,n,a=[],h=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(h=(i=o.call(r)).done)&&(a.push(i.value),a.length!==t);h=!0);}catch(l){c=!0,s=l}finally{try{if(!h&&r.return!=null&&(n=r.return(),Object(n)!==n))return}finally{if(c)throw s}}return a}}function p0(){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.`)}function f0(e,t){return d0(e)||u0(e,t)||g0(e,t)||p0()}function g0(e,t){if(e){if(typeof e=="string")return Eh(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)?Eh(e,t):void 0}}const Xd=Object.entries,m0=Object.keys,Mh=Object.setPrototypeOf,y0=Object.isFrozen,Zd=Object.getPrototypeOf,Kd=Object.getOwnPropertyDescriptor;let ce=Object.freeze,se=Object.seal,Or=Object.create,Qd=typeof Reflect<"u"&&Reflect,Co=Qd.apply,_n=Qd.construct;ce||(ce=function(t){return t});se||(se=function(t){return t});Co||(Co=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});_n||(_n=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 ur=Vt(Array.prototype.forEach),C0=Vt(Array.prototype.lastIndexOf),$h=Vt(Array.prototype.pop),Qi=Vt(Array.prototype.push),x0=Vt(Array.prototype.slice),b0=Vt(Array.prototype.splice),Ti=Array.isArray,Ba=Jd(Set),va=Vt(Set.prototype.add),Ji=Vt(Set.prototype.has),Vr=Vt(String.prototype.toLowerCase),La=Vt(String.prototype.toString),k0=Vt(String.prototype.match),Gs=Vt(String.prototype.replace),Fa=Vt(String.prototype.indexOf),S0=Vt(String.prototype.trim),w0=Vt(Number.prototype.toString),T0=Vt(Boolean.prototype.toString),Oh=typeof BigInt>"u"?null:Vt(BigInt.prototype.toString),Dh=typeof Symbol>"u"?null:Vt(Symbol.prototype.toString),be=Vt(Object.prototype.hasOwnProperty),ts=Vt(Object.prototype.toString),_0=RegExp.prototype.test,le=function(t,r){return t instanceof RegExp&&(t.lastIndex=0),Co(_0,t,[r])},pr=Jd(TypeError);function Vt(e){return 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 Co(e,t,i)}}function Jd(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return _n(e,r)}}function zt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vr;if(Mh&&Mh(e,null),!Ti(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(y0(t)||(t[i]=o),s=o)}e[s]=!0}return e}function B0(e){for(let t=0;t<e.length;t++)be(e,t)||(e[t]=null);return e}function xo(e){const t=Or(null);for(const i of Xd(e)){var r=f0(i,2);const s=r[0],o=r[1];be(e,s)&&(Ti(o)?t[s]=B0(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=xo(o):t[s]=o)}return t}function cs(e){const t=Or(null),r=m0(e);let i=r.length;for(;i--;)t[r[i]]=e[r[i]];return t}function v0(e){switch(typeof e){case"string":return e;case"number":return w0(e);case"boolean":return T0(e);case"bigint":return Oh?Oh(e):"0";case"symbol":return Dh?Dh(e):"Symbol()";case"undefined":return ts(e);case"function":case"object":{if(e===null)return ts(e);const t=e,r=Oe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:ts(i)}return ts(e)}default:return ts(e)}}function Oe(e,t){for(;e!==null;){const i=Kd(e,t);if(i){if(i.get)return Vt(i.get);if(typeof i.value=="function")return Vt(i.value)}e=Zd(e)}function r(){return null}return r}function L0(e,t){for(;e!==null;){const r=Kd(e,t);if(r)return r.get?Vt(r.get):null;e=Zd(e)}return null}function F0(e){if(!e)return!1;try{return le(e,""),!0}catch{return!1}}const Ih=ce(["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"]),Aa=ce(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ea=ce(["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"]),A0=ce(["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"]),Ma=ce(["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"]),E0=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ph=ce(["#text"]),Rh=ce(["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"]),$a=ce(["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"]),qh=ce(["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"]),Vs=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M0=se(/{{[\w\W]*|^[\w\W]*}}/g),$0=se(/<%[\w\W]*|^[\w\W]*%>/g),O0=se(/\${[\w\W]*/g),D0=se(/{{|}}|\${|<%|%>|<%|%>/),I0=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),P0=se(/^aria-[\-\w]+$/),Nh=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),R0=se(/^(?:\w+script|data):/i),q0=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),N0=se(/^html$/i),W0=se(/^[a-z][.\w]*(-[.\w]+)+$/i),Oa=se(/<[/\w!]/g),Wh=se(/<[/\w]/g),z0=se(/<\/no(script|embed|frames)/i),zh=se(/\/>/i),H0=se(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),Y0=se(/^[\r\n\t ]+/),Qt={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},U0=ce(zt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),j0=function(){return typeof window>"u"?null:window},G0=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 o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Hh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Er=function(t,r,i,s){return be(t,r)&&Ti(t[r])?zt(s.base?cs(s.base):{},t[r],s.transform):i},Da=function(t,r,i){const s=be(t,r)?t[r]:void 0;return s&&typeof s=="object"?xo(s):i};function tu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j0();const t=rt=>tu(rt);if(t.version="3.4.18",t.removed=[],!e||!e.document||e.document.nodeType!==Qt.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript,o=e.HTMLTemplateElement,n=e.Node,a=e.Element,h=e.NodeFilter,c=e.DOMParser,l=e.trustedTypes,d=a.prototype,u=Oe(d,"cloneNode"),f=Oe(d,"remove"),m=Oe(d,"removeAttributeNode"),y=Oe(d,"nextSibling"),C=Oe(d,"childNodes"),x=Oe(d,"parentNode"),b=Oe(d,"shadowRoot"),S=Oe(d,"attributes"),T=n&&n.prototype?Oe(n.prototype,"nodeType"):null,v=n&&n.prototype?Oe(n.prototype,"nodeName"):null,B=n&&n.prototype?Oe(n.prototype,"ownerDocument"):null,L=function(_){return T?T(_):_.nodeType},F=function(_){return v?v(_):_.nodeName},q=L0(d,"namespaceURI"),R=function(_){return q?q(_):_.namespaceURI};if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let $,G="",M,E=!1,D=0;const A=function(){if(D>0)throw pr('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.')},z=function(_){A(),D++;try{return $.createHTML(_)}finally{D--}},W=function(_){return $&&it?z(_):_},tt=function(_){A(),D++;try{return $.createScriptURL(_)}finally{D--}},V=function(){return E||(M=G0(l,s),E=!0),M},lt=r,xt=lt.implementation,bt=lt.createNodeIterator,_t=lt.createDocumentFragment,mt=lt.getElementsByTagName,ft=i.importNode;let ht=Hh();t.isSupported=typeof Xd=="function"&&typeof x=="function"&&xt&&xt.createHTMLDocument!==void 0;const Tt=M0,It=$0,kt=O0,Pt=I0,Zt=P0,Be=R0,Me=q0,Yr=W0;let _r=Nh,Nt=null;const Xe=zt({},[...Ih,...Aa,...Ea,...Ma,...Ph]);let Yt=null;const Ze=zt({},[...Rh,...$a,...qh,...Vs]);let ue=null,qe=null,hr=null;const oe=Object.seal(Or(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Br=!0,Ne=!0,vr=!1,cr=!0,g=!1,I=!0,X=!1,K=!1,j=null,k=null,N=!1,Y=!1,et=!1,it=!1,st=!0,Z=!1;const at="user-content-";let yt=!0,Bt=!1,St=null,vt=!1,Mt=null;const We=zt({},["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 Lr=null;const Fr=zt({},["audio","video","img","source","image","track"]);let fh=null;const gh=zt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ws="http://www.w3.org/1998/Math/MathML",zs="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let li=Ke,da=!1,mh=null;const vy=zt({},[Ws,zs,Ke],La),Ly=ce(zt({},["mi","mo","mn","ms","mtext"]));let ua=null;const Fy=ce(zt({},["annotation-xml"]));let pa=null;const Ay=ce(Or(null)),Ey=zt({},["title","style","font","a","script"]);let Zi=null;const My=["application/xhtml+xml","text/html"],$y="text/html";let Kt=null,Hs=null;const Oy=r.createElement("form"),yh=function(_){return _ instanceof RegExp||_ instanceof Function},fa=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(!_||typeof _!="object")&&(_={}),_=xo(_),Zi=My.indexOf(_.PARSER_MEDIA_TYPE)===-1?$y:_.PARSER_MEDIA_TYPE,Kt=Zi==="application/xhtml+xml"?La:Vr,Nt=Er(_,"ALLOWED_TAGS",Xe,{transform:Kt}),Yt=Er(_,"ALLOWED_ATTR",Ze,{transform:Kt}),mh=Er(_,"ALLOWED_NAMESPACES",vy,{transform:La}),fh=Er(_,"ADD_URI_SAFE_ATTR",gh,{transform:Kt,base:gh}),Lr=Er(_,"ADD_DATA_URI_TAGS",Fr,{transform:Kt,base:Fr}),Mt=Er(_,"FORBID_CONTENTS",We,{transform:Kt}),qe=Er(_,"FORBID_TAGS",Or(null),{transform:Kt}),hr=Er(_,"FORBID_ATTR",Or(null),{transform:Kt}),vt=be(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?xo(_.USE_PROFILES):_.USE_PROFILES:!1,Br=_.ALLOW_ARIA_ATTR!==!1,Ne=_.ALLOW_DATA_ATTR!==!1,vr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,cr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,g=_.SAFE_FOR_TEMPLATES||!1,I=_.SAFE_FOR_XML!==!1,X=_.WHOLE_DOCUMENT||!1,Y=_.RETURN_DOM||!1,et=_.RETURN_DOM_FRAGMENT||!1,it=_.RETURN_TRUSTED_TYPE||!1,N=_.FORCE_BODY||!1,st=_.SANITIZE_DOM!==!1,Z=_.SANITIZE_NAMED_PROPS||!1,yt=_.KEEP_CONTENT!==!1,Bt=_.IN_PLACE||!1,_r=F0(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Nh,li=typeof _.NAMESPACE=="string"?_.NAMESPACE:Ke,ua=Da(_,"MATHML_TEXT_INTEGRATION_POINTS",Ly),pa=Da(_,"HTML_INTEGRATION_POINTS",Fy);const O=Da(_,"CUSTOM_ELEMENT_HANDLING",Ay);if(ue=Or(null),be(O,"tagNameCheck")&&yh(O.tagNameCheck)&&(ue.tagNameCheck=O.tagNameCheck),be(O,"attributeNameCheck")&&yh(O.attributeNameCheck)&&(ue.attributeNameCheck=O.attributeNameCheck),be(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),se(ue),g&&(Ne=!1),et&&(Y=!0),vt&&((be(_,"ALLOWED_TAGS")||be(_,"ALLOWED_ATTR"))&&typeof console<"u"&&typeof console.warn=="function"&&console.warn("DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together."),Nt=zt({},Ph),Yt=Or(null),vt.html===!0&&(zt(Nt,Ih),zt(Yt,Rh)),vt.svg===!0&&(zt(Nt,Aa),zt(Yt,$a),zt(Yt,Vs)),vt.svgFilters===!0&&(zt(Nt,Ea),zt(Yt,$a),zt(Yt,Vs)),vt.mathMl===!0&&(zt(Nt,Ma),zt(Yt,qh),zt(Yt,Vs))),oe.tagCheck=null,oe.attributeCheck=null,be(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?oe.tagCheck=_.ADD_TAGS:Ti(_.ADD_TAGS)&&(Nt===Xe&&(Nt=cs(Nt)),zt(Nt,_.ADD_TAGS,Kt))),be(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?oe.attributeCheck=_.ADD_ATTR:Ti(_.ADD_ATTR)&&(Yt===Ze&&(Yt=cs(Yt)),zt(Yt,_.ADD_ATTR,Kt))),be(_,"ADD_FORBID_CONTENTS")&&Ti(_.ADD_FORBID_CONTENTS)&&(Mt===We&&(Mt=cs(Mt)),zt(Mt,_.ADD_FORBID_CONTENTS,Kt)),yt&&(Nt["#text"]=!0),X&&zt(Nt,["html","head","body"]),Nt.table&&(Nt.tbody=!0,delete qe.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Q=$;$=_.TRUSTED_TYPES_POLICY;try{G=z("")}catch(ot){throw $=Q,ot}}else _.TRUSTED_TYPES_POLICY===null?($=void 0,G=""):($===void 0&&($=V()),$&&typeof G=="string"&&(G=z("")));Hs=ce(_)},Ch=zt({},[...Aa,...Ea,...A0]),xh=zt({},[...Ma,...E0]),Dy=function(_,O,Q){return O===Ke?_==="svg":O===Ws?_==="svg"&&(Q==="annotation-xml"||ua[Q]):!!Ch[_]},Iy=function(_,O,Q){return O===Ke?_==="math":O===zs?_==="math"&&pa[Q]:!!xh[_]},Py=function(_,O,Q){return O===zs&&!pa[Q]||O===Ws&&!ua[Q]?!1:!xh[_]&&(Ey[_]||!Ch[_])},Ry=function(_){const O=R(_),Q=Vr(F(_)),ot=x(_);let wt=li,At="template";return ot&&L(ot)===Qt.element&&(wt=R(ot),At=Vr(F(ot))),mh[O]?O===zs?Dy(Q,wt,At):O===Ws?Iy(Q,wt,At):O===Ke?Py(Q,wt,At):Zi==="application/xhtml+xml":!1},Ar=function(_){Qi(t.removed,{element:_});try{x(_).removeChild(_)}catch{if(f(_),!x(_))throw pr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},bh=function(_,O,Q){try{m(_,O)}catch{try{_.removeAttribute(Q)}catch{}}},ga=function(_){Ca(_);const O=C(_);O&&ur(x0(O),Q=>{try{f(Q)}catch{}}),L(_)===Qt.element&&ma(_,!1)},hi=function(_,O,Q){if(!Q)try{Q=O.getAttributeNode(_)}catch{Q=null}if(Qi(t.removed,{attribute:Q||null,from:O}),Q)bh(O,Q,_);else try{O.removeAttribute(_)}catch{}if(_==="is")if(Y||et)try{Ar(O)}catch{}else try{O.setAttribute(_,"")}catch{}},ma=function(_,O){const Q=S(_);if(Q)for(let ot=Q.length-1;ot>=0;--ot){const wt=Q[ot],At=wt&&wt.name;typeof At=="string"&&!(O&&Yt[Kt(At)])&&bh(_,wt,At)}},ya=function(_,O){let Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const ot=[_];for(;ot.length>0;){const wt=ot.pop();if(O(wt)===!1)continue;if(Q&&L(wt)===Qt.element){const Rt=b(wt);ci(Rt)&&ot.push(Rt)}const At=C(wt);if(At)for(let Rt=At.length-1;Rt>=0;--Rt)ot.push(At[Rt])}},Ca=function(_){ya(_,O=>{L(O)===Qt.element&&ma(O,!0)})},xa=function(_){const O=[];return ya(_,Q=>{O.push(Q)},!0),O},qy=function(_,O){const Q=Ba();ur(xa(_),ot=>{L(ot)===Qt.element&&va(Q,ot)}),ur(O,ot=>{L(ot)===Qt.element&&!Ji(Q,ot)&&ma(ot,!0)})},kh=function(_,O){let Q=!1;return ur(t.removed,ot=>{ot.element&&(Q=Q||ot.element===_,Ca(ot.element))}),qy(_,O),Q},Ny=8,Wy=function(_,O){const Q=St;let ot=null;const wt=()=>(ot||(ot=Ba(),ur(O,At=>{va(ot,At)})),ot);for(let At=0;;At++){const Rt=xa(_),ae=[_];let dr=!1;if(ur(Rt,He=>{L(He)===Qt.documentFragment?Qi(ae,He):!dr&&!Ji(Q,He)&&(dr=Ji(wt(),He))}),!dr)return;if(At>=Ny)throw pr("the tree kept changing during in-place sanitization; refusing to return it");ur(ae,(He,ve)=>{zy(He,ve>0,_,wt())})}},zy=function(_,O,Q,ot){const wt=Ys(_);let At;for(;At=wt.nextNode();)!Ji(ot,At)||Ji(St,At)||(O&&ze(ht.uponSanitizeShadowNode,At,null),wa(At,Q))},Hy=function(_){St&&va(St,_)},Sh=function(_,O){return I?_==="patchsrc"?!0:_==="for"&&O!=="label"&&O!=="output":!1},Yy=function(_){I&&ya(_,O=>{const Q=L(O);if(Q===Qt.processingInstruction||Q===Qt.comment&&le(Wh,O.data)){try{f(O)}catch{}return!1}if(Q===Qt.element){const ot=O,wt=Kt(F(O));try{ot.hasAttribute&&ot.hasAttribute("patchsrc")&&ot.removeAttribute("patchsrc"),ot.hasAttribute&&ot.hasAttribute("for")&&Sh("for",wt)&&ot.removeAttribute("for")}catch{}}return!0})},wh=function(_){let O=null,Q=null;if(N)_="<remove></remove>"+_;else{const At=k0(_,Y0);Q=At&&At[0]}Zi==="application/xhtml+xml"&&li===Ke&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const ot=$?z(_):_;if(li===Ke)try{O=new c().parseFromString(ot,Zi)}catch{}if(!O||!O.documentElement){O=xt.createDocument(li,"template",null);try{O.documentElement.innerHTML=da?G:ot}catch{}}const wt=O.body||O.documentElement;return _&&Q&&wt.insertBefore(r.createTextNode(Q),wt.childNodes[0]||null),li===Ke?mt.call(O,X?"html":"body")[0]:X?O.documentElement:wt},Ys=function(_){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const Q=B?B(_):_.ownerDocument;return bt.call(Q||_,_,(O?0:h.SHOW_ELEMENT)|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},ba=function(_){return _=Gs(_,Tt," "),_=Gs(_,It," "),_=Gs(_,kt," "),_},ka=function(_){var O;Sa(_);const Q=(O=_.querySelectorAll)===null||O===void 0?void 0:O.call(_,"template");Q&&ur(Q,ot=>{ci(ot.content)&&ka(ot.content)})},Sa=function(_){_.normalize();const O=Ys(_,!0);let Q=O.nextNode();for(;Q;)Q.data=ba(Q.data),Q=O.nextNode()},Us=function(_){const O=v?v(_):null;return typeof O!="string"||Kt(O)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==S(_)||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(_)},Th=function(_){if(!T||typeof _!="object"||_===null)return null;try{const O=T(_);return typeof O=="number"?O:null}catch{return null}},ci=function(_){return Th(_)===Qt.documentFragment},Ki=function(_){return Th(_)!==null};function ze(rt,_,O){rt.length!==0&&ur(rt,Q=>{Q.call(t,_,O,Hs)})}const Uy=function(_,O,Q){return!!(I&&Q===Qt.element&&_.hasChildNodes()&&!Ki(_.firstElementChild)&&le(Oa,_.textContent)&&le(Oa,_.innerHTML)||I&&U0[O]&&Q===Qt.element&&R(_)===Ke&&(Ki(_.firstElementChild)||typeof _.textContent=="string"&&le(Oa,_.textContent))||Q===Qt.processingInstruction||I&&Q===Qt.comment&&le(Wh,_.data))},js=function(_,O){if(_ instanceof RegExp)return le(_,O);if(_ instanceof Function){for(var Q=arguments.length,ot=new Array(Q>2?Q-2:0),wt=2;wt<Q;wt++)ot[wt-2]=arguments[wt];return!!_(O,...ot)}return!1},jy=function(_,O,Q){if(!qe[O]&&vh(O)&&js(ue.tagNameCheck,O))return!1;if(yt&&!Mt[O]&&!Mt[Vr(O)]){const ot=x(_),wt=C(_);if(wt&&ot){const At=wt.length;for(let Rt=At-1;Rt>=0;--Rt){const ae=_===Q?u(wt[Rt],!0):wt[Rt];ot.insertBefore(ae,y(_))}}}return Ar(_),!0},_h=function(_,O,Q,ot){return _.length===0?O:O===Q||O===ot?cs(O):O},di=function(_,O){return _===O||x(_)!==null?!1:(Bt&&Ca(_),!0)},Gy=function(_,O){if(Hy(_),ze(ht.beforeSanitizeElements,_,null),di(_,O))return!0;if(Us(_))return Ar(_),!0;const Q=Kt(F(_)),ot=L(_);if(Nt=_h(ht.uponSanitizeElement,Nt,Xe,j),ze(ht.uponSanitizeElement,_,{tagName:Q,allowedTags:Nt}),di(_,O))return!0;if(Uy(_,Q,ot))return Ar(_),!0;if(qe[Q]||!(oe.tagCheck instanceof Function&&oe.tagCheck(Q))&&!Nt[Q]){const wt=jy(_,Q,O);return wt===!1&&(ze(ht.afterSanitizeElements,_,null),di(_,O))?!0:wt}if(ot===Qt.element&&!Ry(_)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&le(z0,_.innerHTML))return Ar(_),!0;if(g&&ot===Qt.text){const wt=_.textContent,At=ba(wt);wt!==At&&(Qi(t.removed,{element:_.cloneNode()}),_.textContent=At)}return ze(ht.afterSanitizeElements,_,null),di(_,O)},Bh=function(_,O,Q){if(hr[O]||Sh(O,_)||st&&(O==="id"||O==="name")&&(Q in r||Q in Oy))return!1;const ot=Yt[O]||oe.attributeCheck instanceof Function&&oe.attributeCheck(O,_);if(Ne&&le(Pt,O)||Br&&le(Zt,O))return!0;if(!ot)return vh(_)&&js(ue.tagNameCheck,_)&&js(ue.attributeNameCheck,O,_)||O==="is"&&ue.allowCustomizedBuiltInElements&&js(ue.tagNameCheck,Q);if(fh[O])return!0;const wt=Gs(Q,Me,"");return le(_r,wt)||(O==="src"||O==="xlink:href"||O==="href")&&_!=="script"&&Fa(Q,"data:")===0&&Lr[_]||vr&&!le(Be,wt)?!0:!Q},Vy=zt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vh=function(_){return!Vy[Vr(_)]&&le(Yr,_)},Xy=function(_,O,Q,ot){if($&&typeof l=="object"&&typeof l.getAttributeType=="function"&&!Q)switch(l.getAttributeType(_,O)){case"TrustedHTML":return z(ot);case"TrustedScriptURL":return tt(ot)}return ot},Zy=function(_,O,Q,ot){try{return Q?_.setAttributeNS(Q,O,ot):_.setAttribute(O,ot),Us(_)?(Ar(_),!1):!0}catch{return hi(O,_),!1}},Lh=function(_,O){return I&&le(H0,O)?!0:Vr(_)==="attributename"&&Fa(O,"href")!==-1},Ky=function(_,O){if(ze(ht.beforeSanitizeAttributes,_,null),di(_,O))return;const Q=_.attributes;if(!Q||Us(_))return;Yt=_h(ht.uponSanitizeAttribute,Yt,Ze,k);const ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Yt,forceKeepAttr:void 0};let wt=Q.length;const At=Kt(F(_));for(;wt--;){const Rt=Q[wt],ae=Rt.name,dr=Rt.namespaceURI,He=Rt.value,ve=Kt(ae),Qe=He;let pe=ae==="value"?Qe:S0(Qe),Fh=!1;if(ot.attrName=ve,ot.attrValue=pe,ot.keepAttr=!0,ot.forceKeepAttr=void 0,ze(ht.uponSanitizeAttribute,_,ot),pe=ot.attrValue,Z&&(ve==="id"||ve==="name")&&Fa(pe,at)!==0&&(hi(ae,_,Rt),pe=at+pe,Fh=!0),Lh(ae,pe)){hi(ae,_,Rt);continue}if(!ot.forceKeepAttr){if(!ot.keepAttr){hi(ae,_,Rt);continue}if(!cr&&le(zh,pe)){hi(ae,_,Rt);continue}if(g&&(pe=ba(pe)),!Bh(At,ve,pe)){hi(ae,_,Rt);continue}pe=Xy(At,ve,dr,pe),pe!==Qe&&Zy(_,ae,dr,pe)&&Fh&&$h(t.removed)}}ze(ht.afterSanitizeAttributes,_,null),di(_,O)},wa=function(_,O){Gy(_,O),Ky(_,O),ci(_.content)&&Ta(_.content)},Ta=function(_){let O=null;const Q=Ys(_);for(ze(ht.beforeSanitizeShadowDOM,_,null);O=Q.nextNode();)if(ze(ht.uponSanitizeShadowNode,O,null),wa(O,_),L(O)===Qt.element){const ot=b(O);ci(ot)&&(_a(ot),Ta(ot))}g&&Sa(_),ze(ht.afterSanitizeShadowDOM,_,null)},_a=function(_){const O=[{node:_,shadow:null}];for(;O.length>0;){const Q=O.pop();if(Q.shadow){Ta(Q.shadow);continue}const ot=Q.node,wt=L(ot)===Qt.element,At=C(ot);if(At)for(let Rt=At.length-1;Rt>=0;--Rt)O.push({node:At[Rt],shadow:null});if(wt){const Rt=v?v(ot):null;if(typeof Rt=="string"&&Kt(Rt)==="template"){const ae=ot.content;ci(ae)&&O.push({node:ae,shadow:null})}}if(wt){const Rt=b(ot);ci(Rt)&&O.push({node:null,shadow:Rt},{node:Rt,shadow:null})}}};return t.sanitize=function(rt){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,Q=null,ot=null,wt=null;if(da=!rt,da&&(rt="<!-->"),typeof rt!="string"&&!Ki(rt)&&(rt=v0(rt),typeof rt!="string"))throw pr("dirty is not a string, aborting");if(!t.isSupported)return rt;K?(Nt=j,Yt=k):fa(_),t.removed=[];const At=Bt&&typeof rt!="string"&&Ki(rt);let Rt=[];const ae=St;if(At){Yy(rt);const Qe=F(rt);if(typeof Qe=="string"){const pe=Kt(Qe);if(!Nt[pe]||qe[pe])throw ga(rt),pr("root node is forbidden and cannot be sanitized in-place")}if(Us(rt))throw ga(rt),pr("root node is clobbered and cannot be sanitized in-place");Rt=xa(rt),St=Ba()}else if(Ki(rt))O=wh("<!---->"),Q=O.ownerDocument.importNode(rt,!0),Q.nodeType===Qt.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?O=Q:O.appendChild(Q),_a(O);else{if(!Y&&!g&&!X&&rt.indexOf("<")===-1)return W(rt);if(O=wh(rt),!O)return Y?null:it?G:""}O&&N&&Ar(O.firstChild);const dr=At?rt:O;try{At&&_a(rt);const Qe=Ys(dr);for(;ot=Qe.nextNode();)wa(ot,dr);At&&Wy(rt,Rt)}catch(Qe){throw At&&(ga(rt),kh(rt,Rt)),Qe}finally{St=ae}if(At){if(kh(rt,Rt))throw pr("a node selected for removal could not be safely returned; refusing to sanitize in place");return g&&ka(rt),rt}if(Y){if(g&&ka(O),et)for(wt=_t.call(O.ownerDocument);O.firstChild;)wt.appendChild(O.firstChild);else wt=O;return(Yt.shadowroot||Yt.shadowrootmode)&&(wt=ft.call(i,wt,!0)),wt}const He=()=>X?O.outerHTML:O.innerHTML;let ve=He();return g&&le(D0,ve)&&(Sa(O),ve=He()),X&&Nt["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&le(N0,O.ownerDocument.doctype.name)&&(ve="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
4
|
+
`+ve),W(ve)},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fa(rt),K=!0,j=Nt,k=Yt},t.clearConfig=function(){Hs=null,K=!1,j=null,k=null,$=M,G=""},t.isValidAttribute=function(rt,_,O){Hs||fa({});const Q=Kt(rt),ot=Kt(_);return typeof O=="string"&&(Lh(_,O)||!cr&&le(zh,O))?!1:Bh(Q,ot,O)},t.addHook=function(rt,_){typeof _=="function"&&be(ht,rt)&&Qi(ht[rt],_)},t.removeHook=function(rt,_){if(be(ht,rt)){if(_!==void 0){const O=C0(ht[rt],_);return O===-1?void 0:b0(ht[rt],O,1)[0]}return $h(ht[rt])}},t.removeHooks=function(rt){be(ht,rt)&&(ht[rt]=[])},t.removeAllHooks=function(){ht=Hh()},t}var ei=tu(),eu=Object.defineProperty,p=(e,t)=>eu(e,"name",{value:t,configurable:!0}),V0=(e,t)=>{for(var r in t)eu(e,r,{get:t[r],enumerable:!0})};function ru(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(ru,"getDefaultExportFromCjs");var me={},Xs={},Mr={},Yh;function Ui(){if(Yh)return Mr;Yh=1;function e(n){return typeof n>"u"||n===null}p(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}p(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}p(r,"toArray");function i(n,a){if(a){const h=Object.keys(a);for(let c=0,l=h.length;c<l;c+=1){const d=h[c];n[d]=a[d]}}return n}p(i,"extend");function s(n,a){let h="";for(let c=0;c<a;c+=1)h+=n;return h}p(s,"repeat");function o(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return p(o,"isNegativeZero"),Mr.isNothing=e,Mr.isObject=t,Mr.toArray=r,Mr.repeat=s,Mr.isNegativeZero=o,Mr.extend=i,Mr}p(Ui,"requireCommon");var Ia,Uh;function ji(){if(Uh)return Ia;Uh=1;function e(r,i){let s="";const o=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+=`
|
|
5
|
+
|
|
6
|
+
`+r.mark.snippet),o+" "+s):o}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"),Ia=t,Ia}p(ji,"requireException");var Pa,jh;function iu(){if(jh)return Pa;jh=1;const e=Ui();function t(s,o,n,a,h){let c="",l="";const d=Math.floor(h/2)-1;return a-o>d&&(c=" ... ",o=a-d+c.length),n-a>d&&(l=" ...",n=a+d-l.length),{str:c+s.slice(o,n).replace(/\t/g,"→")+l,pos:a-o+c.length}}p(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}p(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const n=/\r?\n|\r|\0/g,a=[0],h=[];let c,l=-1;for(;c=n.exec(s.buffer);)h.push(c.index),a.push(c.index+c[0].length),s.position<=c.index&&l<0&&(l=a.length-2);l<0&&(l=a.length-1);let d="";const u=Math.min(s.line+o.linesAfter,h.length).toString().length,f=o.maxLength-(o.indent+u+3);for(let y=1;y<=o.linesBefore&&!(l-y<0);y++){const C=t(s.buffer,a[l-y],h[l-y],s.position-(a[l]-a[l-y]),f);d=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),u)+" | "+C.str+`
|
|
7
|
+
`+d}const m=t(s.buffer,a[l],h[l],s.position,f);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),u)+" | "+m.str+`
|
|
8
|
+
`,d+=e.repeat("-",o.indent+u+3+m.pos)+`^
|
|
9
|
+
`;for(let y=1;y<=o.linesAfter&&!(l+y>=h.length);y++){const C=t(s.buffer,a[l+y],h[l+y],s.position-(a[l]-a[l+y]),f);d+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),u)+" | "+C.str+`
|
|
10
|
+
`}return d.replace(/\n$/,"")}return p(i,"makeSnippet"),Pa=i,Pa}p(iu,"requireSnippet");var Ra,Gh;function ke(){if(Gh)return Ra;Gh=1;const e=ji(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const n={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(h){n[String(h)]=a})}),n}p(i,"compileStyleAliases");function s(o,n){if(n=n||{},Object.keys(n).forEach(function(a){if(t.indexOf(a)===-1)throw new e('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=n,this.tag=o,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(a){return a},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return p(s,"Type2"),Ra=s,Ra}p(ke,"requireType");var qa,Vh;function sl(){if(Vh)return qa;Vh=1;const e=ji(),t=ke();function r(o,n){const a=[];return o[n].forEach(function(h){let c=a.length;a.forEach(function(l,d){l.tag===h.tag&&l.kind===h.kind&&l.multi===h.multi&&(c=d)}),a[c]=h}),a}p(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}p(n,"collectType");for(let a=0,h=arguments.length;a<h;a+=1)arguments[a].forEach(n);return o}p(i,"compileMap");function s(o){return this.extend(o)}return p(s,"Schema2"),s.prototype.extend=p(function(n){let a=[],h=[];if(n instanceof t)h.push(n);else if(Array.isArray(n))h=h.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(a=a.concat(n.implicit)),n.explicit&&(h=h.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.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.")}),h.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 c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(h),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),qa=s,qa}p(sl,"requireSchema");var Na,Xh;function ol(){if(Xh)return Na;Xh=1;const e=ke();return Na=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Na}p(ol,"requireStr");var Wa,Zh;function al(){if(Zh)return Wa;Zh=1;const e=ke();return Wa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),Wa}p(al,"requireSeq");var za,Kh;function nl(){if(Kh)return za;Kh=1;const e=ke();return za=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),za}p(nl,"requireMap");var Ha,Qh;function ll(){if(Qh)return Ha;Qh=1;const e=sl();return Ha=new e({explicit:[ol(),al(),nl()]}),Ha}p(ll,"requireFailsafe");var Ya,Jh;function hl(){if(Jh)return Ya;Jh=1;const e=ke();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===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"),Ya=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"}),Ya}p(hl,"require_null");var Ua,tc;function cl(){if(tc)return Ua;tc=1;const e=ke();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===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"),Ua=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"}),Ua}p(cl,"requireBool");var ja,ec;function dl(){if(ec)return ja;ec=1;const e=Ui(),t=ke();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function s(c){return c>=48&&c<=57}p(s,"isDecCode");function o(c){if(c===null)return!1;const l=c.length;let d=0,u=!1;if(!l)return!1;let f=c[d];if((f==="-"||f==="+")&&(f=c[++d]),f==="0"){if(d+1===l)return!0;if(f=c[++d],f==="b"){for(d++;d<l;d++){if(f=c[d],f!=="0"&&f!=="1")return!1;u=!0}return u&&isFinite(n(c))}if(f==="x"){for(d++;d<l;d++){if(!r(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(n(c))}if(f==="o"){for(d++;d<l;d++){if(!i(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(n(c))}}for(;d<l;d++){if(!s(c.charCodeAt(d)))return!1;u=!0}return u?isFinite(n(c)):!1}p(o,"resolveYamlInteger");function n(c){let l=c,d=1,u=l[0];if((u==="-"||u==="+")&&(u==="-"&&(d=-1),l=l.slice(1),u=l[0]),l==="0")return 0;if(u==="0"){if(l[1]==="b")return d*parseInt(l.slice(2),2);if(l[1]==="x")return d*parseInt(l.slice(2),16);if(l[1]==="o")return d*parseInt(l.slice(2),8)}return d*parseInt(l,10)}p(n,"parseYamlInteger");function a(c){return n(c)}p(a,"constructYamlInteger");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(h,"isInteger"),ja=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:h,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ja}p(dl,"requireInt");var Ga,rc;function ul(){if(rc)return Ga;rc=1;const e=Ui(),t=ke(),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(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(s,"resolveYamlFloat");function o(c){let l=c.toLowerCase();const d=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:d*parseFloat(l,10)}p(o,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function a(c,l){if(isNaN(c))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return n.test(d)?d.replace("e",".e"):d}p(a,"representYamlFloat");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(h,"isFloat"),Ga=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:h,represent:a,defaultStyle:"lowercase"}),Ga}p(ul,"requireFloat");var Va,ic;function pl(){return ic||(ic=1,Va=ll().extend({implicit:[hl(),cl(),dl(),ul()]})),Va}p(pl,"requireJson");var Xa,sc;function fl(){return sc||(sc=1,Xa=pl()),Xa}p(fl,"requireCore");var Za,oc;function gl(){if(oc)return Za;oc=1;const e=ke(),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(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}p(i,"resolveYamlTimestamp");function s(n){let a=0,h=null,c=t.exec(n);if(c===null&&(c=r.exec(n)),c===null)throw new Error("Date resolve error");const l=+c[1],d=+c[2]-1,u=+c[3];if(!c[4])return new Date(Date.UTC(l,d,u));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){const x=+c[10],b=+(c[11]||0);h=(x*60+b)*6e4,c[9]==="-"&&(h=-h)}const C=new Date(Date.UTC(l,d,u,f,m,y,a));return h&&C.setTime(C.getTime()-h),C}p(s,"constructYamlTimestamp");function o(n){return n.toISOString()}return p(o,"representYamlTimestamp"),Za=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Za}p(gl,"requireTimestamp");var Ka,ac;function ml(){if(ac)return Ka;ac=1;const e=ke();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),Ka=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ka}p(ml,"requireMerge");var Qa,nc;function yl(){if(nc)return Qa;nc=1;const e=ke(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
11
|
+
\r`;function r(n){if(n===null)return!1;let a=0;const h=n.length,c=t;for(let l=0;l<h;l++){const d=c.indexOf(n.charAt(l));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}p(r,"resolveYamlBinary");function i(n){const a=n.replace(/[\r\n=]/g,""),h=a.length,c=t;let l=0;const d=[];for(let f=0;f<h;f++)f%4===0&&f&&(d.push(l>>16&255),d.push(l>>8&255),d.push(l&255)),l=l<<6|c.indexOf(a.charAt(f));const u=h%4*6;return u===0?(d.push(l>>16&255),d.push(l>>8&255),d.push(l&255)):u===18?(d.push(l>>10&255),d.push(l>>2&255)):u===12&&d.push(l>>4&255),new Uint8Array(d)}p(i,"constructYamlBinary");function s(n){let a="",h=0;const c=n.length,l=t;for(let u=0;u<c;u++)u%3===0&&u&&(a+=l[h>>18&63],a+=l[h>>12&63],a+=l[h>>6&63],a+=l[h&63]),h=(h<<8)+n[u];const d=c%3;return d===0?(a+=l[h>>18&63],a+=l[h>>12&63],a+=l[h>>6&63],a+=l[h&63]):d===2?(a+=l[h>>10&63],a+=l[h>>4&63],a+=l[h<<2&63],a+=l[64]):d===1&&(a+=l[h>>2&63],a+=l[h<<4&63],a+=l[64],a+=l[64]),a}p(s,"representYamlBinary");function o(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return p(o,"isBinary"),Qa=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),Qa}p(yl,"requireBinary");var Ja,lc;function Cl(){if(lc)return Ja;lc=1;const e=ke(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const n={},a=o;for(let h=0,c=a.length;h<c;h+=1){const l=a[h];let d=!1;if(r.call(l)!=="[object Object]")return!1;let u;for(u in l)if(t.call(l,u))if(!d)d=!0;else return!1;if(!d||t.call(n,u))return!1;Object.defineProperty(n,u,{value:!0})}return!0}p(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return p(s,"constructYamlOmap"),Ja=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Ja}p(Cl,"requireOmap");var tn,hc;function xl(){if(hc)return tn;hc=1;const e=ke(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,n=new Array(o.length);for(let a=0,h=o.length;a<h;a+=1){const c=o[a];if(t.call(c)!=="[object Object]")return!1;const l=Object.keys(c);if(l.length!==1)return!1;n[a]=[l[0],c[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,n=new Array(o.length);for(let a=0,h=o.length;a<h;a+=1){const c=o[a],l=Object.keys(c);n[a]=[l[0],c[l[0]]]}return n}return p(i,"constructYamlPairs"),tn=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),tn}p(xl,"requirePairs");var en,cc;function bl(){if(cc)return en;cc=1;const e=ke(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const n in o)if(t.call(o,n)&&o[n]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),en=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),en}p(bl,"requireSet");var rn,dc;function Xo(){return dc||(dc=1,rn=fl().extend({implicit:[gl(),ml()],explicit:[yl(),Cl(),xl(),bl()]})),rn}p(Xo,"require_default");var uc;function su(){if(uc)return Xs;uc=1;const e=Ui(),t=ji(),r=iu(),i=Xo(),s=Object.prototype.hasOwnProperty,o=1,n=2,a=3,h=4,c=1,l=2,d=3,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\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 S(g){return g===9||g===32}p(S,"isWhiteSpace");function T(g){return g===9||g===32||g===10||g===13}p(T,"isWsOrEol");function v(g){return g===44||g===91||g===93||g===123||g===125}p(v,"isFlowIndicator");function B(g){if(g>=48&&g<=57)return g-48;const I=g|32;return I>=97&&I<=102?I-97+10:-1}p(B,"fromHexCode");function L(g){return g===120?2:g===117?4:g===85?8:0}p(L,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}p(F,"fromDecimalCode");function q(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
12
|
+
`;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(q,"simpleEscapeSequence");function R(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(R,"charFromCodepoint");function $(g,I,X){I==="__proto__"?Object.defineProperty(g,I,{configurable:!0,enumerable:!0,writable:!0,value:X}):g[I]=X}p($,"setProperty");const G=new Array(256),M=new Array(256);for(let g=0;g<256;g++)G[g]=q(g)?1:0,M[g]=q(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 D(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(D,"generateError");function A(g,I){throw D(g,I)}p(A,"throwError");function z(g,I){g.onWarning&&g.onWarning.call(null,D(g,I))}p(z,"throwWarning");function W(g,I,X){const K=g.anchorMapTransactions;if(K.length!==0){const j=K[K.length-1];s.call(j,I)||(j[I]={existed:s.call(g.anchorMap,I),value:g.anchorMap[I]})}g.anchorMap[I]=X}p(W,"storeAnchor");function tt(g){g.anchorMapTransactions.push(Object.create(null))}p(tt,"beginAnchorTransaction");function V(g){const I=g.anchorMapTransactions.pop(),X=g.anchorMapTransactions;if(X.length===0)return;const K=X[X.length-1],j=Object.keys(I);for(let k=0,N=j.length;k<N;k+=1){const Y=j[k];s.call(K,Y)||(K[Y]=I[Y])}}p(V,"commitAnchorTransaction");function lt(g){const I=g.anchorMapTransactions.pop(),X=Object.keys(I);for(let K=X.length-1;K>=0;K-=1){const j=I[X[K]];j.existed?g.anchorMap[X[K]]=j.value:delete g.anchorMap[X[K]]}}p(lt,"rollbackAnchorTransaction");function xt(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(xt,"snapshotState");function bt(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(bt,"restoreState");const _t={YAML:p(function(I,X,K){I.version!==null&&A(I,"duplication of %YAML directive"),K.length!==1&&A(I,"YAML directive accepts exactly one argument");const j=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);j===null&&A(I,"ill-formed argument of the YAML directive");const k=parseInt(j[1],10),N=parseInt(j[2],10);k!==1&&A(I,"unacceptable YAML version of the document"),I.version=K[0],I.checkLineBreaks=N<2,N!==1&&N!==2&&z(I,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(I,X,K){let j;K.length!==2&&A(I,"TAG directive accepts exactly two arguments");const k=K[0];j=K[1],y.test(k)||A(I,"ill-formed tag handle (first argument) of the TAG directive"),s.call(I.tagMap,k)&&A(I,'there is a previously declared suffix for "'+k+'" tag handle'),C.test(j)||A(I,"ill-formed tag prefix (second argument) of the TAG directive");try{j=decodeURIComponent(j)}catch{A(I,"tag prefix is malformed: "+j)}I.tagMap[k]=j},"handleTagDirective")};function mt(g,I,X,K){if(I<X){const j=g.input.slice(I,X);if(K)for(let k=0,N=j.length;k<N;k+=1){const Y=j.charCodeAt(k);Y===9||Y>=32&&Y<=1114111||A(g,"expected valid JSON character")}else u.test(j)&&A(g,"the stream contains non-printable characters");g.result+=j}}p(mt,"captureSegment");function ft(g){g.totalMergeKeys++,g.maxTotalMergeKeys!==-1&&g.totalMergeKeys>g.maxTotalMergeKeys&&A(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")")}p(ft,"chargeMergeWork");function ht(g,I,X,K){e.isObject(X)||A(g,"cannot merge mappings; the provided source object is unacceptable"),ft(g);const j=Object.keys(X);for(let k=0,N=j.length;k<N;k+=1){const Y=j[k];ft(g),s.call(I,Y)||($(I,Y,X[Y]),K[Y]=!0)}}p(ht,"mergeMappings");function Tt(g,I,X,K,j,k,N,Y,et){if(Array.isArray(j)){j=Array.prototype.slice.call(j);for(let it=0,st=j.length;it<st;it+=1)Array.isArray(j[it])&&A(g,"nested arrays are not supported inside keys"),typeof j=="object"&&x(j[it])==="[object Object]"&&(j[it]="[object Object]")}if(typeof j=="object"&&x(j)==="[object Object]"&&(j="[object Object]"),j=String(j),I===null&&(I={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(k)){k.length>100&&A(g,"abnormal merge sequence size");for(let it=0,st=k.length;it<st;it+=1)ht(g,I,k[it],X)}else ht(g,I,k,X);else!g.json&&!s.call(X,j)&&s.call(I,j)&&(g.line=N||g.line,g.lineStart=Y||g.lineStart,g.position=et||g.position,A(g,"duplicated mapping key")),$(I,j,k),delete X[j];return I}p(Tt,"storeMappingPair");function It(g){const I=g.input.charCodeAt(g.position);I===10?g.position++:I===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):A(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(It,"readLineBreak");function kt(g,I,X){let K=0,j=g.input.charCodeAt(g.position);for(;j!==0;){for(;S(j);)j===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),j=g.input.charCodeAt(++g.position);if(I&&j===35)do j=g.input.charCodeAt(++g.position);while(j!==10&&j!==13&&j!==0);if(b(j))for(It(g),j=g.input.charCodeAt(g.position),K++,g.lineIndent=0;j===32;)g.lineIndent++,j=g.input.charCodeAt(++g.position);else break}return X!==-1&&K!==0&&g.lineIndent<X&&z(g,"deficient indentation"),K}p(kt,"skipSeparationSpace");function Pt(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(Pt,"testDocumentSeparator");function Zt(g,I){I===1?g.result+=" ":I>1&&(g.result+=e.repeat(`
|
|
13
|
+
`,I-1))}p(Zt,"writeFoldedLines");function Be(g,I,X){let K,j,k,N,Y,et;const it=g.kind,st=g.result;let Z=g.input.charCodeAt(g.position);if(T(Z)||v(Z)||Z===35||Z===38||Z===42||Z===33||Z===124||Z===62||Z===39||Z===34||Z===37||Z===64||Z===96)return!1;if(Z===63||Z===45){const at=g.input.charCodeAt(g.position+1);if(T(at)||X&&v(at))return!1}for(g.kind="scalar",g.result="",K=j=g.position,k=!1;Z!==0;){if(Z===58){const at=g.input.charCodeAt(g.position+1);if(T(at)||X&&v(at))break}else if(Z===35){const at=g.input.charCodeAt(g.position-1);if(T(at))break}else{if(g.position===g.lineStart&&Pt(g)||X&&v(Z))break;if(b(Z))if(N=g.line,Y=g.lineStart,et=g.lineIndent,kt(g,!1,-1),g.lineIndent>=I){k=!0,Z=g.input.charCodeAt(g.position);continue}else{g.position=j,g.line=N,g.lineStart=Y,g.lineIndent=et;break}}k&&(mt(g,K,j,!1),Zt(g,g.line-N),K=j=g.position,k=!1),S(Z)||(j=g.position+1),Z=g.input.charCodeAt(++g.position)}return mt(g,K,j,!1),g.result?!0:(g.kind=it,g.result=st,!1)}p(Be,"readPlainScalar");function Me(g,I){let X,K,j=g.input.charCodeAt(g.position);if(j!==39)return!1;for(g.kind="scalar",g.result="",g.position++,X=K=g.position;(j=g.input.charCodeAt(g.position))!==0;)if(j===39)if(mt(g,X,g.position,!0),j=g.input.charCodeAt(++g.position),j===39)X=g.position,g.position++,K=g.position;else return!0;else b(j)?(mt(g,X,K,!0),Zt(g,kt(g,!1,I)),X=K=g.position):g.position===g.lineStart&&Pt(g)?A(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(j)||(K=g.position));A(g,"unexpected end of the stream within a single quoted scalar")}p(Me,"readSingleQuotedScalar");function Yr(g,I){let X,K,j,k=g.input.charCodeAt(g.position);if(k!==34)return!1;for(g.kind="scalar",g.result="",g.position++,X=K=g.position;(k=g.input.charCodeAt(g.position))!==0;){if(k===34)return mt(g,X,g.position,!0),g.position++,!0;if(k===92){if(mt(g,X,g.position,!0),k=g.input.charCodeAt(++g.position),b(k))kt(g,!1,I);else if(k<256&&G[k])g.result+=M[k],g.position++;else if((j=L(k))>0){let N=j,Y=0;for(;N>0;N--)k=g.input.charCodeAt(++g.position),(j=B(k))>=0?Y=(Y<<4)+j:A(g,"expected hexadecimal character");g.result+=R(Y),g.position++}else A(g,"unknown escape sequence");X=K=g.position}else b(k)?(mt(g,X,K,!0),Zt(g,kt(g,!1,I)),X=K=g.position):g.position===g.lineStart&&Pt(g)?A(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(k)||(K=g.position))}A(g,"unexpected end of the stream within a double quoted scalar")}p(Yr,"readDoubleQuotedScalar");function _r(g,I){let X=!0,K,j,k;const N=g.tag;let Y;const et=g.anchor;let it,st,Z,at;const yt=Object.create(null);let Bt,St,vt,Mt=g.input.charCodeAt(g.position);if(Mt===91)it=93,at=!1,Y=[];else if(Mt===123)it=125,at=!0,Y={};else return!1;for(g.anchor!==null&&W(g,g.anchor,Y),Mt=g.input.charCodeAt(++g.position);Mt!==0;){if(kt(g,!0,I),Mt=g.input.charCodeAt(g.position),Mt===it)return g.position++,g.tag=N,g.anchor=et,g.kind=at?"mapping":"sequence",g.result=Y,!0;if(X?Mt===44&&A(g,"expected the node content, but found ','"):A(g,"missed comma between flow collection entries"),St=Bt=vt=null,st=Z=!1,Mt===63){const We=g.input.charCodeAt(g.position+1);T(We)&&(st=Z=!0,g.position++,kt(g,!0,I))}K=g.line,j=g.lineStart,k=g.position,oe(g,I,o,!1,!0),St=g.tag,Bt=g.result,kt(g,!0,I),Mt=g.input.charCodeAt(g.position),(Z||g.line===K)&&Mt===58&&(st=!0,Mt=g.input.charCodeAt(++g.position),kt(g,!0,I),oe(g,I,o,!1,!0),vt=g.result),at?Tt(g,Y,yt,St,Bt,vt,K,j,k):st?Y.push(Tt(g,null,yt,St,Bt,vt,K,j,k)):Y.push(Bt),kt(g,!0,I),Mt=g.input.charCodeAt(g.position),Mt===44?(X=!0,Mt=g.input.charCodeAt(++g.position)):X=!1}A(g,"unexpected end of the stream within a flow collection")}p(_r,"readFlowCollection");function Nt(g,I){let X,K=c,j=!1,k=!1,N=I,Y=0,et=!1,it,st=g.input.charCodeAt(g.position);if(st===124)X=!1;else if(st===62)X=!0;else return!1;for(g.kind="scalar",g.result="";st!==0;)if(st=g.input.charCodeAt(++g.position),st===43||st===45)c===K?K=st===43?d:l:A(g,"repeat of a chomping mode identifier");else if((it=F(st))>=0)it===0?A(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):k?A(g,"repeat of an indentation width identifier"):(N=I+it-1,k=!0);else break;if(S(st)){do st=g.input.charCodeAt(++g.position);while(S(st));if(st===35)do st=g.input.charCodeAt(++g.position);while(!b(st)&&st!==0)}for(;st!==0;){for(It(g),g.lineIndent=0,st=g.input.charCodeAt(g.position);(!k||g.lineIndent<N)&&st===32;)g.lineIndent++,st=g.input.charCodeAt(++g.position);if(!k&&g.lineIndent>N&&(N=g.lineIndent),b(st)){Y++;continue}if(!k&&N===0&&A(g,"missing indentation for block scalar"),g.lineIndent<N){K===d?g.result+=e.repeat(`
|
|
14
|
+
`,j?1+Y:Y):K===c&&j&&(g.result+=`
|
|
15
|
+
`);break}X?S(st)?(et=!0,g.result+=e.repeat(`
|
|
16
|
+
`,j?1+Y:Y)):et?(et=!1,g.result+=e.repeat(`
|
|
17
|
+
`,Y+1)):Y===0?j&&(g.result+=" "):g.result+=e.repeat(`
|
|
18
|
+
`,Y):g.result+=e.repeat(`
|
|
19
|
+
`,j?1+Y:Y),j=!0,k=!0,Y=0;const Z=g.position;for(;!b(st)&&st!==0;)st=g.input.charCodeAt(++g.position);mt(g,Z,g.position,!1)}return!0}p(Nt,"readBlockScalar");function Xe(g,I){const X=g.tag,K=g.anchor,j=[];let k=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&W(g,g.anchor,j);let N=g.input.charCodeAt(g.position);for(;N!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,A(g,"tab characters must not be used in indentation")),N===45);){const Y=g.input.charCodeAt(g.position+1);if(!T(Y))break;if(k=!0,g.position++,kt(g,!0,-1)&&g.lineIndent<=I){j.push(null),N=g.input.charCodeAt(g.position);continue}const et=g.line;if(oe(g,I,a,!1,!0),j.push(g.result),kt(g,!0,-1),N=g.input.charCodeAt(g.position),(g.line===et||g.lineIndent>I)&&N!==0)A(g,"bad indentation of a sequence entry");else if(g.lineIndent<I)break}return k?(g.tag=X,g.anchor=K,g.kind="sequence",g.result=j,!0):!1}p(Xe,"readBlockSequence");function Yt(g,I,X){let K,j,k,N;const Y=g.tag,et=g.anchor,it={},st=Object.create(null);let Z=null,at=null,yt=null,Bt=!1,St=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&W(g,g.anchor,it);let vt=g.input.charCodeAt(g.position);for(;vt!==0;){!Bt&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,A(g,"tab characters must not be used in indentation"));const Mt=g.input.charCodeAt(g.position+1),We=g.line;if((vt===63||vt===58)&&T(Mt))vt===63?(Bt&&(Tt(g,it,st,Z,at,null,j,k,N),Z=at=yt=null),St=!0,Bt=!0,K=!0):Bt?(Bt=!1,K=!0):A(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,vt=Mt;else{if(j=g.line,k=g.lineStart,N=g.position,!oe(g,X,n,!1,!0))break;if(g.line===We){for(vt=g.input.charCodeAt(g.position);S(vt);)vt=g.input.charCodeAt(++g.position);if(vt===58)vt=g.input.charCodeAt(++g.position),T(vt)||A(g,"a whitespace character is expected after the key-value separator within a block mapping"),Bt&&(Tt(g,it,st,Z,at,null,j,k,N),Z=at=yt=null),St=!0,Bt=!1,K=!1,Z=g.tag,at=g.result;else if(St)A(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=Y,g.anchor=et,!0}else if(St)A(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=Y,g.anchor=et,!0}if((g.line===We||g.lineIndent>I)&&(Bt&&(j=g.line,k=g.lineStart,N=g.position),oe(g,I,h,!0,K)&&(Bt?at=g.result:yt=g.result),Bt||(Tt(g,it,st,Z,at,yt,j,k,N),Z=at=yt=null),kt(g,!0,-1),vt=g.input.charCodeAt(g.position)),(g.line===We||g.lineIndent>I)&&vt!==0)A(g,"bad indentation of a mapping entry");else if(g.lineIndent<I)break}return Bt&&Tt(g,it,st,Z,at,null,j,k,N),St&&(g.tag=Y,g.anchor=et,g.kind="mapping",g.result=it),St}p(Yt,"readBlockMapping");function Ze(g){let I=!1,X=!1,K,j,k=g.input.charCodeAt(g.position);if(k!==33)return!1;g.tag!==null&&A(g,"duplication of a tag property"),k=g.input.charCodeAt(++g.position),k===60?(I=!0,k=g.input.charCodeAt(++g.position)):k===33?(X=!0,K="!!",k=g.input.charCodeAt(++g.position)):K="!";let N=g.position;if(I){do k=g.input.charCodeAt(++g.position);while(k!==0&&k!==62);g.position<g.length?(j=g.input.slice(N,g.position),k=g.input.charCodeAt(++g.position)):A(g,"unexpected end of the stream within a verbatim tag")}else{for(;k!==0&&!T(k);)k===33&&(X?A(g,"tag suffix cannot contain exclamation marks"):(K=g.input.slice(N-1,g.position+1),y.test(K)||A(g,"named tag handle cannot contain such characters"),X=!0,N=g.position+1)),k=g.input.charCodeAt(++g.position);j=g.input.slice(N,g.position),m.test(j)&&A(g,"tag suffix cannot contain flow indicator characters")}j&&!C.test(j)&&A(g,"tag name cannot contain such characters: "+j);try{j=decodeURIComponent(j)}catch{A(g,"tag name is malformed: "+j)}return I?g.tag=j:s.call(g.tagMap,K)?g.tag=g.tagMap[K]+j:K==="!"?g.tag="!"+j:K==="!!"?g.tag="tag:yaml.org,2002:"+j:A(g,'undeclared tag handle "'+K+'"'),!0}p(Ze,"readTagProperty");function ue(g){let I=g.input.charCodeAt(g.position);if(I!==38)return!1;g.anchor!==null&&A(g,"duplication of an anchor property"),I=g.input.charCodeAt(++g.position);const X=g.position;for(;I!==0&&!T(I)&&!v(I);)I=g.input.charCodeAt(++g.position);return g.position===X&&A(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(X,g.position),!0}p(ue,"readAnchorProperty");function qe(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)&&!v(I);)I=g.input.charCodeAt(++g.position);g.position===X&&A(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)||A(g,'unidentified alias "'+K+'"'),g.result=g.anchorMap[K],kt(g,!0,-1),!0}p(qe,"readAlias");function hr(g,I,X,K){const j=xt(g);return tt(g),bt(g,I),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Yt(g,X,K)&&g.kind==="mapping"?(V(g),!0):(lt(g),bt(g,j),!1)}p(hr,"tryReadBlockMappingFromProperty");function oe(g,I,X,K,j){let k,N,Y=1,et=!1,it=!1,st=null,Z,at,yt;g.depth>=g.maxDepth&&A(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 Bt=k=N=h===X||a===X;if(K&&kt(g,!0,-1)&&(et=!0,g.lineIndent>I?Y=1:g.lineIndent===I?Y=0:g.lineIndent<I&&(Y=-1)),Y===1)for(;;){const St=g.input.charCodeAt(g.position),vt=xt(g);if(et&&(St===33&&g.tag!==null||St===38&&g.anchor!==null)||!Ze(g)&&!ue(g))break;st===null&&(st=vt),kt(g,!0,-1)?(et=!0,N=Bt,g.lineIndent>I?Y=1:g.lineIndent===I?Y=0:g.lineIndent<I&&(Y=-1)):N=!1}if(N&&(N=et||j),Y===1||h===X)if(o===X||n===X?at=I:at=I+1,yt=g.position-g.lineStart,Y===1)if(N&&(Xe(g,yt)||Yt(g,yt,at))||_r(g,at))it=!0;else{const St=g.input.charCodeAt(g.position);st!==null&&Bt&&!N&&St!==124&&St!==62&&hr(g,st,st.position-st.lineStart,at)||k&&Nt(g,at)||Me(g,at)||Yr(g,at)?it=!0:qe(g)?(it=!0,(g.tag!==null||g.anchor!==null)&&A(g,"alias node should not have any properties")):Be(g,at,o===X)&&(it=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&W(g,g.anchor,g.result)}else Y===0&&(it=N&&Xe(g,yt));if(g.tag===null)g.anchor!==null&&W(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&A(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let St=0,vt=g.implicitTypes.length;St<vt;St+=1)if(Z=g.implicitTypes[St],Z.resolve(g.result)){g.result=Z.construct(g.result),g.tag=Z.tag,g.anchor!==null&&W(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))Z=g.typeMap[g.kind||"fallback"][g.tag];else{Z=null;const St=g.typeMap.multi[g.kind||"fallback"];for(let vt=0,Mt=St.length;vt<Mt;vt+=1)if(g.tag.slice(0,St[vt].tag.length)===St[vt].tag){Z=St[vt];break}}Z||A(g,"unknown tag !<"+g.tag+">"),g.result!==null&&Z.kind!==g.kind&&A(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+Z.kind+'", not "'+g.kind+'"'),Z.resolve(g.result,g.tag)?(g.result=Z.construct(g.result,g.tag),g.anchor!==null&&W(g,g.anchor,g.result)):A(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||it}p(oe,"composeNode");function Br(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&&(kt(g,!0,-1),K=g.input.charCodeAt(g.position),!(g.lineIndent>0||K!==37));){X=!0,K=g.input.charCodeAt(++g.position);let j=g.position;for(;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);const k=g.input.slice(j,g.position),N=[];for(k.length<1&&A(g,"directive name must not be less than one character in length");K!==0;){for(;S(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(j=g.position;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);N.push(g.input.slice(j,g.position))}K!==0&&It(g),s.call(_t,k)?_t[k](g,k,N):z(g,'unknown document directive "'+k+'"')}if(kt(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,kt(g,!0,-1)):X&&A(g,"directives end mark is expected"),oe(g,g.lineIndent-1,h,!1,!0),kt(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice(I,g.position))&&z(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&Pt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,kt(g,!0,-1));return}g.position<g.length-1&&A(g,"end of the stream or a document separator is expected")}p(Br,"readDocument");function Ne(g,I){g=String(g),I=I||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
20
|
+
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const X=new E(g,I),K=g.indexOf("\0");for(K!==-1&&(X.position=K,A(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;)Br(X);return X.documents}p(Ne,"loadDocuments");function vr(g,I,X){I!==null&&typeof I=="object"&&typeof X>"u"&&(X=I,I=null);const K=Ne(g,X);if(typeof I!="function")return K;for(let j=0,k=K.length;j<k;j+=1)I(K[j])}p(vr,"loadAll2");function cr(g,I){const X=Ne(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(cr,"load2"),Xs.loadAll=vr,Xs.load=cr,Xs}p(su,"requireLoader");var sn={},pc;function ou(){if(pc)return sn;pc=1;const e=Ui(),t=ji(),r=Xo(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,n=9,a=10,h=13,c=32,l=33,d=34,u=35,f=37,m=38,y=39,C=42,x=44,b=45,S=58,T=61,v=62,B=63,L=64,F=91,q=93,R=96,$=123,G=124,M=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 D=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function z(k,N){if(N===null)return{};const Y={},et=Object.keys(N);for(let it=0,st=et.length;it<st;it+=1){let Z=et[it],at=String(N[Z]);Z.slice(0,2)==="!!"&&(Z="tag:yaml.org,2002:"+Z.slice(2));const yt=k.compiledTypeMap.fallback[Z];yt&&s.call(yt.styleAliases,at)&&(at=yt.styleAliases[at]),Y[Z]=at}return Y}p(z,"compileStyleMap");function W(k){let N,Y;const et=k.toString(16).toUpperCase();if(k<=255)N="x",Y=2;else if(k<=65535)N="u",Y=4;else if(k<=4294967295)N="U",Y=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+N+e.repeat("0",Y-et.length)+et}p(W,"encodeHex");const tt=1,V=2;function lt(k){this.schema=k.schema||r,this.indent=Math.max(1,k.indent||2),this.noArrayIndent=k.noArrayIndent||!1,this.skipInvalid=k.skipInvalid||!1,this.flowLevel=e.isNothing(k.flowLevel)?-1:k.flowLevel,this.styleMap=z(this.schema,k.styles||null),this.sortKeys=k.sortKeys||!1,this.lineWidth=k.lineWidth||80,this.noRefs=k.noRefs||!1,this.noCompatMode=k.noCompatMode||!1,this.condenseFlow=k.condenseFlow||!1,this.quotingType=k.quotingType==='"'?V:tt,this.forceQuotes=k.forceQuotes||!1,this.replacer=typeof k.replacer=="function"?k.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(lt,"State");function xt(k,N){const Y=e.repeat(" ",N);let et=0,it="";const st=k.length;for(;et<st;){let Z;const at=k.indexOf(`
|
|
21
|
+
`,et);at===-1?(Z=k.slice(et),et=st):(Z=k.slice(et,at+1),et=at+1),Z.length&&Z!==`
|
|
22
|
+
`&&(it+=Y),it+=Z}return it}p(xt,"indentString");function bt(k,N){return`
|
|
23
|
+
`+e.repeat(" ",k.indent*N)}p(bt,"generateNextLine");function _t(k,N){for(let Y=0,et=k.implicitTypes.length;Y<et;Y+=1)if(k.implicitTypes[Y].resolve(N))return!0;return!1}p(_t,"testImplicitResolving");function mt(k){return k===c||k===n}p(mt,"isWhitespace");function ft(k){return k>=32&&k<=126||k>=161&&k<=55295&&k!==8232&&k!==8233||k>=57344&&k<=65533&&k!==o||k>=65536&&k<=1114111}p(ft,"isPrintable");function ht(k){return ft(k)&&k!==o&&k!==h&&k!==a}p(ht,"isNsCharOrWhitespace");function Tt(k,N,Y){const et=ht(k),it=et&&!mt(k);return(Y?et:et&&k!==x&&k!==F&&k!==q&&k!==$&&k!==M)&&k!==u&&!(N===S&&!it)||ht(N)&&!mt(N)&&k===u||N===S&&it}p(Tt,"isPlainSafe");function It(k){return ft(k)&&k!==o&&!mt(k)&&k!==b&&k!==B&&k!==S&&k!==x&&k!==F&&k!==q&&k!==$&&k!==M&&k!==u&&k!==m&&k!==C&&k!==l&&k!==G&&k!==T&&k!==v&&k!==y&&k!==d&&k!==f&&k!==L&&k!==R}p(It,"isPlainSafeFirst");function kt(k){return!mt(k)&&k!==S}p(kt,"isPlainSafeLast");function Pt(k,N){const Y=k.charCodeAt(N);let et;return Y>=55296&&Y<=56319&&N+1<k.length&&(et=k.charCodeAt(N+1),et>=56320&&et<=57343)?(Y-55296)*1024+et-56320+65536:Y}p(Pt,"codePointAt");function Zt(k){return/^\n* /.test(k)}p(Zt,"needIndentIndicator");const Be=1,Me=2,Yr=3,_r=4,Nt=5;function Xe(k,N,Y,et,it,st,Z,at){let yt,Bt=0,St=null,vt=!1,Mt=!1;const We=et!==-1;let Lr=-1,Fr=It(Pt(k,0))&&kt(Pt(k,k.length-1));if(N||Z)for(yt=0;yt<k.length;Bt>=65536?yt+=2:yt++){if(Bt=Pt(k,yt),!ft(Bt))return Nt;Fr=Fr&&Tt(Bt,St,at),St=Bt}else{for(yt=0;yt<k.length;Bt>=65536?yt+=2:yt++){if(Bt=Pt(k,yt),Bt===a)vt=!0,We&&(Mt=Mt||yt-Lr-1>et&&k[Lr+1]!==" ",Lr=yt);else if(!ft(Bt))return Nt;Fr=Fr&&Tt(Bt,St,at),St=Bt}Mt=Mt||We&&yt-Lr-1>et&&k[Lr+1]!==" "}return!vt&&!Mt?Fr&&!Z&&!it(k)?Be:st===V?Nt:Me:Y>9&&Zt(k)?Nt:Z?st===V?Nt:Me:Mt?_r:Yr}p(Xe,"chooseScalarStyle");function Yt(k,N,Y,et,it){k.dump=(function(){if(N.length===0)return k.quotingType===V?'""':"''";if(!k.noCompatMode&&(D.indexOf(N)!==-1||A.test(N)))return k.quotingType===V?'"'+N+'"':"'"+N+"'";const st=k.indent*Math.max(1,Y),Z=k.lineWidth===-1?-1:Math.max(Math.min(k.lineWidth,40),k.lineWidth-st),at=et||k.flowLevel>-1&&Y>=k.flowLevel;function yt(Bt){return _t(k,Bt)}switch(p(yt,"testAmbiguity"),Xe(N,at,k.indent,Z,yt,k.quotingType,k.forceQuotes&&!et,it)){case Be:return N;case Me:return"'"+N.replace(/'/g,"''")+"'";case Yr:return"|"+Ze(N,k.indent)+ue(xt(N,st));case _r:return">"+Ze(N,k.indent)+ue(xt(qe(N,Z),st));case Nt:return'"'+oe(N)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(Yt,"writeScalar");function Ze(k,N){const Y=Zt(k)?String(N):"",et=k[k.length-1]===`
|
|
24
|
+
`,st=et&&(k[k.length-2]===`
|
|
25
|
+
`||k===`
|
|
26
|
+
`)?"+":et?"":"-";return Y+st+`
|
|
27
|
+
`}p(Ze,"blockHeader");function ue(k){return k[k.length-1]===`
|
|
28
|
+
`?k.slice(0,-1):k}p(ue,"dropEndingNewline");function qe(k,N){const Y=/(\n+)([^\n]*)/g;let et=(function(){let at=k.indexOf(`
|
|
29
|
+
`);return at=at!==-1?at:k.length,Y.lastIndex=at,hr(k.slice(0,at),N)})(),it=k[0]===`
|
|
30
|
+
`||k[0]===" ",st,Z;for(;Z=Y.exec(k);){const at=Z[1],yt=Z[2];st=yt[0]===" ",et+=at+(!it&&!st&&yt!==""?`
|
|
31
|
+
`:"")+hr(yt,N),it=st}return et}p(qe,"foldString");function hr(k,N){if(k===""||k[0]===" ")return k;const Y=/ [^ ]/g;let et,it=0,st,Z=0,at=0,yt="";for(;et=Y.exec(k);)at=et.index,at-it>N&&(st=Z>it?Z:at,yt+=`
|
|
32
|
+
`+k.slice(it,st),it=st+1),Z=at;return yt+=`
|
|
33
|
+
`,k.length-it>N&&Z>it?yt+=k.slice(it,Z)+`
|
|
34
|
+
`+k.slice(Z+1):yt+=k.slice(it),yt.slice(1)}p(hr,"foldLine");function oe(k){let N="",Y=0;for(let et=0;et<k.length;Y>=65536?et+=2:et++){Y=Pt(k,et);const it=E[Y];!it&&ft(Y)?(N+=k[et],Y>=65536&&(N+=k[et+1])):N+=it||W(Y)}return N}p(oe,"escapeString");function Br(k,N,Y){let et="";const it=k.tag;for(let st=0,Z=Y.length;st<Z;st+=1){let at=Y[st];k.replacer&&(at=k.replacer.call(Y,String(st),at)),(I(k,N,at,!1,!1)||typeof at>"u"&&I(k,N,null,!1,!1))&&(et!==""&&(et+=","+(k.condenseFlow?"":" ")),et+=k.dump)}k.tag=it,k.dump="["+et+"]"}p(Br,"writeFlowSequence");function Ne(k,N,Y,et){let it="";const st=k.tag;for(let Z=0,at=Y.length;Z<at;Z+=1){let yt=Y[Z];k.replacer&&(yt=k.replacer.call(Y,String(Z),yt)),(I(k,N+1,yt,!0,!0,!1,!0)||typeof yt>"u"&&I(k,N+1,null,!0,!0,!1,!0))&&((!et||it!=="")&&(it+=bt(k,N)),k.dump&&a===k.dump.charCodeAt(0)?it+="-":it+="- ",it+=k.dump)}k.tag=st,k.dump=it||"[]"}p(Ne,"writeBlockSequence");function vr(k,N,Y){let et="";const it=k.tag,st=Object.keys(Y);for(let Z=0,at=st.length;Z<at;Z+=1){let yt="";et!==""&&(yt+=", "),k.condenseFlow&&(yt+='"');const Bt=st[Z];let St=Y[Bt];k.replacer&&(St=k.replacer.call(Y,Bt,St)),I(k,N,Bt,!1,!1)&&(k.dump.length>1024&&(yt+="? "),yt+=k.dump+(k.condenseFlow?'"':"")+":"+(k.condenseFlow?"":" "),I(k,N,St,!1,!1)&&(yt+=k.dump,et+=yt))}k.tag=it,k.dump="{"+et+"}"}p(vr,"writeFlowMapping");function cr(k,N,Y,et){let it="";const st=k.tag,Z=Object.keys(Y);if(k.sortKeys===!0)Z.sort();else if(typeof k.sortKeys=="function")Z.sort(k.sortKeys);else if(k.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let at=0,yt=Z.length;at<yt;at+=1){let Bt="";(!et||it!=="")&&(Bt+=bt(k,N));const St=Z[at];let vt=Y[St];if(k.replacer&&(vt=k.replacer.call(Y,St,vt)),!I(k,N+1,St,!0,!0,!0))continue;const Mt=k.tag!==null&&k.tag!=="?"||k.dump&&k.dump.length>1024;Mt&&(k.dump&&a===k.dump.charCodeAt(0)?Bt+="?":Bt+="? "),Bt+=k.dump,Mt&&(Bt+=bt(k,N)),I(k,N+1,vt,!0,Mt)&&(k.dump&&a===k.dump.charCodeAt(0)?Bt+=":":Bt+=": ",Bt+=k.dump,it+=Bt)}k.tag=st,k.dump=it||"{}"}p(cr,"writeBlockMapping");function g(k,N,Y){const et=Y?k.explicitTypes:k.implicitTypes;for(let it=0,st=et.length;it<st;it+=1){const Z=et[it];if((Z.instanceOf||Z.predicate)&&(!Z.instanceOf||typeof N=="object"&&N instanceof Z.instanceOf)&&(!Z.predicate||Z.predicate(N))){if(Y?Z.multi&&Z.representName?k.tag=Z.representName(N):k.tag=Z.tag:k.tag="?",Z.represent){const at=k.styleMap[Z.tag]||Z.defaultStyle;let yt;if(i.call(Z.represent)==="[object Function]")yt=Z.represent(N,at);else if(s.call(Z.represent,at))yt=Z.represent[at](N,at);else throw new t("!<"+Z.tag+'> tag resolver accepts not "'+at+'" style');k.dump=yt}return!0}}return!1}p(g,"detectType");function I(k,N,Y,et,it,st,Z){k.tag=null,k.dump=Y,g(k,Y,!1)||g(k,Y,!0);const at=i.call(k.dump),yt=et;et&&(et=k.flowLevel<0||k.flowLevel>N);const Bt=at==="[object Object]"||at==="[object Array]";let St,vt;if(Bt&&(St=k.duplicates.indexOf(Y),vt=St!==-1),(k.tag!==null&&k.tag!=="?"||vt||k.indent!==2&&N>0)&&(it=!1),vt&&k.usedDuplicates[St])k.dump="*ref_"+St;else{if(Bt&&vt&&!k.usedDuplicates[St]&&(k.usedDuplicates[St]=!0),at==="[object Object]")et&&Object.keys(k.dump).length!==0?(cr(k,N,k.dump,it),vt&&(k.dump="&ref_"+St+k.dump)):(vr(k,N,k.dump),vt&&(k.dump="&ref_"+St+" "+k.dump));else if(at==="[object Array]")et&&k.dump.length!==0?(k.noArrayIndent&&!Z&&N>0?Ne(k,N-1,k.dump,it):Ne(k,N,k.dump,it),vt&&(k.dump="&ref_"+St+k.dump)):(Br(k,N,k.dump),vt&&(k.dump="&ref_"+St+" "+k.dump));else if(at==="[object String]")k.tag!=="?"&&Yt(k,k.dump,N,st,yt);else{if(at==="[object Undefined]")return!1;if(k.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+at)}if(k.tag!==null&&k.tag!=="?"){let Mt=encodeURI(k.tag[0]==="!"?k.tag.slice(1):k.tag).replace(/!/g,"%21");k.tag[0]==="!"?Mt="!"+Mt:Mt.slice(0,18)==="tag:yaml.org,2002:"?Mt="!!"+Mt.slice(18):Mt="!<"+Mt+">",k.dump=Mt+" "+k.dump}}return!0}p(I,"writeNode");function X(k,N){const Y=[],et=[];K(k,Y,et);const it=et.length;for(let st=0;st<it;st+=1)N.duplicates.push(Y[et[st]]);N.usedDuplicates=new Array(it)}p(X,"getDuplicateReferences");function K(k,N,Y){if(k!==null&&typeof k=="object"){const et=N.indexOf(k);if(et!==-1)Y.indexOf(et)===-1&&Y.push(et);else if(N.push(k),Array.isArray(k))for(let it=0,st=k.length;it<st;it+=1)K(k[it],N,Y);else{const it=Object.keys(k);for(let st=0,Z=it.length;st<Z;st+=1)K(k[it[st]],N,Y)}}}p(K,"inspectNode");function j(k,N){N=N||{};const Y=new lt(N);Y.noRefs||X(k,Y);let et=k;return Y.replacer&&(et=Y.replacer.call({"":et},"",et)),I(Y,0,et,!0,!0)?Y.dump+`
|
|
35
|
+
`:""}return p(j,"dump2"),sn.dump=j,sn}p(ou,"requireDumper");var fc;function au(){if(fc)return me;fc=1;const e=su(),t=ou();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"),me.Type=ke(),me.Schema=sl(),me.FAILSAFE_SCHEMA=ll(),me.JSON_SCHEMA=pl(),me.CORE_SCHEMA=fl(),me.DEFAULT_SCHEMA=Xo(),me.load=e.load,me.loadAll=e.loadAll,me.dump=t.dump,me.YAMLException=ji(),me.types={binary:yl(),float:ul(),map:nl(),null:hl(),pairs:xl(),set:bl(),timestamp:gl(),bool:cl(),int:dl(),merge:ml(),omap:Cl(),seq:al(),str:ol()},me.safeLoad=r("safeLoad","load"),me.safeLoadAll=r("safeLoadAll","loadAll"),me.safeDump=r("safeDump","dump"),me}p(au,"requireJsYaml");var X0=au(),Z0=ru(X0),{Type:WL,Schema:zL,FAILSAFE_SCHEMA:HL,JSON_SCHEMA:K0,CORE_SCHEMA:YL,DEFAULT_SCHEMA:UL,load:Q0,loadAll:jL,dump:GL,YAMLException:VL,types:XL,safeLoad:ZL,safeLoadAll:KL,safeDump:QL}=Z0,J0=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:o,gradientStop:n}=i??{},a=e.attr("id"),h=r?.includes("dark")?"#FFFFFF":"#000000",c=p((d,u,f)=>e.append("defs").append("filter").attr("id",d).attr("height",u).attr("width",u).append("feDropShadow").attr("dx",f).attr("dy",f).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",h),"dropShadow");if(c(`${a}-drop-shadow`,"130%","4"),c(`${a}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${a}-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",o).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),no={exports:{}},tC=no.exports,gc;function eC(){return gc||(gc=1,(function(e,t){(function(r,i){e.exports=i()})(tC,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",n="second",a="minute",h="hour",c="day",l="week",d="month",u="quarter",f="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 D=["th","st","nd","rd"],A=E%100;return"["+E+(D[(A-20)%10]||D[A]||D[0])+"]"}},S=function(E,D,A){var z=String(E);return!z||z.length>=D?E:""+Array(D+1-z.length).join(A)+E},T={s:S,z:function(E){var D=-E.utcOffset(),A=Math.abs(D),z=Math.floor(A/60),W=A%60;return(D<=0?"+":"-")+S(z,2,"0")+":"+S(W,2,"0")},m:function E(D,A){if(D.date()<A.date())return-E(A,D);var z=12*(A.year()-D.year())+(A.month()-D.month()),W=D.clone().add(z,d),tt=A-W<0,V=D.clone().add(z+(tt?-1:1),d);return+(-(z+(A-W)/(tt?W-V:V-W))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:f,w:l,d:c,D:m,h,m:a,s:n,ms:o,Q:u}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},v="en",B={};B[v]=b;var L="$isDayjsObject",F=function(E){return E instanceof G||!(!E||!E[L])},q=function E(D,A,z){var W;if(!D)return v;if(typeof D=="string"){var tt=D.toLowerCase();B[tt]&&(W=tt),A&&(B[tt]=A,W=tt);var V=D.split("-");if(!W&&V.length>1)return E(V[0])}else{var lt=D.name;B[lt]=D,W=lt}return!z&&W&&(v=W),W||!z&&v},R=function(E,D){if(F(E))return E.clone();var A=typeof D=="object"?D:{};return A.date=E,A.args=arguments,new G(A)},$=T;$.l=q,$.i=F,$.w=function(E,D){return R(E,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var G=(function(){function E(A){this.$L=q(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[L]=!0}var D=E.prototype;return D.parse=function(A){this.$d=(function(z){var W=z.date,tt=z.utc;if(W===null)return new Date(NaN);if($.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var V=W.match(C);if(V){var lt=V[2]-1||0,xt=(V[7]||"0").substring(0,3);return tt?new Date(Date.UTC(V[1],lt,V[3]||1,V[4]||0,V[5]||0,V[6]||0,xt)):new Date(V[1],lt,V[3]||1,V[4]||0,V[5]||0,V[6]||0,xt)}}return new Date(W)})(A),this.init()},D.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==y},D.isSame=function(A,z){var W=R(A);return this.startOf(z)<=W&&W<=this.endOf(z)},D.isAfter=function(A,z){return R(A)<this.startOf(z)},D.isBefore=function(A,z){return this.endOf(z)<R(A)},D.$g=function(A,z,W){return $.u(A)?this[z]:this.set(W,A)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(A,z){var W=this,tt=!!$.u(z)||z,V=$.p(A),lt=function(It,kt){var Pt=$.w(W.$u?Date.UTC(W.$y,kt,It):new Date(W.$y,kt,It),W);return tt?Pt:Pt.endOf(c)},xt=function(It,kt){return $.w(W.toDate()[It].apply(W.toDate("s"),(tt?[0,0,0,0]:[23,59,59,999]).slice(kt)),W)},bt=this.$W,_t=this.$M,mt=this.$D,ft="set"+(this.$u?"UTC":"");switch(V){case f:return tt?lt(1,0):lt(31,11);case d:return tt?lt(1,_t):lt(0,_t+1);case l:var ht=this.$locale().weekStart||0,Tt=(bt<ht?bt+7:bt)-ht;return lt(tt?mt-Tt:mt+(6-Tt),_t);case c:case m:return xt(ft+"Hours",0);case h:return xt(ft+"Minutes",1);case a:return xt(ft+"Seconds",2);case n:return xt(ft+"Milliseconds",3);default:return this.clone()}},D.endOf=function(A){return this.startOf(A,!1)},D.$set=function(A,z){var W,tt=$.p(A),V="set"+(this.$u?"UTC":""),lt=(W={},W[c]=V+"Date",W[m]=V+"Date",W[d]=V+"Month",W[f]=V+"FullYear",W[h]=V+"Hours",W[a]=V+"Minutes",W[n]=V+"Seconds",W[o]=V+"Milliseconds",W)[tt],xt=tt===c?this.$D+(z-this.$W):z;if(tt===d||tt===f){var bt=this.clone().set(m,1);bt.$d[lt](xt),bt.init(),this.$d=bt.set(m,Math.min(this.$D,bt.daysInMonth())).$d}else lt&&this.$d[lt](xt);return this.init(),this},D.set=function(A,z){return this.clone().$set(A,z)},D.get=function(A){return this[$.p(A)]()},D.add=function(A,z){var W,tt=this;A=Number(A);var V=$.p(z),lt=function(_t){var mt=R(tt);return $.w(mt.date(mt.date()+Math.round(_t*A)),tt)};if(V===d)return this.set(d,this.$M+A);if(V===f)return this.set(f,this.$y+A);if(V===c)return lt(1);if(V===l)return lt(7);var xt=(W={},W[a]=i,W[h]=s,W[n]=r,W)[V]||1,bt=this.$d.getTime()+A*xt;return $.w(bt,this)},D.subtract=function(A,z){return this.add(-1*A,z)},D.format=function(A){var z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||y;var tt=A||"YYYY-MM-DDTHH:mm:ssZ",V=$.z(this),lt=this.$H,xt=this.$m,bt=this.$M,_t=W.weekdays,mt=W.months,ft=W.meridiem,ht=function(kt,Pt,Zt,Be){return kt&&(kt[Pt]||kt(z,tt))||Zt[Pt].slice(0,Be)},Tt=function(kt){return $.s(lt%12||12,kt,"0")},It=ft||function(kt,Pt,Zt){var Be=kt<12?"AM":"PM";return Zt?Be.toLowerCase():Be};return tt.replace(x,(function(kt,Pt){return Pt||(function(Zt){switch(Zt){case"YY":return String(z.$y).slice(-2);case"YYYY":return $.s(z.$y,4,"0");case"M":return bt+1;case"MM":return $.s(bt+1,2,"0");case"MMM":return ht(W.monthsShort,bt,mt,3);case"MMMM":return ht(mt,bt);case"D":return z.$D;case"DD":return $.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return ht(W.weekdaysMin,z.$W,_t,2);case"ddd":return ht(W.weekdaysShort,z.$W,_t,3);case"dddd":return _t[z.$W];case"H":return String(lt);case"HH":return $.s(lt,2,"0");case"h":return Tt(1);case"hh":return Tt(2);case"a":return It(lt,xt,!0);case"A":return It(lt,xt,!1);case"m":return String(xt);case"mm":return $.s(xt,2,"0");case"s":return String(z.$s);case"ss":return $.s(z.$s,2,"0");case"SSS":return $.s(z.$ms,3,"0");case"Z":return V}return null})(kt)||V.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(A,z,W){var tt,V=this,lt=$.p(z),xt=R(A),bt=(xt.utcOffset()-this.utcOffset())*i,_t=this-xt,mt=function(){return $.m(V,xt)};switch(lt){case f:tt=mt()/12;break;case d:tt=mt();break;case u:tt=mt()/3;break;case l:tt=(_t-bt)/6048e5;break;case c:tt=(_t-bt)/864e5;break;case h:tt=_t/s;break;case a:tt=_t/i;break;case n:tt=_t/r;break;default:tt=_t}return W?tt:$.a(tt)},D.daysInMonth=function(){return this.endOf(d).$D},D.$locale=function(){return B[this.$L]},D.locale=function(A,z){if(!A)return this.$L;var W=this.clone(),tt=q(A,z,!0);return tt&&(W.$L=tt),W},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},E})(),M=G.prototype;return R.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",h],["$W",c],["$M",d],["$y",f],["$D",m]].forEach((function(E){M[E[1]]=function(D){return this.$g(D,E[0],E[1])}})),R.extend=function(E,D){return E.$i||(E(D,G,R),E.$i=!0),R},R.locale=q,R.isDayjs=F,R.unix=function(E){return R(1e3*E)},R.en=B[v],R.Ls=B,R.p={},R}))})(no)),no.exports}var rC=eC();const iC=r0(rC);var fr={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")},kl=p(function(e="fatal"){let t=fr.fatal;typeof e=="string"?e.toLowerCase()in fr&&(t=fr[e]):typeof e=="number"&&(t=e),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},t<=fr.fatal&&(J.fatal=console.error?console.error.bind(console,$e("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",$e("FATAL"))),t<=fr.error&&(J.error=console.error?console.error.bind(console,$e("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",$e("ERROR"))),t<=fr.warn&&(J.warn=console.warn?console.warn.bind(console,$e("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",$e("WARN"))),t<=fr.info&&(J.info=console.info?console.info.bind(console,$e("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",$e("INFO"))),t<=fr.debug&&(J.debug=console.debug?console.debug.bind(console,$e("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("DEBUG"))),t<=fr.trace&&(J.trace=console.debug?console.debug.bind(console,$e("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$e("TRACE")))},"setLogLevel"),$e=p(e=>`%c${iC().format("ss.SSS")} : ${e} : `,"format");const lo={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,o=2*r-s;switch(i){case"r":return lo.hue2rgb(o,s,e+1/3)*255;case"g":return lo.hue2rgb(o,s,e)*255;case"b":return lo.hue2rgb(o,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),o=Math.min(e,t,r),n=(s+o)/2;if(i==="l")return n*100;if(s===o)return 0;const a=s-o,h=n>.5?a/(2-s-o):a/(s+o);if(i==="s")return h*100;switch(s){case e:return((t-r)/a+(t<r?6:0))*60;case t:return((r-e)/a+2)*60;case r:return((e-t)/a+4)*60;default:return-1}}},sC={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},oC={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Et={channel:lo,lang:sC,unit:oC},$r={};for(let e=0;e<=255;e++)$r[e]=Et.unit.dec2hex(e);const Ce={ALL:0,RGB:1,HSL:2};class aC{constructor(){this.type=Ce.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=Ce.ALL}is(t){return this.type===t}}class nC{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new aC}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ce.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Et.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Et.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Et.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Et.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Et.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Et.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Et.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Et.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Et.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Et.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Et.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Et.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ce.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ce.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ce.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ce.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ce.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ce.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Zo=new nC({r:0,g:0,b:0,a:0},"transparent"),_i={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(_i.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,n=s>4,a=n?1:17,h=n?8:4,c=o?0:-1,l=n?255:15;return Zo.set({r:(i>>h*(c+3)&l)*a,g:(i>>h*(c+2)&l)*a,b:(i>>h*(c+1)&l)*a,a:o?(i&l)*a/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${$r[Math.round(t)]}${$r[Math.round(r)]}${$r[Math.round(i)]}${$r[Math.round(s*255)]}`:`#${$r[Math.round(t)]}${$r[Math.round(r)]}${$r[Math.round(i)]}`}},Qr={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(Qr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Et.channel.clamp.h(parseFloat(r)*.9);case"rad":return Et.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Et.channel.clamp.h(parseFloat(r)*360)}}return Et.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Qr.re);if(!r)return;const[,i,s,o,n,a]=r;return Zo.set({h:Qr._hue2deg(i),s:Et.channel.clamp.s(parseFloat(s)),l:Et.channel.clamp.l(parseFloat(o)),a:n?Et.channel.clamp.a(a?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Et.lang.round(t)}, ${Et.lang.round(r)}%, ${Et.lang.round(i)}%, ${s})`:`hsl(${Et.lang.round(t)}, ${Et.lang.round(r)}%, ${Et.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 _i.parse(t)},stringify:e=>{const t=_i.stringify(e);for(const r in xs.colors)if(xs.colors[r]===t)return r}},ds={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(ds.re);if(!r)return;const[,i,s,o,n,a,h,c,l]=r;return Zo.set({r:Et.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Et.channel.clamp.g(n?parseFloat(o)*2.55:parseFloat(o)),b:Et.channel.clamp.b(h?parseFloat(a)*2.55:parseFloat(a)),a:c?Et.channel.clamp.a(l?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Et.lang.round(t)}, ${Et.lang.round(r)}, ${Et.lang.round(i)}, ${Et.lang.round(s)})`:`rgb(${Et.lang.round(t)}, ${Et.lang.round(r)}, ${Et.lang.round(i)})`}},Ge={format:{keyword:xs,hex:_i,rgb:ds,rgba:ds,hsl:Qr,hsla:Qr},parse:e=>{if(typeof e!="string")return e;const t=_i.parse(e)||ds.parse(e)||Qr.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(Ce.HSL)||e.data.r===void 0?Qr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ds.stringify(e):_i.stringify(e)},nu=(e,t)=>{const r=Ge.parse(e);for(const i in t)r[i]=Et.channel.clamp[i](t[i]);return Ge.stringify(r)},Ir=(e,t,r=0,i=1)=>{if(typeof e!="number")return nu(e,{a:t});const s=Zo.set({r:Et.channel.clamp.r(e),g:Et.channel.clamp.g(t),b:Et.channel.clamp.b(r),a:Et.channel.clamp.a(i)});return Ge.stringify(s)},lC=(e,t)=>Et.lang.round(Ge.parse(e)[t]),hC=e=>{const{r:t,g:r,b:i}=Ge.parse(e),s=.2126*Et.channel.toLinear(t)+.7152*Et.channel.toLinear(r)+.0722*Et.channel.toLinear(i);return Et.lang.round(s)},cC=e=>hC(e)>=.5,_e=e=>!cC(e),lu=(e,t,r)=>{const i=Ge.parse(e),s=i[t],o=Et.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Ge.stringify(i)},H=(e,t)=>lu(e,"l",t),U=(e,t)=>lu(e,"l",-t),w=(e,t)=>{const r=Ge.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return nu(e,i)},dC=(e,t,r=50)=>{const{r:i,g:s,b:o,a:n}=Ge.parse(e),{r:a,g:h,b:c,a:l}=Ge.parse(t),d=r/100,u=d*2-1,f=n-l,y=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,C=1-y,x=i*y+a*C,b=s*y+h*C,S=o*y+c*C,T=n*d+l*(1-d);return Ir(x,b,S,T)},P=(e,t=100)=>{const r=Ge.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,dC(r,e,t)};var bs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bo=/\s/,uC=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const o=e.indexOf(`
|
|
36
|
+
`,s);if(o===-1)break;let n=s;for(;n>r&&bo.test(e[n-1]);)n--;t+=e.slice(r,n)+`
|
|
37
|
+
`,r=o+1,i=r}return t+e.slice(r)},"stripAnyComments"),ho=p(e=>e===`
|
|
38
|
+
`||e==="\r","isLineBreak"),pC=p((e,t)=>{let r=-1;for(let i=t;i<e.length&&bo.test(e[i]);i++)ho(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),hu=p(e=>{let t=0;for(;t<e.length&&bo.test(e[t])&&!ho(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let l=t+3;l<e.length&&bo.test(e[l]);l++)ho(e[l])&&i.push(l);if(i.length===0)return;const s=`${r}---`,o=p(l=>ho(e[l])&&e.startsWith(s,l+1)?pC(e,l+1+s.length):-1,"closingEnd"),n=i[0]+1;let a=-1;for(let l=n;l<e.length;l++)o(l)!==-1&&(a=l);if(a===-1)return;let h=i[0];for(const l of i)l<a&&(h=l);const c=h+1;for(let l=c;l<=a;l++){const d=o(l);if(d!==-1)return{indent:r,body:e.slice(c,l),length:d+1}}},"matchFrontMatter"),vi,cu=(vi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(vi,"UnknownDiagramError"),vi),ri={},Ko=p(function(e,t){const r=hu(e);e=uC((r?e.slice(r.length):e).replace(bs,""));for(const[i,{detector:s}]of Object.entries(ri))if(s(e,t))return i;throw new cu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Bn=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)du(t,r,i)},"registerLazyLoadedDiagrams"),du=p((e,t,r)=>{ri[e]&&J.warn(`Detector with key ${e} already exists. Overwriting.`),ri[e]={detector:t,loader:r},J.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),fC=p(e=>ri[e].loader,"getDiagramLoader"),vn=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>vn(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(([o,n])=>{if(typeof n=="object"){if(n===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(n)?[]:{}),typeof s[o]=="object"&&(s[o]=vn(s[o],n,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=n:Object.defineProperty(e,o,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),re=vn,or="#ffffff",ar="#f2f2f2",Ft=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),mc=p(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Ve=p((e,t)=>mc(e)&&mc(t)?{...e,...t}:t,"applyOverride"),Li,gC=(Li=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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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||P(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||H(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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||P(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||U(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(8+r*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:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar,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]=Ve(this[i],t[i])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(Li,"Theme"),Li),mC=p(e=>{const t=new gC;return t.calculate(e),t},"getThemeVariables"),Fi,yC=(Fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(P("#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||H(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(){this.secondBkg=H(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=H(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=H(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=P(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||P(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??H(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(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||H("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||H("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||H("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||H("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||H(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||H(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(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]=Ve(this[i],t[i])})}},p(Fi,"Theme"),Fi),CC=p(e=>{const t=new yC;return t.calculate(e),t},"getThemeVariables"),Ai,xC=(Ai=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=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ft(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(){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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||P(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||P(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(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:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.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||_e(this.quadrant1Fill)?H(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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(P(this.git0),25),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Ai,"Theme"),Ai),bC=p(e=>{const t=new xC;return t.calculate(e),t},"getThemeVariables"),Ei,kC=(Ei=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=H("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.primaryColor),this.lineColor=P(this.background),this.textColor=P(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(){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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(8+t*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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.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||_e(this.quadrant1Fill)?H(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||P(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Ei,"Theme"),Ei),SC=p(e=>{const t=new kC;return t.calculate(e),t},"getThemeVariables"),Mi,wC=(Mi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(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||H(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(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||P(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{l:-(8+t*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=H(this.contrast,30),this.sectionBkgColor2=H(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=H(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Mi,"Theme"),Mi),TC=p(e=>{const t=new wC;return t.calculate(e),t},"getThemeVariables"),$i,_C=($i=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=Ft(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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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||P(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?H(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||H(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=U(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=U(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||P(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||H(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||U(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(8+o*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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p($i,"Theme"),$i),BC=p(e=>{const t=new _C;return t.calculate(e),t},"getThemeVariables"),Oi,vC=(Oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(P("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=P(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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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"?H(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||P(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||H(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||P(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||U(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(8+r*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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Oi,"Theme"),Oi),LC=p(e=>{const t=new vC;return t.calculate(e),t},"getThemeVariables"),Di,FC=(Di=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=Ft("#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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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||P(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?H(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||H(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=U(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=U(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||P(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||H(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||U(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(8+o*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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Di,"Theme"),Di),AC=p(e=>{const t=new FC;return t.calculate(e),t},"getThemeVariables"),Ii,EC=(Ii=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(P("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=P(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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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"?H(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||P(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||H(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=U(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||P(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||U(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(8+r*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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Ii,"Theme"),Ii),MC=p(e=>{const t=new EC;return t.calculate(e),t},"getThemeVariables"),Pi,$C=(Pi=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=Ft("#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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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||P(this.lineColor),this.rectBkgColor=this.rectBkgColor||(_e(this.background)?H(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||H(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||P(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||H(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||U(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||w(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Pi,"Theme"),Pi),OC=p(e=>{const t=new $C;return t.calculate(e),t},"getThemeVariables"),Ri,DC=(Ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(P("#323D47"),10),this.border1="#ccc",this.border2=Ir(255,255,255,.25),this.arrowheadColor=P(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(){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||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(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"?H(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||P(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||H(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 i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||P(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||H(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||U(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=U(this["cScale"+i],75);const t=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||w(this.mainBkg,{h:180,s:-15,l:t*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||w(this.mainBkg,{h:180,s:-15,l:t*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%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||_e(this.quadrant1Fill)?H(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(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||P(this.git0),this.gitInv1=this.gitInv1||P(this.git1),this.gitInv2=this.gitInv2||P(this.git2),this.gitInv3=this.gitInv3||P(this.git3),this.gitInv4=this.gitInv4||P(this.git4),this.gitInv5=this.gitInv5||P(this.git5),this.gitInv6=this.gitInv6||P(this.git6),this.gitInv7=this.gitInv7||P(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ar}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]=Ve(this[i],t[i])})}},p(Ri,"Theme"),Ri),IC=p(e=>{const t=new DC;return t.calculate(e),t},"getThemeVariables"),br={base:{getThemeVariables:mC},dark:{getThemeVariables:CC},default:{getThemeVariables:bC},forest:{getThemeVariables:SC},neutral:{getThemeVariables:TC},neo:{getThemeVariables:BC},"neo-dark":{getThemeVariables:LC},redux:{getThemeVariables:AC},"redux-dark":{getThemeVariables:MC},"redux-color":{getThemeVariables:OC},"redux-dark-color":{getThemeVariables:IC}},Jt={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,stepDuration:1,stepNumbers:!1,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,colorBy:"branch",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},uu={...Jt,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:br.default.getThemeVariables(),sequence:{...Jt.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:Jt.class?.theme,look:Jt.class?.look,layout:Jt.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Jt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Jt.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:{...Jt.pie,useWidth:984},xyChart:{...Jt.xyChart,useWidth:void 0},requirement:{...Jt.requirement,useWidth:void 0},packet:{...Jt.packet},eventmodeling:{...Jt.eventmodeling},treeView:{...Jt.treeView,useWidth:void 0},radar:{...Jt.radar},usecase:{...Jt.usecase},railroad:{...Jt.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:{...Jt.ishikawa},sankey:{...Jt.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:{...Jt.venn},cynefin:{...Jt.cynefin}},pu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...pu(e[i],"")]:[...r,t+i],[]),"keyify"),PC=new Set(pu(uu,"")),Sl=uu,RC={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},qC=p(e=>RC[e]??e,"getDiagramConfigKey"),NC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},WC=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"),ko=p(e=>{if(J.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ko(t));return}for(const t of Object.keys(e)){if(J.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!PC.has(t)||e[t]==null){J.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=NC[t];i?WC(e[t],i):(J.debug("sanitizing object",t),ko(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(J.debug("sanitizing css option",t),e[t]=fu(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}J.debug("After sanitization",e)}},"sanitizeDirective"),fu=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"),Pr=Object.freeze(Sl),zC=["theme","look","layout"],HC=new Set(["classic","handDrawn","neo"]),YC=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(br,t):e!=="look"||HC.has(t),"isUsableAppearance"),UC=p((e,t,r)=>e?[e[t]?.[r],e[r]].find(s=>s!==void 0&&YC(r,s)):void 0,"readAppearance"),nr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Se=re({},Pr),So,wo={},kr=[],ks=re({},Pr),Ss,jC=p((e,t)=>{if(!Ss)return;const r=[t,...[...kr].reverse(),wo,Pr],i=e[Ss];for(const s of zC)for(const o of r){const n=UC(o,Ss,s);if(n!==void 0){e[s]=n,i?.[s]!==void 0&&(i[s]=n);break}}},"resolveAppearance"),Gi=p((e,t)=>{let r=re({},e),i={};for(const o of t)yu(o),i=re(i,o);if(r=re(r,i),jC(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(br,r.theme)){const o=re({},So),n=re(o.themeVariables||{},i.themeVariables);r.themeVariables=br[r.theme].getThemeVariables(n)}return ks=r,QC(ks),ks},"updateCurrentConfig"),wl=p(e=>{Ss=e===void 0?void 0:qC(e),Gi(Se,kr)},"setDiagramConfigScope"),GC=p(e=>(Se=re({},Pr),Se=re(Se,e),wo=re({},e),e.theme&&Object.hasOwn(br,e.theme)&&(Se.themeVariables=br[e.theme].getThemeVariables(e.themeVariables)),Gi(Se,kr),Se),"setSiteConfig"),VC=p(e=>{So=re({},e)},"saveConfigFromInitialize"),XC=p(e=>(Se=re(Se,e),wo=re(wo,e),Gi(Se,kr),Se),"updateSiteConfig"),gu=p(()=>re({},Se),"getSiteConfig"),mu=p(e=>(Gi(ks,[e]),Gt()),"setConfig"),Gt=p(()=>re({},ks),"getConfig"),yu=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"&&yu(e[t])}))},"sanitize"),ZC=p(e=>{ko(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),kr.push(e),Gi(Se,kr)},"addDirective"),To=p((e=Se)=>{kr=[],Ss=void 0,Gi(e,kr)},"reset"),KC={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."},yc={},Cu=p(e=>{yc[e]||(J.warn(KC[e]),yc[e]=!0)},"issueWarning"),QC=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Cu("LAZY_LOAD_DEPRECATED")},"checkConfig"),JL=p(()=>{let e={};So&&(e=re(e,So));for(const t of kr)e=re(e,t);return e},"getUserDefinedConfig"),de=p(e=>(e.flowchart?.htmlLabels!=null&&Cu("FLOWCHART_HTML_LABELS_DEPRECATED"),nr(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Es=/<\/?br\s*\/?>/gi,JC=new RegExp(Es.source,"i"),tx=p(e=>e?ku(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ex=(()=>{let e=!1;return()=>{e||(xu(),e=!0)}})();function xu(){const e="data-temp-href-target";ei.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ei.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(xu,"setupDompurifyHooks");var bu=p(e=>(ex(),ei.sanitize(e)),"removeScript"),Cc=p((e,t)=>{if(de(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=bu(e):r!=="loose"&&(e=ku(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=ox(e))}return e},"sanitizeMore"),De=p((e,t)=>e&&(t.dompurifyConfig?e=ei.sanitize(Cc(e,t),t.dompurifyConfig).toString():e=ei.sanitize(Cc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),rx=p((e,t)=>typeof e=="string"?De(e,t):e.flat().map(r=>De(r,t)),"sanitizeTextOrArray"),ix=p(e=>JC.test(e),"hasBreaks"),sx=p(e=>e.split(Es),"splitBreaks"),ox=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ku=p(e=>e.replace(Es,"#br#"),"breakToPlaceholder"),ax=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"),nx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),lx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),xc=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 o=t[i-1],n=t[i+1];hx(o,n)&&(s=o+","+n,i++,r.pop())}r.push(cx(s))}return r.join("")},"parseGenericTypes"),Ln=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),hx=p((e,t)=>{const r=Ln(e,"~"),i=Ln(t,"~");return r===1&&i===1},"shouldCombineSets"),cx=p(e=>{const t=Ln(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("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),bc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Fn=/\$\$(.*?)\$\$/g,vs=p(e=>(e.match(Fn)?.length??0)>0,"hasKatex"),tF=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Su(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),dx=p(async(e,t)=>{if(!vs(e))return e;if(!(bc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Fn,"MathML is unsupported in this environment.");{const{default:r}=await Dt(async()=>{const{default:s}=await import("./katex-DLSO0Xi6.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!bc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Es).map(s=>vs(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Fn,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Su=p(async(e,t)=>De(await dx(e,t),t),"renderKatexSanitized"),Ms={getRows:tx,sanitizeText:De,sanitizeTextOrArray:rx,hasBreaks:ix,splitBreaks:sx,lineBreakRegex:Es,removeScript:bu,getUrl:ax,evaluate:nr,getMax:nx,getMin:lx},ux=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),px=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"),wu=p(function(e,t,r,i){const s=px(t,r,i);ux(e,s)},"configureSvgSize"),fx=p(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,n=s.height;J.info(`SVG bounds: ${o}x${n}`,s);let a=0,h=0;J.info(`Graph bounds: ${a}x${h}`,e),a=o+r*2,h=n+r*2,J.info(`Calculated bounds: ${a}x${h}`),wu(t,h,a,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),co={};function An(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
39
|
+
`)}p(An,"cssStyleSheetToString");var gx=p((e,t,r,i)=>{let s="";return e in co&&co[e]?s=co[e]({...r,svgId:i}):J.warn(`No theme found for ${e}`),`& {
|
|
40
|
+
font-family: ${r.fontFamily};
|
|
41
|
+
font-size: ${r.fontSize};
|
|
42
|
+
fill: ${r.textColor}
|
|
43
|
+
}
|
|
44
|
+
@keyframes edge-animation-frame {
|
|
45
|
+
from {
|
|
46
|
+
stroke-dashoffset: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
@keyframes dash {
|
|
50
|
+
to {
|
|
51
|
+
stroke-dashoffset: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
& .edge-animation-slow {
|
|
55
|
+
stroke-dasharray: 9,5 !important;
|
|
56
|
+
stroke-dashoffset: 900;
|
|
57
|
+
animation: dash 50s linear infinite;
|
|
58
|
+
stroke-linecap: round;
|
|
59
|
+
}
|
|
60
|
+
& .edge-animation-fast {
|
|
61
|
+
stroke-dasharray: 9,5 !important;
|
|
62
|
+
stroke-dashoffset: 900;
|
|
63
|
+
animation: dash 20s linear infinite;
|
|
64
|
+
stroke-linecap: round;
|
|
65
|
+
}
|
|
66
|
+
/* Classes common for multiple diagrams */
|
|
67
|
+
|
|
68
|
+
& .error-icon {
|
|
69
|
+
fill: ${r.errorBkgColor};
|
|
70
|
+
}
|
|
71
|
+
& .error-text {
|
|
72
|
+
fill: ${r.errorTextColor};
|
|
73
|
+
stroke: ${r.errorTextColor};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& .edge-thickness-normal {
|
|
77
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
78
|
+
}
|
|
79
|
+
& .edge-thickness-thick {
|
|
80
|
+
stroke-width: 3.5px
|
|
81
|
+
}
|
|
82
|
+
& .edge-pattern-solid {
|
|
83
|
+
stroke-dasharray: 0;
|
|
84
|
+
}
|
|
85
|
+
& .edge-thickness-invisible {
|
|
86
|
+
stroke-width: 0;
|
|
87
|
+
fill: none;
|
|
88
|
+
}
|
|
89
|
+
& .edge-pattern-dashed{
|
|
90
|
+
stroke-dasharray: 3;
|
|
91
|
+
}
|
|
92
|
+
.edge-pattern-dotted {
|
|
93
|
+
stroke-dasharray: 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
& .marker {
|
|
97
|
+
fill: ${r.lineColor};
|
|
98
|
+
stroke: ${r.lineColor};
|
|
99
|
+
}
|
|
100
|
+
& .marker.cross {
|
|
101
|
+
stroke: ${r.lineColor};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
& svg {
|
|
105
|
+
font-family: ${r.fontFamily};
|
|
106
|
+
font-size: ${r.fontSize};
|
|
107
|
+
}
|
|
108
|
+
& p {
|
|
109
|
+
margin: 0
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
${s}
|
|
113
|
+
.node .neo-node {
|
|
114
|
+
stroke: ${r.nodeBorder};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
118
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
119
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
120
|
+
}
|
|
121
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
122
|
+
filter: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
[data-look="neo"].node path {
|
|
127
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
128
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-look="neo"].node .outer-path {
|
|
132
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-look="neo"].node .neo-line path {
|
|
136
|
+
stroke: ${r.nodeBorder};
|
|
137
|
+
filter: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[data-look="neo"].node circle{
|
|
141
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
142
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[data-look="neo"].node circle .state-start{
|
|
146
|
+
fill: #000000;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
[data-look="neo"].icon-shape .icon {
|
|
150
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
151
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
155
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
156
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
${t}
|
|
160
|
+
`},"getStyles"),mx=p((e,t)=>{t!==void 0&&(co[e]=t)},"addStylesForDiagram"),yx=gx,Tu={};V0(Tu,{clear:()=>Cx,getAccDescription:()=>Sx,getAccTitle:()=>bx,getDiagramTitle:()=>Tx,setAccDescription:()=>kx,setAccTitle:()=>xx,setDiagramTitle:()=>wx});var Tl="",_l="",Bl="",vl=p(e=>De(e,Gt()),"sanitizeText"),Cx=p(()=>{Tl="",Bl="",_l=""},"clear"),xx=p(e=>{Tl=vl(e).replace(/^\s+/g,"")},"setAccTitle"),bx=p(()=>Tl,"getAccTitle"),kx=p(e=>{Bl=vl(e).replace(/\n\s+/g,`
|
|
161
|
+
`)},"setAccDescription"),Sx=p(()=>Bl,"getAccDescription"),wx=p(e=>{_l=vl(e)},"setDiagramTitle"),Tx=p(()=>_l,"getDiagramTitle"),kc=J,_x=kl,Ot=Gt,eF=mu,rF=Pr,Ll=p(e=>De(e,Ot()),"sanitizeText"),Bx=fx,vx=p(()=>Tu,"getCommonDb"),_o={},Bo=p((e,t,r)=>{_o[e]&&kc.warn(`Diagram with id ${e} already registered. Overwriting.`),_o[e]=t,r&&du(e,r),mx(e,t.styles),t.injectUtils?.(kc,_x,Ot,Ll,Bx,vx(),()=>{})},"registerDiagram"),En=p(e=>{if(e in _o)return _o[e];throw new Lx(e)},"getDiagram"),qi,Lx=(qi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(qi,"DiagramNotFoundError"),qi),Fx=p(e=>{const{handDrawnSeed:t}=Ot();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Ax=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Hr=p(e=>{const t=Ex([...e.cssCompiledStyles||[],...e.cssStyles||[],...Ax(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Ex=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),_u=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"),dt=p(e=>{const{stylesArray:t}=Hr(e),r=[],i=[],s=[],o=[];return t.forEach(n=>{const a=n[0];_u(a)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),a.includes("stroke")&&s.push(n.join(":")+" !important"),a==="fill"&&o.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),ct=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ot(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:n}=Hr(e);return Object.assign({roughness:.7,fill:n.get("fill")||o,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||s,seed:i,strokeWidth:n.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Mx(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),Mx=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 $x=Object.freeze({left:0,top:0,width:16,height:16}),vo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Bu=Object.freeze({...$x,...vo}),Ox=Object.freeze({...Bu,body:"",hidden:!1}),Dx=Object.freeze({width:null,height:null}),Ix=Object.freeze({...Dx,...vo}),Px=(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 a=s.pop(),h=s.pop(),c={provider:s.length>0?s[0]:i,prefix:h,name:a};return on(c)?c:null}const o=s[0],n=o.split("-");if(n.length>1){const a={provider:i,prefix:n.shift(),name:n.join("-")};return on(a)?a:null}if(r&&i===""){const a={provider:i,prefix:"",name:o};return on(a,r)?a:null}return null},on=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Rx(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 Sc(e,t){const r=Rx(e,t);for(const i in Ox)i in vo?i in e&&!(i in r)&&(r[i]=vo[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function qx(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const a=i[n]&&i[n].parent,h=a&&o(a);h&&(s[n]=[a].concat(h))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function wc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function n(a){o=Sc(i[a]||s[a],o)}return n(t),r.forEach(n),Sc(e,o)}function Nx(e,t){if(e.icons[t])return wc(e,t,[]);const r=qx(e,[t])[t];return r?wc(e,t,r):null}const Wx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,zx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Tc(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(Wx);if(i===null||!i.length)return e;const s=[];let o=i.shift(),n=zx.test(o);for(;;){if(n){const a=parseFloat(o);isNaN(a)?s.push(o):s.push(Math.ceil(a*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");n=!n}}function Hx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const n=e.indexOf(">",o);if(n===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function Yx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Ux(e,t,r){const i=Hx(e);return Yx(i.defs,t+i.content+r)}const jx=e=>e==="unset"||e==="undefined"||e==="none";function Gx(e,t){const r={...Bu,...e},i={...Ix,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const C=[],x=y.hFlip,b=y.vFlip;let S=y.rotate;x?b?S+=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(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){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()+")")}S%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&&(o=Ux(o,'<g transform="'+C.join(" ")+'">',"</g>"))});const n=i.width,a=i.height,h=s.width,c=s.height;let l,d;n===null?(d=a===null?"1em":a==="auto"?c:a,l=Tc(d,h/c)):(l=n==="auto"?h:n,d=a===null?Tc(l,c/h):a==="auto"?c:a);const u={},f=(y,C)=>{jx(C)||(u[y]=C.toString())};f("width",l),f("height",d);const m=[s.left,s.top,h,c];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:o}}const Vx=/\sid="(\S+)"/g,_c=new Map;function Xx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=_c.get(e)||0;return _c.set(e,t+1),t?`${e}${t}`:e}function Zx(e){const t=[];let r;for(;r=Vx.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 o=Xx(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Kx(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 Qx={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},Lo=new Map,Fl=new Map,vu=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)Fl.set(t.name,t.loader);else if("icons"in t)Lo.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"),Jx=p(e=>Lo.has(e)||Fl.has(e),"isIconPackRegistered"),Lu=p(async(e,t)=>{const r=Px(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=Lo.get(i);if(!s){const n=Fl.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},Lo.set(i,s)}catch(a){throw J.error(a),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Nx(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Fu=p(async e=>{try{return await Lu(e),!0}catch{return!1}},"isIconAvailable"),ai=p(async(e,t,r)=>{let i;try{i=await Lu(e,t?.fallbackPrefix)}catch(n){J.error(n),i=Qx}const s=Gx(i,t),o=Kx(Zx(s.body),{...s.attributes,...r});return De(o,Gt())},"getIconSVG"),Zs={},ne={},Bc;function tb(){return Bc||(Bc=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 vc;function eb(){if(vc)return Zs;vc=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.sanitizeUrl=o;var e=tb();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var a=n.replace(e.ctrlCharactersRegex,"");return a.replace(e.htmlEntitiesRegex,function(h,c){return String.fromCharCode(c)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function o(n){if(!n)return e.BLANK_URL;var a,h=s(n.trim());do h=r(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=s(h),a=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var c=h;if(!c)return e.BLANK_URL;if(t(c))return c;var l=c.trimStart(),d=l.match(e.urlSchemeRegex);if(!d)return c;var u=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var f=l.replace(/\\/g,"/");if(u==="mailto:"||u.includes("://"))return f;if(u==="http:"||u==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Zs}var rb=eb(),Mn="http://www.w3.org/1999/xhtml",Lc={svg:"http://www.w3.org/2000/svg",xhtml:Mn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Au(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Lc.hasOwnProperty(t)?{space:Lc[t],local:e}:e}function ib(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Mn&&t.documentElement.namespaceURI===Mn?t.createElement(e):t.createElementNS(r,e)}}function sb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Eu(e){var t=Au(e);return(t.local?sb:ib)(t)}function ob(){}function Mu(e){return e==null?ob:function(){return this.querySelector(e)}}function ab(e){typeof e!="function"&&(e=Mu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],n=o.length,a=i[s]=new Array(n),h,c,l=0;l<n;++l)(h=o[l])&&(c=e.call(h,h.__data__,l,o))&&("__data__"in h&&(c.__data__=h.__data__),a[l]=c);return new Ie(i,this._parents)}function nb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lb(){return[]}function hb(e){return e==null?lb:function(){return this.querySelectorAll(e)}}function cb(e){return function(){return nb(e.apply(this,arguments))}}function db(e){typeof e=="function"?e=cb(e):e=hb(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var n=t[o],a=n.length,h,c=0;c<a;++c)(h=n[c])&&(i.push(e.call(h,h.__data__,c,n)),s.push(h));return new Ie(i,s)}function ub(e){return function(){return this.matches(e)}}function $u(e){return function(t){return t.matches(e)}}var pb=Array.prototype.find;function fb(e){return function(){return pb.call(this.children,e)}}function gb(){return this.firstElementChild}function mb(e){return this.select(e==null?gb:fb(typeof e=="function"?e:$u(e)))}var yb=Array.prototype.filter;function Cb(){return Array.from(this.children)}function xb(e){return function(){return yb.call(this.children,e)}}function bb(e){return this.selectAll(e==null?Cb:xb(typeof e=="function"?e:$u(e)))}function kb(e){typeof e!="function"&&(e=ub(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],n=o.length,a=i[s]=[],h,c=0;c<n;++c)(h=o[c])&&e.call(h,h.__data__,c,o)&&a.push(h);return new Ie(i,this._parents)}function Ou(e){return new Array(e.length)}function Sb(){return new Ie(this._enter||this._groups.map(Ou),this._parents)}function Fo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fo.prototype={constructor:Fo,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 wb(e){return function(){return e}}function Tb(e,t,r,i,s,o){for(var n=0,a,h=t.length,c=o.length;n<c;++n)(a=t[n])?(a.__data__=o[n],i[n]=a):r[n]=new Fo(e,o[n]);for(;n<h;++n)(a=t[n])&&(s[n]=a)}function _b(e,t,r,i,s,o,n){var a,h,c=new Map,l=t.length,d=o.length,u=new Array(l),f;for(a=0;a<l;++a)(h=t[a])&&(u[a]=f=n.call(h,h.__data__,a,t)+"",c.has(f)?s[a]=h:c.set(f,h));for(a=0;a<d;++a)f=n.call(e,o[a],a,o)+"",(h=c.get(f))?(i[a]=h,h.__data__=o[a],c.delete(f)):r[a]=new Fo(e,o[a]);for(a=0;a<l;++a)(h=t[a])&&c.get(u[a])===h&&(s[a]=h)}function Bb(e){return e.__data__}function vb(e,t){if(!arguments.length)return Array.from(this,Bb);var r=t?_b:Tb,i=this._parents,s=this._groups;typeof e!="function"&&(e=wb(e));for(var o=s.length,n=new Array(o),a=new Array(o),h=new Array(o),c=0;c<o;++c){var l=i[c],d=s[c],u=d.length,f=Lb(e.call(l,l&&l.__data__,c,i)),m=f.length,y=a[c]=new Array(m),C=n[c]=new Array(m),x=h[c]=new Array(u);r(l,d,y,C,x,f,t);for(var b=0,S=0,T,v;b<m;++b)if(T=y[b]){for(b>=S&&(S=b+1);!(v=C[S])&&++S<m;);T._next=v||null}}return n=new Ie(n,i),n._enter=a,n._exit=h,n}function Lb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fb(){return new Ie(this._exit||this._groups.map(Ou),this._parents)}function Ab(e,t,r){var i=this.enter(),s=this,o=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?o.remove():r(o),i&&s?i.merge(s).order():s}function Eb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,n=Math.min(s,o),a=new Array(s),h=0;h<n;++h)for(var c=r[h],l=i[h],d=c.length,u=a[h]=new Array(d),f,m=0;m<d;++m)(f=c[m]||l[m])&&(u[m]=f);for(;h<s;++h)a[h]=r[h];return new Ie(a,this._parents)}function Mb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],n;--s>=0;)(n=i[s])&&(o&&n.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(n,o),o=n);return this}function $b(e){e||(e=Ob);function t(d,u){return d&&u?e(d.__data__,u.__data__):!d-!u}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var n=r[o],a=n.length,h=s[o]=new Array(a),c,l=0;l<a;++l)(c=n[l])&&(h[l]=c);h.sort(t)}return new Ie(s,this._parents).order()}function Ob(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Db(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ib(){return Array.from(this)}function Pb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var n=i[s];if(n)return n}return null}function Rb(){let e=0;for(const t of this)++e;return e}function qb(){return!this.node()}function Nb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,n=s.length,a;o<n;++o)(a=s[o])&&e.call(a,a.__data__,o,s);return this}function Wb(e){return function(){this.removeAttribute(e)}}function zb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Hb(e,t){return function(){this.setAttribute(e,t)}}function Yb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ub(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function jb(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 Gb(e,t){var r=Au(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?zb:Wb:typeof t=="function"?r.local?jb:Ub:r.local?Yb:Hb)(r,t))}function Du(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vb(e){return function(){this.style.removeProperty(e)}}function Xb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Zb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Kb(e,t,r){return arguments.length>1?this.each((t==null?Vb:typeof t=="function"?Zb:Xb)(e,t,r??"")):Qb(this.node(),e)}function Qb(e,t){return e.style.getPropertyValue(t)||Du(e).getComputedStyle(e,null).getPropertyValue(t)}function Jb(e){return function(){delete this[e]}}function tk(e,t){return function(){this[e]=t}}function ek(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function rk(e,t){return arguments.length>1?this.each((t==null?Jb:typeof t=="function"?ek:tk)(e,t)):this.node()[e]}function Iu(e){return e.trim().split(/^|\s+/)}function Al(e){return e.classList||new Pu(e)}function Pu(e){this._node=e,this._names=Iu(e.getAttribute("class")||"")}Pu.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 Ru(e,t){for(var r=Al(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function qu(e,t){for(var r=Al(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function ik(e){return function(){Ru(this,e)}}function sk(e){return function(){qu(this,e)}}function ok(e,t){return function(){(t.apply(this,arguments)?Ru:qu)(this,e)}}function ak(e,t){var r=Iu(e+"");if(arguments.length<2){for(var i=Al(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?ok:t?ik:sk)(r,t))}function nk(){this.textContent=""}function lk(e){return function(){this.textContent=e}}function hk(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ck(e){return arguments.length?this.each(e==null?nk:(typeof e=="function"?hk:lk)(e)):this.node().textContent}function dk(){this.innerHTML=""}function uk(e){return function(){this.innerHTML=e}}function pk(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function fk(e){return arguments.length?this.each(e==null?dk:(typeof e=="function"?pk:uk)(e)):this.node().innerHTML}function gk(){this.nextSibling&&this.parentNode.appendChild(this)}function mk(){return this.each(gk)}function yk(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ck(){return this.each(yk)}function xk(e){var t=typeof e=="function"?e:Eu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function bk(){return null}function kk(e,t){var r=typeof e=="function"?e:Eu(e),i=t==null?bk:typeof t=="function"?t:Mu(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Sk(){var e=this.parentNode;e&&e.removeChild(this)}function wk(){return this.each(Sk)}function Tk(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _k(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bk(e){return this.select(e?_k:Tk)}function vk(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Lk(e){return function(t){e.call(this,t,this.__data__)}}function Fk(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 Ak(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function Ek(e,t,r){return function(){var i=this.__on,s,o=Lk(t);if(i){for(var n=0,a=i.length;n<a;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function Mk(e,t,r){var i=Fk(e+""),s,o=i.length,n;if(arguments.length<2){var a=this.node().__on;if(a){for(var h=0,c=a.length,l;h<c;++h)for(s=0,l=a[h];s<o;++s)if((n=i[s]).type===l.type&&n.name===l.name)return l.value}return}for(a=t?Ek:Ak,s=0;s<o;++s)this.each(a(i[s],t,r));return this}function Nu(e,t,r){var i=Du(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 $k(e,t){return function(){return Nu(this,e,t)}}function Ok(e,t){return function(){return Nu(this,e,t.apply(this,arguments))}}function Dk(e,t){return this.each((typeof t=="function"?Ok:$k)(e,t))}function*Ik(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,n;s<o;++s)(n=i[s])&&(yield n)}var Pk=[null];function Ie(e,t){this._groups=e,this._parents=t}function Rk(){return this}Ie.prototype={constructor:Ie,select:ab,selectAll:db,selectChild:mb,selectChildren:bb,filter:kb,data:vb,enter:Sb,exit:Fb,join:Ab,merge:Eb,selection:Rk,order:Mb,sort:$b,call:Db,nodes:Ib,node:Pb,size:Rb,empty:qb,each:Nb,attr:Gb,style:Kb,property:rk,classed:ak,text:ck,html:fk,raise:mk,lower:Ck,append:xk,insert:kk,remove:wk,clone:Bk,datum:vk,on:Mk,dispatch:Dk,[Symbol.iterator]:Ik};function $t(e){return typeof e=="string"?new Ie([[document.querySelector(e)]],[document.documentElement]):new Ie([[e]],Pk)}var qk=0;function Fc(){this._="@"+(++qk).toString(36)}Fc.prototype={constructor:Fc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const us=Math.PI,$n=2*us,Xr=1e-6,Nk=$n-Xr;function Wu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Wk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Wu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}function zu(e,t,r,i){return e===r&&t===i}function zk(e){const t=Math.floor(e);if(!(t<=15))return zu;const r=10**t,i=function(s){return Math.round(s*r)};return function(s,o,n,a){return i(s)===i(n)&&i(o)===i(a)}}class Hk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Wu:Wk(t),this._equal=t==null?zu:zk(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,o,n){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+n}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let n=this._x1,a=this._y1,h=i-t,c=s-r,l=n-t,d=a-r,u=l*l+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(u>Xr)if(!(Math.abs(d*h-c*l)>Xr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-n,m=s-a,y=h*h+c*c,C=f*f+m*m,x=Math.sqrt(y),b=Math.sqrt(u),S=o*Math.tan((us-Math.acos((y+u-C)/(2*x*b)))/2),T=S/b,v=S/x;Math.abs(T-1)>Xr&&this._append`L${t+T*l},${r+T*d}`,this._append`A${o},${o},0,0,${+(d*f>l*m)},${this._x1=t+v*h},${this._y1=r+v*c}`}}arc(t,r,i,s,o,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(s),h=i*Math.sin(s),c=t+a,l=r+h,d=1^n,u=n?s-o:o-s;if(this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Xr||Math.abs(this._y1-l)>Xr)&&this._append`L${c},${l}`,!!i){if(u<0&&(u=u%$n+$n),u>Nk)this._append`A${i},${i},0,1,${d},${t-a},${r-h}A${i},${i},0,1,${d},${this._x1=c},${this._y1=l}`;else if(u>Xr){const f=t+i*Math.cos(o),m=r+i*Math.sin(o);if(u>=us&&this._equal(c,l,f,m)){u/=2;let y=s+u;this._append`A${i},${i},0,${+(u>=us)},${d},${t+i*Math.cos(y)},${r+i*Math.sin(y)}`}this._append`A${i},${i},0,${+(u>=us)},${d},${this._x1=f},${this._y1=m}`}}}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 te(e){return function(){return e}}const Ac=Math.abs,ye=Math.atan2,Ur=Math.cos,Yk=Math.max,an=Math.min,Je=Math.sin,ki=Math.sqrt,xe=1e-12,Ls=Math.PI,Ao=Ls/2,uo=2*Ls;function Uk(e){return e>1?0:e<-1?Ls:Math.acos(e)}function Ec(e){return e>=1?Ao:e<=-1?-Ao:Math.asin(e)}function Hu(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 Hk(t)}function jk(e){return e.innerRadius}function Gk(e){return e.outerRadius}function Vk(e){return e.startAngle}function Xk(e){return e.endAngle}function Zk(e){return e&&e.padAngle}function Kk(e,t,r,i,s,o,n,a){var h=r-e,c=i-t,l=n-s,d=a-o,u=d*h-l*c;if(!(u*u<xe))return u=(l*(t-o)-d*(e-s))/u,[e+u*h,t+u*c]}function Ks(e,t,r,i,s,o,n){var a=e-r,h=t-i,c=(n?o:-o)/ki(a*a+h*h),l=c*h,d=-c*a,u=e+l,f=t+d,m=r+l,y=i+d,C=(u+m)/2,x=(f+y)/2,b=m-u,S=y-f,T=b*b+S*S,v=s-o,B=u*y-m*f,L=(S<0?-1:1)*ki(Yk(0,v*v*T-B*B)),F=(B*S-b*L)/T,q=(-B*b-S*L)/T,R=(B*S+b*L)/T,$=(-B*b+S*L)/T,G=F-C,M=q-x,E=R-C,D=$-x;return G*G+M*M>E*E+D*D&&(F=R,q=$),{cx:F,cy:q,x01:-l,y01:-d,x11:F*(s/v-1),y11:q*(s/v-1)}}function iF(){var e=jk,t=Gk,r=te(0),i=null,s=Vk,o=Xk,n=Zk,a=null,h=Hu(c);function c(){var l,d,u=+e.apply(this,arguments),f=+t.apply(this,arguments),m=s.apply(this,arguments)-Ao,y=o.apply(this,arguments)-Ao,C=Ac(y-m),x=y>m;if(a||(a=l=h()),f<u&&(d=f,f=u,u=d),!(f>xe))a.moveTo(0,0);else if(C>uo-xe)a.moveTo(f*Ur(m),f*Je(m)),a.arc(0,0,f,m,y,!x),u>xe&&(a.moveTo(u*Ur(y),u*Je(y)),a.arc(0,0,u,y,m,x));else{var b=m,S=y,T=m,v=y,B=C,L=C,F=n.apply(this,arguments)/2,q=F>xe&&(i?+i.apply(this,arguments):ki(u*u+f*f)),R=an(Ac(f-u)/2,+r.apply(this,arguments)),$=R,G=R,M,E;if(q>xe){var D=Ec(q/u*Je(F)),A=Ec(q/f*Je(F));(B-=D*2)>xe?(D*=x?1:-1,T+=D,v-=D):(B=0,T=v=(m+y)/2),(L-=A*2)>xe?(A*=x?1:-1,b+=A,S-=A):(L=0,b=S=(m+y)/2)}var z=f*Ur(b),W=f*Je(b),tt=u*Ur(v),V=u*Je(v);if(R>xe){var lt=f*Ur(S),xt=f*Je(S),bt=u*Ur(T),_t=u*Je(T),mt;if(C<Ls)if(mt=Kk(z,W,bt,_t,lt,xt,tt,V)){var ft=z-mt[0],ht=W-mt[1],Tt=lt-mt[0],It=xt-mt[1],kt=1/Je(Uk((ft*Tt+ht*It)/(ki(ft*ft+ht*ht)*ki(Tt*Tt+It*It)))/2),Pt=ki(mt[0]*mt[0]+mt[1]*mt[1]);$=an(R,(u-Pt)/(kt-1)),G=an(R,(f-Pt)/(kt+1))}else $=G=0}L>xe?G>xe?(M=Ks(bt,_t,z,W,f,G,x),E=Ks(lt,xt,tt,V,f,G,x),a.moveTo(M.cx+M.x01,M.cy+M.y01),G<R?a.arc(M.cx,M.cy,G,ye(M.y01,M.x01),ye(E.y01,E.x01),!x):(a.arc(M.cx,M.cy,G,ye(M.y01,M.x01),ye(M.y11,M.x11),!x),a.arc(0,0,f,ye(M.cy+M.y11,M.cx+M.x11),ye(E.cy+E.y11,E.cx+E.x11),!x),a.arc(E.cx,E.cy,G,ye(E.y11,E.x11),ye(E.y01,E.x01),!x))):(a.moveTo(z,W),a.arc(0,0,f,b,S,!x)):a.moveTo(z,W),!(u>xe)||!(B>xe)?a.lineTo(tt,V):$>xe?(M=Ks(tt,V,lt,xt,u,-$,x),E=Ks(z,W,bt,_t,u,-$,x),a.lineTo(M.cx+M.x01,M.cy+M.y01),$<R?a.arc(M.cx,M.cy,$,ye(M.y01,M.x01),ye(E.y01,E.x01),!x):(a.arc(M.cx,M.cy,$,ye(M.y01,M.x01),ye(M.y11,M.x11),!x),a.arc(0,0,u,ye(M.cy+M.y11,M.cx+M.x11),ye(E.cy+E.y11,E.cx+E.x11),x),a.arc(E.cx,E.cy,$,ye(E.y11,E.x11),ye(E.y01,E.x01),!x))):a.arc(0,0,u,v,T,x)}if(a.closePath(),l)return a=null,l+""||null}return c.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+s.apply(this,arguments)+ +o.apply(this,arguments))/2-Ls/2;return[Ur(d)*l,Je(d)*l]},c.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:te(+l),c):e},c.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:te(+l),c):t},c.cornerRadius=function(l){return arguments.length?(r=typeof l=="function"?l:te(+l),c):r},c.padRadius=function(l){return arguments.length?(i=l==null?null:typeof l=="function"?l:te(+l),c):i},c.startAngle=function(l){return arguments.length?(s=typeof l=="function"?l:te(+l),c):s},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:te(+l),c):o},c.padAngle=function(l){return arguments.length?(n=typeof l=="function"?l:te(+l),c):n},c.context=function(l){return arguments.length?(a=l??null,c):a},c}function Yu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uu(e){this._context=e}Uu.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 Uu(e)}function Qk(e){return e[0]}function Jk(e){return e[1]}function t1(e,t){var r=te(!0),i=null,s=ws,o=null,n=Hu(a);e=typeof e=="function"?e:e===void 0?Qk:te(e),t=typeof t=="function"?t:t===void 0?Jk:te(t);function a(h){var c,l=(h=Yu(h)).length,d,u=!1,f;for(i==null&&(o=s(f=n())),c=0;c<=l;++c)!(c<l&&r(d=h[c],c,h))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(d,c,h),+t(d,c,h));if(f)return o=null,f+""||null}return a.x=function(h){return arguments.length?(e=typeof h=="function"?h:te(+h),a):e},a.y=function(h){return arguments.length?(t=typeof h=="function"?h:te(+h),a):t},a.defined=function(h){return arguments.length?(r=typeof h=="function"?h:te(!!h),a):r},a.curve=function(h){return arguments.length?(s=h,i!=null&&(o=s(i)),a):s},a.context=function(h){return arguments.length?(h==null?i=o=null:o=s(i=h),a):i},a}function e1(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function r1(e){return e}function sF(){var e=r1,t=e1,r=null,i=te(0),s=te(uo),o=te(0);function n(a){var h,c=(a=Yu(a)).length,l,d,u=0,f=new Array(c),m=new Array(c),y=+i.apply(this,arguments),C=Math.min(uo,Math.max(-uo,s.apply(this,arguments)-y)),x,b=Math.min(Math.abs(C)/c,o.apply(this,arguments)),S=b*(C<0?-1:1),T;for(h=0;h<c;++h)(T=m[f[h]=h]=+e(a[h],h,a))>0&&(u+=T);for(t!=null?f.sort(function(v,B){return t(m[v],m[B])}):r!=null&&f.sort(function(v,B){return r(a[v],a[B])}),h=0,d=u?(C-c*S)/u:0;h<c;++h,y=x)l=f[h],T=m[l],x=y+(T>0?T*d:0)+S,m[l]={data:a[l],index:h,value:T,startAngle:y,endAngle:x,padAngle:b};return m}return n.value=function(a){return arguments.length?(e=typeof a=="function"?a:te(+a),n):e},n.sortValues=function(a){return arguments.length?(t=a,r=null,n):t},n.sort=function(a){return arguments.length?(r=a,t=null,n):r},n.startAngle=function(a){return arguments.length?(i=typeof a=="function"?a:te(+a),n):i},n.endAngle=function(a){return arguments.length?(s=typeof a=="function"?a:te(+a),n):s},n.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:te(+a),n):o},n}class ju{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 Gu(e){return new ju(e,!0)}function Vu(e){return new ju(e,!1)}function Rr(){}function Eo(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 Qo(e){this._context=e}Qo.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:Eo(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:Eo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function On(e){return new Qo(e)}function Xu(e){this._context=e}Xu.prototype={areaStart:Rr,areaEnd:Rr,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:Eo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function i1(e){return new Xu(e)}function Zu(e){this._context=e}Zu.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:Eo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s1(e){return new Zu(e)}function Ku(e,t){this._basis=new Qo(e),this._beta=t}Ku.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],o=e[r]-i,n=t[r]-s,a=-1,h;++a<=r;)h=a/r,this._basis.point(this._beta*e[a]+(1-this._beta)*(i+h*o),this._beta*t[a]+(1-this._beta)*(s+h*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var o1=(function e(t){function r(i){return t===1?new Qo(i):new Ku(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Mo(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 El(e,t){this._context=e,this._k=(1-t)/6}El.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:Mo(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:Mo(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}};var Qu=(function e(t){function r(i){return new El(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ml(e,t){this._context=e,this._k=(1-t)/6}Ml.prototype={areaStart:Rr,areaEnd:Rr,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:Mo(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}};var a1=(function e(t){function r(i){return new Ml(i,t)}return r.tension=function(i){return e(+i)},r})(0);function $l(e,t){this._context=e,this._k=(1-t)/6}$l.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:Mo(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}};var n1=(function e(t){function r(i){return new $l(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ol(e,t,r){var i=e._x1,s=e._y1,o=e._x2,n=e._y2;if(e._l01_a>xe){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,s=(s*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>xe){var c=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);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,n=(n*c+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,o,n,e._x2,e._y2)}function Ju(e,t){this._context=e,this._alpha=t}Ju.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:Ol(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}};var tp=(function e(t){function r(i){return t?new Ju(i,t):new El(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ep(e,t){this._context=e,this._alpha=t}ep.prototype={areaStart:Rr,areaEnd:Rr,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:Ol(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}};var l1=(function e(t){function r(i){return t?new ep(i,t):new Ml(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rp(e,t){this._context=e,this._alpha=t}rp.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:Ol(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}};var h1=(function e(t){function r(i){return t?new rp(i,t):new $l(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ip(e){this._context=e}ip.prototype={areaStart:Rr,areaEnd:Rr,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 c1(e){return new ip(e)}function Mc(e){return e<0?-1:1}function $c(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),a=(o*s+n*i)/(i+s);return(Mc(o)+Mc(n))*Math.min(Math.abs(o),Math.abs(n),.5*Math.abs(a))||0}function Oc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function nn(e,t,r){var i=e._x0,s=e._y0,o=e._x1,n=e._y1,a=(o-i)/3;e._context.bezierCurveTo(i+a,s+a*t,o-a,n-a*r,o,n)}function $o(e){this._context=e}$o.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:nn(this,this._t0,Oc(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,nn(this,Oc(this,r=$c(this,e,t)),r);break;default:nn(this,this._t0,r=$c(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sp(e){this._context=new op(e)}(sp.prototype=Object.create($o.prototype)).point=function(e,t){$o.prototype.point.call(this,t,e)};function op(e){this._context=e}op.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,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function ap(e){return new $o(e)}function np(e){return new sp(e)}function lp(e){this._context=e}lp.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=Dc(e),s=Dc(t),o=0,n=1;n<r;++o,++n)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[n],t[n]);(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 Dc(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),n=new Array(r);for(s[0]=0,o[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function hp(e){return new lp(e)}function Jo(e,t){this._context=e,this._t=t}Jo.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 cp(e){return new Jo(e,.5)}function dp(e){return new Jo(e,0)}function up(e){return new Jo(e,1)}function ln(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){var t;const i=e[Symbol.toStringTag];return i==null||!(!((t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))===null||t===void 0)&&t.writable)?!1:e.toString()===`[object ${i}]`}let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function d1(e){return Number.isSafeInteger(e)&&e>=0}function pp(e){return e!=null&&typeof e!="function"&&d1(e.length)}function u1(e){return e==="__proto__"}const p1=Object.prototype.hasOwnProperty;function Ic(e,t){return p1.call(e,t)}function Dl(e){return e==null||typeof e!="object"&&typeof e!="function"}function fp(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const f1="[object RegExp]",gp="[object String]",mp="[object Number]",yp="[object Boolean]",Cp="[object Arguments]",g1="[object Symbol]",m1="[object Date]",y1="[object Map]",C1="[object Set]",x1="[object Array]",b1="[object ArrayBuffer]",k1="[object Object]",S1="[object DataView]",w1="[object Uint8Array]",T1="[object Uint8ClampedArray]",_1="[object Uint16Array]",B1="[object Uint32Array]",v1="[object Int8Array]",L1="[object Int16Array]",F1="[object Int32Array]",A1="[object Float32Array]",E1="[object Float64Array]",Pc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Il(e){return typeof Pc.Buffer<"u"&&Pc.Buffer.isBuffer(e)}function M1(e){return Il(e)}function xp(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ts(e){return xp(e)}function bp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function $1(e,t){return Si(e,void 0,e,new Map)}function Si(e,t,r,i,s){if(Dl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const n=new Array(e.length);i.set(e,n);for(let a=0;a<e.length;a++)n[a]=Si(e[a],a,r,i);return Ic(e,"index")&&(n.index=e.index),Ic(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;return i.set(e,n),e.forEach((a,h)=>{n.set(h,Si(a,h,r,i))}),n}if(e instanceof Set){const n=new Set;return i.set(e,n),e.forEach(a=>{n.add(Si(a,void 0,r,i))}),n}if(M1(e))return e.subarray();if(Ts(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,n);for(let a=0;a<e.length;a++)n[a]=Si(e[a],a,r,i);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,n),ui(n,e,r,i),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return i.set(e,n),ui(n,e,r,i),n}if(typeof Blob<"u"&&e instanceof Blob){const n=new Blob([e],{type:e.type});return i.set(e,n),ui(n,e,r,i),n}const o=fp(e);if(o==="[object Error]")return e===r?{}:e;switch(o){case mp:case gp:case yp:{const n=new e.constructor(e.valueOf());return i.set(e,n),ui(n,e,r,i),n}case Cp:{const n={};return i.set(e,n),ui(n,e,r,i),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}}if(typeof e=="object"&&O1(o)){const n=o==="[object Object]"&&typeof e.constructor!="function"?{}:Object.create(Object.getPrototypeOf(e));return i.set(e,n),ui(n,e,r,i),n}return e}function ui(e,t,r,i,s){const o=[...Object.keys(t),...bp(t)];for(let n=0;n<o.length;n++){const a=o[n],h=Object.getOwnPropertyDescriptor(e,a);(h==null||h.writable)&&(e[a]=Si(t[a],a,r,i))}}function O1(e){switch(e){case Cp:case x1:case b1:case S1:case yp:case m1:case A1:case E1:case v1:case L1:case F1:case y1:case mp:case k1:case f1:case C1:case gp:case g1:case w1:case T1:case _1:case B1:return!0;default:return!1}}function Rc(e){return $1(e)}function Dn(e){return e!==null&&typeof e=="object"&&fp(e)==="[object Arguments]"}function In(e){return typeof e=="object"&&e!==null}function D1(e){return In(e)&&pp(e)}function I1(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function $s(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],o=r.cache;if(o.has(s))return o.get(s);const n=e.apply(this,i);return r.cache=o.set(s,n)||o,n};return r.cache=new($s.Cache||Map),r}$s.Cache=Map;function P1(e){if(Dl(e))return e;if(Array.isArray(e)||xp(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 typeof AggregateError<"u"&&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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function R1(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const n=r[o];s=po(s,n,i,new Map)}return s}function po(e,t,r,i){if(Dl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return P1(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)o in t||(t[o]=void 0)}const s=[...Object.keys(t),...bp(t)];for(let o=0;o<s.length;o++){const n=s[o];if(u1(n))continue;let a=t[n],h=e[n];if(Dn(a)&&(a=Object.assign({},a)),Dn(h)&&(h=Object.assign({},h)),Il(a)&&(a=Rc(a)),Array.isArray(a))if(Array.isArray(h)){const l=[],d=Reflect.ownKeys(h);for(let u=0;u<d.length;u++){const f=d[u];l[f]=h[f]}h=l}else if(D1(h)){const l=[];for(let d=0;d<h.length;d++)l[d]=h[d];h=l}else h=[];const c=r(h,a,n,e,t,i);c!==void 0?e[n]=c:Array.isArray(a)||In(h)&&In(a)&&(ln(h)||ln(a)||Ts(h)||Ts(a))?e[n]=po(h,a,r,i):h==null&&ln(a)?e[n]=po({},a,r,i):h==null&&Ts(a)?e[n]=Rc(a):(h===void 0||a!==void 0)&&(e[n]=a)}return e}function q1(){}function N1(e,...t){return R1(e,...t,q1)}function qc(e){if(e==null)return!0;if(pp(e))return typeof e.splice!="function"&&typeof e!="string"&&!Il(e)&&!Ts(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 I1(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var W1="",z1={curveBasis:On,curveBasisClosed:i1,curveBasisOpen:s1,curveBumpX:Gu,curveBumpY:Vu,curveBundle:o1,curveCardinalClosed:a1,curveCardinalOpen:n1,curveCardinal:Qu,curveCatmullRomClosed:l1,curveCatmullRomOpen:h1,curveCatmullRom:tp,curveLinear:ws,curveLinearClosed:c1,curveMonotoneX:ap,curveMonotoneY:np,curveNatural:hp,curveStep:cp,curveStepAfter:up,curveStepBefore:dp},H1=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y1=p(function(e,t){const r=kp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(a=>a.args);ko(n),i=re(i,[...n])}else i=r.args;if(!i)return;let s=Ko(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),kp=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${H1.source})(?=[}][%]{2}).*
|
|
162
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=bs.exec(e))!==null;)if(i.index===bs.lastIndex&&bs.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],n=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:n})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return J.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),U1=p(function(e){return e.replace(bs,"")},"removeDirectives"),j1=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Pl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return z1[r]??t}p(Pl,"interpolateToCurve");function Sp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?rb.sanitizeUrl(r):r}p(Sp,"formatUrl");var G1=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){J.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Rl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Rl,"distance");function wp(e){let t,r=0;e.forEach(s=>{r+=Rl(s,t),t=s});const i=r/2;return ql(e,i)}p(wp,"traverseEdge");function Tp(e){return e.length===1?e[0]:wp(e)}p(Tp,"calcLabelPosition");var Nc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),ql=p((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Rl(s,r);if(o===0)return r;if(o<i)i-=o;else{const n=i/o;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:Nc((1-n)*r.x+n*s.x,5),y:Nc((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),V1=p((e,t,r)=>{J.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=ql(t,25),o=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),a={x:0,y:0};return a.x=Math.sin(n)*o+(t[0].x+s.x)/2,a.y=-Math.cos(n)*o+(t[0].y+s.y)/2,a},"calcCardinalityPosition");function _p(e,t,r){const i=structuredClone(r);J.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=ql(i,s),n=10+e*.5,a=Math.atan2(i[0].y-o.y,i[0].x-o.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(a+Math.PI)*n+(i[0].x+o.x)/2,h.y=-Math.cos(a+Math.PI)*n+(i[0].y+o.y)/2):t==="end_right"?(h.x=Math.sin(a-Math.PI)*n+(i[0].x+o.x)/2,h.y=-Math.cos(a-Math.PI)*n+(i[0].y+o.y)/2):(h.x=Math.sin(a)*n+(i[0].x+o.x)/2,h.y=-Math.cos(a)*n+(i[0].y+o.y)/2),h}p(_p,"calcTerminalLabelPosition");function Bp(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(Bp,"getStylesFromArray");var Wc=0,X1=p(()=>(Wc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Wc),"generateId");function vp(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(vp,"makeRandomHex");var Z1=p(e=>vp(e.length),"random"),K1=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"),Q1=p(function(e,t){const r=t.text.replace(Ms.lineBreakRegex," "),[,i]=ta(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 o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),J1=$s((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ms.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((n,a)=>{const h=Sr(`${n} `,r),c=Sr(o,r);if(h>t){const{hyphenatedStrings:u,remainingWord:f}=t2(n,t,"-",r);s.push(o,...u),o=f}else c+h>=t?(s.push(o),o=n):o=[o,n].filter(Boolean).join(" ");a+1===i.length&&s.push(o)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),t2=$s((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let n="";return s.forEach((a,h)=>{const c=`${n}${a}`;if(Sr(c,i)>=t){const d=h+1,u=s.length===d,f=`${c}${r}`;o.push(u?c:f),n=""}else n=c}),{hyphenatedStrings:o,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Lp(e,t){return Nl(e,t).height}p(Lp,"calculateTextHeight");function Sr(e,t){return Nl(e,t).width}p(Sr,"calculateTextWidth");var Nl=$s((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=ta(r),n=["sans-serif",i],a=e.split(Ms.lineBreakRegex),h=[],c=$t("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const l=c.append("svg");for(const u of n){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of a){const C=K1();C.text=y||W1;const x=Q1(l,C).style("font-size",o).style("font-weight",s).style("font-family",u),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)),f=Math.round(b.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}h.push(m)}l.remove();const d=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ni,e2=(Ni=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ni,"InitIDGenerator"),Ni),Qs,r2=p(function(e){return Qs=Qs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Qs.innerHTML=e,unescape(Qs.textContent)},"entityDecode");function Wl(e){return"str"in e}p(Wl,"isDetailedError");function Fp(e){return e instanceof Error?e.message:String(e)}p(Fp,"getErrorMessage");var i2=p((e,t,r,i)=>{if(!i)return;const s=e.node()?.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"),ta=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 N1({},e,t)}p(zl,"cleanAndMerge");var Fe={assignWithDepth:re,wrapLabel:J1,calculateTextHeight:Lp,calculateTextWidth:Sr,calculateTextDimensions:Nl,cleanAndMerge:zl,detectInit:Y1,detectDirective:kp,isSubstringInArray:j1,interpolateToCurve:Pl,calcLabelPosition:Tp,calcCardinalityPosition:V1,calcTerminalLabelPosition:_p,formatUrl:Sp,getStylesFromArray:Bp,generateId:X1,random:Z1,runFunc:G1,entityDecode:r2,insertTitle:i2,isLabelCoordinateInPath:Ap,parseFontSize:ta,InitIDGenerator:e2},s2=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"),qr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),oF=p((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ie(e){return e??null}p(ie,"handleUndefinedAttr");function Ap(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Ap,"isLabelCoordinateInPath");function Hl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ni=Hl();function Ep(e){ni=e}var _s={exec:()=>null};function Wt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let n=typeof o=="string"?o:o.source;return n=n.replace(we.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var o2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),we={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")},a2=/^(?:[ \t]*(?:\n|$))+/,n2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,l2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Os=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,h2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yl=/(?:[*+-]|\d{1,9}[.)])/,Mp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$p=Wt(Mp).replace(/bull/g,Yl).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(),c2=Wt(Mp).replace(/bull/g,Yl).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(),Ul=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,d2=/^[^\n]+/,jl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,u2=Wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p2=Wt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yl).getRegex(),ea="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",Gl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,f2=Wt("^ {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",Gl).replace("tag",ea).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Op=Wt(Ul).replace("hr",Os).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",ea).getRegex(),g2=Wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Op).getRegex(),Vl={blockquote:g2,code:n2,def:u2,fences:l2,heading:h2,hr:Os,html:f2,lheading:$p,list:p2,newline:a2,paragraph:Op,table:_s,text:d2},zc=Wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Os).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",ea).getRegex(),m2={...Vl,lheading:c2,table:zc,paragraph:Wt(Ul).replace("hr",Os).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zc).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",ea).getRegex()},y2={...Vl,html:Wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gl).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:_s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wt(Ul).replace("hr",Os).replace("heading",` *#{1,6} *[^
|
|
163
|
+
]`).replace("lheading",$p).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},C2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,x2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dp=/^( {2,}|\\)\n(?!\s*$)/,b2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ra=/[\p{P}\p{S}]/u,Xl=/[\s\p{P}\p{S}]/u,Ip=/[^\s\p{P}\p{S}]/u,k2=Wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xl).getRegex(),Pp=/(?!~)[\p{P}\p{S}]/u,S2=/(?!~)[\s\p{P}\p{S}]/u,w2=/(?:[^\s\p{P}\p{S}]|~)/u,T2=Wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",o2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Rp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_2=Wt(Rp,"u").replace(/punct/g,ra).getRegex(),B2=Wt(Rp,"u").replace(/punct/g,Pp).getRegex(),qp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",v2=Wt(qp,"gu").replace(/notPunctSpace/g,Ip).replace(/punctSpace/g,Xl).replace(/punct/g,ra).getRegex(),L2=Wt(qp,"gu").replace(/notPunctSpace/g,w2).replace(/punctSpace/g,S2).replace(/punct/g,Pp).getRegex(),F2=Wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ip).replace(/punctSpace/g,Xl).replace(/punct/g,ra).getRegex(),A2=Wt(/\\(punct)/,"gu").replace(/punct/g,ra).getRegex(),E2=Wt(/^<(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(),M2=Wt(Gl).replace("(?:-->|$)","-->").getRegex(),$2=Wt("^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",M2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,O2=Wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Oo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Np=Wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Oo).replace("ref",jl).getRegex(),Wp=Wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",jl).getRegex(),D2=Wt("reflink|nolink(?!\\()","g").replace("reflink",Np).replace("nolink",Wp).getRegex(),Hc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zl={_backpedal:_s,anyPunctuation:A2,autolink:E2,blockSkip:T2,br:Dp,code:x2,del:_s,emStrongLDelim:_2,emStrongRDelimAst:v2,emStrongRDelimUnd:F2,escape:C2,link:O2,nolink:Wp,punctuation:k2,reflink:Np,reflinkSearch:D2,tag:$2,text:b2,url:_s},I2={...Zl,link:Wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Oo).getRegex(),reflink:Wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oo).getRegex()},Pn={...Zl,emStrongRDelimAst:L2,emStrongLDelim:B2,url:Wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Hc).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:Wt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Hc).getRegex()},P2={...Pn,br:Wt(Dp).replace("{2,}","*").getRegex(),text:Wt(Pn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Js={normal:Vl,gfm:m2,pedantic:y2},es={normal:Zl,gfm:Pn,breaks:P2,pedantic:I2},R2={"&":"&","<":"<",">":">",'"':""","'":"'"},Yc=e=>R2[e];function er(e,t){if(t){if(we.escapeTest.test(e))return e.replace(we.escapeReplace,Yc)}else if(we.escapeTestNoEncode.test(e))return e.replace(we.escapeReplaceNoEncode,Yc);return e}function Uc(e){try{e=encodeURI(e).replace(we.percentDecode,"%")}catch{return null}return e}function jc(e,t){let r=e.replace(we.findPipe,(o,n,a)=>{let h=!1,c=n;for(;--c>=0&&a[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(we.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.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(we.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 q2(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 Gc(e,t,r,i,s){let o=t.href,n=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:n,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,h}function N2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
164
|
+
`).map(o=>{let n=o.match(r.other.beginningSpace);if(n===null)return o;let[a]=n;return a.length>=s.length?o.slice(s.length):o}).join(`
|
|
165
|
+
`)}var Do=class{options;rules;lexer;constructor(t){this.options=t||ni}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=N2(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="",o="",n=[];for(;i.length>0;){let a=!1,h=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))h.push(i[c]),a=!0;else if(!a)h.push(i[c]);else break;i=i.slice(c);let l=h.join(`
|
|
170
|
+
`),d=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
171
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
172
|
+
${l}`:l,o=o?`${o}
|
|
173
|
+
${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=u,i.length===0)break;let f=n.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
|
|
174
|
+
`+i.join(`
|
|
175
|
+
`),C=this.blockquote(y);n[n.length-1]=C,s=s.substring(0,s.length-m.raw.length)+C.raw,o=o.substring(0,o.length-m.text.length)+C.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
|
|
176
|
+
`+i.join(`
|
|
177
|
+
`),C=this.list(y);n[n.length-1]=C,s=s.substring(0,s.length-f.raw.length)+C.raw,o=o.substring(0,o.length-m.raw.length)+C.raw,i=y.substring(n.at(-1).raw.length).split(`
|
|
178
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={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 n=this.rules.other.listItemRegex(i),a=!1;for(;t;){let c=!1,l="",d="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let u=r[2].split(`
|
|
179
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
180
|
+
`,1)[0],m=!u.trim(),y=0;if(this.options.pedantic?(y=2,d=u.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=u.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(l+=f+`
|
|
181
|
+
`,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),B=this.rules.other.htmlBeginRegex(y);for(;t;){let L=t.split(`
|
|
182
|
+
`,1)[0],F;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),F=f):F=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||v.test(f)||B.test(f)||b.test(f)||S.test(f))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!f.trim())d+=`
|
|
183
|
+
`+F.slice(y);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(u)||v.test(u)||S.test(u))break;d+=`
|
|
184
|
+
`+f}!m&&!f.trim()&&(m=!0),l+=L+`
|
|
185
|
+
`,t=t.substring(L.length+1),u=F.slice(y)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(d),C&&(x=C[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:l,task:!!C,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=l}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let l=o.items[c].tokens.filter(u=>u.type==="space"),d=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}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"):"",o=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:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=jc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
186
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let a=0;a<i.length;a++)n.header.push({text:i[a],tokens:this.lexer.inline(i[a]),header:!0,align:n.align[a]});for(let a of o)n.rows.push(jc(a,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}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 n=rs(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=q2(r[2],"()");if(n===-2)return;if(n>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],o=n[3])}else o=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)),Gc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=r[s.toLowerCase()];if(!o){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return Gc(i,o,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 o=[...s[0]].length-1,n,a,h=o,c=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+o);(s=l.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(a=[...n].length,s[3]||s[4]){h+=a;continue}else if((s[5]||s[6])&&o%3&&!((o+a)%3)){c+=a;continue}if(h-=a,h>0)continue;a=Math.min(a,a+h+c);let d=[...s[0]][0].length,u=t.slice(0,o+s.index+d+a);if(Math.min(o,a)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}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),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(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){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}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}}}},Ye=class Rn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ni,this.options.tokenizer=this.options.tokenizer||new Do,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:we,block:Js.normal,inline:es.normal};this.options.pedantic?(r.block=Js.pedantic,r.inline=es.pedantic):this.options.gfm&&(r.block=Js.gfm,this.options.breaks?r.inline=es.breaks:r.inline=es.gfm),this.tokenizer.rules=r}static get rules(){return{block:Js,inline:es}}static lex(t,r){return new Rn(r).lex(t)}static lexInline(t,r){return new Rn(r).inlineTokens(t)}lex(t){t=t.replace(we.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){for(this.options.pedantic&&(t=t.replace(we.tabCharGlobal," ").replace(we.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(n=>(s=n.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let n=r.at(-1);s.raw.length===1&&n!==void 0?n.raw+=`
|
|
189
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let n=r.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+=(n.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+s.raw,n.text+=`
|
|
192
|
+
`+s.text,this.inlineQueue.at(-1).src=n.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let n=r.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+=(n.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+s.raw,n.text+=`
|
|
195
|
+
`+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let n=1/0,a=t.slice(1),h;this.options.extensions.startBlock.forEach(c=>{h=c.call({lexer:this},a),typeof h=="number"&&h>=0&&(n=Math.min(n,h))}),n<1/0&&n>=0&&(o=t.substring(0,n+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let n=r.at(-1);i&&n?.type==="paragraph"?(n.raw+=(n.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+s.raw,n.text+=`
|
|
198
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let n=r.at(-1);n?.type==="text"?(n.raw+=(n.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+s.raw,n.text+=`
|
|
201
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):r.push(s);continue}if(t){let n="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(n);break}else throw new Error(n)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.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 o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,a="";for(;t;){n||(a=""),n=!1;let h;if(this.options.extensions?.inline?.some(l=>(h=l.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let l=r.at(-1);h.type==="text"&&l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,a)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let c=t;if(this.options.extensions?.startInline){let l=1/0,d=t.slice(1),u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},d),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(h=this.tokenizer.inlineText(c)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),n=!0;let l=r.at(-1);l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return r}},Io=class{options;parser;constructor(t){this.options=t||ni}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(we.notSpaceStart)?.[0],o=t.replace(we.endingNewline,"")+`
|
|
202
|
+
`;return s?'<pre><code class="language-'+er(s)+'">'+(i?o:er(o,!0))+`</code></pre>
|
|
203
|
+
`:"<pre><code>"+(i?o:er(o,!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 a=0;a<t.items.length;a++){let h=t.items[a];s+=this.listitem(h)}let o=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+o+n+`>
|
|
209
|
+
`+s+"</"+o+`>
|
|
210
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+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=i+" "+er(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}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 o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let n=t.rows[o];i="";for(let a=0;a<n.length;a++)i+=this.tablecell(n[a]);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>${er(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),o=Uc(t);if(o===null)return s;t=o;let n='<a href="'+t+'"';return r&&(n+=' title="'+er(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Uc(t);if(o===null)return er(i);t=o;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${er(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:er(t.text)}},Kl=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""}},Ue=class qn{options;renderer;textRenderer;constructor(t){this.options=t||ni,this.options.renderer=this.options.renderer||new Io,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Kl}static parse(t,r){return new qn(r).parse(t)}static parseInline(t,r){return new qn(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let a=o,h=this.options.extensions.renderers[a.type].call({parser:this},a);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){i+=h||"";continue}}let n=o;switch(n.type){case"space":{i+=this.renderer.space(n);continue}case"hr":{i+=this.renderer.hr(n);continue}case"heading":{i+=this.renderer.heading(n);continue}case"code":{i+=this.renderer.code(n);continue}case"table":{i+=this.renderer.table(n);continue}case"blockquote":{i+=this.renderer.blockquote(n);continue}case"list":{i+=this.renderer.list(n);continue}case"html":{i+=this.renderer.html(n);continue}case"def":{i+=this.renderer.def(n);continue}case"paragraph":{i+=this.renderer.paragraph(n);continue}case"text":{let a=n,h=this.renderer.text(a);for(;s+1<t.length&&t[s+1].type==="text";)a=t[++s],h+=`
|
|
220
|
+
`+this.renderer.text(a);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}let n=o;switch(n.type){case"escape":{i+=r.text(n);break}case"html":{i+=r.html(n);break}case"link":{i+=r.link(n);break}case"image":{i+=r.image(n);break}case"strong":{i+=r.strong(n);break}case"em":{i+=r.em(n);break}case"codespan":{i+=r.codespan(n);break}case"br":{i+=r.br(n);break}case"del":{i+=r.del(n);break}case"text":{i+=r.text(n);break}default:{let a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},ps=class{options;block;constructor(t){this.options=t||ni}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},W2=class{defaults=Hl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ue;Renderer=Io;TextRenderer=Kl;Lexer=Ye;Tokenizer=Do;Hooks=ps;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let n of o.header)i=i.concat(this.walkTokens(n.tokens,r));for(let n of o.rows)for(let a of n)i=i.concat(this.walkTokens(a.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(n=>{let a=o[n].flat(1/0);i=i.concat(this.walkTokens(a,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let n=r.renderers[o.name];n?r.renderers[o.name]=function(...a){let h=o.renderer.apply(this,a);return h===!1&&(h=n.apply(this,a)),h}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[o.level];n?n.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Io(this.defaults);for(let n in i.renderer){if(!(n in o))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,h=i.renderer[a],c=o[a];o[a]=(...l)=>{let d=h.apply(o,l);return d===!1&&(d=c.apply(o,l)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Do(this.defaults);for(let n in i.tokenizer){if(!(n in o))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,h=i.tokenizer[a],c=o[a];o[a]=(...l)=>{let d=h.apply(o,l);return d===!1&&(d=c.apply(o,l)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ps;for(let n in i.hooks){if(!(n in o))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,h=i.hooks[a],c=o[a];ps.passThroughHooks.has(n)?o[a]=l=>{if(this.defaults.async&&ps.passThroughHooksRespectAsync.has(n))return(async()=>{let u=await h.call(o,l);return c.call(o,u)})();let d=h.call(o,l);return c.call(o,d)}:o[a]=(...l)=>{if(this.defaults.async)return(async()=>{let u=await h.apply(o,l);return u===!1&&(u=await c.apply(o,l)),u})();let d=h.apply(o,l);return d===!1&&(d=c.apply(o,l)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(a){let h=[];return h.push(n.call(this,a)),o&&(h=h.concat(o.call(this,a))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},n=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return n(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 n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let a=o.hooks?await o.hooks.preprocess(r):r,h=await(o.hooks?await o.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(a,o),c=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let l=await(o.hooks?await o.hooks.provideParser():t?Ue.parse:Ue.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(l):l})().catch(n);try{o.hooks&&(r=o.hooks.preprocess(r));let a=(o.hooks?o.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,o);o.hooks&&(a=o.hooks.processAllTokens(a)),o.walkTokens&&this.walkTokens(a,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():t?Ue.parse:Ue.parseInline)(a,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(a){return n(a)}}}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>"+er(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ii=new W2;function Ht(e,t){return ii.parse(e,t)}Ht.options=Ht.setOptions=function(e){return ii.setOptions(e),Ht.defaults=ii.defaults,Ep(Ht.defaults),Ht};Ht.getDefaults=Hl;Ht.defaults=ni;Ht.use=function(...e){return ii.use(...e),Ht.defaults=ii.defaults,Ep(Ht.defaults),Ht};Ht.walkTokens=function(e,t){return ii.walkTokens(e,t)};Ht.parseInline=ii.parseInline;Ht.Parser=Ue;Ht.parser=Ue.parse;Ht.Renderer=Io;Ht.TextRenderer=Kl;Ht.Lexer=Ye;Ht.lexer=Ye.lex;Ht.Tokenizer=Do;Ht.Hooks=ps;Ht.parse=Ht;Ht.options;Ht.setOptions;Ht.use;Ht.walkTokens;Ht.parseInline;Ue.parse;Ye.lex;function zp(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(a,h){var c=h.match(/\n([\t ]+|(?!\s).)/g);return c?a.concat(c.map(function(l){var d,u;return(u=(d=l.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&u!==void 0?u:0})):a},[]);if(s.length){var o=new RegExp(`
|
|
222
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(a){return a.replace(o,`
|
|
223
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(a,h){var c=n.match(/(?:^|\n)( *)$/),l=c?c[1]:"",d=a;typeof a=="string"&&a.includes(`
|
|
224
|
+
`)&&(d=String(a).split(`
|
|
225
|
+
`).map(function(u,f){return f===0?u:"".concat(l).concat(u)}).join(`
|
|
226
|
+
`)),n+=d+i[h+1]}),n}var Nn=typeof performance<"u"&&typeof performance.now=="function",pi=p(()=>Nn?performance.now():0,"now"),hn="🧜 ",z2="Mermaid render",H2="Mermaid",Y2={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Wi;Wi=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=pi();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(pi()-i)}}async tick(t,r){if(!this.enabled)return r();const i=pi();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(pi()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??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:pi(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Nn&&typeof performance.mark=="function")try{performance.mark(`${hn}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=pi();if(t.duration=r-t.start,Nn&&typeof performance.measure=="function")try{performance.measure(`${hn}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:z2,trackGroup:H2,color:Y2[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(){return this.records.at(-1)?.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,o=["ms % phase"],n=p((h,c)=>{const l=" ".repeat(c),d=h.duration.toFixed(1).padStart(8),u=i>0?`${(h.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${d} ${u} ${l}${h.name}`);for(const f of h.children)n(f,c+1);if(h.children.length>0){const f=h.children.reduce((y,C)=>y+C.duration,0),m=h.duration-f;if(m>.5){const y=m.toFixed(1).padStart(8);o.push(`${y} ${l} (self)`)}}},"walk");n(t,0);const a=Object.keys(this.buckets);if(a.length>0){o.push("—— buckets (summed) ——");for(const h of a)o.push(`${this.buckets[h].toFixed(1).padStart(8)} ${h}`)}console.log(`${hn}mermaid render profile · ${s}
|
|
227
|
+
${o.join(`
|
|
228
|
+
`)}`)}},p(Wi,"Profiler");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 zp(i)}p(Hp,"preprocessMarkdown");function Yp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(Yp,"nonMarkdownToLines");function Up(e,t={}){const r=Hp(e,t),i=Ht.lexer(r),s=[[]];let o=0;function n(a,h="normal"){a.type==="text"?a.text.split(`
|
|
231
|
+
`).forEach((l,d)=>{d!==0&&(o++,s.push([])),l.split(" ").forEach(u=>{u=u.replace(/'/g,"'"),u&&s[o].push({content:u,type:h})})}):a.type==="strong"||a.type==="em"?a.tokens.forEach(c=>{n(c,a.type)}):a.type==="html"&&s[o].push({content:a.text,type:"normal"})}return p(n,"processNode"),i.forEach(a=>{a.type==="paragraph"?a.tokens?.forEach(h=>{n(h)}):a.type==="html"?s[o].push({content:a.text,type:"normal"}):s[o].push({content:a.raw,type:"normal"})}),s}p(Up,"markdownToLines");function jp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(jp,"nonMarkdownToHTML");function Gp(e,{markdownAutoWrap:t}={}){const r=Ht.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.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(Gp,"markdownToHTML");var U2=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(c){return setTimeout(c,16)};function i(){var c=this;c.reads=[],c.writes=[],c.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(c){for(var l;l=c.shift();)l()},"runTasks"),measure:p(function(c,l){var d=l?c.bind(l):c;return this.reads.push(d),s(this),d},"measure"),mutate:p(function(c,l){var d=l?c.bind(l):c;return this.writes.push(d),s(this),d},"mutate"),clear:p(function(c){return n(this.reads,c)||n(this.writes,c)},"clear"),extend:p(function(c){if(typeof c!="object")throw new Error("expected object");var l=Object.create(this);return a(l,c),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(c){c.scheduled||(c.scheduled=!0,c.raf(o.bind(null,c)))}p(s,"scheduleFlush");function o(c){var l=c.writes,d=c.reads,u;try{t("flushing reads",d.length),c.runTasks(d),t("flushing writes",l.length),c.runTasks(l)}catch(f){u=f}if(c.scheduled=!1,(d.length||l.length)&&s(c),u)if(t("task errored",u.message),c.catch)c.catch(u);else throw u}p(o,"flush");function n(c,l){var d=c.indexOf(l);return!!~d&&!!c.splice(d,1)}p(n,"remove");function a(c,l){for(var d in l)l.hasOwnProperty(d)&&(c[d]=l[d])}p(a,"mixin");var h=e.fastdom=e.fastdom||new i;return h})(typeof window<"u"?window:globalThis),Vp={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return Wn(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return Wn(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 Wn(e,t,r,i){var s=e._tasks,o=e.fastdom,n,a=new Promise(function(h,c){n=o[t](function(){s.delete(a);try{h(i?r.call(i):r())}catch(l){c(l)}},i)});return s.set(a,n),a}p(Wn,"create");var{initialize:dF,mutate:uF,measure:pF,clear:fF}=Vp,j2=Vp,G2=U2.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(j2),si=G2;function Xp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Xp,"splitTextToChars");function Zp(e,t){const r=Xp(t.content);return Ql(e,[],r,t.type)}p(Zp,"splitWordToFitWidth");function Ql(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?Ql(e,n,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Ql,"splitWordToFitWidthRecursion");function Kp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Po(e,t)}p(Kp,"splitLineToFitWidth");function Po(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 o=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(o),t(n))return Po(e,t,r,n);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[a,h]=Zp(t,o);r.push([a]),h.content&&e.unshift(h)}return Po(e,t,r)}p(Po,"splitLineToFitWidthRecursion");function zn(e,t){t&&e.attr("style",t)}p(zn,"applyStyle");var Vc=16384;async function Qp(e,t,r,i,s=!1,o=Gt(),n=0){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Vc)}px`),a.attr("height",`${Math.min(10*r,Vc)}px`);const h=a.append("xhtml:div"),c=vs(t.label)?await Su(t.label.replace(Ms.lineBreakRegex,`
|
|
233
|
+
`),o):De(t.label,o),l=t.isNode?"nodeLabel":"edgeLabel",d=h.append("span");d.html(c),zn(d,t.labelStyle),d.attr("class",`${l} ${i}`),zn(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&h.attr("class","labelBkg");const u=await si.measure(()=>h.node().getBoundingClientRect());return u.width===r?(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px")):u.width<n&&(h.style("display","table"),h.style("width",n+"px"),h.style("text-align","center")),a.node()}p(Qp,"addHtmlSpan");function ia(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(ia,"createTspan");function Jp(e,t,r){const i=e.append("text"),s=ia(i,1,t);sa(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}p(Jp,"computeWidthOfText");function V2(e,t,r){const i=e.append("text"),s=ia(i,1,t);sa(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}p(V2,"computeDimensionOfText");function tf(e,t,r,i=!1,s=!1){const n=t.append("g"),a=n.insert("rect").attr("class","background").attr("style","stroke: none"),h=n.append("text").attr("y","-10.1");s&&h.attr("text-anchor","middle");let c=0;for(const l of r){const d=p(f=>Jp(n,1.1,f)<=e,"checkWidth"),u=d(l)?[l]:Kp(l,d);for(const f of u){const m=ia(h,c,1.1,s);sa(m,f),c++}}if(i){const l=h.node().getBBox(),d=2;return a.attr("x",l.x-d).attr("y",l.y-d).attr("width",l.width+2*d).attr("height",l.height+2*d),n.node()}else return h.node()}p(tf,"createFormattedText");function Hn(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(Hn,"decodeHTMLEntities");function sa(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(Hn(r.content)):s.text(" "+Hn(r.content))})}p(sa,"updateTextContentAndStyles");async function ef(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,n)=>(r.push((async()=>{const a=`${o}:${n}`;return await Fu(a)?await ai(a,void 0,{class:"label-icon"}):`<i class='${De(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(ef,"replaceIconSubstring");var Ae=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:n=!0,isNode:a=!0,width:h=200,minWidth:c=0,addSvgBackground:l=!1}={},d)=>{if(J.debug("XYZ createText",t,r,i,s,o,a,"addSvgBackground: ",l),o){const u=n?Gp(t,d):jp(t),f=await ef(qr(u),d),m=t.replace(/\\\\/g,"\\"),y={isNode:a,label:vs(t)?m:f,labelStyle:r.replace("fill:","color:")};return await Qp(e,y,h,s,l,d,c)}else{const u=qr(t.replace(/<br\s*\/?>/g,"<br/>")),f=n?Up(u.replace("<br>","<br/>"),d):Yp(u),m=tf(h,e,f,t?l:!1,!a);if(a){/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:");$t(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");$t(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:");$t(m).select("text").attr("style",C)}return i?$t(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):$t(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),X2=new Set(["redux-color","redux-dark-color"]),Z2=12,K2=64,Jl=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),Q2=p((e,t)=>e!=null&&X2.has(e)&&Jl(t),"isColorTheme"),J2=/^[\w-]+$/,gF=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return J2.test(t)?t:"classic"},"safeLook"),rf=p(e=>Jl(e)?e.length:0,"paletteSlotCount"),mF=p((e,t)=>Jl(t)?rf(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=K2?e:Z2,"colorSlotCount"),Re=p((e,t,r,i)=>{if(t===void 0||!Q2(r,i))return;const s=t%rf(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function cn(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,n=Math.cos(o),a=Math.sin(o);for(const h of e){const[c,l]=h;h[0]=(c-i)*n-(l-s)*a+i,h[1]=(c-i)*a+(l-s)*n+s}}}function tS(e,t){return e[0]===t[0]&&e[1]===t[1]}function eS(e,t,r,i=1){const s=r,o=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,a=[0,0];if(s)for(const c of n)cn(c,a,s);const h=(function(c,l,d){const u=[];for(const b of c){const S=[...b];tS(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&u.push(S)}const f=[];l=Math.max(l,.1);const m=[];for(const b of u)for(let S=0;S<b.length-1;S++){const T=b[S],v=b[S+1];if(T[1]!==v[1]){const B=Math.min(T[1],v[1]);m.push({ymin:B,ymax:Math.max(T[1],v[1]),x:B===T[1]?T[0]:v[0],islope:(v[0]-T[0])/(v[1]-T[1])})}}if(m.sort(((b,S)=>b.ymin<S.ymin?-1:b.ymin>S.ymin?1:b.x<S.x?-1:b.x>S.x?1:b.ymax===S.ymax?0:(b.ymax-S.ymax)/Math.abs(b.ymax-S.ymax))),!m.length)return f;let y=[],C=m[0].ymin,x=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let S=0;S<m.length&&!(m[S].ymin>C);S++)b=S;m.splice(0,b+1).forEach((S=>{y.push({s:C,edge:S})}))}if(y=y.filter((b=>!(b.edge.ymax<=C))),y.sort(((b,S)=>b.edge.x===S.edge.x?0:(b.edge.x-S.edge.x)/Math.abs(b.edge.x-S.edge.x))),(d!==1||x%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const S=b+1;if(S>=y.length)break;const T=y[b].edge,v=y[S].edge;f.push([[Math.round(T.x),C],[Math.round(v.x),C]])}C+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return f})(n,o,i);if(s){for(const c of n)cn(c,a,-s);(function(c,l,d){const u=[];c.forEach((f=>u.push(...f))),cn(u,l,d)})(h,a,-s)}return h}function Ds(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 o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),eS(e,s,i,o||1)}class th{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ds(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 oa(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 rS extends th{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ds(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,n=[],a=.5*i*Math.cos(o),h=.5*i*Math.sin(o);for(const[c,l]of s)oa([c,l])&&n.push([[c[0]-a,c[1]+h],[...l]],[[c[0]+a,c[1]-h],[...l]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class iS extends th{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class sS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ds(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 o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const n=s/4;for(const a of t){const h=oa(a),c=h/s,l=Math.ceil(c)-1,d=h-l*s,u=(a[0][0]+a[1][0])/2-s/4,f=Math.min(a[0][1],a[1][1]);for(let m=0;m<l;m++){const y=f+d+m*s,C=u-n+2*Math.random()*n,x=y-n+2*Math.random()*n,b=this.helper.ellipse(C,x,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class oS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ds(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,o=[];return t.forEach((n=>{const a=oa(n),h=Math.floor(a/(i+s)),c=(a+s-h*(i+s))/2;let l=n[0],d=n[1];l[0]>d[0]&&(l=n[1],d=n[0]);const u=Math.atan((d[1]-l[1])/(d[0]-l[0]));for(let f=0;f<h;f++){const m=f*(i+s),y=m+i,C=[l[0]+m*Math.cos(u)+c*Math.cos(u),l[1]+m*Math.sin(u)+c*Math.sin(u)],x=[l[0]+y*Math.cos(u)+c*Math.cos(u),l[1]+y*Math.sin(u)+c*Math.sin(u)];o.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}})),o}}class aS{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,o=Ds(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const n=oa(o),a=Math.round(n/(2*r));let h=o[0],c=o[1];h[0]>c[0]&&(h=o[1],c=o[0]);const l=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let d=0;d<a;d++){const u=2*d*r,f=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[h[0]+u*Math.cos(l),h[1]+u*Math.sin(l)],C=[h[0]+f*Math.cos(l),h[1]+f*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 Te={};class nS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const lS=0,dn=1,Xc=2,to={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 un(e,t){return e.type===t}function eh(e){const t=[],r=(function(n){const a=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:lS,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:dn,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return a[a.length]={type:Xc,text:""},a})(e);let i="BOD",s=0,o=r[s];for(;!un(o,Xc);){let n=0;const a=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return eh("M0,0"+e);s++,n=to[o.text],i=o.text}else un(o,dn)?n=to[i]:(s++,n=to[o.text],i=o.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let h=s;h<s+n;h++){const c=r[h];if(!un(c,dn))throw new Error("Param not a number: "+i+","+c.text);a[a.length]=+c.text}if(typeof to[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:a};t.push(h),s+=n,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function sf(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:n,data:a}of e)switch(n){case"M":o.push({key:"M",data:[...a]}),[t,r]=a,[i,s]=a;break;case"m":t+=a[0],r+=a[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...a]}),[t,r]=a;break;case"l":t+=a[0],r+=a[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...a]}),t=a[4],r=a[5];break;case"c":{const h=a.map(((c,l)=>l%2?c+r:c+t));o.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":o.push({key:"Q",data:[...a]}),t=a[2],r=a[3];break;case"q":{const h=a.map(((c,l)=>l%2?c+r:c+t));o.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":o.push({key:"A",data:[...a]}),t=a[5],r=a[6];break;case"a":t+=a[5],r+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],t,r]});break;case"H":o.push({key:"H",data:[...a]}),t=a[0];break;case"h":t+=a[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...a]}),r=a[0];break;case"v":r+=a[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...a]}),t=a[2],r=a[3];break;case"s":{const h=a.map(((c,l)=>l%2?c+r:c+t));o.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":o.push({key:"T",data:[...a]}),t=a[0],r=a[1];break;case"t":t+=a[0],r+=a[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function of(e){const t=[];let r="",i=0,s=0,o=0,n=0,a=0,h=0;for(const{key:c,data:l}of e){switch(c){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[o,n]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],a=l[2],h=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 d=0,u=0;r==="C"||r==="S"?(d=i+(i-a),u=s+(s-h)):(d=i,u=s),t.push({key:"C",data:[d,u,...l]}),a=l[0],h=l[1],i=l[2],s=l[3];break}case"T":{const[d,u]=l;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-a),m=s+(s-h)):(f=i,m=s);const y=i+2*(f-i)/3,C=s+2*(m-s)/3,x=d+2*(f-d)/3,b=u+2*(m-u)/3;t.push({key:"C",data:[y,C,x,b,d,u]}),a=f,h=m,i=d,s=u;break}case"Q":{const[d,u,f,m]=l,y=i+2*(d-i)/3,C=s+2*(u-s)/3,x=f+2*(d-f)/3,b=m+2*(u-m)/3;t.push({key:"C",data:[y,C,x,b,f,m]}),a=d,h=u,i=f,s=m;break}case"A":{const d=Math.abs(l[0]),u=Math.abs(l[1]),f=l[2],m=l[3],y=l[4],C=l[5],x=l[6];d===0||u===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(af(i,s,C,x,d,u,f,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=n}r=c}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 af(e,t,r,i,s,o,n,a,h,c){const l=(d=n,Math.PI*d/180);var d;let u=[],f=0,m=0,y=0,C=0;if(c)[f,m,y,C]=c;else{[e,t]=is(e,t,-l),[r,i]=is(r,i,-l);const M=(e-r)/2,E=(t-i)/2;let D=M*M/(s*s)+E*E/(o*o);D>1&&(D=Math.sqrt(D),s*=D,o*=D);const A=s*s,z=o*o,W=A*z-A*E*E-z*M*M,tt=A*E*E+z*M*M,V=(a===h?-1:1)*Math.sqrt(Math.abs(W/tt));y=V*s*E/o+(e+r)/2,C=V*-o*M/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/o).toFixed(9))),m=Math.asin(parseFloat(((i-C)/o).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),h&&f>m&&(f-=2*Math.PI),!h&&m>f&&(m-=2*Math.PI)}let x=m-f;if(Math.abs(x)>120*Math.PI/180){const M=m,E=r,D=i;m=h&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,u=af(r=y+s*Math.cos(m),i=C+o*Math.sin(m),E,D,s,o,n,0,h,[m,M,y,C])}x=m-f;const b=Math.cos(f),S=Math.sin(f),T=Math.cos(m),v=Math.sin(m),B=Math.tan(x/4),L=4/3*s*B,F=4/3*o*B,q=[e,t],R=[e+L*S,t-F*b],$=[r+L*v,i-F*T],G=[r,i];if(R[0]=2*q[0]-R[0],R[1]=2*q[1]-R[1],c)return[R,$,G].concat(u);{u=[R,$,G].concat(u);const M=[];for(let E=0;E<u.length;E+=3){const D=is(u[E][0],u[E][1],l),A=is(u[E+1][0],u[E+1][1],l),z=is(u[E+2][0],u[E+2][1],l);M.push([D[0],D[1],A[0],A[1],z[0],z[1]])}return M}}const hS={randOffset:function(e,t){return Lt(e,t)},randOffsetWithRange:function(e,t,r){return Ro(e,t,r)},ellipse:function(e,t,r,i,s){const o=lf(r,i,s);return Yn(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Nr(e,t,r,i,s,!0)}};function nf(e,t,r,i,s){return{type:"path",ops:Nr(e,t,r,i,s)}}function fo(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Nr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Nr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?nf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function cS(e,t,r,i,s){return(function(o,n){return fo(o,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Zc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=eo(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:eo(r[0],1.5*(1+.22*t.roughness),Jc(t));for(let o=1;o<r.length;o++){const n=r[o];if(n.length){const a=eo(n,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:eo(n,1.5*(1+.22*t.roughness),Jc(t));for(const c of a)c.op!=="move"&&i.push(c);for(const c of h)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function lf(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)),o=2*Math.PI/s;let n=Math.abs(e/2),a=Math.abs(t/2);const h=1-r.curveFitting;return n+=Lt(n*h,r),a+=Lt(a*h,r),{increment:o,rx:n,ry:a}}function Yn(e,t,r,i){const[s,o]=td(i.increment,e,t,i.rx,i.ry,1,i.increment*Ro(.1,Ro(.4,1,r),r),r);let n=qo(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[a]=td(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=qo(a,null,r);n=n.concat(h)}return{estimatedPoints:o,opset:{type:"path",ops:n}}}function Kc(e,t,r,i,s,o,n,a,h){const c=e,l=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Lt(.01*d,h),u+=Lt(.01*u,h);let f=s,m=o;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/h.curveStepCount,C=Math.min(y/2,(m-f)/2),x=ed(C,c,l,d,u,f,m,1,h);if(!h.disableMultiStroke){const b=ed(C,c,l,d,u,f,m,1.5,h);x.push(...b)}return n&&(a?x.push(...Nr(c,l,c+d*Math.cos(f),l+u*Math.sin(f),h),...Nr(c,l,c+d*Math.cos(m),l+u*Math.sin(m),h)):x.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+d*Math.cos(f),l+u*Math.sin(f)]})),{type:"path",ops:x}}function Qc(e,t){const r=of(sf(eh(e))),i=[];let s=[0,0],o=[0,0];for(const{key:n,data:a}of r)switch(n){case"M":o=[a[0],a[1]],s=[a[0],a[1]];break;case"L":i.push(...Nr(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]];break;case"C":{const[h,c,l,d,u,f]=a;i.push(...dS(h,c,l,d,u,f,o,t)),o=[u,f];break}case"Z":i.push(...Nr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function pn(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Lt(s,t),i[0][1]+Lt(s,t)]});for(let n=1;n<o;n++)r.push({op:"lineTo",data:[i[n][0]+Lt(s,t),i[n][1]+Lt(s,t)]})}}return{type:"fillPath",ops:r}}function fi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Te[s])switch(s){case"zigzag":Te[s]||(Te[s]=new rS(i));break;case"cross-hatch":Te[s]||(Te[s]=new iS(i));break;case"dots":Te[s]||(Te[s]=new sS(i));break;case"dashed":Te[s]||(Te[s]=new oS(i));break;case"zigzag-line":Te[s]||(Te[s]=new aS(i));break;default:s="hachure",Te[s]||(Te[s]=new th(i))}return Te[s]})(t,hS).fillPolygons(e,t)}function Jc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function hf(e){return e.randomizer||(e.randomizer=new nS(e.seed||0)),e.randomizer.next()}function Ro(e,t,r,i=1){return r.roughness*i*(hf(r)*(t-e)+e)}function Lt(e,t,r=1){return Ro(-e,e,t,r)}function Nr(e,t,r,i,s,o=!1){const n=o?s.disableMultiStrokeFill:s.disableMultiStroke,a=Un(e,t,r,i,s,!0,!1);if(n)return a;const h=Un(e,t,r,i,s,!0,!0);return a.concat(h)}function Un(e,t,r,i,s,o,n){const a=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(a);let c=1;c=h<200?1:h>500?.4:-.0016668*h+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>a&&(l=h/10);const d=l/2,u=.2+.2*hf(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=Lt(f,s,c),m=Lt(m,s,c);const y=[],C=()=>Lt(d,s,c),x=()=>Lt(l,s,c),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:C()),t+(b?0:C())]}):y.push({op:"move",data:[e+(b?0:Lt(l,s,c)),t+(b?0:Lt(l,s,c))]}),n?y.push({op:"bcurveTo",data:[f+e+(r-e)*u+C(),m+t+(i-t)*u+C(),f+e+2*(r-e)*u+C(),m+t+2*(i-t)*u+C(),r+(b?0:C()),i+(b?0:C())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*u+x(),m+t+(i-t)*u+x(),f+e+2*(r-e)*u+x(),m+t+2*(i-t)*u+x(),r+(b?0:x()),i+(b?0:x())]}),y}function eo(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Lt(t,r),e[0][1]+Lt(t,r)]),i.push([e[0][0]+Lt(t,r),e[0][1]+Lt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Lt(t,r),e[s][1]+Lt(t,r)]),s===e.length-1&&i.push([e[s][0]+Lt(t,r),e[s][1]+Lt(t,r)]);return qo(i,null,r)}function qo(e,t,r){const i=e.length,s=[];if(i>3){const o=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let a=1;a+2<i;a++){const h=e[a];o[0]=[h[0],h[1]],o[1]=[h[0]+(n*e[a+1][0]-n*e[a-1][0])/6,h[1]+(n*e[a+1][1]-n*e[a-1][1])/6],o[2]=[e[a+1][0]+(n*e[a][0]-n*e[a+2][0])/6,e[a+1][1]+(n*e[a][1]-n*e[a+2][1])/6],o[3]=[e[a+1][0],e[a+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[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(...Un(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function td(e,t,r,i,s,o,n,a){const h=[],c=[];if(a.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const d=[t+i*Math.cos(l),r+s*Math.sin(l)];h.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const l=Lt(.5,a)-Math.PI/2;c.push([Lt(o,a)+t+.9*i*Math.cos(l-e),Lt(o,a)+r+.9*s*Math.sin(l-e)]);const d=2*Math.PI+l-.01;for(let u=l;u<d;u+=e){const f=[Lt(o,a)+t+i*Math.cos(u),Lt(o,a)+r+s*Math.sin(u)];h.push(f),c.push(f)}c.push([Lt(o,a)+t+i*Math.cos(l+2*Math.PI+.5*n),Lt(o,a)+r+s*Math.sin(l+2*Math.PI+.5*n)]),c.push([Lt(o,a)+t+.98*i*Math.cos(l+n),Lt(o,a)+r+.98*s*Math.sin(l+n)]),c.push([Lt(o,a)+t+.9*i*Math.cos(l+.5*n),Lt(o,a)+r+.9*s*Math.sin(l+.5*n)])}return[c,h]}function ed(e,t,r,i,s,o,n,a,h){const c=o+Lt(.1,h),l=[];l.push([Lt(a,h)+t+.9*i*Math.cos(c-e),Lt(a,h)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=n;d+=e)l.push([Lt(a,h)+t+i*Math.cos(d),Lt(a,h)+r+s*Math.sin(d)]);return l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),qo(l,null,h)}function dS(e,t,r,i,s,o,n,a){const h=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let l=[0,0];const d=a.disableMultiStroke?1:2,u=a.preserveVertices;for(let f=0;f<d;f++)f===0?h.push({op:"move",data:[n[0],n[1]]}):h.push({op:"move",data:[n[0]+(u?0:Lt(c[0],a)),n[1]+(u?0:Lt(c[0],a))]}),l=u?[s,o]:[s+Lt(c[f],a),o+Lt(c[f],a)],h.push({op:"bcurveTo",data:[e+Lt(c[f],a),t+Lt(c[f],a),r+Lt(c[f],a),i+Lt(c[f],a),l[0],l[1]]});return h}function ss(e){return[...e]}function rd(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 a=1;a<e.length;a++)s.push(e[a]),a===e.length-1&&s.push(e[a]);const o=[],n=1-t;i.push(ss(s[0]));for(let a=1;a+2<s.length;a++){const h=s[a];o[0]=[h[0],h[1]],o[1]=[h[0]+(n*s[a+1][0]-n*s[a-1][0])/6,h[1]+(n*s[a+1][1]-n*s[a-1][1])/6],o[2]=[s[a+1][0]+(n*s[a][0]-n*s[a+2][0])/6,s[a+1][1]+(n*s[a][1]-n*s[a+2][1])/6],o[3]=[s[a+1][0],s[a+1][1]],i.push(o[1],o[2],o[3])}}return i}function go(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function uS(e,t,r){const i=go(t,r);if(i===0)return go(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)),go(e,Zr(t,r,s))}function Zr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function jn(e,t,r,i){const s=i||[];if((function(a,h){const c=a[h+0],l=a[h+1],d=a[h+2],u=a[h+3];let f=3*l[0]-2*c[0]-u[0];f*=f;let m=3*l[1]-2*c[1]-u[1];m*=m;let y=3*d[0]-2*u[0]-c[0];y*=y;let C=3*d[1]-2*u[1]-c[1];return C*=C,f<y&&(f=y),m<C&&(m=C),f+m})(e,t)<r){const a=e[t+0];s.length?(o=s[s.length-1],n=a,Math.sqrt(go(o,n))>1&&s.push(a)):s.push(a),s.push(e[t+3])}else{const h=e[t+0],c=e[t+1],l=e[t+2],d=e[t+3],u=Zr(h,c,.5),f=Zr(c,l,.5),m=Zr(l,d,.5),y=Zr(u,f,.5),C=Zr(f,m,.5),x=Zr(y,C,.5);jn([h,u,y,x],0,r,s),jn([x,C,m,d],0,r,s)}var o,n;return s}function pS(e,t){return No(e,0,e.length,t)}function No(e,t,r,i,s){const o=s||[],n=e[t],a=e[r-1];let h=0,c=1;for(let l=t+1;l<r-1;++l){const d=uS(e[l],n,a);d>h&&(h=d,c=l)}return Math.sqrt(h)>i?(No(e,t,c+1,i,o),No(e,c,r,i,o)):(o.length||o.push(n),o.push(a)),o}function fn(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)jn(e,3*o,t,i);return r&&r>0?No(i,0,i.length,r):i}const Le="none";class Wo{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,o){const n=this._o(o);return this._d("line",[nf(t,r,i,s,n)],n)}rectangle(t,r,i,s,o){const n=this._o(o),a=[],h=cS(t,r,i,s,n);if(n.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?a.push(pn([c],n)):a.push(fi([c],n))}return n.stroke!==Le&&a.push(h),this._d("rectangle",a,n)}ellipse(t,r,i,s,o){const n=this._o(o),a=[],h=lf(i,s,n),c=Yn(t,r,n,h);if(n.fill)if(n.fillStyle==="solid"){const l=Yn(t,r,n,h).opset;l.type="fillPath",a.push(l)}else a.push(fi([c.estimatedPoints],n));return n.stroke!==Le&&a.push(c.opset),this._d("ellipse",a,n)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[fo(t,!1,i)],i)}arc(t,r,i,s,o,n,a=!1,h){const c=this._o(h),l=[],d=Kc(t,r,i,s,o,n,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const u=Object.assign({},c);u.disableMultiStroke=!0;const f=Kc(t,r,i,s,o,n,!0,!1,u);f.type="fillPath",l.push(f)}else l.push((function(u,f,m,y,C,x,b){const S=u,T=f;let v=Math.abs(m/2),B=Math.abs(y/2);v+=Lt(.01*v,b),B+=Lt(.01*B,b);let L=C,F=x;for(;L<0;)L+=2*Math.PI,F+=2*Math.PI;F-L>2*Math.PI&&(L=0,F=2*Math.PI);const q=(F-L)/b.curveStepCount,R=[];for(let $=L;$<=F;$+=q)R.push([S+v*Math.cos($),T+B*Math.sin($)]);return R.push([S+v*Math.cos(F),T+B*Math.sin(F)]),R.push([S,T]),fi([R],b)})(t,r,i,s,o,n,c));return c.stroke!==Le&&l.push(d),this._d("arc",l,c)}curve(t,r){const i=this._o(r),s=[],o=Zc(t,i);if(i.fill&&i.fill!==Le)if(i.fillStyle==="solid"){const n=Zc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],a=t;if(a.length){const h=typeof a[0][0]=="number"?[a]:a;for(const c of h)c.length<3?n.push(...c):c.length===3?n.push(...fn(rd([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):n.push(...fn(rd(c),10,(1+i.roughness)/2))}n.length&&s.push(fi([n],i))}return i.stroke!==Le&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=fo(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(pn([t],i)):s.push(fi([t],i))),i.stroke!==Le&&s.push(o),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 o=i.fill&&i.fill!=="transparent"&&i.fill!==Le,n=i.stroke!==Le,a=!!(i.simplification&&i.simplification<1),h=(function(l,d,u){const f=of(sf(eh(l))),m=[];let y=[],C=[0,0],x=[];const b=()=>{x.length>=4&&y.push(...fn(x,d)),x=[]},S=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:v,data:B}of f)switch(v){case"M":S(),C=[B[0],B[1]],y.push(C);break;case"L":b(),y.push([B[0],B[1]]);break;case"C":if(!x.length){const L=y.length?y[y.length-1]:C;x.push([L[0],L[1]])}x.push([B[0],B[1]]),x.push([B[2],B[3]]),x.push([B[4],B[5]]);break;case"Z":b(),y.push([C[0],C[1]])}if(S(),!u)return m;const T=[];for(const v of m){const B=pS(v,u);B.length&&T.push(B)}return T})(t,1,a?4-4*(i.simplification||1):(1+i.roughness)/2),c=Qc(t,i);if(o)if(i.fillStyle==="solid")if(h.length===1){const l=Qc(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(pn(h,i));else s.push(fi(h,i));return n&&(a?h.forEach((l=>{s.push(fo(l,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let n=null;switch(o.type){case"path":n={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Le};break;case"fillPath":n={d:this.opsToPath(o),stroke:Le,strokeWidth:0,fill:i.fill||Le};break;case"fillSketch":n=this.fillSketch(o,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Le,strokeWidth:i,fill:Le}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class fS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Wo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.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,n,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const a=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,o,a),s.restore();break}case"fillSketch":this.fillSketch(s,n,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 o of r.ops){const n=typeof i=="number"&&i>=0?o.data.map((a=>+a.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const n=this.gen.line(t,r,i,s,o);return this.draw(n),n}rectangle(t,r,i,s,o){const n=this.gen.rectangle(t,r,i,s,o);return this.draw(n),n}ellipse(t,r,i,s,o){const n=this.gen.ellipse(t,r,i,s,o);return this.draw(n),n}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}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,o,n,a=!1,h){const c=this.gen.arc(t,r,i,s,o,n,a,h);return this.draw(c),c}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 ro="http://www.w3.org/2000/svg";class gS{constructor(t,r){this.svg=t,this.gen=new Wo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(ro,"g"),n=t.options.fixedDecimalPlaceDigits;for(const a of r){let h=null;switch(a.type){case"path":h=s.createElementNS(ro,"path"),h.setAttribute("d",this.opsToPath(a,n)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(ro,"path"),h.setAttribute("d",this.opsToPath(a,n)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,a,i)}h&&o.appendChild(h)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(ro,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const n=this.gen.line(t,r,i,s,o);return this.draw(n)}rectangle(t,r,i,s,o){const n=this.gen.rectangle(t,r,i,s,o);return this.draw(n)}ellipse(t,r,i,s,o){const n=this.gen.ellipse(t,r,i,s,o);return this.draw(n)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}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,o,n,a=!1,h){const c=this.gen.arc(t,r,i,s,o,n,a,h);return this.draw(c)}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 ut={canvas:(e,t)=>new fS(e,t),svg:(e,t)=>new gS(e,t),generator:e=>new Wo(e),newSeed:()=>Wo.newSeed()},mS=1,yS=3;async function rh(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ih(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=Ot().fontSize?Ot().fontSize:window.getComputedStyle(document.body).fontSize,a=5,[h=Sl.fontSize]=ta(n),c=h*a+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}p(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}p(rh,"configureLabelImages");function ih(e){return e.nodeType===yS?e.textContent?.trim()!=="":e.nodeType!==mS||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ih)}p(ih,"hasTextBesidesImages");var id=3,CS=32,xS=p(async(e,t,r)=>{const i=Ot(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",ie(t.labelStyle)),a=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(x=>({text:x,cssClass:"c4-descr"}))].filter(x=>x.text),h=t.width?Math.max(t.width-2*(t.padding??0),CS):Ot().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?h:Number.POSITIVE_INFINITY,d=await Promise.all(a.map(async x=>{const b=o.append("g").attr("class",x.cssClass),S=await Ae(b,De(qr(x.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return $t(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),$t(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:b,box:b.node().getBBox()}})),u=Math.max(...d.map(({box:x})=>x.width),0);let f=0;for(const{el:x,box:b}of d)x.attr("transform",`translate(${u/2-b.x-b.width/2}, ${f-b.y})`),f+=b.height+id;const m=d.length>0?f-id:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-u/2}, ${-m/2})`);const y=o.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:C,label:o}},"c4LabelHelper"),sd=p((e,t)=>{const{x:r,y:i,width:s,height:o}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:o,top:i,left:r,bottom:i+o,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:o}},"withMinWidth"),Ct=p(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{if(t.stereotype!==void 0)return xS(e,t,r);let s;const o=t.useHtmlLabels||nr(Ot()?.htmlLabels);r?s=r:s="node default";const n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=n.insert("g").attr("class","label").attr("style",ie(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,l=t.labelType==="markdown",d=h&&!t.width&&!i?t.minWidth??0:0,u=await Ae(a,De(qr(h),Ot()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||Ot().flowchart?.wrappingWidth,minWidth:d,classes:l?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:l},Ot()),f=(t?.padding??0)/2;let m;if(o){const y=u.children[0],C=$t(u);await rh(y),m=await si.measure(()=>y.getBoundingClientRect()),m=sd(m,d),C.attr("width",m.width),C.attr("height",m.height)}else m=await si.measure(()=>u.getBBox()),m=sd(m,d);return o?a.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):a.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:n,bbox:m,halfPadding:f,label:a}},"labelHelper"),Jr=p(async(e,t,r)=>{const i=r.useHtmlLabels??de(Ot()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Ae(s,De(qr(t),Ot()),{useHtmlLabels:i,width:r.width||Ot()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let a;if(de(Ot())){const h=o.children[0],c=$t(o);a=await si.measure(()=>h.getBoundingClientRect()),c.attr("width",a.width),c.attr("height",a.height)}else a=await si.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),pt=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"),gt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function qt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(qt,"createPathFromPoints");function Wr(e,t,r,i,s,o){const n=[],h=r-e,c=i-t,l=h/o,d=2*Math.PI/l,u=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*h,C=u+s*Math.sin(d*(y-e));n.push({x:y,y:C})}return n}p(Wr,"generateFullSineWavePoints");function sr(e,t,r,i,s,o){const n=[],a=s*Math.PI/180,l=(o*Math.PI/180-a)/(i-1);for(let d=0;d<i;d++){const u=a+d*l,f=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-f,y:-m})}return n}p(sr,"generateCirclePoints");function Gn(e){const t=Array.from(e.childNodes).filter(h=>h.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(h=>h.getAttribute("d")).filter(h=>h!==null).join(" ");r.setAttribute("d",i);const s=t.find(h=>h.getAttribute("fill")!=="none"),o=t.find(h=>h.getAttribute("stroke")!=="none"),n=p((h,c)=>h?.getAttribute(c)??void 0,"getAttr");if(s){const h={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}if(o){const h={stroke:n(o,"stroke"),"stroke-width":n(o,"stroke-width")??"1","stroke-opacity":n(o,"stroke-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}const a=document.createElementNS("http://www.w3.org/2000/svg","g");return a.appendChild(r),a}p(Gn,"mergePaths");var bS=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,n=e.width/2,a=e.height/2,h,c;return Math.abs(o)*n>Math.abs(s)*a?(o<0&&(a=-a),h=o===0?0:a*s/o,c=a):(s<0&&(n=-n),h=n,c=s===0?0:n*o/s),{x:r+h,y:i+c}},"intersectRect"),Tr=bS;function cf(e,t){return e.intersect(t)}p(cf,"intersectNode");var kS=cf;function df(e,t,r,i){var s=e.x,o=e.y,n=s-i.x,a=o-i.y,h=Math.sqrt(t*t*a*a+r*r*n*n),c=Math.abs(t*r*n/h);i.x<s&&(c=-c);var l=Math.abs(t*r*a/h);return i.y<o&&(l=-l),{x:s+c,y:o+l}}p(df,"intersectEllipse");var uf=df;function pf(e,t,r){return uf(e,t,t,r)}p(pf,"intersectCircle");var SS=pf;function ff(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,n=t.x*e.y-e.x*t.y,a=s*r.x+o*r.y+n,h=s*i.x+o*i.y+n,c=1e-6;if(a!==0&&h!==0&&Vn(a,h))return;const l=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,f=l*e.x+d*e.y+u,m=l*t.x+d*t.y+u;if(Math.abs(f)<c&&Math.abs(m)<c&&Vn(f,m))return;const y=s*d-l*o;if(y===0)return;const C=(o*u-d*n)/y,x=(l*n-s*u)/y;return{x:C,y:x}}}p(ff,"intersectLine");function Vn(e,t){return e*t>0}p(Vn,"sameSign");var wS=ff;function gf(e,t,r){let i=e.x,s=e.y,o=[],n=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){n=Math.min(n,l.x),a=Math.min(a,l.y)}):(n=Math.min(n,t.x),a=Math.min(a,t.y));let h=i-e.width/2-n,c=s-e.height/2-a;for(let l=0;l<t.length;l++){let d=t[l],u=t[l<t.length-1?l+1:0],f=wS(e,r,{x:h+d.x,y:c+d.y},{x:h+u.x,y:c+u.y});f&&o.push(f)}return o.length?(o.length>1&&o.sort(function(l,d){let u=l.x-r.x,f=l.y-r.y,m=Math.sqrt(u*u+f*f),y=d.x-r.x,C=d.y-r.y,x=Math.sqrt(y*y+C*C);return m<x?-1:m===x?0:1}),o[0]):e}p(gf,"intersectPolygon");var TS=gf,nt={node:kS,circle:SS,ellipse:uf,polygon:TS,rect:Tr},Ee=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"),_S=p(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const n=Ot(),a=de(n);return await Ae(e,o,{style:r,isTitle:i,useHtmlLabels:a,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),yr=_S;function mf(e,t){const{labelStyles:r}=dt(t);t.labelStyle=r;const i=gt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:a}=t,h=ut.svg(o),c=ct(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=h.circle(0,0,n*2,c),d=o.insert(()=>l,":first-child");return d.attr("class","anchor").attr("style",ie(a)),pt(t,d),t.intersect=function(u){return J.info("Circle intersect",t,n,u),nt.circle(t,n,u)},o}p(mf,"anchor");function Xn(e,t,r,i,s,o,n){const h=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),d=(r-e)/2,u=(i-t)/2,f=d/s,m=u/o,y=Math.sqrt(f**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=h+C*o*Math.sin(l)*(n?-1:1),b=c-C*s*Math.cos(l)*(n?-1:1),S=Math.atan2((t-b)/o,(e-x)/s);let v=Math.atan2((i-b)/o,(r-x)/s)-S;n&&v<0&&(v+=2*Math.PI),!n&&v>0&&(v-=2*Math.PI);const B=[];for(let L=0;L<20;L++){const F=L/19,q=S+F*v,R=x+s*Math.cos(q),$=b+o*Math.sin(q);B.push({x:R,y:$})}return B}p(Xn,"generateArcPoints");function yf(e,t,r){const[i,s]=[t,r].sort((o,n)=>n-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(yf,"calculateArcSagitta");async function Cf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s,a=p(q=>q+n,"calcTotalHeight"),h=p(q=>{const R=q/2;return[R/(2.5+q/50),R]},"calcEllipseRadius"),{shapeSvg:c,bbox:l}=await Ct(e,t,gt(t)),d=a(t?.height?t?.height:l.height),[u,f]=h(d),m=yf(d,u,f),C=(t?.width?t?.width:l.width)+o*2+m-m,x=d,{cssStyles:b}=t,S=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...Xn(-C/2,-x/2,-C/2,x/2,u,f,!1),{x:C/2,y:x/2},...Xn(C/2,x/2,C/2,-x/2,u,f,!0)],T=ut.svg(c),v=ct(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=qt(S),L=T.path(B,v),F=c.insert(()=>L,":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(${u/2}, 0)`),pt(t,F),t.intersect=function(q){return nt.polygon(t,S,q)},c}p(Cf,"bowTieRect");async function xf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,label:a}=await Ct(e,t,gt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=Math.max(n.width+c*2,t.width??0,80),d=Math.max(Math.min(l*.08,12),5),u=Math.max(n.height+c*2+d,t.height??0),f=-u/2+d,m=u/2,y=l*.72,C=[`M${-l/2},${f}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${l/2},${f}`,`A${l/2},${d} 0 0 0 ${-l/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,b=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const F=ut.svg(o).path(C,ct(t,{}));b.node()?.appendChild(F),x&&b.attr("style",x)}else b.append("path").attr("d",C).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",l/2).attr("ry",d).attr("style",`fill:none;stroke:${h};stroke-width:1px`),pt(t,b);const S=f+(m-f)/2;a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${S-n.height/2-(n.y-(n.top??0))})`);const T=12,v=p((L,F,q)=>Array.from({length:T+1},(R,$)=>{const G=Math.PI-$*Math.PI/T;return{x:L*Math.cos(G),y:F+q*d*Math.sin(G)}}),"arc"),B=[...v(l/2,f,-1),...v(y/2,m,1).reverse()];return t.intersect=function(L){return nt.polygon(t,B,L)},o}p(xf,"bucket");var od=20,ad=8,BS=80,vS=8;function bf(e){const{themeVariables:t}=Ot(),r=t.clusterBkg,i=t.clusterBorder;return e==="flow"?{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:vS,fill:r,stroke:i,cssClass:"collapsed-group"}}p(bf,"getCollapsedStyle");async function kf(e,t){const r=bf(t.metadata?.containerType),{fill:i,stroke:s}=r,{nodeStyles:o}=dt(t),{shapeSvg:n,bbox:a}=await Ct(e,t,gt(t)),{theme:h,themeVariables:c}=Ot();Re(n,t.colorIndex,h,c.borderColorArray);const l=t.padding??8,d=a.height,u=Math.max(a.width+l*2,BS,t?.width??0),f=Math.max(d+ad+od+l*2,t?.height??0),m=-u/2,y=-f/2,C=-28/2,x=n.select(".label");x&&(t.useHtmlLabels??de(Ot())?x.attr("transform",`translate(${-a.width/2}, ${-a.height/2+C})`):x.attr("transform",`translate(0, ${-a.height/2+C})`));let b;if(t.look==="handDrawn"){const L=ut.svg(n),F=ct(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),q=L.path(Ee(m,y,u,f,r.rx),F);b=n.insert(()=>q,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ie(t.cssStyles))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",o).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",u).attr("height",f).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const S=y+l+d+ad;n.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",S).attr("x2",m+u-8).attr("y2",S).attr("stroke",s).attr("stroke-dasharray","3, 3");const T=S+od/2,v=2.5,B=10;for(let L=-1;L<=1;L++)n.append("circle").attr("class","collapsed-indicator").attr("cx",L*B).attr("cy",T).attr("r",v).attr("fill",s);return pt(t,b),t.calcIntersect=function(L,F){return nt.rect(L,F)},t.intersect=function(L){return nt.rect(t,L)},n}p(kf,"collapsedGroup");function lr(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(lr,"insertPolygonShape");var LS=["right","left","up","down"],sh="point",FS=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"),AS=p(e=>LS.filter(t=>e.has(t)).join("|")||sh,"getDirectionKey"),nd={"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"),[sh]:()=>[{x:0,y:0}]},ES=p((e,t,r,i)=>{const s=FS(e),o=(r.padding??0)/2,n=t.height+4*o,a=n/2,h=i??t.width+2*a+2*o,c=AS(s);return(nd[c]??nd[sh])({height:n,midpoint:a,padding:o,width:h})},"getArrowPoints");async function Sf(e,t){const r=t,{shapeSvg:i,bbox:s}=await Ct(e,r,gt(r)),o=r.padding??0,n=s.height+2*o,a=n/2,h=s.width+2*a+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>h?c:h,u=ES(r.directions??[],s,r,d),f=lr(i,d,n,u);return f.attr("style",r.style??null),pt(r,f),r.intersect=function(m){return nt.polygon(r,u,m)},i}p(Sf,"block_arrow");async function wf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,label:a}=await Ct(e,t,gt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=18,d=12,u=Math.max(n.width+c*2,t.width??0,90),f=Math.max(n.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=ut.svg(o).path(Ee(-u/2,m,u,f,d),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);C.append("line").attr("x1",-u/2).attr("y1",m+l).attr("x2",u/2).attr("y2",m+l).attr("style",`stroke:${h};stroke-width:1px`);for(let b=0;b<3;b++)C.append("circle").attr("cx",-u/2+12+b*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${h};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-u/2+44).attr("y",m+4).attr("width",Math.max(u-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),pt(t,C);const x=m+l+(f-l)/2;return a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${x-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(b){return nt.rect(t,b)},o}p(wf,"browser");var io=12;async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=(t?.width??h.width)+(t.look==="neo"?o*2:o+io),l=(t?.height??h.height)+(t.look==="neo"?n*2:n),d=0,u=c,f=-l,m=0,y=[{x:d+io,y:f},{x:u,y:f},{x:u,y:m},{x:d,y:m},{x:d,y:f+io},{x:d+io,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=ut.svg(a),S=ct(t,{}),T=qt(y),v=b.path(T,S);C=a.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),x&&C.attr("style",x)}else C=lr(a,c,l,y);return i&&C.attr("style",i),pt(t,C),t.intersect=function(b){return nt.polygon(t,y,b)},a}p(Tf,"card");function _f(e,t){const{nodeStyles:r}=dt(t);t.label="";const i=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),n=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],a=ut.svg(i),h=ct(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=qt(n),l=a.path(c,h),d=i.insert(()=>l,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return nt.polygon(t,n,u)},i}p(_f,"choice");async function oh(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,halfPadding:a}=await Ct(e,t,gt(t),{ignoreMinWidth:!0}),h=16,c=r?.padding??a,l=Math.sqrt(n.width**2+n.height**2)/2,d=t.look==="neo"?l+h:l+c;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(o),y=ct(t,{}),C=m.circle(0,0,d*2,y);u=o.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",ie(f))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",d).attr("cx",0).attr("cy",0);return pt(t,u),t.calcIntersect=function(m,y){const C=m.width/2;return nt.circle(m,C,y)},t.intersect=function(m){return J.info("Circle intersect",t,d,m),nt.circle(t,d,m)},o}p(oh,"circle");async function Bf(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:n}=await Ct(e,r,i),a=s.insert("rect",":first-child"),h=r.padding??0,c=r.positioned?r.width??0:o.width+h,l=r.positioned?r.height??0:o.height+h,d=r.positioned?-c/2:-o.width/2-n,u=r.positioned?-l/2:-o.height/2-n;return a.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",c).attr("height",l),pt(r,a),r.intersect=function(f){return nt.rect(r,f)},s}p(Bf,"composite");async function vf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,label:a}=await Ct(e,t,gt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=20,d=12,u=Math.max(n.width+c*2,t.width??0,90),f=Math.max(n.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,C=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=ut.svg(o).path(Ee(-u/2,m,u,f,d),ct(t,{}));C.node()?.appendChild(S),y&&C.attr("style",y)}else C.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);C.append("text").attr("x",-u/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),pt(t,C);const x=m+l+(f-l)/2;return a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${x-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(b){return nt.rect(t,b)},o}p(vf,"consoleWindow");function Lf(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},o={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},a={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${a.x},${a.y}
|
|
234
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}p(Lf,"createLine");function Ff(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:n}=t,a=ut.svg(s),h=ct(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=a.circle(0,0,o*2,h),l=Lf(o),d=a.path(l,h),u=s.insert(()=>c,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),pt(t,u),t.intersect=function(f){return J.info("crossedCircle intersect",t,{radius:o,point:f}),nt.circle(t,o,f)},s}p(Ff,"crossedCircle");function gr(e,t,r,i=100,s=0,o=180){const n=[],a=s*Math.PI/180,l=(o*Math.PI/180-a)/(i-1);for(let d=0;d<i;d++){const u=a+d*l,f=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-f,y:-m})}return n}p(gr,"generateCirclePoints");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+a,l=o.height+h,d=Math.max(5,l*.1),{cssStyles:u}=t,f=[...gr(c/2,-l/2,d,30,-90,0),{x:-c/2-d,y:d},...gr(c/2+d*2,-d,d,20,-180,-270),...gr(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-l/2},...gr(c/2,l/2,d,20,0,90)],m=[{x:c/2,y:-l/2-d},{x:-c/2,y:-l/2-d},...gr(c/2,-l/2,d,20,-90,0),{x:-c/2-d,y:-d},...gr(c/2+c*.1,-d,d,20,-180,-270),...gr(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:l/2},...gr(c/2,l/2,d,20,0,90),{x:-c/2,y:l/2+d},{x:c/2,y:l/2+d}],y=ut.svg(s),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=qt(f).replace("Z",""),S=y.path(b,C),T=qt(m),v=y.path(T,{...C}),B=s.insert("g",":first-child");return B.insert(()=>v,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.attr("class","text"),u&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),n.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),pt(t,B),t.intersect=function(L){return nt.polygon(t,m,L)},s}p(Af,"curlyBraceLeft");function mr(e,t,r,i=100,s=0,o=180){const n=[],a=s*Math.PI/180,l=(o*Math.PI/180-a)/(i-1);for(let d=0;d<i;d++){const u=a+d*l,f=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:f,y:m})}return n}p(mr,"generateCirclePoints");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?a*2:a),l=o.height+(t.look==="neo"?h*2:h),d=Math.max(5,l*.1),{cssStyles:u}=t,f=[...mr(c/2,-l/2,d,20,-90,0),{x:c/2+d,y:-d},...mr(c/2+d*2,-d,d,20,-180,-270),...mr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:l/2},...mr(c/2,l/2,d,20,0,90)],m=[{x:-c/2,y:-l/2-d},{x:c/2,y:-l/2-d},...mr(c/2,-l/2,d,20,-90,0),{x:c/2+d,y:-d},...mr(c/2+d*2,-d,d,20,-180,-270),...mr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:l/2},...mr(c/2,l/2,d,20,0,90),{x:c/2,y:l/2+d},{x:-c/2,y:l/2+d}],y=ut.svg(s),C=ct(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=qt(f).replace("Z",""),S=y.path(b,C),T=qt(m),v=y.path(T,{...C}),B=s.insert("g",":first-child");return B.insert(()=>v,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.attr("class","text"),u&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),n.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),pt(t,B),t.intersect=function(L){return nt.polygon(t,m,L)},s}p(Ef,"curlyBraceRight");function fe(e,t,r,i=100,s=0,o=180){const n=[],a=s*Math.PI/180,l=(o*Math.PI/180-a)/(i-1);for(let d=0;d<i;d++){const u=a+d*l,f=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-f,y:-m})}return n}p(fe,"generateCirclePoints");async function Mf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?a*2:a),l=o.height+(t.look==="neo"?h*2:h),d=Math.max(5,l*.1),{cssStyles:u}=t,f=[...fe(c/2,-l/2,d,30,-90,0),{x:-c/2-d,y:d},...fe(c/2+d*2,-d,d,20,-180,-270),...fe(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-l/2},...fe(c/2,l/2,d,20,0,90)],m=[...fe(-c/2+d+d/2,-l/2,d,20,-90,-180),{x:c/2-d/2,y:d},...fe(-c/2-d/2,-d,d,20,0,90),...fe(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...fe(-c/2+d+d/2,l/2,d,30,-180,-270)],y=[{x:c/2,y:-l/2-d},{x:-c/2,y:-l/2-d},...fe(c/2,-l/2,d,20,-90,0),{x:-c/2-d,y:-d},...fe(c/2+d*2,-d,d,20,-180,-270),...fe(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:l/2},...fe(c/2,l/2,d,20,0,90),{x:-c/2,y:l/2+d},{x:c/2-d-d/2,y:l/2+d},...fe(-c/2+d+d/2,-l/2,d,20,-90,-180),{x:c/2-d/2,y:d},...fe(-c/2-d/2,-d,d,20,0,90),...fe(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...fe(-c/2+d+d/2,l/2,d,30,-180,-270)],C=ut.svg(s),x=ct(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=qt(f).replace("Z",""),T=C.path(S,x),B=qt(m).replace("Z",""),L=C.path(B,x),F=qt(y),q=C.path(F,{...x}),R=s.insert("g",":first-child");return R.insert(()=>q,":first-child").attr("stroke-opacity",0),R.insert(()=>T,":first-child"),R.insert(()=>L,":first-child"),R.attr("class","text"),u&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${d-d/4}, 0)`),n.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),pt(t,R),t.intersect=function($){return nt.polygon(t,y,$)},s}p(Mf,"curlyBraces");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s,a=20,h=5,{shapeSvg:c,bbox:l}=await Ct(e,t,gt(t)),d=Math.max(h,l.height+n*2,t?.height??0),u=d/2,f=u-Math.sqrt(Math.max(0,u**2-(l.height/2)**2)),m=Math.max(d/4,f),y=Math.max(a,l.width+o*2+m*2,(l.width+o*2)*1.25,t?.width??0),{cssStyles:C}=t,x=ut.svg(c),b=ct(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=y,T=d,v=S-u,B=T/4,L=[{x:v,y:0},{x:B,y:0},{x:0,y:T/2},{x:B,y:T},{x:v,y:T},...sr(-v,-T/2,u,50,270,90)],F=qt(L),q=x.path(F,b),R=c.insert(()=>q,":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}, ${-d/2})`),pt(t,R),t.intersect=function($){return nt.polygon(t,L,$)},c}p($f,"curvedTrapezoid");async function Of(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.padding??20,h=Math.max(o.width+a*2,t.width??0,100),c=Math.min(Math.max(h*.23,16),56),l=c*.27,d=Math.max(o.height+a*2,t.height?t.height-(2*c-l):0),u=Math.min(h*.177,d*.45),f=d+2*c-l,m=-f/2,y=m+2*c-l,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const F=ut.svg(s),q=ct(t,{}),R=F.path(Ee(-h/2,y,h,d,u),q),$=F.circle(0,m+c,c*2,q);C.insert(()=>$,":first-child"),C.insert(()=>R,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-h/2).attr("y",y).attr("width",h).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),C.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);pt(t,C);const b=y+d/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`);const S=m+c,T=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,L=[...sr(0,-S,c,24,180+T,-T),...sr(-(-h/2+u),-(y+u),u,12,90,0),...sr(-(-h/2+u),-(f/2-u),u,12,360,270),...sr(-(h/2-u),-(f/2-u),u,12,270,180),...sr(-(h/2-u),-(y+u),u,12,180,90)];return t.intersect=function(F){return nt.polygon(t,L,F)},s}p(Of,"person");var MS=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),$S=p((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),OS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ld=8,hd=8;async function Df(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,n=t.look==="neo"?24:s,a=t.width??0;if(t.width&&(t.width=t.width-n,t.width<hd&&(t.width=hd)),t.height){const b=a/2/(2.5+a/50);t.height=t.height-o-b*3,t.height<ld&&(t.height=ld)}const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,gt(t)),d=Math.max(t.width??0,c.width)+n,u=d/2,f=u/(2.5+d/50),m=Math.max(t.height??0,c.height)+o+f;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(h),b=$S(0,0,d,m,u,f),S=OS(0,f,d,m,u,f),T=ct(t,{}),v=x.path(b,T),B=x.path(S,ct(t,{fill:"none"}));y=h.insert(()=>B,":first-child"),y=h.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=MS(0,0,d,m,u,f);y=h.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ie(C)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-d/2}, ${-(m/2+f)})`),pt(t,y),l.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const b=nt.rect(t,x),S=b.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-S*S/(u*u));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},h}p(Df,"cylinder");async function Vi(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n}=await Ct(e,t,gt(t)),a=Math.max(n.width+r.labelPaddingX*2,t?.width||0),h=Math.max(n.height+r.labelPaddingY*2,t?.height||0),c=-a/2,l=-h/2;let d,{rx:u,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(u=r.rx,f=r.ry),t.look==="handDrawn"){const y=ut.svg(o),C=ct(t,{}),x=u||f?y.path(Ee(c,l,a,h,u||0),C):y.rectangle(c,l,a,h,C);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",ie(m))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",ie(u)).attr("ry",ie(f)).attr("x",c).attr("y",l).attr("width",a).attr("height",h);return pt(t,d,t.look==="handDrawn"?void 0:{width:a,height:h}),t.calcIntersect=function(y,C){return nt.rect(y,C)},t.intersect=function(y){return nt.rect(t,y)},o}p(Vi,"drawRect");async function If(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:n,height:a}=t,h={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Vi(e,t,h);if(t.look==="handDrawn"){const f=ut.svg(c),m=ct(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),C=y.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,m),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,m),".basic.label-container g.label"),y.remove(),c}const l=c.select(".basic.label-container"),d=(Number(l.attr("width"))||n)??0,u=(Number(l.attr("height"))||a)??0;return d>0&&u>0&&l.attr("stroke-dasharray",`${d} ${u}`),c}p(If,"datastore");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=a.width+s,l=a.height+o,d=l*.2,u=-c/2,f=-l/2-d/2,{cssStyles:m}=t,y=ut.svg(n),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:u,y:f+d},{x:-u,y:f+d},{x:-u,y:-f},{x:u,y:-f},{x:u,y:f},{x:-u,y:f},{x:-u,y:f+d}],b=y.polygon(x.map(T=>[T.x,T.y]),C),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),h.attr("transform",`translate(${u+(t.padding??0)/2-(a.x-(a.left??0))}, ${f+d+(t.padding??0)/2-(a.y-(a.top??0))})`),pt(t,S),t.intersect=function(T){return nt.rect(t,T)},n}p(Pf,"dividedRectangle");async function Rf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,n=t.look==="neo"?16:o,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t),{ignoreMinWidth:!0}),c=Math.sqrt(h.width**2+h.height**2)/2,l=(t?.width?t?.width/2:c)+(n??0),d=l+s;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(a),y=ct(t,{roughness:.2,strokeWidth:2.5}),C=ct(t,{roughness:.2,strokeWidth:1.5}),x=m.circle(0,0,d*2,y),b=m.circle(0,0,l*2,C);u=a.insert("g",":first-child"),u.attr("class",ie(t.cssClasses)).attr("style",ie(f)),u.node()?.appendChild(x),u.node()?.appendChild(b)}else{u=a.insert("g",":first-child");const m=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return pt(t,u),t.intersect=function(m){return J.info("DoubleCircle intersect",t,d,m),nt.circle(t,d,m)},a}p(Rf,"doublecircle");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:n}=await Ct(e,t,gt(t)),{theme:a,themeVariables:h}=Ot();Re(s,t.colorIndex,a,h.borderColorArray);const c=n??10,l=o.width/2+c*2,d=o.height/2+c*2;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(s),y=ct(t,{}),C=m.ellipse(0,0,l*2,d*2,y);u=s.insert(()=>C,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else u=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",d).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=d*2,pt(t,u),t.calcIntersect=function(m,y){const C=m.width/2,x=m.height/2;return nt.ellipse(m,C,x,y)},t.intersect=function(m){return nt.ellipse(t,l,d,m)},s}p(qf,"usecaseEllipse");function Nf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),n=7,{cssStyles:a}=t,h=ut.svg(o),{nodeBorder:c}=r,l=ct(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const d=h.circle(0,0,n*2,l),u=o.insert(()=>d,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),pt(t,u),t.intersect=function(f){return J.info("filledCircle intersect",t,{radius:n,point:f}),nt.circle(t,n,f)},o}p(Nf,"filledCircle");var cd=10,dd=10;async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<cd&&(t.height=cd),t.width=(t?.width??0)-o-o/2,t.width<dd&&(t.width=dd));const{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=(t?.width?t?.width:a.width)+(o??0),l=t?.height?t?.height:c+a.height,d=l,u=[{x:0,y:-l},{x:d,y:-l},{x:d/2,y:0}],{cssStyles:f}=t,m=ut.svg(n),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=qt(u),x=m.path(C,y),b=n.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=l,pt(t,b),h.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(S){return J.info("Triangle intersect",t,u,S),nt.polygon(t,u,S)},n}p(Wf,"flippedTriangle");async function zf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.padding??12,h=Math.max(o.width+a*2,t.width??0,90),c=o.height+a*2,l=Math.max(Math.min(c*.16,14),8),d=Math.max(c+l,t.height??0),u=d-l,f=Math.max(h*.38,28),m=-d/2,y=[{x:-h/2,y:m},{x:-h/2+f,y:m},{x:-h/2+f,y:m+l},{x:h/2,y:m+l},{x:h/2,y:d/2},{x:-h/2,y:d/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 v=ut.svg(s).path(C,ct(t,{}));b=s.insert(()=>v,":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"?pt(t,b):pt(t,b,{width:h,height:d});const S=m+l+u/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return nt.polygon(t,y,T)},s}p(zf,"folder");function Hf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=dt(t);t.label="";const n=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t;let h=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);(r==="LR"||r==="RL")&&(h=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const l=-1*h/2,d=-1*c/2,u=ut.svg(n),f=ct(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=u.rectangle(l,d,h,c,f),y=n.insert(()=>m,":first-child");a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),pt(t,y);const C=i?.padding??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return nt.rect(t,x)},n}p(Hf,"forkJoin");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=15,o=10,n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:h,bbox:c}=await Ct(e,t,gt(t)),l=(t?.height?t?.height:Math.max(o,c.height))+a*2,d=l/2,u=d-Math.sqrt(Math.max(0,d**2-(c.height/2)**2)),f=(t?.width?t?.width:Math.max(s,c.width)+u*2)+n*2,{cssStyles:m}=t,y=ut.svg(h),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-f/2,y:-l/2},{x:f/2-d,y:-l/2},...sr(-f/2+d,0,d,50,90,270),{x:f/2-d,y:l/2},{x:-f/2,y:l/2}],b=qt(x),S=y.path(b,C),T=h.insert(()=>S,":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),pt(t,T),t.intersect=function(v){return J.info("Pill intersect",t,{radius:d,point:v}),nt.polygon(t,x,v)},h}p(Yf,"halfRoundedRectangle");var DS=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 Uf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,n=70,a=32,h=t.look==="neo"?n:o,c=t.look==="neo"?a:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-h}const{shapeSvg:l,bbox:d}=await Ct(e,t,gt(t)),u=(t?.height?t?.height:d.height)+h,f=u/s,m=(t?.width?t?.width:d.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-u/2},{x:m-f,y:-u},{x:f,y:-u},{x:0,y:-u/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=ut.svg(l),S=ct(t,{}),T=DS(0,0,m,u,f),v=b.path(T,S);C=l.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),x&&C.attr("style",x)}else C=lr(l,m,u,y);return i&&C.attr("style",i),t.width=m,t.height=u,pt(t,C),t.intersect=function(b){return nt.polygon(t,y,b)},l}p(Uf,"hexagon");async function jf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Ct(e,t,gt(t)),o=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),{cssStyles:a}=t,h=ut.svg(s),c=ct(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=[{x:0,y:0},{x:o,y:0},{x:0,y:n},{x:o,y:n}],d=qt(l),u=h.path(d,c),f=s.insert(()=>u,":first-child");return f.attr("class","basic label-container outer-path"),a&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-n/2})`),pt(t,f),t.intersect=function(m){return J.info("Pill intersect",t,{points:l}),nt.polygon(t,l,m)},s}p(jf,"hourglass");async function Gf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const o=t.assetHeight??48,n=t.assetWidth??48,a=Math.max(o,n),h=i?.wrappingWidth;t.width=Math.max(a,h??0);const{shapeSvg:c,bbox:l,label:d}=await Ct(e,t,"icon-shape default"),u=t.pos==="t",f=a,m=a,{nodeBorder:y}=r,{stylesMap:C}=Hr(t),x=-m/2,b=-f/2,S=t.label?8:0,T=ut.svg(c),v=ct(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=T.rectangle(x,b,m,f,v),L=Math.max(m,l.width),F=f+l.height+S,q=T.rectangle(-L/2,-F/2,L,F,{...v,fill:"transparent",stroke:"none"}),R=c.insert(()=>B,":first-child"),$=c.insert(()=>q);if(t.icon){const G=c.append("g");G.html(`<g>${await ai(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const M=G.node().getBBox(),E=M.width,D=M.height,A=M.x,z=M.y;G.attr("transform",`translate(${-E/2-A},${u?l.height/2+S/2-D/2-z:-l.height/2-S/2-D/2-z})`),G.attr("style",`color: ${C.get("stroke")??y};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${u?-F/2:F/2-l.height})`),R.attr("transform",`translate(0,${u?l.height/2+S/2:-l.height/2-S/2})`),pt(t,$),t.intersect=function(G){if(J.info("iconSquare intersect",t,G),!t.label)return nt.rect(t,G);const M=t.x??0,E=t.y??0,D=t.height??0;let A=[];return u?A=[{x:M-l.width/2,y:E-D/2},{x:M+l.width/2,y:E-D/2},{x:M+l.width/2,y:E-D/2+l.height+S},{x:M+m/2,y:E-D/2+l.height+S},{x:M+m/2,y:E+D/2},{x:M-m/2,y:E+D/2},{x:M-m/2,y:E-D/2+l.height+S},{x:M-l.width/2,y:E-D/2+l.height+S}]:A=[{x:M-m/2,y:E-D/2},{x:M+m/2,y:E-D/2},{x:M+m/2,y:E-D/2+f},{x:M+l.width/2,y:E-D/2+f},{x:M+l.width/2/2,y:E+D/2},{x:M-l.width/2,y:E+D/2},{x:M-l.width/2,y:E-D/2+f},{x:M-m/2,y:E-D/2+f}],nt.polygon(t,A,G)},c}p(Gf,"icon");async function Vf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const o=t.assetHeight??48,n=t.assetWidth??48,a=Math.max(o,n),h=i?.wrappingWidth;t.width=Math.max(a,h??0);const{shapeSvg:c,bbox:l,label:d}=await Ct(e,t,"icon-shape default"),u=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:C}=r,{stylesMap:x}=Hr(t),b=ut.svg(c),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=x.get("fill");S.stroke=T??C;const v=c.append("g");t.icon&&v.html(`<g>${await ai(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const B=v.node().getBBox(),L=B.width,F=B.height,q=B.x,R=B.y,$=Math.max(L,F)*Math.SQRT2+u*2,G=b.circle(0,0,$,S),M=Math.max($,l.width),E=$+l.height+f,D=b.rectangle(-M/2,-E/2,M,E,{...S,fill:"transparent",stroke:"none"}),A=c.insert(()=>G,":first-child"),z=c.insert(()=>D);return v.attr("transform",`translate(${-L/2-q},${m?l.height/2+f/2-F/2-R:-l.height/2-f/2-F/2-R})`),v.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-E/2:E/2-l.height})`),A.attr("transform",`translate(0,${m?l.height/2+f/2:-l.height/2-f/2})`),pt(t,z),t.intersect=function(W){return J.info("iconSquare intersect",t,W),nt.rect(t,W)},c}p(Vf,"iconCircle");async function Xf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const o=t.assetHeight??48,n=t.assetWidth??48,a=Math.max(o,n),h=i?.wrappingWidth;t.width=Math.max(a,h??0);const{shapeSvg:c,bbox:l,halfPadding:d,label:u}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=a+d*2,y=a+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Hr(t),S=-y/2,T=-m/2,v=t.label?8:0,B=ut.svg(c),L=ct(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const F=b.get("fill");L.stroke=F??x;const q=B.path(Ee(S,T,y,m,5),L),R=Math.max(y,l.width),$=m+l.height+v,G=B.rectangle(-R/2,-$/2,R,$,{...L,fill:"transparent",stroke:"none"}),M=c.insert(()=>q,":first-child").attr("class","icon-shape2"),E=c.insert(()=>G);if(t.icon){const D=c.append("g");D.html(`<g>${await ai(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const A=D.node().getBBox(),z=A.width,W=A.height,tt=A.x,V=A.y;D.attr("transform",`translate(${-z/2-tt},${f?l.height/2+v/2-W/2-V:-l.height/2-v/2-W/2-V})`),D.attr("style",`color: ${b.get("stroke")??C};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-$/2:$/2-l.height})`),M.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),pt(t,E),t.intersect=function(D){if(J.info("iconSquare intersect",t,D),!t.label)return nt.rect(t,D);const A=t.x??0,z=t.y??0,W=t.height??0;let tt=[];return f?tt=[{x:A-l.width/2,y:z-W/2},{x:A+l.width/2,y:z-W/2},{x:A+l.width/2,y:z-W/2+l.height+v},{x:A+y/2,y:z-W/2+l.height+v},{x:A+y/2,y:z+W/2},{x:A-y/2,y:z+W/2},{x:A-y/2,y:z-W/2+l.height+v},{x:A-l.width/2,y:z-W/2+l.height+v}]:tt=[{x:A-y/2,y:z-W/2},{x:A+y/2,y:z-W/2},{x:A+y/2,y:z-W/2+m},{x:A+l.width/2,y:z-W/2+m},{x:A+l.width/2/2,y:z+W/2},{x:A-l.width/2,y:z+W/2},{x:A-l.width/2,y:z-W/2+m},{x:A-y/2,y:z-W/2+m}],nt.polygon(t,tt,D)},c}p(Xf,"iconRounded");async function Zf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const o=t.assetHeight??48,n=t.assetWidth??48,a=Math.max(o,n),h=i?.wrappingWidth;t.width=Math.max(a,h??0);const{shapeSvg:c,bbox:l,halfPadding:d,label:u}=await Ct(e,t,"icon-shape default"),f=t.pos==="t",m=a+d*2,y=a+d*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:b}=Hr(t),S=-y/2,T=-m/2,v=t.label?8:0,B=ut.svg(c),L=ct(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const F=b.get("fill");L.stroke=F??x;const q=B.path(Ee(S,T,y,m,.1),L),R=Math.max(y,l.width),$=m+l.height+v,G=B.rectangle(-R/2,-$/2,R,$,{...L,fill:"transparent",stroke:"none"}),M=c.insert(()=>q,":first-child"),E=c.insert(()=>G);if(t.icon){const D=c.append("g");D.html(`<g>${await ai(t.icon,{height:a,width:a,fallbackPrefix:""})}</g>`);const A=D.node().getBBox(),z=A.width,W=A.height,tt=A.x,V=A.y;D.attr("transform",`translate(${-z/2-tt},${f?l.height/2+v/2-W/2-V:-l.height/2-v/2-W/2-V})`),D.attr("style",`color: ${b.get("stroke")??C};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-$/2:$/2-l.height})`),M.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),pt(t,E),t.intersect=function(D){if(J.info("iconSquare intersect",t,D),!t.label)return nt.rect(t,D);const A=t.x??0,z=t.y??0,W=t.height??0;let tt=[];return f?tt=[{x:A-l.width/2,y:z-W/2},{x:A+l.width/2,y:z-W/2},{x:A+l.width/2,y:z-W/2+l.height+v},{x:A+y/2,y:z-W/2+l.height+v},{x:A+y/2,y:z+W/2},{x:A-y/2,y:z+W/2},{x:A-y/2,y:z-W/2+l.height+v},{x:A-l.width/2,y:z-W/2+l.height+v}]:tt=[{x:A-y/2,y:z-W/2},{x:A+y/2,y:z-W/2},{x:A+y/2,y:z-W/2+m},{x:A+l.width/2,y:z-W/2+m},{x:A+l.width/2/2,y:z+W/2},{x:A-l.width/2,y:z+W/2},{x:A-l.width/2,y:z-W/2+m},{x:A-y/2,y:z-W/2+m}],nt.polygon(t,tt,D)},c}p(Zf,"iconSquare");async function Kf(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:n}=dt(t);t.labelStyle=n;const a=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const h=Math.max(t.label?a??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:h,l=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,a??0);const{shapeSvg:d,bbox:u,label:f}=await Ct(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,C=-l/2,x=t.label?8:0,b=ut.svg(d),S=ct(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=b.rectangle(y,C,c,l,S),v=Math.max(c,u.width),B=l+u.height+x,L=b.rectangle(-v/2,-B/2,v,B,{...S,fill:"none",stroke:"none"}),F=d.insert(()=>T,":first-child"),q=d.insert(()=>L);if(t.img){const R=d.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",l),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${m?B/2-l:-B/2})`)}return f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${m?-l/2-u.height/2-x/2:l/2-u.height/2+x/2})`),F.attr("transform",`translate(0,${m?u.height/2+x/2:-u.height/2-x/2})`),pt(t,q),t.intersect=function(R){if(J.info("iconSquare intersect",t,R),!t.label)return nt.rect(t,R);const $=t.x??0,G=t.y??0,M=t.height??0;let E=[];return m?E=[{x:$-u.width/2,y:G-M/2},{x:$+u.width/2,y:G-M/2},{x:$+u.width/2,y:G-M/2+u.height+x},{x:$+c/2,y:G-M/2+u.height+x},{x:$+c/2,y:G+M/2},{x:$-c/2,y:G+M/2},{x:$-c/2,y:G-M/2+u.height+x},{x:$-u.width/2,y:G-M/2+u.height+x}]:E=[{x:$-c/2,y:G-M/2},{x:$+c/2,y:G-M/2},{x:$+c/2,y:G-M/2+l},{x:$+u.width/2,y:G-M/2+l},{x:$+u.width/2/2,y:G+M/2},{x:$-u.width/2,y:G+M/2},{x:$-u.width/2,y:G-M/2+l},{x:$-c/2,y:G-M/2+l}],nt.polygon(t,E,R)},d}p(Kf,"imageSquare");async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=s,n=t.look==="neo"?s*2:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=Math.max(h.height+o*2,t.height??0),l=Math.max(h.width+n*2,(t.width??0)-c),d=[{x:0,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(a),y=ct(t,{}),C=qt(d),x=m.path(C,y);u=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&u.attr("style",f)}else u=lr(a,l,c,d);return i&&u.attr("style",i),t.width=l,t.height=c,pt(t,u),t.intersect=function(m){return nt.polygon(t,d,m)},a}p(Qf,"inv_trapezoid");async function Jf(e,t){const{shapeSvg:r,bbox:i,label:s}=await Ct(e,t,"label"),o=r.insert("rect",":first-child");return o.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))})`),pt(t,o),t.intersect=function(h){return nt.rect(t,h)},r}p(Jf,"labelRect");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=s,n=t.look==="neo"?s*2:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+n,(t.width??0)-c),d=[{x:0,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:-(3*c)/6,y:-c}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(a),y=ct(t,{}),C=qt(d),x=m.path(C,y);u=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&u.attr("style",f)}else u=lr(a,l,c,d);return i&&u.attr("style",i),t.width=l,t.height=c,pt(t,u),t.intersect=function(m){return nt.polygon(t,d,m)},a}p(tg,"lean_left");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=s,n=t.look==="neo"?s*2:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+n,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:0,y:-c}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(a),y=ct(t,{}),C=qt(d),x=m.path(C,y);u=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&u.attr("style",f)}else u=lr(a,l,c,d);return i&&u.attr("style",i),t.width=l,t.height=c,pt(t,u),t.intersect=function(m){return nt.polygon(t,d,m)},a}p(eg,"lean_right");function rg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",gt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,n=Math.max(35,t?.width??0),a=Math.max(35,t?.height??0),h=7,c=[{x:n,y:0},{x:0,y:a+h/2},{x:n-2*h,y:a+h/2},{x:0,y:2*a},{x:n,y:a-h/2},{x:2*h,y:a-h/2}],l=ut.svg(s),d=ct(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=qt(c),f=l.path(u,d),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-a})`),pt(t,m),t.intersect=function(y){return J.info("lightningBolt intersect",t,y),nt.polygon(t,c,y)},s}p(rg,"lightningBolt");var IS=p((e,t,r,i,s,o,n)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+n}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),PS=p((e,t,r,i,s,o,n)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+n}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),RS=p((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ud=10,pd=10;async function ig(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<pd&&(t.width=pd);const S=x/2/(2.5+x/50);t.height=(t.height??0)-n-S*3,t.height<ud&&(t.height=ud)}const{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=(t?.width?t?.width:h.width)+o*2,d=l/2,u=d/(2.5+l/50),f=(t?.height?t?.height:h.height)+u+n*2,m=f*.1;let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=ut.svg(a),b=PS(0,0,l,f,d,u,m),S=RS(0,u,l,f,d,u),T=ct(t,{}),v=x.path(b,T),B=x.path(S,T);a.insert(()=>B,":first-child").attr("class","line"),y=a.insert(()=>v,":first-child"),y.attr("class","basic label-container"),C&&y.attr("style",C)}else{const x=IS(0,0,l,f,d,u,m);y=a.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",ie(C)).attr("style",i)}return y.attr("label-offset-y",u),y.attr("transform",`translate(${-l/2}, ${-(f/2+u)})`),pt(t,y),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),t.intersect=function(x){const b=nt.rect(t,x),S=b.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-u)){let T=u*u*(1-S*S/(d*d));T>0&&(T=Math.sqrt(T)),T=u-T,x.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},a}p(ig,"linedCylinder");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=(t?.width?t?.width:h.width)+(o??0)*2,d=(t?.height?t?.height:h.height)+(n??0)*2,u=t.look==="neo"?d/4:d/8,f=d+u,{cssStyles:m}=t,y=ut.svg(a),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...Wr(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,u,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],b=y.polygon(x.map(T=>[T.x,T.y]),C),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(h.x-(h.left??0))},${-d/2+(t.padding??0)-u-(h.y-(h.top??0))})`),pt(t,S),t.intersect=function(T){return nt.polygon(t,x,T)},a}p(sg,"linedWaveEdgedRect");var qS=56,gn=72,fd=8,gd=2,NS=8,WS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},md=Math.PI/3,yd=.6,mn=p((e,t)=>{const r=t*yd,i=t*Math.sqrt(1-yd**2),s=Math.cos(md),o=-Math.sin(md),n=r*-o,a=e+r*s,h=i*s,c=i*o;return`M ${n-h} ${a-c} L ${n+h} ${a+c}`},"businessMarkerPathForCircle"),zS={normal:mn(-24,12),hollow:mn(-23,9),awesome:mn(-21,13),icon:"M 12 -8 L 26 -26"},Cd=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"),ah=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const a=ut.svg(e).path(r,ct(t,s?{fill:"none"}:{}));return e.insert(()=>a,":first-child").attr("class",i)}const o=e.append("path").attr("class",i).attr("d",r);return s&&o.attr("fill","none"),o},"appendActorPath"),HS=p((e,t,r,i,s,o,n=!1)=>{if(t.look==="handDrawn"){const c=ut.svg(e).circle(r,i,s*2,ct(t,n?{fill:"none"}:{}));return e.insert(()=>c,":first-child").attr("class",o)}const a=e.append("circle").attr("class",o).attr("cx",r).attr("cy",i).attr("r",s);return n&&a.attr("fill","none"),a},"appendActorCircle"),YS=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",zS[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Is(e,t,r,i){const{labelStyles:s,nodeStyles:o}=dt(t);t.labelStyle=s;const n=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:a,bbox:h,label:c}=await Ct(e,n,gt(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&a.attr("role","img").attr("aria-label",l),c.attr("class","label actor-label usecase-actor-label");const{theme:d,themeVariables:u}=Ot();Re(a,t.colorIndex,d,u.borderColorArray);let f,m;if(t.stereotype){const F=await Jr(a,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=F.label.attr("class","label usecase-stereotype"),m=F.bbox}const y=a.append("g").attr("class",`usecase-actor-glyph ${WS[r]}`).attr("style",o||null);await i(y,t),YS(y,t,r);const C=t.padding??NS,x=m?.height??0,b=gn+fd+h.height+(m?x+gd:0),S=Math.max(qS,h.width,m?.width??0)+C*2,T=b+C*2,v=-b/2;y.attr("transform",`translate(0,${v+gn/2})`);let B=v+gn+fd;f&&m&&(B+=x/2,Cd(f,m,B),B+=x/2+gd),Cd(c,h,B+h.height/2);const L=a.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-S/2).attr("y",-T/2).attr("width",S).attr("height",T).attr("opacity",0).attr("aria-hidden","true");return pt(t,L),t.intersect=F=>nt.rect(t,F),a}p(Is,"renderUsecaseActor");var US=["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 og(e,t){return Is(e,t,"normal",(r,i)=>{ah(r,i,US,"usecase-actor-stick")})}p(og,"usecaseActor");var jS=["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 ag(e,t){return Is(e,t,"awesome",(r,i)=>{ah(r,i,jS,"usecase-actor-awesome-silhouette")})}p(ag,"usecaseActorAwesome");var GS=["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 ng(e,t){return Is(e,t,"hollow",(r,i)=>{HS(r,i,0,-23,9,"usecase-actor-hollow-head",!0),ah(r,i,GS,"usecase-actor-hollow-body",!0)})}p(ng,"usecaseActorHollow");var gi=52,xd=42,bd=-2,VS=p(async(e,t)=>{const r=-gi/2,i=bd-gi/2;if(t.look==="handDrawn"){const l=ut.svg(e).rectangle(r,i,gi,gi,ct(t,{}));e.insert(()=>l,":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",gi).attr("height",gi).attr("rx",4).attr("ry",4);const s=t.icon??"",o=await Fu(s.includes(":")?s:`fa:${s}`),n=await ai(s,{height:xd,width:xd,fallbackPrefix:"fa"}),a=e.append("g").attr("class",`usecase-actor-icon-symbol${o?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),h=a.node()?.getBBox();h&&a.attr("transform",`translate(${-h.width/2-h.x},${bd-h.height/2-h.y})`)},"drawIconActor");async function lg(e,t){return Is(e,t,"icon",VS)}p(lg,"usecaseActorIcon");var kd=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 hg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const o=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:n,bbox:a,halfPadding:h,label:c}=await Ct(e,o,gt(t,"usecase-business-shape"));c.attr("class","label usecase-label");const{theme:l,themeVariables:d}=Ot();Re(n,t.colorIndex,l,d.borderColorArray);let u,f;if(r.stereotype){const M=await Jr(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});u=M.label.attr("class","label usecase-stereotype"),f=M.bbox}const m=f?2:0,y=a.height+(f?.height??0)+m,C=Math.max(a.width,f?.width??0),x=h??10,b=C/2+x*2,S=y/2+x*2,T=Math.min(Math.max(x/5,1),x/2),v=C/2+T,B=b-T,L=v/b,F=B/b,q=S*Math.sqrt(Math.max(0,1-L*L)),R=-S*Math.sqrt(Math.max(0,1-F*F));u&&f&&kd(u,f,-y/2+f.height/2),kd(c,a,y/2-a.height/2);let $;if(t.look==="handDrawn"){const E=ut.svg(n).ellipse(0,0,b*2,S*2,ct(t,{}));$=n.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else $=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",S).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${v} ${q} L ${B} ${R}`).attr("fill","none").attr("style",s||null);const G=r.accessibleName??r.label;return G&&n.attr("role","img").attr("aria-label",G),pt(t,$),t.calcIntersect=(M,E)=>nt.ellipse(M,M.width/2,M.height/2,E),t.intersect=M=>nt.ellipse(t,b,S,M),n}p(hg,"usecaseBusiness");var yn=8,Sd=4,XS=1,Cn=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),o=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-o})`)},"positionLabel"),ZS=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:XS},"numericStrokeWidth");async function cg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=dt(t),{stylesMap:o}=Hr(t);t.labelStyle=i;const{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t,"usecase-json-table"));n.attr("role","img"),r.accessibleName&&n.attr("aria-label",r.accessibleName),h.attr("class","label usecase-json-title");const c=n.append("g").attr("class","usecase-json-table-grid"),l=[];for(const M of r.jsonRows??[]){const E=await Jr(c,M.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),D=await Jr(c,M.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:E.label.attr("class","label usecase-json-key"),bbox:E.bbox},value:{label:D.label.attr("class","label usecase-json-value"),bbox:D.bbox}})}const d=Math.max(0,...l.map(({key:M})=>M.bbox.width))+yn*2,u=Math.max(0,...l.map(({value:M})=>M.bbox.width))+yn*2,f=a.width+yn*2,m=Math.max(f,d+u),y=u+Math.max(0,m-d-u),C=a.height+Sd*2,x=l.map(({key:M,value:E})=>Math.max(M.bbox.height,E.bbox.height)+Sd*2),b=C+x.reduce((M,E)=>M+E,0),S=ZS(o.get("stroke-width")),T=m+S*2,v=b+S*2,B=-m/2,L=-b/2,F=t.look==="handDrawn"?ut.svg(n):void 0,q=F?ct(t,{}):void 0,R=p((M,E,D,A,z,W)=>{if(F&&q){const tt=F.rectangle(D,A,z,W,q);return M.insert(()=>tt,":first-child").attr("class",E)}return M.insert("rect",":first-child").attr("class",E).attr("x",D).attr("y",A).attr("width",z).attr("height",W).attr("style",s)},"insertCell"),$=R(n,"label-container usecase-json-border",-T/2,-v/2,T,v);R(c,"usecase-json-cell usecase-json-title-cell",B,L,m,C),c.node()?.append(h.node()),Cn(h,a,0,L+C/2);let G=L+C;return l.forEach(({key:M,value:E},D)=>{const A=x[D],z=c.append("g").attr("class","usecase-json-row").attr("data-row-index",D).attr("transform",`translate(0,${G})`);R(z,"usecase-json-cell usecase-json-key-cell",B,0,d,A),R(z,"usecase-json-cell usecase-json-value-cell",B+d,0,y,A),z.node()?.append(M.label.node(),E.label.node()),Cn(M.label,M.bbox,B+d/2,A/2),Cn(E.label,E.bbox,B+d+y/2,A/2),G+=A}),pt(t,$),t.intersect=M=>nt.rect(t,M),n}p(cg,"usecaseJsonTable");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s,a=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*a,10),t.height=Math.max((t?.height??0)-n*2-2*a,10));const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,gt(t)),d=(t?.width?t?.width:c.width)+o*2+2*a,u=(t?.height?t?.height:c.height)+n*2+2*a,f=d-2*a,m=u-2*a,y=-f/2,C=-m/2,{cssStyles:x}=t,b=ut.svg(h),S=ct(t,{}),T=[{x:y-a,y:C+a},{x:y-a,y:C+m+a},{x:y+f-a,y:C+m+a},{x:y+f-a,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C+m-a},{x:y+f+a,y:C+m-a},{x:y+f+a,y:C-a},{x:y+a,y:C-a},{x:y+a,y:C},{x:y,y:C},{x:y,y:C+a}],v=[{x:y,y:C+a},{x:y+f-a,y:C+a},{x:y+f-a,y:C+m},{x:y+f,y:C+m},{x:y+f,y:C},{x:y,y:C}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=qt(T);let L=b.path(B,S);const F=qt(v);let q=b.path(F,S);t.look!=="handDrawn"&&(L=Gn(L),q=Gn(q));const R=h.insert("g",":first-child");return R.insert(()=>L),R.insert(()=>q),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(${-(c.width/2)-a-(c.x-(c.left??0))}, ${-(c.height/2)+a-(c.y-(c.top??0))})`),pt(t,R),t.intersect=function($){return nt.polygon(t,T,$)},h}p(dg,"multiRect");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=t.padding??0,h=t.look==="neo"?16:a,c=t.look==="neo"?12:a;let l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-h*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+h*2,u=Math.max(o.height,t?.height??0)+c*3,f=t.look==="neo"?u/4:u/8,m=u+(l?f/2:-f/2),y=-d/2,C=-m/2,x=10,{cssStyles:b}=t,S=Wr(y-x,C+m+x,y+d-x,C+m+x,f,.8),T=S?.[S.length-1],v=[{x:y-x,y:C+x},{x:y-x,y:C+m+x},...S,{x:y+d-x,y:T.y-x},{x:y+d,y:T.y-x},{x:y+d,y:T.y-2*x},{x:y+d+x,y:T.y-2*x},{x:y+d+x,y:C-x},{x:y+x,y:C-x},{x:y+x,y:C},{x:y,y:C},{x:y,y:C+x}],B=[{x:y,y:C+x},{x:y+d-x,y:C+x},{x:y+d-x,y:T.y-x},{x:y+d,y:T.y-x},{x:y+d,y:C},{x:y,y:C}],L=ut.svg(s),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const q=qt(v),R=L.path(q,F),$=qt(B),G=L.path($,F),M=s.insert(()=>R,":first-child");return M.insert(()=>G),M.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-f/2})`),n.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-f-(o.y-(o.top??0))})`),pt(t,M),t.intersect=function(E){return nt.polygon(t,v,E)},s}p(ug,"multiWaveEdgedRectangle");async function pg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i,t.useHtmlLabels||de(Gt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),d=-c/2,u=-l/2,{cssStyles:f}=t,m=ut.svg(n),y=ct(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=m.rectangle(d,u,c,l,y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),h.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),pt(t,x),t.intersect=function(b){return nt.rect(t,b)},n}p(pg,"note");var KS=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 fg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ct(e,t,gt(t)),n=o.width+(t.padding??0),a=o.height+(t.padding??0),h=n+a,c=.5,l=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}];let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=ut.svg(s),m=ct(t,{}),y=KS(0,0,h),C=f.path(y,m);d=s.insert(()=>C,":first-child").attr("transform",`translate(${-h/2+c}, ${h/2})`),u&&d.attr("style",u)}else d=lr(s,h,h,l),d.attr("transform",`translate(${-h/2+c}, ${h/2})`);return i&&d.attr("style",i),pt(t,d),t.calcIntersect=function(f,m){const y=f.width,C=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return nt.polygon(f,C,m)},t.intersect=function(f){return this.calcIntersect(t,f)},s}p(fg,"question");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=h.width+(t.look==="neo"?o*2:o),d=Math.max(h.height+(t.look==="neo"?n*2:n),t.height??0),u=d/4,m=-Math.max(l,(t.width??0)-u)/2,y=-d/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,S=ut.svg(a),T=ct(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=qt(x),B=S.path(v,T),L=a.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),pt(t,L),t.intersect=function(F){return nt.polygon(t,x,F)},a}p(gg,"rect_left_inv_arrow");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=o.insert("g"),a=o.insert("g").attr("class","label").attr("style",i),h=t.description,c=t.label,l=await yr(a,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(de(Ot())){const F=l.children[0],q=$t(l);d=F.getBoundingClientRect(),q.attr("width",d.width),q.attr("height",d.height)}J.info("Text 2",h);const u=h||[],f=l.getBBox(),m=await yr(a,Array.isArray(u)?u.join("<br/>"):u,t.labelStyle,!0,!0),y=m.children[0],C=$t(m);d=y.getBoundingClientRect(),C.attr("width",d.width),C.attr("height",d.height);const x=(t.padding||0)/2;$t(m).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+x+5)+")"),$t(l).attr("transform","translate( "+(d.width<f.width?0:-(f.width-d.width)/2)+", 0)"),d=a.node().getBBox(),a.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const b=d.width+(t.padding||0),S=d.height+(t.padding||0),T=-d.width/2-x,v=-d.height/2-x;let B,L;if(t.look==="handDrawn"){const F=ut.svg(o),q=ct(t,{}),R=F.path(Ee(T,v,b,S,t.rx||0),q),$=F.line(-d.width/2-x,-d.height/2-x+f.height+x,d.width/2+x,-d.height/2-x+f.height+x,q);L=o.insert(()=>(J.debug("Rough node insert CXC",R),$),":first-child"),B=o.insert(()=>(J.debug("Rough node insert CXC",R),R),":first-child")}else B=n.insert("rect",":first-child"),L=n.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),L.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+f.height+x).attr("y2",-d.height/2-x+f.height+x);return pt(t,B),t.intersect=function(F){return nt.rect(t,F)},o}p(mg,"rectWithTitle");async function yg(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Vi(e,t,s)}p(yg,"roundedRect");var jr=8;async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=(t?.width??a.width)+s*2+(t.look==="neo"?jr:jr*2),l=(t?.height??a.height)+o*2,d=c-jr,u=l,f=jr-c/2,m=-l/2,{cssStyles:y}=t,C=ut.svg(n),x=ct(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:f,y:m},{x:f+d,y:m},{x:f+d,y:m+u},{x:f-jr,y:m+u},{x:f-jr,y:m},{x:f,y:m},{x:f,y:m+u}],S=C.polygon(b.map(v=>[v.x,v.y]),x),T=n.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path").attr("style",ie(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),h.attr("transform",`translate(${jr/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),pt(t,T),t.intersect=function(v){return nt.rect(t,v)},n}p(Cg,"shadedProcess");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-n*2,10));const{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=(t?.width?t?.width:h.width)+o*2,d=((t?.height?t?.height:h.height)+n*2)*1.5,u=l,f=d/1.5,m=-u/2,y=-f/2,{cssStyles:C}=t,x=ut.svg(a),b=ct(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+f},{x:m+u,y:y+f},{x:m+u,y:y-f/2}],T=qt(S),v=x.path(T,b),B=a.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))}, ${-f/4+(t.padding??0)-(h.y-(h.top??0))})`),pt(t,B),t.intersect=function(L){return nt.polygon(t,S,L)},a}p(xg,"slopedRect");async function bg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},n=await Vi(e,t,o);if(t.colorIndex!==void 0){const{theme:a,themeVariables:h}=Ot();Re(n,t.colorIndex,a,h.borderColorArray)}return n}p(bg,"squareRect");var Zn=50,QS=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(Zn-1))),o=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-o),h:i}},"stadiumDimensions");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?40:s,n=t.look==="neo"?24:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),{w:c,h:l}=QS(h,o,n),d=l/2,{cssStyles:u}=t,f=ut.svg(a),m=ct(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2+d,y:-l/2},{x:c/2-d,y:-l/2},...sr(-c/2+d,0,d,Zn,90,270),{x:c/2-d,y:l/2},...sr(c/2-d,0,d,Zn,270,450)],C=qt(y),x=f.path(C,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),pt(t,b),t.intersect=function(S){return nt.polygon(t,y,S)},a}p(kg,"stadium");async function Sg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Vi(e,t,r)}p(Sg,"state");function wg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:n,stateBorder:a,nodeBorder:h,nodeShadow:c}=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),d=ut.svg(l),u=ct(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=d.circle(0,0,t.width,{...u,stroke:n,strokeWidth:2}),m=a??h,y=(t.width??0)*5/14,C=d.circle(0,0,y,{...u,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=l.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",S=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${S})`)}return pt(t,x),t.intersect=function(b){return nt.circle(t,(t.width??0)/2,b)},l}p(wg,"stateEnd");function Tg(e,t,{config:{themeVariables:r}}){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 o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const h=ut.svg(o).circle(0,0,t.width,Fx(i));n=o.insert(()=>h),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=o.insert("circle",":first-child"),n.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 a=e.node()?.ownerSVGElement?.id??"",h=a?`${a}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${h})`)}return pt(t,n),t.intersect=function(a){return nt.circle(t,(t.width??7)/2,a)},o}p(Tg,"stateStart");var mi=8;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=Math.max(h.width+2*mi+o,t.width??0),l=Math.max(h.height+n,t.height??0),d=c-2*mi,u=l,f=-c/2,m=-l/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){const C=ut.svg(a),x=ct(t,{}),b=C.rectangle(f,m,d+16,u,x),S=C.line(f+mi,m,f+mi,m+u,x),T=C.line(f+mi+d,m,f+mi+d,m+u,x);a.insert(()=>S,":first-child"),a.insert(()=>T,":first-child");const v=a.insert(()=>b,":first-child"),{cssStyles:B}=t;v.attr("class","basic label-container").attr("style",ie(B)),pt(t,v)}else{const C=lr(a,d,u,y);i&&C.attr("style",i),pt(t,C)}return t.intersect=function(C){return nt.polygon(t,y,C)},a}p(_g,"subroutine");var xn=.2;async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-n*2,10),t.width=Math.max((t?.width??0)-o*2-xn*(t.height+n*2),10));const{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=(t?.height?t?.height:h.height)+n*2,l=xn*c,d=xn*c,f=(t?.width?t?.width:h.width)+o*2+l-l,m=c,y=-f/2,C=-m/2,{cssStyles:x}=t,b=ut.svg(a),S=ct(t,{}),T=[{x:y-l/2,y:C},{x:y+f+l/2,y:C},{x:y+f+l/2,y:C+m},{x:y-l/2,y:C+m}],v=[{x:y+f-l/2,y:C+m},{x:y+f+l/2,y:C+m},{x:y+f+l/2,y:C+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const B=qt(T),L=b.path(B,S),F=qt(v),q=b.path(F,{...S,fillStyle:"solid"}),R=a.insert(()=>q,":first-child");return R.insert(()=>L,":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),pt(t,R),t.intersect=function($){return nt.polygon(t,T,$)},a}p(Bg,"taggedRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t)),a=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=h/8,l=.2*a,d=.2*h,u=h+c,{cssStyles:f}=t,m=ut.svg(s),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-a/2-a/2*.1,y:u/2},...Wr(-a/2-a/2*.1,u/2,a/2+a/2*.1,u/2,c,.8),{x:a/2+a/2*.1,y:-u/2},{x:-a/2-a/2*.1,y:-u/2}],x=-a/2+a/2*.1,b=-u/2-d*.4,S=[{x:x+a-l,y:(b+h)*1.3},{x:x+a,y:b+h-d},{x:x+a,y:(b+h)*.9},...Wr(x+a,(b+h)*1.25,x+a-l,(b+h)*1.3,-h*.02,.5)],T=qt(C),v=m.path(T,y),B=qt(S),L=m.path(B,{...y,fillStyle:"solid"}),F=s.insert(()=>L,":first-child");return F.insert(()=>v,":first-child"),F.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),pt(t,F),t.intersect=function(q){return nt.polygon(t,C,q)},s}p(vg,"taggedWaveEdgedRectangle");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await Ct(e,t,gt(t)),n=Math.max(o.width+(t.padding??0),t?.width||0),a=Math.max(o.height+(t.padding??0),t?.height||0),h=-n/2,c=-a/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",n).attr("height",a),pt(t,l),t.intersect=function(d){return nt.rect(t,d)},s}p(Lg,"text");var JS=p((e,t,r,i,s,o)=>`M${e},${t}
|
|
235
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
236
|
+
l${r},0
|
|
237
|
+
a${s},${o} 0,0,1 0,${i}
|
|
238
|
+
M${r},${-i}
|
|
239
|
+
a${s},${o} 0,0,0 0,${i}
|
|
240
|
+
l${-r},0`,"createCylinderPathD"),tw=p((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ew=p((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),wd=5,Td=10;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-o,t.height<wd&&(t.height=wd)),t.width){const x=n/2/(2.5+n/50);t.width=t.width-o-x*3,t.width<Td&&(t.width=Td)}const{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=Math.max(t.height??0,h.height)+o,d=l/2,u=d/(2.5+l/50),f=Math.max(t.width??0,h.width)+u+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const C=ut.svg(a),x=tw(0,0,f,l,u,d),b=ew(0,0,f,l,u,d),S=C.path(x,ct(t,{})),T=C.path(b,ct(t,{fill:"none"}));y=a.insert(()=>T,":first-child"),y=a.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const C=JS(0,0,f,l,u,d);y=a.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",ie(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",u),y.attr("transform",`translate(${-f/2}, ${l/2} )`),c.attr("transform",`translate(${-(h.width/2)-u-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),pt(t,y),t.intersect=function(C){const x=nt.rect(t,C),b=x.y-(t.y??0);if(d!=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-u)){let S=u*u*(1-b*b/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=u-S,C.x-(t.x??0)>0&&(S=-S),x.x+=S}return x},a}p(Fg,"tiltedCylinder");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+n,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:0,y:-c}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=ut.svg(a),y=ct(t,{}),C=qt(d),x=m.path(C,y);u=a.insert(()=>x,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&u.attr("style",f)}else u=lr(a,l,c,d);return i&&u.attr("style",i),t.width=l,t.height=c,pt(t,u),t.intersect=function(m){return nt.polygon(t,d,m)},a}p(Ag,"trapezoid");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s,a=15,h=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<h&&(t.height=h),t.width=(t.width??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:c,bbox:l}=await Ct(e,t,gt(t)),d=(t?.width?t?.width:l.width)+o*2,u=(t?.height?t?.height:l.height)+n*2,{cssStyles:f}=t,m=ut.svg(c),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-d/2*.8,y:-u/2},{x:d/2*.8,y:-u/2},{x:d/2,y:-u/2*.6},{x:d/2,y:u/2},{x:-d/2,y:u/2},{x:-d/2,y:-u/2*.6}],x=qt(C),b=m.path(x,y),S=c.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),pt(t,S),t.intersect=function(T){return nt.polygon(t,C,T)},c}p(Eg,"trapezoidalPentagon");var _d=10,Bd=10;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Bd&&(t.width=Bd),t.height=t?.height??0,t.height<_d&&(t.height=_d));const{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=nr(Ot().flowchart?.htmlLabels),l=(t?.width?t?.width:a.width)+o,d=t?.height?t?.height:l+a.height,u=d,f=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-d}],{cssStyles:m}=t,y=ut.svg(n),C=ct(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=qt(f),b=y.path(x,C),S=n.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=l,t.height=d,pt(t,S),h.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${d/2-(a.height+(t.padding??0)/(c?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(T){return J.info("Triangle intersect",t,f,T),nt.polygon(t,f,T)},n}p(Mg,"triangle");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let a=!0;(t.width||t.height)&&(a=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:h,bbox:c,label:l}=await Ct(e,t,gt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,u=(t?.height?t?.height:c.height)+(n??0)*2,f=t.look==="neo"?u/4:u/8,m=u+(a?f:-f),{cssStyles:y}=t,x=14-d,b=x>0?x/2:0,S=ut.svg(h),T=ct(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=[{x:-d/2-b,y:m/2},...Wr(-d/2-b,m/2,d/2+b,m/2,f,.8),{x:d/2+b,y:-m/2},{x:-d/2-b,y:-m/2}],B=qt(v),L=S.path(B,T),F=h.insert(()=>L,":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,${-f/2})`),l.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-u/2+(t.padding??0)-f-(c.y-(c.top??0))})`),pt(t,F),t.intersect=function(q){return nt.polygon(t,v,q)},h}p($g,"waveEdgedRectangle");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=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-n-T*(20/9)),t.width=t.width-o*2}const{shapeSvg:a,bbox:h}=await Ct(e,t,gt(t)),c=(t?.width?t?.width:h.width)+o*2,l=(t?.height?t?.height:h.height)+n,d=l/8,u=l+d*2,{cssStyles:f}=t,m=ut.svg(a),y=ct(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2,y:u/2},...Wr(-c/2,u/2,c/2,u/2,d,1),{x:c/2,y:-u/2},...Wr(c/2,-u/2,-c/2,-u/2,d,-1)],x=qt(C),b=m.path(x,y),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),pt(t,S),t.intersect=function(T){return nt.polygon(t,C,T)},a}p(Og,"waveRectangle");var Xt=10;async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Xt,10),t.height=Math.max((t?.height??0)-o*2-Xt,10));const{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t)),c=(t?.width?t?.width:a.width)+s*2+Xt,l=(t?.height?t?.height:a.height)+o*2+Xt,d=c-Xt,u=l-Xt,f=-d/2,m=-u/2,{cssStyles:y}=t,C=ut.svg(n),x=ct(t,{}),b=[{x:f-Xt,y:m-Xt},{x:f-Xt,y:m+u},{x:f+d,y:m+u},{x:f+d,y:m-Xt}],S=`M${f-Xt},${m-Xt} L${f+d},${m-Xt} L${f+d},${m+u} L${f-Xt},${m+u} L${f-Xt},${m-Xt}
|
|
241
|
+
M${f-Xt},${m} L${f+d},${m}
|
|
242
|
+
M${f},${m-Xt} L${f},${m+u}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(S,x),v=n.insert(()=>T,":first-child");return v.attr("transform",`translate(${Xt/2}, ${Xt/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(a.width/2)+Xt/2-(a.x-(a.left??0))}, ${-(a.height/2)+Xt/2-(a.y-(a.top??0))})`),pt(t,v),t.intersect=function(B){return nt.polygon(t,b,B)},n}p(Dg,"windowPane");var vd=new Set(["redux-color","redux-dark-color"]),rw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function nh(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Gt(),{rowEven:o,rowOdd:n,nodeBorder:a,borderColorArray:h}=s;if(t.look==="handDrawn"){const{themeVariables:ft}=Gt(),{background:ht}=ft,Tt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ht}`]};await nh(e,Tt)}const c=Gt();t.useHtmlLabels=c.htmlLabels;let l=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:u}=t,{labelStyles:f,nodeStyles:m}=dt(t);if(r.attributes.length===0&&t.label){const ft={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};Sr(t.label,c)+ft.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ht=await Vi(e,t,ft);if(i!=null&&vd.has(i)){const Tt=r.colorIndex??0;ht.attr("data-color-id",`color-${Tt%h.length}`)}if(!nr(c.htmlLabels)){const Tt=ht.select("text"),It=Tt.node()?.getBBox();Tt.attr("transform",`translate(${-It.width/2}, 0)`)}return ht}c.htmlLabels||(l*=1.25,d*=1.25);let y=gt(t);y||(y="node default");const C=e.insert("g").attr("class",y).attr("id",t.domId||t.id),x=await xi(C,t.label??"",c,0,0,["name"],f);x.height+=d;let b=0;const S=[],T=[];let v=0,B=0,L=0,F=0,q=!0,R=!0;for(const ft of r.attributes){const ht=await xi(C,ft.type,c,0,b,["attribute-type"],f);v=Math.max(v,ht.width+l);const Tt=await xi(C,ft.name,c,0,b,["attribute-name"],f);B=Math.max(B,Tt.width+l);const It=await xi(C,ft.keys.join(),c,0,b,["attribute-keys"],f);L=Math.max(L,It.width+l);const kt=await xi(C,ft.comment,c,0,b,["attribute-comment"],f);F=Math.max(F,kt.width+l);const Pt=Math.max(ht.height,Tt.height,It.height,kt.height)+d;T.push({yOffset:b,rowHeight:Pt}),b+=Pt}let $=4;L<=l&&(q=!1,L=0,$--),F<=l&&(R=!1,F=0,$--);const G=C.node().getBBox();if(x.width+l*2-(v+B+L+F)>0){const ft=x.width+l*2-(v+B+L+F);v+=ft/$,B+=ft/$,L>0&&(L+=ft/$),F>0&&(F+=ft/$)}const M=v+B+L+F,E=ut.svg(C),D=ct(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let A=0;T.length>0&&(A=T.reduce((ft,ht)=>ft+(ht?.rowHeight??0),0));const z=Math.max(G.width+l*2,t?.width||0,M),W=Math.max((A??0)+x.height,t?.height||0),tt=-z/2,V=-W/2;if(C.selectAll("g:not(:first-child)").each((ft,ht,Tt)=>{const It=$t(Tt[ht]),kt=It.attr("transform");let Pt=0,Zt=0;if(kt){const Me=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(kt);Me&&(Pt=parseFloat(Me[1]),Zt=parseFloat(Me[2]),It.attr("class").includes("attribute-name")?Pt+=v:It.attr("class").includes("attribute-keys")?Pt+=v+B:It.attr("class").includes("attribute-comment")&&(Pt+=v+B+L))}It.attr("transform",`translate(${tt+l/2+Pt}, ${Zt+V+x.height+d/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(V+d/2)+")"),i!=null&&vd.has(i)){const ft=r.colorIndex??0;C.attr("data-color-id",`color-${ft%h.length}`)}const lt=E.rectangle(tt,V,z,W,D),xt=C.insert(()=>lt,":first-child").attr("class","outer-path").attr("style",u.join(""));S.push(0);for(const[ft,ht]of T.entries()){const It=(ft+1)%2===0&&ht.yOffset!==0,kt=E.rectangle(tt,x.height+V+ht?.yOffset,z,ht?.rowHeight,{...D,fill:It?o:n,stroke:a});C.insert(()=>kt,"g.label").attr("style",u.join("")).attr("class",`row-rect-${It?"even":"odd"}`)}const bt=1e-4;let _t=bi(tt,x.height+V,z+tt,x.height+V,bt),mt=E.polygon(_t.map(ft=>[ft.x,ft.y]),D);if(C.insert(()=>mt).attr("class","divider"),_t=bi(v+tt,x.height+V,v+tt,W+V,bt),mt=E.polygon(_t.map(ft=>[ft.x,ft.y]),D),C.insert(()=>mt).attr("class","divider"),q){const ft=v+B+tt;_t=bi(ft,x.height+V,ft,W+V,bt),mt=E.polygon(_t.map(ht=>[ht.x,ht.y]),D),C.insert(()=>mt).attr("class","divider")}if(R){const ft=v+B+L+tt;_t=bi(ft,x.height+V,ft,W+V,bt),mt=E.polygon(_t.map(ht=>[ht.x,ht.y]),D),C.insert(()=>mt).attr("class","divider")}for(const ft of S){const ht=x.height+V+ft;_t=bi(tt,ht,z+tt,ht,bt),mt=E.polygon(_t.map(Tt=>[Tt.x,Tt.y]),D),C.insert(()=>mt).attr("class","divider")}if(pt(t,xt),m&&t.look!=="handDrawn")if(i!=null&&rw.has(i))C.selectAll("path").attr("style",m);else{const ht=m.split(";")?.filter(Tt=>Tt.includes("stroke"))?.map(Tt=>`${Tt}`).join("; ");C.selectAll("path").attr("style",ht??""),C.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ft){return nt.rect(t,ft)},C}p(nh,"erBox");async function xi(e,t,r,i=0,s=0,o=[],n=""){const a=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==xc(t)&&(t=xc(t),t=t.replaceAll("<","<").replaceAll(">",">"));const h=a.node().appendChild(await Ae(a,t,{width:Sr(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let l=h.children[0];for(l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">")}let c=h.getBBox();if(nr(r.htmlLabels)){const l=h.children[0];l.style.textAlign="start";const d=$t(h);c=l.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}p(xi,"addText");function bi(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(bi,"lineToPolygon");async function Ig(e,t,r,i,s=r.class.padding??12){const o=i?0:3,n=e.insert("g").attr("class",gt(t)).attr("id",t.domId||t.id);let a=null,h=null,c=null,l=null,d=0,u=0,f=0;if(a=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await fs(a,{text:`«${b}»`},0),d=a.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await fs(h,t,0,["font-weight: bolder"]);const m=h.node().getBBox();u=m.height,c=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const S=await fs(c,b,y,[b.parseClassifier()]);y+=S+o}f=c.node().getBBox().height,f<=0&&(f=s/2),l=n.insert("g").attr("class","methods-group text");let C=0;for(const b of t.methods){const S=await fs(l,b,C,[b.parseClassifier()]);C+=S+o}let x=n.node().getBBox();if(a!==null){const b=a.node().getBBox();a.attr("transform",`translate(${-b.width/2})`)}return h.attr("transform",`translate(${-m.width/2}, ${d})`),x=n.node().getBBox(),c.attr("transform",`translate(0, ${d+u+s*2})`),x=n.node().getBBox(),l.attr("transform",`translate(0, ${d+u+(f?f+s*4:s*2)})`),x=n.node().getBBox(),{shapeSvg:n,bbox:x}}p(Ig,"textHelper");async function fs(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Gt();let n="useHtmlLabels"in t?t.useHtmlLabels:nr(o.htmlLabels)??!0,a="";"text"in t?a=t.text:a=t.label,!n&&a.startsWith("\\")&&(a=a.substring(1)),vs(a)&&(n=!0);const h=await Ae(s,Ll(qr(a)),{width:Sr(a,o)+50,classes:"markdown-node-label",useHtmlLabels:n},o);let c,l=1;if(n){const d=h.children[0],u=$t(h);l=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(l+=d.innerHTML.split("<mrow>").length-1),await rh(d),c=d.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{i.includes("font-weight: bolder")&&$t(h).selectAll("tspan").attr("font-weight",""),l=h.children.length;const d=h.children[0];(h.textContent===""||h.textContent.includes(">"))&&(d.textContent=a[0]+a.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),a[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=h.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*l)+r)+")"),c.height}p(fs,"addText");async function Pg(e,t){const r=Ot(),{theme:i,themeVariables:s}=r,{useGradient:o,borderColorArray:n}=s,a=r.class.padding??12,h=a,c=t.useHtmlLabels??nr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:d,bbox:u}=await Ig(e,t,r,c,h);Re(d,t.colorIndex,i,n);const{labelStyles:f,nodeStyles:m}=dt(t);t.labelStyle=f,t.cssStyles=l.styles||"";const y=l.styles?.join(";")||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const C=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,x=ut.svg(d),b=ct(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=Math.max(t.width??0,u.width);let T=Math.max(t.height??0,u.height);const v=(t.height??0)>u.height;l.members.length===0&&l.methods.length===0?T+=h:l.members.length>0&&l.methods.length===0&&(T+=h*2);const B=-S/2,L=-T/2;let F=C?a*2:l.members.length===0&&l.methods.length===0?-a:0;v&&(F=a*2);const q=x.rectangle(B-a,L-a-(C?a:l.members.length===0&&l.methods.length===0?-a/2:0),S+2*a,T+2*a+F,b),R=d.insert(()=>q,":first-child");R.attr("class","basic label-container outer-path");const $=R.node().getBBox(),G=d.select(".annotation-group").node().getBBox().height-(C?a/2:0)||0,M=d.select(".label-group").node().getBBox().height-(C?a/2:0)||0,E=d.select(".members-group").node().getBBox().height-(C?a/2:0)||0,D=(G+M+L+a-(L-a-(C?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(d.selectAll(".text").each((A,z,W)=>{const tt=$t(W[z]),V=tt.attr("transform");let lt=0;if(V){const mt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(V);mt&&(lt=parseFloat(mt[2]))}let xt=lt+L+a-(C?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(tt.attr("class").includes("methods-group")){const _t=Math.max(E,h/2);v?xt=Math.max(D,G+M+_t+L+h*2+a)+h*2:xt=G+M+_t+L+h*4+a}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?xt=lt-h:xt=lt),c||(xt-=4);let bt=B;(tt.attr("class").includes("label-group")||tt.attr("class").includes("annotation-group"))&&(bt=-tt.node()?.getBBox().width/2||0,d.selectAll("text").each(function(_t,mt,ft){window.getComputedStyle(ft[mt]).textAnchor==="middle"&&(bt=0)})),tt.attr("transform",`translate(${bt}, ${xt})`)}),l.members.length>0||l.methods.length>0||C){const A=G+M+L+a,z=x.line($.x,A,$.x+$.width,A+.001,b);d.insert(()=>z).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(C||l.members.length>0||l.methods.length>0){const A=G+M+E+L+h*2+a,z=x.line($.x,v?Math.max(D,A):A,$.x+$.width,(v?Math.max(D,A):A)+.001,b);d.insert(()=>z).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&d.selectAll("path").attr("style",y),R.select(":nth-child(2)").attr("style",y),d.selectAll(".divider").select("path").attr("style",y),t.labelStyle?d.selectAll("span").attr("style",t.labelStyle):d.selectAll("span").attr("style",y),!c){const A=RegExp(/color\s*:\s*([^;]*)/),z=A.exec(y);if(z){const W=z[0].replace("color","fill");d.selectAll("tspan").attr("style",W)}else if(f){const W=A.exec(f);if(W){const tt=W[0].replace("color","fill");d.selectAll("tspan").attr("style",tt)}}}return pt(t,R),t.intersect=function(A){return nt.rect(t,A)},d}p(Pg,"classBox");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t,o=t,n=20,a=20,h="verifyMethod"in t,c=gt(t),l=Ot(),{themeVariables:d}=l,{borderColorArray:u,requirementEdgeLabelBackground:f}=d,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;h?C=await rr(y,`<<${s.type}>>`,0,t.labelStyle):C=await rr(y,"<<Element>>",0,t.labelStyle);let x=C;const b=await rr(y,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+a,h){const $=await rr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,m);x+=$;const G=await rr(y,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,m);x+=G;const M=await rr(y,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,m);x+=M,await rr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,m)}else{const $=await rr(y,`${o.type?`Type: ${o.type}`:""}`,x,t.labelStyle,m);x+=$,await rr(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,x,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+n,T=(y.node()?.getBBox().height??200)+n,v=-S/2,B=-T/2,L=ut.svg(y),F=ct(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const q=L.rectangle(v,B,S,T,F),R=y.insert(()=>q,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",i),u?.length){const $=t.colorIndex??0;y.attr("data-color-id",`color-${$%u.length}`)}if(y.selectAll(".label").each(($,G,M)=>{const E=$t(M[G]),D=E.attr("transform");let A=0,z=0;if(D){const lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(D);lt&&(A=parseFloat(lt[1]),z=parseFloat(lt[2]))}const W=z-T/2;let tt=v+n/2;(G===0||G===1)&&(tt=A),E.attr("transform",`translate(${tt}, ${W+n})`)}),x>C+b+a){const $=B+C+b+a;let G;if(t.look==="neo"){const D=[[v,$],[v+S,$],[v+S,$+.001],[v,$+.001]];G=L.polygon(D,F)}else G=L.line(v,$,v+S,$,F);y.insert(()=>G).attr("class","divider")}return pt(t,R),t.intersect=function($){return nt.rect(t,$)},i&&t.look!=="handDrawn"&&(f||u?.length)&&y.selectAll("path").attr("style",i),y}p(Rg,"requirementBox");async function rr(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),n=Ot(),a=n.htmlLabels??!0,h=await Ae(o,Ll(qr(t)),{width:Sr(t,n)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},n);let c;if(a){const l=h.children[0],d=$t(h);s==="start"&&$t(l).style("text-align","left"),c=l.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const l=h.children[0];for(const d of l.children)i&&d.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const d of l.children)d.setAttribute("text-anchor","start")}c=h.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(rr,"addText");var iw=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 qg(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i||"";const o=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:a,bbox:h,label:c}=await Ct(e,t,gt(t)),l=t.padding||10;let d="",u;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),u=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;u?{label:m,bbox:y}=await Jr(u,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await Jr(a,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Jr(a,"assigned"in t&&t.assigned||"",f);t.width=n;const b=10,S=t?.width||0,T=Math.max(y.height,x.height)/2,v=Math.max(h.height+b*2,t?.height||0)+T,B=-S/2,L=-v/2;c.attr("transform","translate("+(l-S/2)+", "+(-T-h.height/2)+")"),m.attr("transform","translate("+(l-S/2)+", "+(-T+h.height/2)+")"),C.attr("transform","translate("+(l+S/2-x.width-2*o)+", "+(-T+h.height/2)+")");let F;const{rx:q,ry:R}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const G=ut.svg(a),M=ct(t,{}),E=q||R?G.path(Ee(B,L,S,v,q||0),M):G.rectangle(B,L,S,v,M);F=a.insert(()=>E,":first-child"),F.attr("class","basic label-container").attr("style",$||null)}else{F=a.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",q??5).attr("ry",R??5).attr("x",B).attr("y",L).attr("width",S).attr("height",v);const G="priority"in t&&t.priority;if(G){const M=a.append("line"),E=B+2,D=L+Math.floor((q??0)/2),A=L+v-Math.floor((q??0)/2);M.attr("x1",E).attr("y1",D).attr("x2",E).attr("y2",A).attr("stroke-width","4").attr("stroke",iw(G))}}return pt(t,F),t.height=v,t.intersect=function(G){return nt.rect(t,G)},a}p(qg,"kanbanItem");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:n,label:a}=await Ct(e,t,gt(t)),h=o.width+10*n,c=o.height+8*n,l=.15*h,{cssStyles:d}=t,u=o.width+20,f=o.height+20,m=Math.max(h,u),y=Math.max(c,f);a.attr("transform",`translate(${-o.width/2}, ${-o.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=ut.svg(s),S=ct(t,{}),T=b.path(x,S);C=s.insert(()=>T,":first-child"),C.attr("class","basic label-container").attr("style",ie(d))}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})`),pt(t,C),t.calcIntersect=function(b,S){return nt.rect(b,S)},t.intersect=function(b){return J.info("Bang intersect",t,b),nt.rect(t,b)},s}p(Ng,"bang");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:n,label:a}=await Ct(e,t,gt(t)),h=o.width+2*n,c=o.height+2*n,l=.15*h,d=.25*h,u=.35*h,f=.2*h,{cssStyles:m}=t;let y;const C=`M0 0
|
|
261
|
+
a${l},${l} 0 0,1 ${h*.25},${-1*h*.1}
|
|
262
|
+
a${u},${u} 1 0,1 ${h*.4},${-1*h*.1}
|
|
263
|
+
a${d},${d} 1 0,1 ${h*.35},${h*.2}
|
|
264
|
+
|
|
265
|
+
a${l},${l} 1 0,1 ${h*.15},${c*.35}
|
|
266
|
+
a${f},${f} 1 0,1 ${-1*h*.15},${c*.65}
|
|
267
|
+
|
|
268
|
+
a${d},${l} 1 0,1 ${-1*h*.25},${h*.15}
|
|
269
|
+
a${u},${u} 1 0,1 ${-1*h*.5},0
|
|
270
|
+
a${l},${l} 1 0,1 ${-1*h*.25},${-1*h*.15}
|
|
271
|
+
|
|
272
|
+
a${l},${l} 1 0,1 ${-1*h*.1},${-1*c*.35}
|
|
273
|
+
a${f},${f} 1 0,1 ${h*.1},${-1*c*.65}
|
|
274
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=ut.svg(s),b=ct(t,{}),S=x.path(C,b);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",ie(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return a.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-h/2}, ${-c/2})`),pt(t,y),t.calcIntersect=function(x,b){return nt.rect(x,b)},t.intersect=function(x){return J.info("Cloud intersect",t,x),nt.rect(t,x)},s}p(Wg,"cloud");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:n,label:a}=await Ct(e,t,gt(t)),h=o.width+8*n,c=o.height+2*n,l=5,d=t.look==="neo"?`
|
|
275
|
+
M${-h/2} ${c/2-l}
|
|
276
|
+
v${-c+2*l}
|
|
277
|
+
q0,-${l} ${l},-${l}
|
|
278
|
+
h${h-2*l}
|
|
279
|
+
q${l},0 ${l},${l}
|
|
280
|
+
v${c-l}
|
|
281
|
+
H${-h/2}
|
|
282
|
+
Z
|
|
283
|
+
`:`
|
|
284
|
+
M${-h/2} ${c/2-l}
|
|
285
|
+
v${-c+2*l}
|
|
286
|
+
q0,-${l} ${l},-${l}
|
|
287
|
+
h${h-2*l}
|
|
288
|
+
q${l},0 ${l},${l}
|
|
289
|
+
v${c-2*l}
|
|
290
|
+
q0,${l} ${-l},${l}
|
|
291
|
+
h${-(h-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 u=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),a.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>a.node()),pt(t,u),t.calcIntersect=function(f,m){return nt.rect(f,m)},t.intersect=function(f){return nt.rect(t,f)},s}p(zg,"defaultMindmapNode");async function Hg(e,t){const r={padding:t.padding??0};return oh(e,t,r)}p(Hg,"mindmapCircle");var yi=36,Gr=50,sw=100,ow=80,zr=6,wi=16,aw="bpmn",nw={start:{rings:1,strokeWidth:1.6},intermediate:{rings:2,strokeWidth:1.4},boundary:{rings:2,strokeWidth:1.4},end:{rings:1,strokeWidth:3.4}},Ld;async function Yg(){return Ld??=Dt(async()=>{const{bpmnIcons:e}=await import("./bpmnIcons-APHXDYXF-ByGoYv9M.js");return{bpmnIcons:e}},[],import.meta.url).then(({bpmnIcons:e})=>{Jx(e.prefix)||vu([{name:e.prefix,icons:e}])}),Ld}p(Yg,"ensureBpmnIcons");function Ug(e){const t=e.metadata?.dataDirection;return t==="input"||t==="output"?t:void 0}p(Ug,"dataDirectionOf");function jg(e){return e.metadata?.isCollection===!0}p(jg,"isCollectionData");async function zo(e,t){return await Yg(),ai(e,{height:t,width:t,fallbackPrefix:aw})}p(zo,"glyphSvg");var Ps=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})`)},"positionLabelBelow"),Gg=p(async(e,t,r)=>{if(!t)return;const i=e.append("g").attr("class","bpmn-glyph");i.html(`<g>${await zo(t,r)}</g>`),i.attr("transform",`translate(${-r/2}, ${-r/2})`)},"appendGlyph"),Rs=p((e,t,r,i,s)=>{s&&(t.metadata={...t.metadata??{},drawnExtent:s});const o=e.insert("rect",":first-child").attr("class","bpmn-bounds").attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i).attr("opacity",0).attr("aria-hidden","true");return pt(t,o),o},"reserveBounds"),lw=8,Ho=p((e,t,r)=>Math.min(Math.max(e,t),r),"clamp"),aa=p((e,t,r,i,s)=>{const o=e.x??0,n=e.y??0,a=t/2,h=r/2,c=i.x-o,l=i.y-n,d=s??(Math.abs(c)*h>Math.abs(l)*a?c>=0?"right":"left":l>=0?"bottom":"top"),u=p(f=>Math.max(0,f-Math.min(lw,f/2)),"reach");return d==="left"||d==="right"?{x:o+(d==="right"?a:-a),y:Ho(i.y,n-u(h),n+u(h))}:{x:Ho(i.x,o-u(a),o+u(a)),y:n+(d==="bottom"?h:-h)}},"faceProjectIntersect"),hw=p((e,t,r)=>{const i=e.x??0,s=e.y??0,o=t/2,n=r.x-i,a=r.y-s,h=o*.85;if(Math.abs(a)>=Math.abs(n)){const l=Ho(n,-h,h);return{x:i+l,y:s+Math.sign(a||1)*Math.sqrt(o*o-l*l)}}const c=Ho(a,-h,h);return{x:i+Math.sign(n||1)*Math.sqrt(o*o-c*c),y:s+c}},"ringIntersect"),cw=p((e,t,r,i)=>{const s=e.x??0,o=e.y??0,n=t/2,a=r/2,h=i.x-s,c=i.y-o;return Math.abs(h)*a>Math.abs(c)*n?{x:s+Math.sign(h)*n,y:o}:{x:s,y:o+Math.sign(c||1)*a}},"faceCentreIntersect");async function qs(e,t,r){const i=t,{labelStyles:s,nodeStyles:o}=dt(t);t.labelStyle=s;const{rings:n,strokeWidth:a}=nw[r],h=yi/2,{shapeSvg:c,bbox:l,label:d}=await Ct(e,t,gt(t,`bpmn-event bpmn-event-${r}`)),u=c.insert("g",":first-child").attr("class","bpmn-event-body");u.attr("style",o);for(let x=0;x<n;x++)u.append("circle").attr("class",x===0?"bpmn-event-ring":"bpmn-event-ring bpmn-event-ring-inner").attr("r",h-x*3).style("stroke-width",`${a}px`);await Gg(u,i.icon,wi);const f=l.height>0&&!!t.label,m=f?zr+l.height:0,y=yi+2*m,C=Math.max(yi,f?l.width:0);return f&&Ps(d,l,h+zr+l.height/2),Rs(c,t,C,y,{width:yi,height:yi}),t.intersect=function(x){return hw(t,yi,x)},c}p(qs,"renderBpmnEvent");async function Vg(e,t){return qs(e,t,"start")}p(Vg,"bpmnStart");async function Xg(e,t){return qs(e,t,"intermediate")}p(Xg,"bpmnIntermediate");async function Zg(e,t){return qs(e,t,"boundary")}p(Zg,"bpmnBoundary");async function Kg(e,t){return qs(e,t,"end")}p(Kg,"bpmnEnd");async function Qg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const o=Gr/2,{shapeSvg:n,bbox:a,label:h}=await Ct(e,t,gt(t,"bpmn-gateway")),c=n.insert("g",":first-child").attr("class","bpmn-gateway-body");c.append("polygon").attr("class","bpmn-gateway-diamond").attr("points",`0,${-o} ${o},0 0,${o} ${-o},0`).attr("style",s),await Gg(c,r.icon,wi+2);const l=a.height>0&&!!t.label,d=l?zr+a.height:0,u=Gr+2*d,f=Math.max(Gr,l?a.width:0);return l&&Ps(h,a,o+zr+a.height/2),Rs(n,t,f,u,{width:Gr,height:Gr}),t.intersect=function(m){return cw(t,Gr,Gr,m)},n}p(Qg,"bpmnGateway");async function Jg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:o,bbox:n,label:a}=await Ct(e,t,gt(t,"bpmn-activity")),h=r.markers??[],c=r.icon,l=c?wi+6:10,d=h.length>0?wi+4:10,u=Math.max(sw,n.width+16),f=Math.max(ow,n.height+l+d),m=o.insert("g",":first-child").attr("class","bpmn-activity-body");if(m.append("rect").attr("class","bpmn-activity-rect").attr("x",-u/2).attr("y",-f/2).attr("width",u).attr("height",f).attr("rx",10).attr("ry",10).attr("style",s),c){const y=m.append("g").attr("class","bpmn-activity-icon");y.html(`<g>${await zo(c,wi)}</g>`),y.attr("transform",`translate(${-u/2+6}, ${-f/2+6})`)}if(h.length>0){const y=m.append("g").attr("class","bpmn-activity-markers"),C=wi-2,x=h.length*C;for(const[b,S]of h.entries()){const T=y.append("g");T.html(`<g>${await zo(S,C)}</g>`),T.attr("transform",`translate(${-x/2+b*C}, 0)`)}y.attr("transform",`translate(0, ${f/2-C-3})`)}if(n.height>0){const y=-f/2+l,C=f/2-d;Ps(a,n,(y+C)/2)}return pt(t,m),t.intersect=function(y){return aa(t,u,f,y)},o}p(Jg,"bpmnActivity");var os=36,Ci=50,so=10;async function tm(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t,"bpmn-data-object")),a=s.insert("g",":first-child").attr("class","bpmn-data-body"),h=-os/2,c=-Ci/2,l=os/2,d=Ci/2;a.append("path").attr("class","bpmn-data-page").attr("d",`M${h},${c} H${l-so} L${l},${c+so} V${d} H${h} Z`).attr("style",i),a.append("path").attr("class","bpmn-data-fold").attr("d",`M${l-so},${c} V${c+so} H${l}`);const u=Ug(t);u&&a.append("path").attr("class",`bpmn-data-arrow bpmn-data-arrow-${u}`).attr("d",`M${h+4},${c+9} h7 v-3 l5,4.5 -5,4.5 v-3 h-7 Z`),jg(t)&&a.append("path").attr("class","bpmn-data-collection").attr("d",`M-4,${d-11} v9 M0,${d-11} v9 M4,${d-11} v9`);const f=o.height>0&&!!t.label,m=f?zr+o.height:0,y=Ci+2*m,C=Math.max(os,f?o.width:0);return f&&Ps(n,o,Ci/2+zr+o.height/2),Rs(s,t,C,y,{width:os,height:Ci}),t.intersect=function(x){return aa(t,os,Ci,x)},s}p(tm,"bpmnDataObject");var tr=50;async function em(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:n}=await Ct(e,t,gt(t,"bpmn-data-store")),a=s.insert("g",":first-child").attr("class","bpmn-data-body"),h=tr/2,c=6;a.append("path").attr("class","bpmn-store-body").attr("d",`M${-h},${-h+c} a${h},${c} 0 0 1 ${tr},0 V${h-c} a${h},${c} 0 0 1 ${-tr},0 Z`).attr("style",i);for(const m of[0,5,10])a.append("path").attr("class","bpmn-store-rings").attr("d",`M${-h},${-h+c+m} a${h},${c} 0 0 0 ${tr},0`);const l=o.height>0&&!!t.label,d=l?zr+o.height:0,u=tr+2*d,f=Math.max(tr,l?o.width:0);return l&&Ps(n,o,h+zr+o.height/2),Rs(s,t,f,u,{width:tr,height:tr}),t.intersect=function(m){return aa(t,tr,tr,m)},s}p(em,"bpmnDataStore");async function rm(e,t){const{labelStyles:r}=dt(t);t.labelStyle=r,t.wrappingWidth=160;const{shapeSvg:i,bbox:s,label:o}=await Ct(e,t,gt(t,"bpmn-annotation")),n=8,a=Math.max(28,s.height+n*2),h=s.width+n*2+6,c=t.metadata?.attachFace==="right"?"right":"left";i.insert("g",":first-child").attr("class","bpmn-annotation-body").append("path").attr("class","bpmn-annotation-bracket").attr("d",c==="right"?`M${h/2-6},${-a/2} h6 V${a/2} h-6`:`M${-h/2+6},${-a/2} h-6 V${a/2} h6`);const d=c==="right"?-h/2+n:-h/2+n+6;return o.attr("transform",`translate(${d-(s.x??0)+(s.left??0)},${-s.height/2-((s.y??0)-(s.top??0))})`),Rs(i,t,h,a),t.intersect=function(u){return aa(t,h,a,u,c)},i}p(rm,"bpmnAnnotation");var dw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:bg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:yg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:kg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:_g},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Df},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:If},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:zf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:xf},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:vf},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:wf},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Of},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:oh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ng},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Wg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:fg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Uf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:eg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ag},{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:Qf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Rf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Lg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Tf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Tg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:wg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Hf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:jf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Af},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Ef},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Mf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:rg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:$g},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Yf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ig},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:$f},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Pf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Mg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Dg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Nf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Eg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Wf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:xg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ug},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Cf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ff},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:vg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Bg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Og},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:gg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:sg}],uw=p(()=>{const t=[...Object.entries({state:Sg,choice:_f,note:pg,composite:Bf,rectWithTitle:mg,labelRect:Jf,block_arrow:Sf,collapsedGroup:kf,iconSquare:Zf,iconCircle:Vf,icon:Gf,iconRounded:Xf,imageSquare:Kf,anchor:mf,kanbanItem:qg,mindmapCircle:Hg,defaultMindmapNode:zg,classBox:Pg,erBox:nh,requirementBox:Rg,usecaseActor:og,usecaseActorHollow:ng,usecaseActorAwesome:ag,usecaseActorIcon:lg,usecaseBusiness:hg,usecaseEllipse:qf,usecaseJsonTable:cg,"bpmn-start":Vg,"bpmn-intermediate":Xg,"bpmn-boundary":Zg,"bpmn-end":Kg,"bpmn-gateway":Qg,"bpmn-activity":Jg,"bpmn-data":tm,"bpmn-data-store":em,"bpmn-annotation":rm}),...dw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),im=uw();function pw(e){return e in im}p(pw,"isValidShape");var Ns=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),na=new Map;async function sm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?im[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",ie(t.look)),t.tooltip&&s.attr("title",t.tooltip),na.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(sm,"insertNode");var yF=p((e,t)=>{na.set(t.id,e)},"setNodeElem"),CF=p(()=>{na.clear()},"clear"),xF=p(e=>{const t=na.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"),om=p(async(e,t,{variant:r="swimlane"}={})=>{const i=r==="pool",s=i?"pool swimlane":"swimlane",o=i?"pool-label swimlane-label":"swimlane-label",n=i?"pool-title swimlane-title":"swimlane-title",a=i?"pool-body swimlane-body":"swimlane-body",h=Ot(),{theme:c,themeVariables:l,handDrawnSeed:d}=h,{clusterBkg:u,clusterBorder:f,borderColorArray:m}=l,y=f,{labelStyles:C,nodeStyles:x,borderStyles:b,backgroundStyles:S}=dt(t),T=e.insert("g").attr("class","cluster "+s+" "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);Re(T,t.colorIndex,c,m);const v=nr(h.flowchart.htmlLabels),B=t.direction==="LR",L=T.insert("g").attr("class","cluster-label "+o),F=await Ae(L,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width});let q=F.getBBox();if(v){const lt=F.children[0],xt=$t(F);q=lt.getBoundingClientRect(),xt.attr("width",q.width),xt.attr("height",q.height)}const R=t.padding??0,$=t.width<=q.width+R?q.width+R:t.width;t.width<=q.width+R?t.diff=($-t.width)/2-R:t.diff=-R;const G=t.height,M=t.y-G/2,E=t.y+G/2,D=t.x-$/2,A=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:M+G/3,z=B?4:0,W=q.height+2*z;let tt,V;if(B){const lt=Math.max(W,q.height+2*z),xt=D+lt,bt=Math.max(0,$-lt);if(t.look==="handDrawn"){const ft=ut.svg(T),ht=ct(t,{roughness:.7,fill:u,stroke:y,seed:d}),Tt=ct(t,{roughness:.7,fill:"none",stroke:y,seed:d}),It=ft.rectangle(D,M,lt,G,ht);tt=T.insert(()=>It,":first-child").attr("class",n);const kt=ft.rectangle(xt,M,bt,G,Tt);V=T.insert(()=>kt,":first-child").attr("class",a),tt.select("path:nth-child(2)").attr("style",b.join(";")),tt.select("path").attr("style",S.join(";").replace("fill","stroke"))}else tt=T.insert("rect",":first-child"),V=T.insert("rect",":first-child"),tt.attr("class",n).attr("style",x).attr("x",D).attr("y",M).attr("width",lt).attr("height",G).attr("fill",u).attr("stroke",y),V.attr("class",a).attr("style",x).attr("x",xt).attr("y",M).attr("width",bt).attr("height",G).attr("fill","none").attr("stroke",y);const _t=D+lt/2,mt=t.y;L.attr("transform",`translate(${_t}, ${mt}) rotate(-90) translate(${-q.width/2}, ${-q.height/2})`)}else{const lt=Math.max(0,A-M),xt=Math.min(W,lt),bt=M+xt,_t=Math.max(0,E-bt),mt=t.x-$/2;if(t.look==="handDrawn"){const Tt=ut.svg(T),It=ct(t,{roughness:.7,fill:u,stroke:y,fillWeight:3,seed:d}),kt=ct(t,{roughness:.7,fill:"none",stroke:y,seed:d}),Pt=Tt.rectangle(mt,M,$,xt,It);tt=T.insert(()=>Pt,":first-child").attr("class",n);const Zt=Tt.rectangle(mt,bt,$,_t,kt);V=T.insert(()=>Zt,":first-child").attr("class",a),tt.select("path:nth-child(2)").attr("style",b.join(";")),tt.select("path").attr("style",S.join(";").replace("fill","stroke"))}else tt=T.insert("rect",":first-child"),V=T.insert("rect",":first-child"),tt.attr("class",n).attr("style",x).attr("x",mt).attr("y",M).attr("width",$).attr("height",xt).attr("fill",u).attr("stroke",y),V.attr("class",a).attr("style",x).attr("x",mt).attr("y",bt).attr("width",$).attr("height",_t).attr("fill","none").attr("stroke",y);const ft=t.x-q.width/2,ht=M+(xt-q.height)/2;L.attr("transform",`translate(${ft}, ${ht})`)}if(J.trace("Swimlane data ",t,JSON.stringify(t)),C){const lt=L.select("span");lt&<.attr("style",C)}return t.offsetX=0,t.width=$,t.height=G,t.offsetY=q.height-R/2,t.intersect=function(lt){return Tr(t,lt)},{cluster:T,labelBBox:q}},"swimlane"),am=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Ot(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:n,clusterBorder:a,borderColorArray:h}=s,{labelStyles:c,nodeStyles:l,borderStyles:d,backgroundStyles:u}=dt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Re(f,t.colorIndex,i,h);const m=de(r),y=f.insert("g").attr("class","cluster-label ");let C;t.labelType==="markdown"?C=await Ae(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):C=await yr(y,t.label,t.labelStyle||"",!1,!0);let x=C.getBBox();if(de(r)){const q=C.children[0],R=$t(C);x=q.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 S=t.height,T=t.x-b/2,v=t.y-S/2;J.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const q=ut.svg(f),R=ct(t,{roughness:.7,fill:n,stroke:a,fillWeight:3,seed:o}),$=q.path(Ee(T,v,b,S,0),R);B=f.insert(()=>(J.debug("Rough node insert CXC",$),$),":first-child"),B.select("path:nth-child(2)").attr("style",d.join(";")),B.select("path").attr("style",u.join(";").replace("fill","stroke"))}else B=f.insert("rect",":first-child"),B.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",v).attr("width",b).attr("height",S);const{subGraphTitleTopMargin:L}=Ns(r);if(y.attr("transform",`translate(${t.x-x.width/2}, ${t.y-t.height/2+L})`),c){const q=y.select("span");q&&q.attr("style",c)}const F=B.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=x.height-t.padding/2,t.intersect=function(q){return Tr(t,q)},{cluster:f,labelBBox:x}},"rect"),fw=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,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(a){return Tr(t,a)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),gw=p(async(e,t)=>{const r=Ot(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:n,borderColorArray:a,compositeBackground:h,compositeTitleBackground:c,nodeBorder:l}=s,d=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);Re(d,t.colorIndex,i,a);const u=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let m=d.append("rect");const y=await yr(f,t.label,t.labelStyle,void 0,!0);let C=y.getBBox();if(de(r)){const $=y.children[0],G=$t(y);C=$.getBoundingClientRect(),G.attr("width",C.width),G.attr("height",C.height)}const x=0*t.padding,b=x/2,S=(t.width<=C.width+t.padding?C.width+t.padding:t.width)+x;t.width<=C.width+t.padding?t.diff=(S-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+x,v=t.height+x-C.height-6,B=t.x-S/2,L=t.y-T/2;t.width=S;const F=t.y-t.height/2-b+C.height+2;let q;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),G=ut.svg(d),M=t.rx||t.ry?G.path(Ee(B,L,S,T,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:l,seed:o}):G.rectangle(B,L,S,T,{seed:o});q=d.insert(()=>M,":first-child");const E=G.rectangle(B,F,S,v,{fill:$?n:h,fillStyle:$?"hachure":"solid",stroke:l,seed:o});q=d.insert(()=>M,":first-child"),m=d.insert(()=>E),q.attr("class","outer"),m.attr("class","inner")}else q=u.insert("rect",":first-child"),q.attr("class","outer").attr("x",B).attr("y",L).attr("width",S).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",B).attr("y",F).attr("width",S).attr("height",v);f.attr("transform",`translate(${t.x-C.width/2}, ${L+1-(de(r)?0:3)})`);const R=q.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function($){return Tr(t,$)},{cluster:d,labelBBox:C}},"roundedWithTitle"),mw=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Ot(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:n}=i,{labelStyles:a,nodeStyles:h,borderStyles:c,backgroundStyles:l}=dt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=de(r),f=d.insert("g").attr("class","cluster-label "),m=await Ae(f,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let y=m.getBBox();if(de(r)){const L=m.children[0],F=$t(m);y=L.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,S=t.y-x/2;J.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const L=ut.svg(d),F=ct(t,{roughness:.7,fill:o,stroke:n,fillWeight:4,seed:s}),q=L.path(Ee(b,S,C,x,t.rx),F);T=d.insert(()=>(J.debug("Rough node insert CXC",q),q),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",l.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:v}=Ns(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),a){const L=f.select("span");L&&L.attr("style",a)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=y.height-t.padding/2,t.intersect=function(L){return Tr(t,L)},{cluster:d,labelBBox:y}},"kanbanSection"),yw=p((e,t)=>{const r=Ot(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:n,nodeBorder:a,borderColorArray:h}=s,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Re(c,t.colorIndex,i,h);const l=c.insert("g",":first-child"),d=0*t.padding,u=t.width+d;t.diff=-t.padding;const f=t.height+d,m=t.x-u/2,y=t.y-f/2;t.width=u;let C;if(t.look==="handDrawn"){const S=ut.svg(c).rectangle(m,y,u,f,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});C=c.insert(()=>S,":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",u).attr("height",f).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 Tr(t,b)},{cluster:c,labelBBox:{}}},"divider"),Cw=p(async(e,t,r)=>{J.info(`Creating ${r.cssClass} for `,t.id,t);const i=Ot(),{theme:s,themeVariables:o,handDrawnSeed:n}=i,{borderColorArray:a}=o,{labelStyles:h,borderStyles:c}=dt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);Re(l,t.colorIndex,s,a);const d=de(i),u=l.insert("g").attr("class","cluster-label");let f={width:0,height:0};const m=t.label?.trim();if(m){let v;if(t.labelType==="markdown"?v=await Ae(u,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):v=await yr(u,t.label,t.labelStyle||"",!1,!0),f=v.getBBox(),d){const B=v.children[0],L=$t(v);f=B.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.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 S;if(t.look==="handDrawn"){const v=ut.svg(l),B=ct(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),L=v.path(Ee(x,b,y,C,r.rx),B);S=l.insert(()=>L,":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";"))}else S=l.insert("rect",":first-child"),S.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&&S.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:v}=Ns(i);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+v})`),h){const B=u.select("span");B&&B.attr("style",h)}}const T=S.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=f.height-t.padding/2,t.intersect=function(v){return Tr(t,v)},{cluster:l,labelBBox:f}},"createContainerGroup"),xw=p(async(e,t)=>{const{themeVariables:r}=Ot(),i=r.flowContainerStroke||r.secondaryBorderColor;return Cw(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),bw=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,o=Math.max(e.width,t.width+i),n=r==="package"?Math.max(e.height,s+e.padding*2):e.height,a=e.x-o/2,h=e.y-n/2;return{boundaryType:r,width:o,height:n,x:a,y:h,bodyY:h+s,bodyHeight:n-s,tabHeight:s,tabWidth:r==="package"?Math.min(o,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),kw=p(async(e,t)=>{J.info("Creating usecase system boundary for ",t.id,t);const r=Ot(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:n,clusterBorder:a,borderColorArray:h}=s,{labelStyles:c,nodeStyles:l}=dt(t),{stylesMap:d}=Hr(t),u=t.boundaryType||"rect",f=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${u} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",u).attr("data-look",t.look);Re(f,t.colorIndex,i,h);const m=de(r),y=f.insert("g").attr("class","cluster-label system-boundary-title"),C=await Ae(y,t.label,{style:c,useHtmlLabels:m,isNode:!0});let x=C.getBBox();if(m){const M=C.children[0],E=$t(C);x=M.getBoundingClientRect(),E.attr("width",x.width),E.attr("height",x.height)}const b=bw(t,x),{width:S,height:T,x:v,y:B,bodyY:L,bodyHeight:F,tabHeight:q,tabWidth:R}=b;t.diff=t.width<=x.width+t.padding?(S-t.width)/2-t.padding:-t.padding;const $=ct(t,{fill:d.get("fill")||n,stroke:d.get("stroke")||a,strokeWidth:d.get("stroke-width")?.replace("px","")||1,seed:o});if(t.look==="handDrawn"){const M=ut.svg(f),E=M.rectangle(v,L,S,F,$);if(f.insert(()=>E,":first-child").attr("class","boundary-body label-container"),u==="package"){const D=M.rectangle(v,B,R,q,$);f.insert(()=>D,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else f.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",v).attr("y",L).attr("width",S).attr("height",F),u==="package"&&f.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",v).attr("y",B).attr("width",R).attr("height",q);const{subGraphTitleTopMargin:G}=Ns(r);return u==="package"?y.attr("transform",`translate(${v+(R-x.width)/2}, ${B+(q-x.height)/2})`):y.attr("transform",`translate(${t.x-x.width/2}, ${B+G})`),c&&(y.attr("style",c),y.select("span").attr("style",c)),t.offsetX=0,t.width=S,t.height=T,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(M){return Tr(t,M)},{cluster:f,labelBBox:x}},"usecaseSystemBoundary"),Sw=am,ww=p((e,t)=>om(e,t,{variant:"pool"}),"pool"),Tw={rect:am,squareRect:Sw,roundedWithTitle:gw,noteGroup:fw,divider:yw,kanbanSection:mw,flowGroup:xw,usecaseSystemBoundary:kw,swimlane:om,pool:ww},_w=new Set(["noteGroup","divider"]),bF=p(e=>!_w.has(e??"rect"),"clusterPaintsTitle"),nm=new Map,Bw=p(async(e,t)=>{const r=t.shape||"rect",i=await Tw[r](e,t);return nm.set(t.id,i),i},"insertCluster"),kF=p(()=>{nm=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"),he={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},Fd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5,arrow_open_head:4,arrow_hollow_circle:8};function gs(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=jt(e),t=jt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],n=s-r,a=o-i;return{angle:Math.atan(a/n),deltaX:n,deltaY:a}}p(gs,"calculateDeltaAndAngle");var jt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vw=p(e=>({x:p(function(t,r,i){let s=0;const o=jt(i[0]).x<jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(he,e.arrowTypeStart)){const{angle:f,deltaX:m}=gs(i[0],i[1]);s=he[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(he,e.arrowTypeEnd)){const{angle:f,deltaX:m}=gs(i[i.length-1],i[i.length-2]);s=he[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const n=Math.abs(jt(t).x-jt(i[i.length-1]).x),a=Math.abs(jt(t).y-jt(i[i.length-1]).y),h=Math.abs(jt(t).x-jt(i[0]).x),c=Math.abs(jt(t).y-jt(i[0]).y),l=he[e.arrowTypeStart],d=he[e.arrowTypeEnd],u=1;if(n<d&&n>0&&a<d){let f=d+u-n;f*=o==="right"?-1:1,s-=f}if(h<l&&h>0&&c<l){let f=l+u-h;f*=o==="right"?-1:1,s+=f}return jt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const o=jt(i[0]).y<jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(he,e.arrowTypeStart)){const{angle:f,deltaY:m}=gs(i[0],i[1]);s=he[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(he,e.arrowTypeEnd)){const{angle:f,deltaY:m}=gs(i[i.length-1],i[i.length-2]);s=he[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const n=Math.abs(jt(t).y-jt(i[i.length-1]).y),a=Math.abs(jt(t).x-jt(i[i.length-1]).x),h=Math.abs(jt(t).y-jt(i[0]).y),c=Math.abs(jt(t).x-jt(i[0]).x),l=he[e.arrowTypeStart],d=he[e.arrowTypeEnd],u=1;if(n<d&&n>0&&a<d){let f=d+u-n;f*=o==="up"?-1:1,s-=f}if(h<l&&h>0&&c<l){let f=l+u-h;f*=o==="up"?-1:1,s+=f}return jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),lm=1,Lw=p(e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:lm,"getStepDuration"),lh=p(e=>typeof e.step=="number"&&Number.isInteger(e.step)&&e.step>0,"isStepEdge"),Ad=[.25,.35,.15,.65,.75,.5,.85,.1,.9],Kn=9,Fw=11,Aw=2,Ew="#333333",Ed=12,Md=6,$d=14,Od=.01,Mw=4.5,hm=/translate\(\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i,$w=4,Ow=.6,Dw=4,Iw=p((e,t,r=lm)=>{const i=Math.max(t,e);return{begin:(e-1)*r,dur:r,gap:(i-1)*r}},"getEdgeStepTiming"),Pw=p(e=>`step_${Array.from(e,t=>/[\dA-Za-z]/.test(t)?t:`_${(t.codePointAt(0)??0).toString(16)}_`).join("")}`,"toAnimationId"),Rw=p(e=>{const t=/^m\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i.exec(e.trim());return t?`translate(${t[1]},${t[2]}) `:""},"pathStartTranslate"),qw=p(e=>Array.from(e,(t,r)=>{const i=t.codePointAt(0)??0;if(i===0)return"�";const s=i<=31||i===127,o=/\d/.test(t)&&(r===0||r===1&&e.startsWith("-"));return s||o?`\\${i.toString(16)} `:e==="-"?"\\-":i>=128||/[\w-]/.test(t)?t:`\\${t}`}).join(""),"escapeCssIdentifierFallback"),Nw=p(e=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):qw(e),"escapeCssIdentifier"),Ww=p((e,t)=>{const r=e.node(),i=r?.ownerSVGElement??r?.closest?.("svg")??r,s=t||i?.getAttribute("id");if(!i||!s||i.querySelector("style.edge-step-style"))return;const o=`#${Nw(s)} `,n=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","style");n.setAttribute("class","edge-step-style"),n.textContent=`@media (prefers-reduced-motion: reduce) { ${o}.edge-step-dot, ${o}.edge-step-highlight { display: none; } }`,i.appendChild(n)},"ensureReducedMotionStyle"),zw=p((e,t)=>{const r=e.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y));if(r.length===0)return;const i=r.slice(1).map((o,n)=>Math.hypot(o.x-r[n].x,o.y-r[n].y));let s=i.reduce((o,n)=>o+n,0)*t;for(const[o,n]of i.entries()){if(s<=n&&n>0){const a=s/n,h=r[o],c=r[o+1];return{x:h.x+(c.x-h.x)*a,y:h.y+(c.y-h.y)*a}}s-=n}return r[r.length-1]},"pointAlongPolyline"),Hw=p((e,t)=>{const r=typeof t?.getTotalLength=="function"?t.getTotalLength():0,i=t?.getPointAtLength?.bind(t);return r>0&&i?s=>{const{x:o,y:n}=i(r*s);return{x:o,y:n}}:s=>zw(e,s)},"createPathSampler"),Yw=p((e,t)=>Math.min(Number.POSITIVE_INFINITY,...t.map(r=>{const i=Math.max(Math.abs(e.x-r.x)-r.halfWidth,0),s=Math.max(Math.abs(e.y-r.y)-r.halfHeight,0);return Math.hypot(i,s)-Kn})),"roomAround"),Uw=p((e,t)=>{const r=e(t),i=e(Math.max(t-Od,0)),s=e(Math.min(t+Od,1));if(!r||!i||!s)return[];const o=Math.hypot(s.x-i.x,s.y-i.y);if(o===0)return[];const n={x:-(s.y-i.y)/o,y:(s.x-i.x)/o};return[1,-1].map(a=>({x:r.x+n.x*$d*a,y:r.y+n.y*$d*a}))},"besideThePath"),jw=p((e,t)=>{const r=[...Ad.map(e),...Ad.flatMap(o=>Uw(e,o))];let i,s=Number.NEGATIVE_INFINITY;for(const o of r){if(!o||!Number.isFinite(o.x)||!Number.isFinite(o.y))continue;const n=Yw(o,t);if(n>=Aw)return o;n>s&&(i=o,s=n)}return i},"chooseBadgePosition"),cm=p((e,t)=>({...e,halfWidth:t,halfHeight:t}),"square"),Gw=p(e=>{const t=hm.exec(e.getAttribute("transform")??"");return t?{x:Number(t[1]),y:Number(t[2])}:{x:0,y:0}},"translationOf"),hh=p(e=>{const t={x:0,y:0};for(let r=e;r&&r.localName!=="svg";r=r.parentElement){const{x:i,y:s}=Gw(r);t.x+=i,t.y+=s}return t},"offsetInSvg"),Vw=p((e,t)=>{if(!hm.test(e.getAttribute("transform")??""))return;const r=hh(e),i=r.x-t.x,s=r.y-t.y,o=e.getBBox?.();if(o)return{x:i+o.x+o.width/2,y:s+o.y+o.height/2,halfWidth:o.width/2,halfHeight:o.height/2}},"boxedObstacle"),Xw=p(e=>{try{const t=JSON.parse(atob(e.getAttribute("data-points")??""));return Array.isArray(t)?t:[]}catch{return[]}},"readPoints"),Dd=p((e,t)=>{const r=Math.hypot(e.x-t.x,e.y-t.y);if(r===0)return cm(e,Ed);const i={x:(e.x-t.x)/r,y:(e.y-t.y)/r},s=Ed/2;return{x:e.x-i.x*s,y:e.y-i.y*s,halfWidth:Math.abs(i.x)*s+Math.abs(i.y)*Md,halfHeight:Math.abs(i.y)*s+Math.abs(i.x)*Md}},"arrowheadObstacle"),Id=p((e,t)=>{const r=e.getAttribute(t);return!!r&&r!=="none"},"hasMarker"),Zw=p((e,t)=>{const r=Xw(e).filter(a=>Number.isFinite(a?.x)&&Number.isFinite(a?.y));if(r.length===0)return[];const i=hh(e),s=p(a=>({x:a.x+i.x-t.x,y:a.y+i.y-t.y}),"toSvg"),o=r.length-1,n=[];return Id(e,"marker-start")&&n.push(Dd(s(r[0]),s(r[Math.min(1,o)]))),Id(e,"marker-end")&&n.push(Dd(s(r[o]),s(r[Math.max(o-1,0)]))),n},"arrowheadObstacles"),dm=p(e=>{const t={x:0,y:0},r=[...e?.querySelectorAll(".edgeLabel, .node")??[]].map(s=>Vw(s,t)).filter(s=>s!==void 0),i=[...e?.querySelectorAll('path[data-edge="true"]')??[]].flatMap(s=>Zw(s,t));return[...r,...i]},"collectBadgeObstacles"),Kw=p((e,t)=>{if(!e.label||t.length===0)return[];const{x:r,y:i}=Fe.calcLabelPosition(t);return[{x:r,y:i,halfWidth:(e.width??0)/2,halfHeight:(e.height??0)/2}]},"edgeLabelObstacles"),Qw=p(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},"linearChannel"),Pd=p(e=>{try{const[t,r,i]=["r","g","b"].map(s=>Qw(lC(e,s)));return .2126*t+.7152*r+.0722*i}catch{return}},"relativeLuminance"),Jw=p((e,t)=>{const r=Pd(e),i=Pd(t);return r===void 0||i===void 0?0:(Math.max(r,i)+.05)/(Math.min(r,i)+.05)},"contrastRatio"),tT=p((e,t)=>{const i=[...t.filter(o=>!!o),"#ffffff","#000000"].map(o=>({color:o,ratio:Jw(e,o)}));return(i.find(({ratio:o})=>o>=Mw)??i.reduce((o,n)=>n.ratio>o.ratio?n:o)).color},"pickBadgeTextColor"),eT=p(e=>{const t=e?.replace(/^stroke:\s*/,"").trim();return t===""?void 0:t},"bareColor"),rT=p((e,t,r,i=dm(e.node()?.closest("svg")))=>{if(!lh(t)||!t.showStepNumber)return;const s=hh(e.node()),o=i.map(c=>({...c,x:c.x-s.x,y:c.y-s.y})),n=jw(Hw(r.points,r.pathNode),[...o,...Kw(t,r.points)]);if(!n)return;const a=eT(r.color)??Ew,h=e.append("g").attr("class","edge-step-badge").attr("transform",`translate(${n.x},${n.y})`).attr("pointer-events","none").attr("data-step",t.step);return h.append("circle").attr("r",Kn).attr("fill",a),h.append("text").attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",Fw).attr("fill",tT(a,r.textColors??[])).text(String(t.step)),cm({x:n.x+s.x,y:n.y+s.y},Kn)},"insertEdgeStepBadge"),Rd=p((e,t,r)=>{e.append("animateTransform").attr("attributeName","transform").attr("type","scale").attr("values","1;1").attr("dur",`${r}s`).attr("begin",`${t}.begin`).attr("fill","remove")},"showWhileStepPlays"),iT=p((e,t,r,i,s)=>{if(!lh(t)||!r)return;const{begin:o,dur:n,gap:a}=Iw(t.step,t.stepCount??t.step,Lw(t.stepDuration)),h=Pw(`${i}-${t.id}-step`),c=`${Rw(r)}scale(0)`,l=s?.replace(/^stroke:\s*/,""),d=e.append("path").attr("class","edge-step-highlight").attr("aria-hidden","true").attr("d",r).attr("fill","none").attr("stroke",l??"currentColor").attr("stroke-width",$w).attr("stroke-linecap","round").attr("stroke-opacity",Ow).attr("pointer-events","none").attr("transform",c).attr("data-step",t.step);Rd(d,h,n);const u=e.append("circle").attr("class","edge-step-dot").attr("r",Dw).attr("aria-hidden","true").attr("transform",c).attr("data-step",t.step);l&&u.attr("fill",l).attr("stroke","none"),u.append("animateMotion").attr("id",h).attr("path",r).attr("dur",`${n}s`).attr("begin",`${o}s;${h}.end+${a}s`).attr("fill","remove"),Rd(u,h,n),Ww(e,i)},"insertEdgeStepDot"),Yo=new WeakMap,sT=p(e=>{const t=e.querySelector(":scope > g.edge-step-badges");if(t)return t;const r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","g");return r.setAttribute("class","edge-step-badges"),e.appendChild(r)},"badgeLayer"),oT=p(e=>{const t=e?Yo.get(e):void 0;if(!e||!t)return;Yo.delete(e);const r=dm(e);for(const{elem:i,edge:s,options:o}of t){const n=i.node()?.parentElement;if(!n)continue;const a=$t(sT(n)),h=rT(a,s,o,r);h&&r.push(h)}},"placeQueuedStepBadges"),aT=p((e,t,r,i,s)=>{iT(e,t,r,i,s.color);const o=e.node(),n=o?.ownerSVGElement??o;!n||!lh(t)||!t.showStepNumber||Yo.set(n,[...Yo.get(n)??[],{elem:e,edge:t,options:s}])},"insertEdgeStepMarks"),nT=p((e,t,r,i,s,o=!1,n)=>{t.arrowTypeStart&&qd(e,"start",t.arrowTypeStart,r,i,s,o,n),t.arrowTypeEnd&&qd(e,"end",t.arrowTypeEnd,r,i,s,o,n)},"addEdgeMarkers"),lT={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_open_head:{type:"openArrow",fill:!1},arrow_hollow_circle:{type:"hollowCircle",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}},hT=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],qd=p((e,t,r,i,s,o,n=!1,a)=>{if(!r||r==="none")return;const h=lT[r],c=h&&hT.includes(h.type);if(!h){J.warn(`Unknown arrow type: ${r}`);return}const l=h.type,f=`${s}_${o}-${l}${t==="start"?"Start":"End"}${n&&c?"-margin":""}`;if(a&&a.trim()!==""){const m=a.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const C=document.getElementById(f);if(C){const x=C.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",a),h.fill&&S.setAttribute("fill",a)}),C.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),cT=p(e=>typeof e=="string"?e:Ot()?.flowchart?.curve,"resolveEdgeCurveType"),Uo=new Map,ge=new Map,SF=p(()=>{Uo.clear(),ge.clear()},"clear"),wF=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),ns=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),dT=p(async(e,t)=>{const r=Ot();let i=de(r);const{labelStyles:s}=dt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),n=o.insert("g").attr("class","label").attr("data-id",t.id),a=t.labelType==="markdown",c=await Ae(e,t.label,{style:ns(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:a,width:a?void 0:void 0},r);n.node().appendChild(c),J.info("abc82",t,t.labelType);let l,d;if(i){const f=c.children[0],m=$t(c);l=await si.measure(()=>f.getBoundingClientRect()),d=l,m.attr("width",l.width),m.attr("height",l.height)}else{const f=$t(c).select("text").node();await si.measure(()=>{l=c.getBBox(),f&&typeof f.getBBox=="function"?d=f.getBBox():d=l})}n.attr("transform",as(d,i)),Uo.set(t.id,o),t.width=l.width,t.height=l.height;let u;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await yr(m,t.startLabelLeft,ns(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=$t(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).startLeft=f,ys(u,t.startLabelLeft,C),ms(t,"startLeft",C)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await yr(m,t.startLabelRight,ns(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=$t(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).startRight=f,ys(u,t.startLabelRight,C),ms(t,"startRight",C)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await yr(m,t.endLabelLeft,ns(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=$t(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).endLeft=f,ys(u,t.endLabelLeft,C),ms(t,"endLeft",C)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await yr(m,t.endLabelRight,ns(t.labelStyle)||"",!1,!1);u=y;let C=y.getBBox();if(i){const x=y.children[0],b=$t(y);C=x.getBoundingClientRect(),b.attr("width",C.width),b.attr("height",C.height)}m.attr("transform",as(C,i)),ge.get(t.id)||ge.set(t.id,{}),ge.get(t.id).endRight=f,ys(u,t.endLabelRight,C),ms(t,"endRight",C)}return c},"insertEdgeLabel");function ms(e,t,r){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:r.width,height:r.height}}p(ms,"recordTerminalLabelSize");function ys(e,t,r){de(Ot())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}p(ys,"setTerminalWidth");var uT=p((e,t)=>{let r=e.x,i=e.y;if(t?.updatedPath){const s=Fe.calcLabelPosition(t.updatedPath);if(t.originalPath){const o=Fe.calcLabelPosition(t.originalPath);r=e.x+(s.x-o.x),i=e.y+(s.y-o.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),pT=p((e,t)=>{J.debug("Moving label abc88 ",e.id,e.label,Uo.get(e.id),t);const r=Ot(),{subGraphTitleTotalMargin:i}=Ns(r);if(e.label){const o=Uo.get(e.id),{x:n,y:a}=uT(e,t);J.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",n,",",a,") abc88"),o.attr("transform",`translate(${n}, ${a+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const o=ge.get(e.id).startLeft;let n=e.x,a=e.y;if(s){const h=Fe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);n=h.x,a=h.y}o.attr("transform",`translate(${n}, ${a})`)}if(e.startLabelRight){const o=ge.get(e.id).startRight;let n=e.x,a=e.y;if(s){const h=Fe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);n=h.x,a=h.y}o.attr("transform",`translate(${n}, ${a})`)}if(e.endLabelLeft){const o=ge.get(e.id).endLeft;let n=e.x,a=e.y;if(s){const h=Fe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);n=h.x,a=h.y}o.attr("transform",`translate(${n}, ${a})`)}if(e.endLabelRight){const o=ge.get(e.id).endRight;let n=e.x,a=e.y;if(s){const h=Fe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);n=h.x,a=h.y}o.attr("transform",`translate(${n}, ${a})`)}},"positionEdgeLabel"),zi=.5,Cr=p((e,t)=>Math.abs(e.x-t.x)<zi,"sharesColumn"),xr=p((e,t)=>Math.abs(e.y-t.y)<zi,"sharesRow"),um=p((e,t)=>Cr(e,t)&&xr(e,t),"coincides");function pm(e,t,r){return Cr(e,t)&&!xr(e,t)?Cr(r,t):xr(e,t)&&!Cr(e,t)?xr(r,t):Cr(r,t)||xr(r,t)}p(pm,"keepsArrivalAxis");function fm(e,t,r){return um(e,t)?{heading:t,from:r}:{heading:e,from:t}}p(fm,"arrivalSegment");function gm({heading:e,from:t},r,i){return(e.x-t.x)*(i.x-r.x)+(e.y-t.y)*(i.y-r.y)<0}p(gm,"runsAgainstHeading");function mm({heading:e,from:t},r,i){return xr(e,t)&&!Cr(e,t)?{x:i.x,y:r.y}:Cr(e,t)&&!xr(e,t)?{x:r.x,y:i.y}:i}p(mm,"snapToArrivalAxis");function ym(e,t,r,i){if((Cr(e,t)||xr(e,t))&&!pm(e,t,i))return e;const o=fm(e,t,r);return gm(o,t,i)?t:mm(o,t,i)}p(ym,"dockFinalPoint");function Cm(e){const t=Object.hasOwn(he,e)?he[e]:0;return Number.isFinite(t)?t:0}p(Cm,"markerPullBack");function xm({originalLast:e,lastInner:t,newLast:r,minLength:i}){const s=!um(e,t),o=Math.hypot(r.x-t.x,r.y-t.y);return o>=Math.max(zi,i)?r:s&&o>=zi?e:void 0}p(xm,"finalDockPoint");var fT=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),gT=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),n=e.width/2,a=e.height/2;return s>=n||o>=a},"outsideNode"),mT=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,o=Math.abs(i-r.x),n=e.width/2;let a=r.x<t.x?n-o:n+o;const h=e.height/2,c=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*h){let d=r.y<t.y?t.y-h-s:s-h-t.y;a=l*d/c;const u={x:r.x<t.x?r.x+a:r.x-l+a,y:r.y<t.y?r.y+c-d:r.y-c+d};return a===0&&(u.x=t.x,u.y=t.y),l===0&&(u.x=t.x),c===0&&(u.y=t.y),J.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${l}, r ${a}`,u),u}else{r.x<t.x?a=t.x-n-i:a=i-n-t.x;let d=c*a/l,u=r.x<t.x?r.x+l-a:r.x-l+a,f=r.y<t.y?r.y+d:r.y-d;return J.debug(`sides calc abc89, Q ${c}, q ${d}, R ${l}, r ${a}`,{_x:u,_y:f}),a===0&&(u=t.x,f=t.y),l===0&&(u=t.x),c===0&&(f=t.y),{x:u,y:f}}},"intersection"),Nd=p((e,t)=>{J.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(J.info("abc88 checking point",o,t),!gT(t,o)&&!s){const n=mT(t,i,o);J.debug("abc88 inside",o,i,n),J.debug("abc88 intersection",n,t);let a=!1;r.forEach(h=>{a=a||h.x===n.x&&h.y===n.y}),r.some(h=>h.x===n.x&&h.y===n.y)?J.warn("abc88 no intersect",n,r):r.push(n),s=!0}else J.warn("abc88 outside",o,i),i=o,s||r.push(o)}),J.debug("returning points",r),r},"cutPathAtIntersect");function bm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],n=e[i+1];(s.x===o.x&&o.y===n.y&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===n.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-n.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(bm,"extractCornerPoints");var Wd=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),n=r/o;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),yT=p(function(e){const{cornerPointPositions:t}=bm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],n=e[i],a=Wd(s,n,5),h=Wd(o,n,5),c=h.x-a.x,l=h.y-a.y;r.push(a);const d=Math.sqrt(2)*2;let u={x:n.x,y:n.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){J.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const f=5;n.x===a.x?u={x:c<0?a.x-f+d:a.x+f-d,y:l<0?a.y-d:a.y+d}:u={x:c<0?a.x-d:a.x+d,y:l<0?a.y-f+d:a.y+f-d}}else J.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(u,h)}else r.push(e[i]);return r},"fixCorners"),CT=p((e,t,r)=>{const i=e-t-r,s=2,o=2,n=s+o,a=Math.floor(i/n),h=Number.isFinite(a)?Math.max(0,a):0,c=Array(h).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),xT=p(function(e,t,r,i,s,o,n,a=!1,h=void 0){if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:l}=Ot(),d=h??l;let u=t.points,f=!1;const m=s;var y=o;const C=[];for(const V in t.cssCompiledStyles)_u(V)||C.push(t.cssCompiledStyles[V]);if(d==="swimlane"){if(!a&&y.intersect&&m.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2){const[V,lt]=u;u=Cr(V,lt)||xr(V,lt)?[m.intersect(V),y.intersect(lt)]:[m.intersect(lt),y.intersect(V)]}else{const V=u.slice(1,-1),lt=V[0],xt=V[V.length-1],bt=m.intersect(lt),_t=u[u.length-1],mt=y.intersect(xt),ft=V.at(-2)??u[0],ht=ym(_t,xt,ft,mt),Tt=xm({originalLast:_t,lastInner:xt,newLast:ht,minLength:Cm(t.arrowTypeEnd)}),kt=Math.abs(bt.x-lt.x)<zi&&Math.abs(bt.y-lt.y)<zi?[]:[bt],Pt=Tt?[Tt]:[];u=[...kt,...V,...Pt]}u=fT(t,u)}else y.intersect&&m.intersect&&!a&&(u=u.slice(1,t.points.length-1),u.unshift(m.intersect(u[0])),u.push(y.intersect(u[u.length-1])));const x=btoa(JSON.stringify(u));t.toCluster&&(J.info("to cluster abc88",r.get(t.toCluster)),u=Nd(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(J.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=Nd(u.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let b=u.filter(V=>!Number.isNaN(V.y));const S=cT(t.curve);S!=="rounded"&&(b=yT(b));let T=ws;switch(S){case"linear":T=ws;break;case"basis":T=On;break;case"cardinal":T=Qu;break;case"bumpX":T=Gu;break;case"bumpY":T=Vu;break;case"catmullRom":T=tp;break;case"monotoneX":T=ap;break;case"monotoneY":T=np;break;case"natural":T=hp;break;case"step":T=cp;break;case"stepAfter":T=up;break;case"stepBefore":T=dp;break;case"rounded":T=ws;break;default:T=On}const{x:v,y:B}=vw(t),L=t1().x(v).y(B).curve(T);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let q,R=S==="rounded"?km(Sm(b,t),5):L(b);const $=Array.isArray(t.style)?t.style:[t.style];let G=$.find(V=>V?.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const V=ut.svg(e);Object.assign([],b);const lt=V.path(R,{roughness:.3,seed:c});F+=" transition",q=$t(lt).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",$?$.reduce((bt,_t)=>bt+";"+_t,""):"");let xt=q.attr("d");q.attr("d",xt),e.node().appendChild(q.node())}else{const V=C.join(";"),lt=$?$.reduce((ht,Tt)=>ht+Tt+";",""):"",xt=(V?V+";"+lt+";":lt)+";"+($?$.reduce((ht,Tt)=>ht+";"+Tt,""):"");q=e.append("path").attr("d",R).attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",xt),G=xt.match(/stroke:([^;]+)/)?.[1],E=t.animate===!0||!!t.animation||V.includes("animation");const bt=q.node(),_t=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,mt=Fd[t.arrowTypeStart]||0,ft=Fd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const Tt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?CT(_t,mt,ft):`0 ${mt} ${_t-mt-ft} ${ft}`}; stroke-dashoffset: 0;`;q.attr("style",Tt+q.attr("style"))}}if(q.attr("data-edge",!0),q.attr("data-et","edge"),q.attr("data-id",t.id),q.attr("data-points",x),q.attr("data-look",ie(t.look)),t.step!==void 0){const{themeVariables:V}=Ot(),lt=G??V?.lineColor;aT(e,t,R,n,{points:b,pathNode:q.node(),color:lt,textColors:[V?.background,V?.primaryTextColor]})}t.showPoints&&b.forEach(V=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",V.x).attr("cy",V.y)});let D="";(Ot().flowchart.arrowMarkerAbsolute||Ot().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),J.info("arrowTypeStart",t.arrowTypeStart),J.info("arrowTypeEnd",t.arrowTypeEnd);const A=!E&&t?.look==="neo";nT(q,t,D,n,i,A,G);const z=Math.floor(u.length/2),W=u[z];Fe.isLabelCoordinateInPath(W,q.attr("d"))||(f=!0);let tt={};return f&&(tt.updatedPath=u),tt.originalPath=t.points,tt},"insertEdge");function km(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const n=e[o],a=e[o-1],h=e[o+1];if(o===0)r+=`M${n.x},${n.y}`;else if(o===i-1)r+=`L${n.x},${n.y}`;else{const c=n.x-a.x,l=n.y-a.y,d=h.x-n.x,u=h.y-n.y,f=Math.hypot(c,l),m=Math.hypot(d,u);if(f<s||m<s){r+=`L${n.x},${n.y}`;continue}const y=c/f,C=l/f,x=d/m,b=u/m,S=y*x+C*b,T=Math.max(-1,Math.min(1,S)),v=Math.acos(T);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${n.x},${n.y}`;continue}const B=Math.min(t/Math.sin(v/2),f/2,m/2),L=n.x-y*B,F=n.y-C*B,q=n.x+x*B,R=n.y+b*B;r+=`L${L},${F}`,r+=`Q${n.x},${n.y} ${q},${R}`}}return r}p(km,"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 Sm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&he[t.arrowTypeStart]){const s=he[t.arrowTypeStart],o=e[0],n=e[1],{angle:a}=Qn(o,n),h=s*Math.cos(a),c=s*Math.sin(a);r[0].x=o.x+h,r[0].y=o.y+c}const i=e.length;if(i>=2&&he[t.arrowTypeEnd]){const s=he[t.arrowTypeEnd],o=e[i-1],n=e[i-2],{angle:a}=Qn(n,o),h=s*Math.cos(a),c=s*Math.sin(a);r[i-1].x=o.x-h,r[i-1].y=o.y-c}return r}p(Sm,"applyMarkerOffsetsToPoints");var bT=p((e,t,r,i)=>{t.forEach(s=>{jT[s](e,r,i)})},"insertMarkers"),kT=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"),ST=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"),wT=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"),TT=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"),_T=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"),BT=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"),vT=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"),LT=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"),FT=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"),AT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{transitionColor:o}=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",`${o}`)},"barbNeo"),ET=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"),MT=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"),$T=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"),OT=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"),DT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"only_one_neo"),IT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:n}=s,a=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");a.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),a.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const h=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");h.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),PT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"one_or_more_neo"),RT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:n}=s,a=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");a.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const h=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");h.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),qT=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"),NT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`).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"),WT=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"),zT=p((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=s,n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),HT=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"),YT=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-openArrowEnd").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",11).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1 1 L 11 6 L 1 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-openArrowStart").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",1).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 11 1 L 1 6 L 11 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none")},"openArrow"),UT=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hollowCircleStart").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hollowCircleEnd").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none")},"hollowCircle"),jT={extension:kT,composition:ST,aggregation:wT,dependency:TT,lollipop:_T,point:BT,circle:vT,cross:LT,barb:FT,barbNeo:AT,hierarchy:HT,only_one:ET,zero_or_one:MT,one_or_more:$T,zero_or_more:OT,only_one_neo:DT,zero_or_one_neo:IT,one_or_more_neo:PT,zero_or_more_neo:RT,requirement_arrow:qT,requirement_contains:WT,requirement_arrow_neo:NT,requirement_contains_neo:zT,openArrow:YT,hollowCircle:UT},GT=bT,VT={common:Ms,getConfig:Gt,insertCluster:Bw,insertEdge:xT,insertEdgeLabel:dT,insertMarkers:GT,insertNode:sm,interpolateToCurve:Pl,labelHelper:Ct,log:J,positionEdgeLabel:pT},XT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Fs=Object.create(null),wm=p(e=>{for(const t of e)Fs[t.name]=t},"registerLayoutLoaders"),ZT=p(()=>{const e=p(async()=>await Dt(()=>import("./elk-XV6XMXQE-cHLdRN7u.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...XT.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),KT=p(()=>{wm([{name:"dagre",loader:p(async()=>await Dt(()=>import("./dagre-SPEB5RXH-B_2grAE7.js"),__vite__mapDeps([7,2,3,4,5,6]),import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await Dt(()=>import("./swimlanes-UMQ2AFYF-Czo9WyoV.js"),__vite__mapDeps([8,1,2,3,4,5,6]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await Dt(()=>import("./cose-bilkent-JH36ORCC-8N6YUm1i.js"),__vite__mapDeps([9,10,6,3,4]),import.meta.url),"loader")},...ZT()])},"registerDefaultLayoutLoaders");KT();var TF=p(async(e,t)=>{if(!Object.hasOwn(Fs,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const o of e.nodes){const n=o.domId||o.id;o.domId=`${e.diagramId}-${n}`}const r=Fs[e.layoutAlgorithm],i=await r.loader();J0(t,e.config);const s=await i.render(e,t,VT,{algorithm:r.algorithm});return oT(t.node()),s},"render"),bn="dagre",_F=p((e="",{fallback:t=bn}={})=>{if(Object.hasOwn(Fs,e))return e;for(const r of[t,bn])if(Object.hasOwn(Fs,r))return J.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${bn} is registered.`)},"getRegisteredLayoutAlgorithm"),QT=p(e=>{const{securityLevel:t}=Ot();let r=$t("body");if(t==="sandbox"){const o=$t(`#i${e}`).node()?.contentDocument??document;r=$t(o.body)}return r.select(`#${e}`)},"selectSvgElement"),ch="comm",Tm="rule",_m="decl",JT="@media",t_="@import",e_="@supports",r_="@namespace",Jn="@keyframes",Bm="@layer",i_="@scope",s_=Math.abs,Bs=String.fromCharCode;function vm(e){return e.trim()}function tl(e,t,r){return e.replace(t,r)}function Bi(e,t){return e.charCodeAt(t)|0}function Hi(e,t,r){return e.slice(t,r)}function ir(e){return e.length}function Lm(e){return e.length}function oo(e,t){return t.push(e),e}var la=1,Yi=1,Fm=0,Pe=0,ee=0,Xi="";function dh(e,t,r,i,s,o,n,a){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:la,column:Yi,length:n,return:"",siblings:a}}function o_(){return ee}function a_(){return ee=Pe>0?Bi(Xi,--Pe):0,Yi--,ee===10&&(Yi=1,la--),ee}function je(){return ee=Pe<Fm?Bi(Xi,Pe++):0,Yi++,ee===10&&(Yi=1,la++),ee}function Dr(){return Bi(Xi,Pe)}function mo(){return Pe}function ha(e,t){return Hi(Xi,e,t)}function As(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 n_(e){return la=Yi=1,Fm=ir(Xi=e),Pe=0,[]}function l_(e){return Xi="",e}function kn(e){return vm(ha(Pe-1,el(e===91?e+2:e===40?e+1:e)))}function h_(e){for(;(ee=Dr())&&ee<33;)je();return As(e)>2||As(ee)>3?"":" "}function c_(e,t){for(;--t&&je()&&!(ee<48||ee>102||ee>57&&ee<65||ee>70&&ee<97););return ha(e,mo()+(t<6&&Dr()==32&&je()==32))}function el(e){for(;je();)switch(ee){case e:return Pe;case 34:case 39:e!==34&&e!==39&&el(ee);break;case 40:e===41&&el(e);break;case 92:je();break}return Pe}function d_(e,t){for(;je()&&e+ee!==57;)if(e+ee===84&&Dr()===47)break;return"/*"+ha(t,Pe-1)+"*"+Bs(e===47?e:je())}function u_(e){for(;!As(Dr());)je();return ha(e,Pe)}function p_(e){return l_(yo("",null,null,null,[""],e=n_(e),0,[0],e))}function yo(e,t,r,i,s,o,n,a,h){for(var c=0,l=0,d=n,u=0,f=0,m=0,y=1,C=1,x=1,b=0,S=0,T="",v=s,B=o,L=i,F=T;C;)switch(m=S,S=je()){case 40:m!=108&&Bi(F,d-1)==58?(b++,F+="("):F+=kn(S);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=kn(S);break;case 9:case 10:case 13:case 32:if(b>0){F+=Bs(S);break}F+=h_(m);break;case 92:F+=c_(mo()-1,7);continue;case 47:switch(Dr()){case 42:case 47:oo(f_(d_(je(),mo()),t,r,h),h),(As(m||1)==5||As(Dr()||1)==5)&&ir(F)&&Hi(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:a[c++]=ir(F)*x;case 125*y:case 59:case 0:if(b>0&&S){F+=Bs(S);break}switch(S){case 0:case 125:C=0;case 59+l:x==-1&&(F=tl(F,/\f/g,"")),f>0&&(ir(F)-d||y===0)&&oo(f>32?Hd(F+";",i,r,d-1,h):Hd(tl(F," ","")+";",i,r,d-2,h),h);break;case 59:F+=";";default:if(oo(L=zd(F,t,r,c,l,s,a,T,v=[],B=[],d,o),o),S===123)if(l===0)yo(F,t,L,L,v,o,d,a,B);else{switch(u){case 99:if(Bi(F,3)===110)break;case 108:if(Bi(F,2)===97)break;default:l=0;case 100:case 109:case 115:}l?yo(e,L,L,i&&oo(zd(e,L,L,0,0,s,a,T,s,v=[],d,B),B),s,B,d,a,i?v:B):yo(F,L,L,L,[""],B,0,a,B)}}c=l=f=0,y=x=1,T=F="",d=n;break;case 58:d=1+ir(F),f=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&a_()==125)continue}switch(F+=Bs(S),S*y){case 38:x=l>0?1:(F+="\f",-1);break;case 44:if(b>0)break;a[c++]=(ir(F)-1)*x,x=1;break;case 64:Dr()===45&&(F+=kn(je())),u=Dr(),l=d=ir(T=F+=u_(mo())),S++;break;case 45:m===45&&ir(F)==2&&(y=0)}}return o}function zd(e,t,r,i,s,o,n,a,h,c,l,d){for(var u=s-1,f=s===0?o:[""],m=Lm(f),y=0,C=0,x=0;y<i;++y)for(var b=0,S=Hi(e,u+1,u=s_(C=n[y])),T=e;b<m;++b)(T=vm(C>0?f[b]+" "+S:tl(S,/&\f/g,f[b])))&&(h[x++]=T);return dh(e,t,r,s===0?Tm:a,h,c,l,d)}function f_(e,t,r,i){return dh(e,t,r,ch,Bs(o_()),Hi(e,2,-2),0,i)}function Hd(e,t,r,i,s){return dh(e,t,r,_m,Hi(e,0,i),Hi(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 g_(e,t,r,i){switch(e.type){case Bm:if(e.children.length)break;case t_:case r_:case _m:return e.return=e.return||e.value;case ch:return"";case Jn:return e.return=e.value+"{"+rl(e.children,i)+"}";case Tm:if(!ir(e.value=e.props.join(",")))return""}return ir(r=rl(e.children,i))?e.return=e.value+"{"+r+"}":""}function m_(e){var t=Lm(e);return function(r,i,s,o){for(var n="",a=0;a<t;a++)n+=e[a](r,i,s,o)||"";return n}}var Am="c4",y_=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),C_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./c4Diagram-KJ2TOQU5-BmBo2PHu.js");return{diagram:t}},__vite__mapDeps([11,12,3,4,6]),import.meta.url);return{id:Am,diagram:e}},"loader"),x_={id:Am,detector:y_,loader:C_},b_=x_,Em="flowchart-v2",k_=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./flowDiagram-MALGAFMO-DoJjw4RA.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12]),import.meta.url);return{id:Em,diagram:e}},"loader"),w_={id:Em,detector:k_,loader:S_},T_=w_,Mm="agentflow",__=p(e=>/^\s*agentflow-beta\b/.test(e),"detector"),B_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-3B7GL73J-C9FXwDlf.js");return{diagram:t}},__vite__mapDeps([17,14,15,16,12,3,4,6]),import.meta.url);return{id:Mm,diagram:e}},"loader"),v_={id:Mm,detector:__,loader:B_},L_=v_,$m="swimlane",F_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),A_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-OMPLPG4O-BH5aEx0X.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,16,12,3,4,6]),import.meta.url);return{id:$m,diagram:e}},"loader"),E_={id:$m,detector:F_,loader:A_},M_=E_,Om="er",$_=p(e=>/^\s*erDiagram/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./erDiagram-EYBAPDEH-7HsRsmBI.js");return{diagram:t}},__vite__mapDeps([19,15,16,3,4,6]),import.meta.url);return{id:Om,diagram:e}},"loader"),D_={id:Om,detector:$_,loader:O_},I_=D_,Dm="gitGraph",P_=p(e=>/^\s*gitGraph/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-STJD7YCW-CjftfLRK.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,3,4,6]),import.meta.url);return{id:Dm,diagram:e}},"loader"),q_={id:Dm,detector:P_,loader:R_},N_=q_,Im="gantt",W_=p(e=>/^\s*gantt/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./ganttDiagram-23REXITY-D2uZtX_8.js");return{diagram:t}},__vite__mapDeps([24,6,3,4,25]),import.meta.url);return{id:Im,diagram:e}},"loader"),H_={id:Im,detector:W_,loader:z_},Y_=H_,Pm="info",U_=p(e=>/^\s*info/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./infoDiagram-KBXO4MBG-HN-1tqq1.js");return{diagram:t}},__vite__mapDeps([26,23,3,4,6]),import.meta.url);return{id:Pm,diagram:e}},"loader"),G_={id:Pm,detector:U_,loader:j_},Rm="pie",V_=p(e=>/^\s*pie/.test(e),"detector"),X_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./pieDiagram-J4AKIIQI-DoHNiqwi.js");return{diagram:t}},__vite__mapDeps([27,22,23,3,4,25,6]),import.meta.url);return{id:Rm,diagram:e}},"loader"),Z_={id:Rm,detector:V_,loader:X_},qm="quadrantChart",K_=p(e=>/^\s*quadrantChart/.test(e),"detector"),Q_=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./quadrantDiagram-XTYBLID2-Bz5idec8.js");return{diagram:t}},__vite__mapDeps([28,25,3,4,6]),import.meta.url);return{id:qm,diagram:e}},"loader"),J_={id:qm,detector:K_,loader:Q_},tB=J_,Nm="xychart",eB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),rB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./xychartDiagram-GGNKY7IX-CKOVznoa.js");return{diagram:t}},__vite__mapDeps([29,25,3,4,6]),import.meta.url);return{id:Nm,diagram:e}},"loader"),iB={id:Nm,detector:eB,loader:rB},sB=iB,Wm="requirement",oB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),aB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./requirementDiagram-Y7LWUY3S-5aETRIZz.js");return{diagram:t}},__vite__mapDeps([30,15,16,3,4,6]),import.meta.url);return{id:Wm,diagram:e}},"loader"),nB={id:Wm,detector:oB,loader:aB},lB=nB,zm="sequence",hB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./sequenceDiagram-5NDRBG5M-D4sVU6s6.js");return{diagram:t}},__vite__mapDeps([31,21,12,3,4,6]),import.meta.url);return{id:zm,diagram:e}},"loader"),dB={id:zm,detector:hB,loader:cB},uB=dB,Hm="classDiagram",pB=p(e=>/^\s*classDiagram/.test(e),"detector"),fB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./classDiagram-v2-L25IHNXF-DwKi-r2i.js");return{diagram:t}},__vite__mapDeps([32,14,15,16,12,3,4,6]),import.meta.url);return{id:Hm,diagram:e}},"loader"),gB={id:Hm,detector:pB,loader:fB},mB=gB,Ym="stateDiagram",yB=p(e=>/^\s*stateDiagram/.test(e),"detector"),CB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-FJ4FJNEA-WqXK7YOd.js");return{diagram:t}},__vite__mapDeps([33,15,16,12,3,4,6]),import.meta.url);return{id:Ym,diagram:e}},"loader"),xB={id:Ym,detector:yB,loader:CB},bB=xB,Um="journey",kB=p(e=>/^\s*journey/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./journeyDiagram-OPLOXDXO-CMZGp8mG.js");return{diagram:t}},__vite__mapDeps([34,14,12,3,4,6]),import.meta.url);return{id:Um,diagram:e}},"loader"),wB={id:Um,detector:kB,loader:SB},TB=wB,ao=4,ls=75,_B=p(e=>{const t=[];for(const s of e.split(/\s+/)){let o=[...s];for(;o.length>ls;)t.push(o.slice(0,ls).join("")),o=o.slice(ls);o.length>0&&t.push(o.join(""))}const r=[];let i="";for(const s of t){const o=i?`${i} ${s}`:s;[...o].length>ls?(r.push(i),i=s):i=o}if(i&&r.push(i),r.length>ao){r.length=ao;const s=r[ao-1]??"";r[ao-1]=`${[...s].slice(0,ls-3).join("")}...`}return r},"wrapErrorMessage"),BB=p((e,t,r,i)=>{J.debug(`rendering svg for syntax error
|
|
304
|
+
`);const s=QT(t),o=s.append("g"),n=_B(i?.db.getErrorMessage?.()??""),a=n.length>0?500+n.length*56:512;s.attr("viewBox",`0 0 2412 ${a}`),wu(s,100,a,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),n.forEach((h,c)=>{o.append("text").attr("class","error-text").attr("x",1440).attr("y",510+c*56).attr("font-size","42px").style("text-anchor","middle").text(h)})},"draw"),jm={draw:BB},vB=jm,Sn,LB={clear(){Sn=void 0},setErrorMessage(e){Sn=e},getErrorMessage(){return Sn}},FB={db:LB,renderer:jm,parser:{parse:p(()=>{},"parse")}},AB=FB,Gm="flowchart-elk",EB=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),MB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./flowDiagram-MALGAFMO-DoJjw4RA.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12]),import.meta.url);return{id:Gm,diagram:e}},"loader"),$B={id:Gm,detector:EB,loader:MB},OB=$B,Vm="timeline",DB=p(e=>/^\s*timeline/.test(e),"detector"),IB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./timeline-definition-SEUHKTQE-KGKDZW_q.js");return{diagram:t}},__vite__mapDeps([35,3,4,6]),import.meta.url);return{id:Vm,diagram:e}},"loader"),PB={id:Vm,detector:DB,loader:IB},RB=PB,Xm="mindmap",qB=p(e=>/^\s*mindmap/.test(e),"detector"),NB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./mindmap-definition-I2QAS2VK-R2SGME7R.js");return{diagram:t}},__vite__mapDeps([36,15,16,3,4,6]),import.meta.url);return{id:Xm,diagram:e}},"loader"),WB={id:Xm,detector:qB,loader:NB},zB=WB,Zm="kanban",HB=p(e=>/^\s*kanban/.test(e),"detector"),YB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./kanban-definition-BZKZHSQY-C9vGS-EW.js");return{diagram:t}},__vite__mapDeps([37,14,3,4,6]),import.meta.url);return{id:Zm,diagram:e}},"loader"),UB={id:Zm,detector:HB,loader:YB},jB=UB,Km="sankey",GB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),VB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./sankeyDiagram-WGJFYUXA-C7O4v9rg.js");return{diagram:t}},__vite__mapDeps([38,25,3,4,6]),import.meta.url);return{id:Km,diagram:e}},"loader"),XB={id:Km,detector:GB,loader:VB},ZB=XB,Qm="packet",KB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),QB=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-DNEMPZML-DflAT3gr.js");return{diagram:t}},__vite__mapDeps([39,22,23,3,4,6]),import.meta.url);return{id:Qm,diagram:e}},"loader"),JB={id:Qm,detector:KB,loader:QB},Jm="radar",tv=p(e=>/^\s*radar-beta/.test(e),"detector"),ev=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-L3MUGCDN-B04gjrM_.js");return{diagram:t}},__vite__mapDeps([40,22,23,3,4,6]),import.meta.url);return{id:Jm,diagram:e}},"loader"),rv={id:Jm,detector:tv,loader:ev},ty="block",iv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./blockDiagram-APKKGZFW-CeBSUSaW.js");return{diagram:t}},__vite__mapDeps([41,14,5,3,4,6]),import.meta.url);return{id:ty,diagram:e}},"loader"),ov={id:ty,detector:iv,loader:sv},av=ov,ey="treeView",nv=p(e=>/^\s*treeView-beta/.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-XPFHEONP-yR45xV59.js");return{diagram:t}},__vite__mapDeps([42,21,22,23,3,4,6]),import.meta.url);return{id:ey,diagram:e}},"loader"),hv={id:ey,detector:nv,loader:lv},cv=hv,ry="architecture",dv=p(e=>/^\s*architecture/.test(e),"detector"),uv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./architectureDiagram-YGSQEFNW-DMB5UtEZ.js");return{diagram:t}},__vite__mapDeps([43,22,23,3,4,10,6]),import.meta.url);return{id:ry,diagram:e}},"loader"),pv={id:ry,detector:dv,loader:uv},fv=pv,iy="eventmodeling",gv=p(e=>/^\s*eventmodeling/.test(e),"detector"),mv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-MHCOC4E2-jRbOs2Df.js");return{diagram:t}},__vite__mapDeps([44,22,23,3,4,6]),import.meta.url);return{id:iy,diagram:e}},"loader"),yv={id:iy,detector:gv,loader:mv},Cv=yv,sy="ishikawa",xv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),bv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-M35NCXHK-DcnRwsO0.js");return{diagram:t}},__vite__mapDeps([45,3,4,6]),import.meta.url);return{id:sy,diagram:e}},"loader"),kv={id:sy,detector:xv,loader:bv},oy="venn",Sv=p(e=>/^\s*venn-beta/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./vennDiagram-NNMJR3RB-DJOjLlbA.js");return{diagram:t}},__vite__mapDeps([46,3,4,6]),import.meta.url);return{id:oy,diagram:e}},"loader"),Tv={id:oy,detector:Sv,loader:wv},_v=Tv,ay="treemap",Bv=p(e=>/^\s*treemap/.test(e),"detector"),vv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./diagram-LA4NIPWU-cfWJg8HX.js");return{diagram:t}},__vite__mapDeps([47,16,22,23,3,4,25,6]),import.meta.url);return{id:ay,diagram:e}},"loader"),Lv={id:ay,detector:Bv,loader:vv},ny="usecase",Fv=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),Av=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./usecaseDiagram-AFA6YXN4-S0_9S22K.js");return{diagram:t}},__vite__mapDeps([48,15,16,3,4,6]),import.meta.url);return{id:ny,diagram:e}},"loader"),Ev={id:ny,detector:Fv,loader:Av},ly="wardley",Mv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),$v=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./wardleyDiagram-S7YFUSEH-BnzYzY-n.js");return{diagram:t}},__vite__mapDeps([49,22,23,3,4,6]),import.meta.url);return{id:ly,diagram:e}},"loader"),Ov={id:ly,detector:Mv,loader:$v},Dv=Ov,hy="cynefin",Iv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Pv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./cynefinDiagram-L36ESFBY-DmAbfxAU.js");return{diagram:t}},__vite__mapDeps([50,22,23,3,4,6]),import.meta.url);return{id:hy,diagram:e}},"loader"),Rv={id:hy,detector:Iv,loader:Pv},cy="railroad",qv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Nv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./railroadDiagram-MRQ6NCDL-DHJisW8P.js");return{diagram:t}},__vite__mapDeps([51,52,22,23,3,4,6]),import.meta.url);return{id:cy,diagram:e}},"loader"),Wv={id:cy,detector:qv,loader:Nv},dy="railroadEbnf",zv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Hv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./ebnfDiagram-UZSYDL2S-DlmNJUx4.js");return{diagram:t}},__vite__mapDeps([53,52,22,23,3,4,6]),import.meta.url);return{id:dy,diagram:e}},"loader"),Yv={id:dy,detector:zv,loader:Hv},uy="railroadAbnf",Uv=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),jv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./abnfDiagram-S7VZAUFO-BIA2ezcb.js");return{diagram:t}},__vite__mapDeps([54,52,22,23,3,4,6]),import.meta.url);return{id:uy,diagram:e}},"loader"),Gv={id:uy,detector:Uv,loader:jv},py="railroadPeg",Vv=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Xv=p(async()=>{const{diagram:e}=await Dt(async()=>{const{diagram:t}=await import("./pegDiagram-FD4XPPHP-eDMY4Hpd.js");return{diagram:t}},__vite__mapDeps([55,52,22,23,3,4,6]),import.meta.url);return{id:py,diagram:e}},"loader"),Zv={id:py,detector:Vv,loader:Xv},Yd=!1,ca=p(()=>{Yd||(Yd=!0,Bo("error",AB,e=>e.toLowerCase().trim()==="error"),Bo("---",{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("---")),Bn(OB,zB,fv),Bn(L_,b_,jB,mB,I_,Y_,G_,Z_,lB,uB,M_,T_,RB,N_,bB,TB,tB,ZB,JB,sB,av,Cv,cv,rv,kv,Lv,Wv,Yv,Gv,Zv,_v,Dv,Rv,Ev))},"addDiagrams"),Kv=p(async()=>{J.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ri).map(async([r,{detector:i,loader:s}])=>{if(s)try{En(r)}catch{try{const{diagram:o,id:n}=await s();Bo(n,o,i)}catch(o){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ri[r],o}}}))).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"),Qv="graphics-document document";function fy(e,t){e.attr("role",Qv),t!==""&&e.attr("aria-roledescription",t)}p(fy,"setA11yDiagramInfo");function gy(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(gy,"addSVGa11yTitleDescription");var ti,jo=(ti=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=typeof t=="string"?{cleaned:t}:t,s=Gt(),o=Ko(i.cleaned,s);try{En(o)}catch{const u=fC(o);if(!u)throw new cu(`Diagram ${o} not found.`);const{id:f,diagram:m}=await u();Bo(f,m)}const{db:n,parser:a,renderer:h,init:c}=En(o);a.parser&&(a.parser.yy=n),n.clear?.(),c?.(s),r.title&&n.setDiagramTitle?.(r.title);let l=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const u=s.maxTextSize??Sl.maxTextSize;i.withComments.length>u?J.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${u}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const d=s2(l)+`
|
|
305
|
+
`;return i.frontmatterLineOffset&&n.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await a.parse(d),new ti(o,d,n,a,h)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ti,"Diagram"),ti),Ud=[],Jv=p(()=>{Ud.forEach(e=>{e()}),Ud=[]},"attachFunctions"),tL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function my(e){const t=hu(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
|
|
306
|
+
`).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
|
|
307
|
+
`):t.body;let s=Q0(i,{schema:K0})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t.length),metadata:o}}p(my,"extractFrontMatter");var eL=p(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),rL=p(e=>{const{text:t,metadata:r}=my(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),iL=p(e=>{const t=Fe.detectInit(e)??{},r=Fe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:U1(e),directive:t}},"processDirectives");function uh(e){const t=e,r=eL(e),i=rL(r),s=iL(i.text),o=zl(i.config,s.directive),n=s.text,a=tL(n),h=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:a,withComments:n,frontmatterLineOffset:h},title:i.title,config:o}}p(uh,"preprocessDiagram");function yy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(yy,"toBase64");var sL=5e4,oL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",aL="sandbox",nL="loose",lL="http://www.w3.org/2000/svg",hL="http://www.w3.org/1999/xlink",cL="http://www.w3.org/1999/xhtml",dL="100%",uL="100%",pL="border:0;margin:0;",fL="margin:0",gL="allow-top-navigation-by-user-activation allow-popups",mL='The "iframe" tag is not supported by your browser.',yL=["foreignobject"],CL=["dominant-baseline"];function ph(e){const t=uh(e);To();let r;try{r=Ko(t.code.cleaned,Gt())}catch{r=void 0}return wl(r),ZC(t.config??{}),t}p(ph,"processAndSetConfigs");async function Cy(e,t){ca();try{const{code:r,config:i}=ph(e);return{diagramType:(await jo.fromText(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}finally{wl(void 0)}}p(Cy,"parse");var jd=p((e,t,r=[])=>{const i=fu(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),xL=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 a=de(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(h=>{qc(h.styles)||a.forEach(c=>{r.insertRule(jd(h.id,c,h.styles),r.cssRules.length)}),qc(h.textStyles)||r.insertRule(jd(h.id,"tspan",(h?.textStyles||[]).map(c=>c.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=An(s)+`
|
|
309
|
+
`}else i+=`${e.themeCSS}
|
|
310
|
+
`;return i+An(r)},"createCssStyles"),bL=p((e,t)=>rl(p_(`${e}{${t}}`),m_([p(function(i,s,o,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Jn)return;i.props=i.props.map(a=>a===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(a.startsWith(`${e} `)||a.startsWith(`${e}>`))&&!a.startsWith(`${e} ||`)?a:`${e} ${a}`)}else i.type.startsWith("@")&&([...[JT,e_,Bm,i_,"@container","@starting-style"],Jn].includes(i.type)||(J.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=ch))},"addNamespace"),g_])),"compileCSS"),kL=p((e,t,r,i)=>{const s=xL(e,r),o=yx(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return bL(i,o)},"createUserStyles"),SL=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=qr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),wL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":uL,i=yy(`<body style="${fL}">${e}</body>`);return`<iframe style="width:${dL};height:${r};${pL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${gL}">
|
|
311
|
+
${mL}
|
|
312
|
+
</iframe>`},"putIntoIFrame"),Gd=p((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const n=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",lL);return s&&n.attr("xmlns:xlink",s),n.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 TL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),_L=p(async function(e,t,r){ca();const i=ph(t);let s=i.code;t=s.cleaned;const o=Gt();J.debug(o),t.length>(o?.maxTextSize??sL)&&(t=oL,s={raw:t,cleaned:t});const n=`#${e}`,a="i"+e,h="#"+a,c="d"+e,l="#"+c,d=p(()=>{const D=$t(f?h:l).node();D&&"remove"in D&&D.remove()},"removeTempElements");let u=$t(document.body);const f=o.securityLevel===aL,m=o.securityLevel===nL,y=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const E=il($t(r),a);u=$t(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=$t(r);Gd(u,e,c,`font-family: ${y}`,hL)}else{if(TL(document,e,c,a),f){const E=il($t(document.body),a);u=$t(E.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=$t("body");Gd(u,e,c)}let C,x;try{C=await jo.fromText(s,{title:i.title})}catch(E){if(o.suppressErrorRendering)throw d(),E;C=await jo.fromText("error"),x=E,C.db.setErrorMessage?.(Fp(E))}const b=u.select(l).node(),S=C.type,T=b.firstChild,v=T.firstChild,B=C.renderer.getClasses?.(t,C),L=kL(o,S,B,n),F=document.createElement("style");F.innerHTML=L,T.insertBefore(F,v);try{await C.renderer.draw(t,e,"12.3.0",C)}catch(E){throw o.suppressErrorRendering?d():vB.draw(t,e,"12.3.0"),E}const q=u.select(`${l} svg`),R=C.db.getAccTitle?.(),$=C.db.getAccDescription?.();by(S,q,R,$);const M=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",cL);let E=u.select(l).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),E=SL(E,f,nr(o.arrowMarkerAbsolute)),f){const D=u.select(l+" svg").node();E=wL(E,D)}else m||(E=ei.sanitize(E,{ADD_TAGS:yL,ADD_ATTR:CL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Jv(),E},"serializeSvg")();if(x)throw x;return d(),{diagramType:S,svg:M,bindFunctions:C.db.bindFunctions}},"renderDiagram"),BL=p(async function(e,t,r){try{return await _L(e,t,r)}finally{wl(void 0)}},"render");function xy(e={}){const t=re({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),VC(t);const r=Pr.theme;t?.theme&&Object.hasOwn(br,t.theme)?t.themeVariables=br[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=br[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?GC(t):gu();kl(i.logLevel),ca()}p(xy,"initialize");var vL=p((e,t={})=>{const{code:r}=uh(e);return jo.fromText(r,t)},"getDiagramFromText");function by(e,t,r,i){fy(t,e),gy(t,r,i,t.attr("id"))}p(by,"addA11yInfo");var oi=Object.freeze({render:BL,parse:Cy,getDiagramFromText:vL,initialize:xy,getConfig:Gt,setConfig:mu,getSiteConfig:gu,updateSiteConfig:XC,reset:p(()=>{To()},"reset"),globalReset:p(()=>{To(Pr)},"globalReset"),defaultConfig:Pr});kl(Gt().logLevel);To(Gt());var LL=p((e,t,r)=>{J.warn(e),Wl(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"),ky=p(async function(e={querySelector:".mermaid"}){try{await FL(e)}catch(t){if(Wl(t)&&J.error(t.str),wr.parseError&&wr.parseError(t),!e.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),t}},"run"),FL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=oi.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?.startOnLoad!==void 0&&(J.debug("Start On Load: "+i?.startOnLoad),oi.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Fe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const a=[];for(const h of Array.from(s)){if(J.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;n=h.innerHTML,n=zp(Fe.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=Fe.detectInit(n);l&&J.debug("Detected early reinit: ",l);try{const{svg:d,bindFunctions:u}=await _y(c,n,h);h.innerHTML=d,e&&await e(c),u&&u(h)}catch(d){LL(d,a,wr.parseError)}}if(a.length>0)throw a[0]},"runThrowsErrors"),Sy=p(function(e){oi.initialize(e)},"initialize"),AL=p(async function(e,t,r){J.warn("mermaid.init is deprecated. Please use run instead."),e&&Sy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ky(i)},"init"),EL=p(async(e,{lazyLoad:t=!0}={})=>{ca(),Bn(...e),t===!1&&await Kv()},"registerExternalDiagrams"),wy=p(function(){if(wr.startOnLoad){const{startOnLoad:e}=oi.getConfig();e&&wr.run().catch(t=>J.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",wy,!1);var ML=p(function(e){wr.parseError=e},"setParseErrorHandler"),Go=[],wn=!1,Ty=p(async()=>{if(!wn){for(wn=!0;Go.length>0;){const e=Go.shift();if(e)try{await e()}catch(t){J.error("Error executing queue",t)}}wn=!1}},"executeQueue"),$L=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((o,n)=>{oi.parse(e,t).then(a=>{o(a),r(a)},a=>{J.error("Error parsing",a),wr.parseError?.(a),n(a),i(a)})}),"performCall");Go.push(s),Ty().catch(i)}),"parse"),_y=p((e,t,r)=>new Promise((i,s)=>{const o=p(()=>new Promise((n,a)=>{oi.render(e,t,r).then(h=>{n(h),i(h)},h=>{J.error("Error parsing",h),wr.parseError?.(h),a(h),s(h)})}),"performCall");Go.push(o),Ty().catch(s)}),"render"),OL=p(()=>Object.keys(ri).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),wr={startOnLoad:!0,mermaidAPI:oi,parse:$L,render:_y,init:AL,run:ky,registerExternalDiagrams:EL,registerLayoutLoaders:wm,initialize:Sy,parseError:void 0,contentLoaded:wy,setParseErrorHandler:ML,detectType:Ko,registerIconPacks:vu,getRegisteredDiagramsMetadata:OL},By=wr;const Vd=16;function DL({image:e,text:t,onClose:r}){const i=hs(null),s=hs(null),[o,n]=Cs({width:0,height:0}),[a,h]=Cs(1),[c,l]=Cs(!1),d=hs({x:.5,y:.5}),u=hs(null);Ah(()=>{const B=i.current,L=s.current;if(!B||!L)return;B.showModal();const F=()=>{n({width:L.clientWidth,height:L.clientHeight})},q=new ResizeObserver(F);return q.observe(L),F(),L.focus({preventScroll:!0}),()=>q.disconnect()},[]);const f=Math.min(o.width,o.height*e.ratio)*a,m=f/e.ratio,y=Math.max(o.width,f),C=Math.max(o.height,m);Ah(()=>{const B=s.current;B&&(B.scrollLeft=d.current.x*y-B.clientWidth/2,B.scrollTop=d.current.y*C-B.clientHeight/2)},[C,y]);function x(B){const L=s.current,F=Math.min(Vd,Math.max(1,B));!L||F===a||(d.current=F===1?{x:.5,y:.5}:{x:(L.scrollLeft+L.clientWidth/2)/Math.max(1,L.scrollWidth),y:(L.scrollTop+L.clientHeight/2)/Math.max(1,L.scrollHeight)},h(F))}function b(B){const L=B.currentTarget;B.pointerType==="touch"||B.button!==0||!B.isPrimary||L.scrollWidth<=L.clientWidth&&L.scrollHeight<=L.clientHeight||(u.current={pointer:B.pointerId,x:B.clientX,y:B.clientY,left:L.scrollLeft,top:L.scrollTop},L.setPointerCapture(B.pointerId),l(!0))}function S(B){const L=u.current;if(!L||B.pointerId!==L.pointer)return;const F=B.currentTarget;F.scrollLeft=L.left+L.x-B.clientX,F.scrollTop=L.top+L.y-B.clientY}function T(B){B.pointerId===u.current?.pointer&&(u.current=null,l(!1))}function v(B){if(!(B.target instanceof Element)||B.touches.length)return;const L=B.target.closest("button:not(:disabled)"),F=B.changedTouches.item(0);if(!L||!F)return;const q=L.getBoundingClientRect();F.clientX<q.left||F.clientX>q.right||F.clientY<q.top||F.clientY>q.bottom||(B.preventDefault(),L.click())}return Ut("dialog",{ref:i,className:"diagram-viewer","aria-label":t.diagram,onClose:r,onKeyDown:B=>{if(B.key==="+"||B.key==="=")x(a*1.5);else if(B.key==="-")x(a/1.5);else if(B.key==="0")x(1);else return;B.preventDefault()},children:[Ut("header",{className:"diagram-toolbar",children:[Ut("h2",{children:t.diagram}),Ut("div",{className:"diagram-controls",onTouchEnd:v,children:[Ut("button",{type:"button","aria-label":t.zoomOut,disabled:a<=1,onClick:()=>x(a/1.5),children:Ut(l0,{size:19,"aria-hidden":"true"})}),Ut("output",{"aria-live":"polite",children:[Math.round(a*100),"%"]}),Ut("button",{type:"button","aria-label":t.zoomIn,disabled:a>=Vd,onClick:()=>x(a*1.5),children:Ut(c0,{size:19,"aria-hidden":"true"})}),Ut("button",{type:"button","aria-label":t.diagramFit,onClick:()=>x(1),children:Ut(a0,{size:18,"aria-hidden":"true"})}),Ut("button",{type:"button","aria-label":t.close,onClick:()=>i.current?.close(),children:Ut(Qy,{size:21,"aria-hidden":"true"})})]})]}),Ut("section",{className:"diagram-viewport",ref:s,"aria-label":t.diagramPan,tabIndex:0,"data-pannable":a>1||void 0,"data-grabbing":c||void 0,onPointerDown:b,onPointerMove:S,onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,children:Ut("div",{className:"diagram-surface",style:{width:y,height:C},children:Ut("img",{src:e.src,alt:t.diagram,draggable:!1,style:{width:f,height:m}})})})]})}By.initialize({startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges","suppressErrorRendering","dompurifyConfig","htmlLabels","flowchart"],theme:"neutral"});const Kr=new Map,Tn=new Map;let IL=0;function PL(e){if(Kr.has(e))return Promise.resolve(Kr.get(e)??null);const t=Tn.get(e);if(t)return t;const r=By.render(`grimoire-diagram-${IL++}`,e).then(({svg:i})=>{const s=ei.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["a","foreignObject"]}),o=new DOMParser().parseFromString(s,"image/svg+xml").documentElement,[,,n,a]=(o.getAttribute("viewBox")??"").trim().split(/\s+/).map(Number),h=n&&a&&n>0&&a>0?n/a:1;return{src:`data:image/svg+xml,${encodeURIComponent(s)}`,ratio:h}}).catch(()=>null).then(i=>{if(Tn.delete(e),Kr.size>=20){const s=Kr.keys().next().value;s!==void 0&&Kr.delete(s)}return Kr.set(e,i),i});return Tn.set(e,r),r}function RL({code:e,text:t}){const[r,i]=Cs(),s=r?.code===e?r.image:Kr.get(e),[o,n]=Cs(!1),a=hs(null);return Jy(()=>{if(s!==void 0)return;let h=!0;return PL(e).then(c=>{h&&i({code:e,image:c})}),()=>{h=!1}},[e,s]),s?Ut(e0,{children:[Ut("button",{ref:a,type:"button",className:"paper-diagram-open","aria-label":t.diagramExpand,"aria-haspopup":"dialog",onClick:()=>n(!0),children:[Ut("img",{className:"paper-diagram",src:s.src,alt:t.diagram}),Ut("span",{className:"diagram-enlarge",children:[Ut(s0,{size:14,"aria-hidden":"true"})," ",t.zoomIn]})]}),o&&t0(Ut(DL,{image:s,text:t,onClose:()=>{n(!1),a.current?.focus({preventScroll:!0})}}),document.body)]}):Ut("div",{className:"paper-diagram-source","aria-busy":s===void 0,children:[s===null&&Ut("p",{children:t.diagramError}),Ut("pre",{children:Ut("code",{children:e})})]})}const BF=Object.freeze(Object.defineProperty({__proto__:null,default:RL},Symbol.toStringTag,{value:"Module"}));export{tF as $,Cx as A,rF as B,Q2 as C,gF as D,Jl as E,mF as F,Ir as G,lC as H,X2 as I,K0 as J,rf as K,V0 as L,Gt as M,Bx as N,zl as O,Sl as P,Z1 as Q,QT as R,ta as S,iF as T,sF as U,bC as V,V2 as W,t1 as X,rb as Y,vs as Z,p as _,bx as a,Re as a$,W1 as a0,ax as a1,Su as a2,xc as a3,X1 as a4,Es as a5,_e as a6,H as a7,U as a8,fx as a9,Ic as aA,Ts as aB,B1 as aC,_1 as aD,T1 as aE,w1 as aF,g1 as aG,gp as aH,C1 as aI,f1 as aJ,k1 as aK,mp as aL,y1 as aM,F1 as aN,L1 as aO,v1 as aP,E1 as aQ,A1 as aR,m1 as aS,yp as aT,S1 as aU,b1 as aV,x1 as aW,Cp as aX,J0 as aY,pT as aZ,Bp as a_,Tu as aa,JL as ab,Bw as ac,sm as ad,xF as ae,ai as af,vu as ag,Nl as ah,ut as ai,he as aj,GT as ak,CF as al,SF as am,kF as an,xT as ao,wF as ap,Uo as aq,dT as ar,Ns as as,uT as at,ge as au,Ct as av,dt as aw,_u as ax,Dl as ay,fp as az,xx as b,lu as b0,ws as b1,bF as b2,Fd as b3,Ae as b4,Qx as b5,iC as b6,Up as b7,pt as b8,yF as b9,lh as ba,Lw as bb,BF as bc,Ot as c,wu as d,re as e,Sr as f,Sx as g,im as h,nt as i,De as j,$t as k,J as l,Ms as m,Lp as n,eF as o,_F as p,wx as q,TF as r,kx as s,Tx as t,Fe as u,Q0 as v,J1 as w,pw as x,oF as y,ei as z};
|