@lancc/cmark 1.2.0 → 1.2.1
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/CHANGELOG.md +8 -0
- package/LICENSE +21 -21
- package/README.md +47 -107
- package/assets/abnfDiagram-WEYOIA3C-CKV_7Upb.js +1 -0
- package/assets/architectureDiagram-ZHVYKT53-BvLudDvk.js +1 -0
- package/assets/blockDiagram-RJAE7QA3--gzkMGi2.js +1 -0
- package/assets/c4Diagram-XDPPPE54-ByfRiJGR.js +1 -0
- package/assets/chunk-2E7WHVMD-TfbC_dmh.js +1 -0
- package/assets/chunk-2Q5K7J3B-0YJgChVo.js +1 -0
- package/assets/chunk-4EMNKR2T-DHoYW7g5.js +1 -0
- package/assets/chunk-55XCU76K-Cq25Yw_G.js +1 -0
- package/assets/chunk-5VM5RSS4-CJaRXFHK.js +1 -0
- package/assets/chunk-JWPE2WC7-BP2iXBhe.js +1 -0
- package/assets/chunk-VQ5W62QI-B95zur4F.js +1 -0
- package/assets/chunk-XXDRQBXY-Ct0MhvQo.js +1 -0
- package/assets/chunk-ZCHMQSOR-C5VhW-wL.js +2 -0
- package/assets/classDiagram-v2-4MYWR3UA-C1G-Vkj0.js +1 -0
- package/assets/cose-bilkent-JH36ORCC-qIQoIBv0.js +1 -0
- package/assets/cynefin-EF2NZ3EQ-CR1E3YiZ.js +1 -0
- package/assets/cynefinDiagram-WF24UDRP-DaJFvZ3b.js +1 -0
- package/assets/cytoscape.esm-SjxgSg6I.js +9 -0
- package/assets/dagre-NK4GIZVX-BFRQhpii.js +1 -0
- package/assets/diagram-CBK3MWTC-DlueL6XZ.js +1 -0
- package/assets/diagram-I5XIIV2D-bITyafYX.js +1 -0
- package/assets/diagram-ODIL2UCW-Dlb4hg_-.js +1 -0
- package/assets/diagram-PFBEJUXE-CRfen0O7.js +1 -0
- package/assets/diagram-RJA3I4VV-CK-FlhGV.js +1 -0
- package/assets/diagram-TYUNFSNR-DmgVsxqa.js +1 -0
- package/assets/ebnfDiagram-V4P3TTPT-B9KGI9eQ.js +1 -0
- package/assets/echarts-CytsvCdp.js +25 -0
- package/assets/elk-QONTBCTQ-VgDftvsU.js +1 -0
- package/assets/erDiagram-KYQIGQAA-DkpP7sS4.js +1 -0
- package/assets/flowDiagram-IUGLLWBU-CRXa9Kxy.js +1 -0
- package/assets/ganttDiagram-R7GPNTJY-Cu2I55Wb.js +1 -0
- package/assets/gitGraphDiagram-PDYL7XHY-CwSo663I.js +1 -0
- package/assets/graph-Dz7AM1Q5.js +1 -0
- package/assets/index-BJ-NdQc4.js +100 -0
- package/assets/infoDiagram-MVDRKAX5-D3Qknzuo.js +1 -0
- package/assets/ishikawaDiagram-HPEHV2GE-9qYT75tk.js +1 -0
- package/assets/journeyDiagram-BOSHW7O7-DeSrJg9o.js +1 -0
- package/assets/kanban-definition-FNSA4HC5-DINkB6G7.js +1 -0
- package/assets/katex-DN8cTsI3.js +1 -0
- package/assets/markdown-S2mWvoE-.js +5 -0
- package/assets/mermaid-T_6Ze_cT.js +7 -0
- package/assets/mindmap-definition-6OY57UG3-DW5hqiAe.js +1 -0
- package/assets/pegDiagram-ECIUJNBX-BWy_tkzy.js +1 -0
- package/assets/pieDiagram-GNMPY74T-CniJbr6l.js +1 -0
- package/assets/quadrantDiagram-D57K4MC3-BVnDJkCv.js +1 -0
- package/assets/railroadDiagram-Y72NRBL7-BNKZpJJb.js +1 -0
- package/assets/requirementDiagram-EQYSW5RA-BETipHj0.js +1 -0
- package/assets/sankeyDiagram-SY24JHO5-ByEYqT7T.js +1 -0
- package/assets/sequenceDiagram-BLEHNHQU-BqCJ2tKG.js +1 -0
- package/assets/sizeCapture-INFHLROL-DlhrWFj-.js +1 -0
- package/assets/stateDiagram-v2-A6IESKWZ-DJUBWLTP.js +1 -0
- package/assets/swimlanes-B3ENRKFQ-D7k7tF5U.js +1 -0
- package/assets/swimlanesDiagram-AYQRV4AK-DoQBgB9o.js +1 -0
- package/assets/timeline-definition-JXYKGLGB-BCNhwnn6.js +1 -0
- package/assets/usecaseDiagram-WPOLBNNX-DRa_Rgl3.js +1 -0
- package/assets/vennDiagram-Q3Y3IDCW-Ba2eaO68.js +1 -0
- package/assets/wardleyDiagram-IVAIDKWA-W_i9vzY-.js +1 -0
- package/assets/xychartDiagram-4URNHDU4-ByfaGjvc.js +1 -0
- package/index.html +3 -3
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/preload/git-panel.js +29 -5
- package/preload/git-service.js +48 -15
- package/preload/remote-setup.js +66 -33
- package/preload/remote-wizard.js +2 -0
- package/preload.js +30 -0
- package/assets/abnfDiagram-WEYOIA3C-BgXsTF7a.js +0 -1
- package/assets/architectureDiagram-ZHVYKT53-BsCWa_qC.js +0 -36
- package/assets/blockDiagram-RJAE7QA3-wbIxEiYN.js +0 -140
- package/assets/c4Diagram-XDPPPE54-5zdyxFvA.js +0 -38
- package/assets/chunk-2E7WHVMD-F85Lca-i.js +0 -88
- package/assets/chunk-2Q5K7J3B-CjpAZ0OI.js +0 -1
- package/assets/chunk-4EMNKR2T-C8Kbh83c.js +0 -1
- package/assets/chunk-55XCU76K-BINcFiLN.js +0 -1
- package/assets/chunk-5VM5RSS4-Diy5h2LS.js +0 -15
- package/assets/chunk-JWPE2WC7-BXnjDdh1.js +0 -1
- package/assets/chunk-VQ5W62QI-BM7ZZo1I.js +0 -1
- package/assets/chunk-XXDRQBXY-CW8CjB1w.js +0 -1
- package/assets/chunk-ZCHMQSOR-C7ATz1L1.js +0 -2
- package/assets/classDiagram-v2-4MYWR3UA-CMoqNk-b.js +0 -217
- package/assets/cose-bilkent-JH36ORCC-6rqR5iJk.js +0 -1
- package/assets/cynefin-EF2NZ3EQ-DypLIJxl.js +0 -141
- package/assets/cynefinDiagram-WF24UDRP-8b2CEBlR.js +0 -62
- package/assets/cytoscape.esm-CjX6Hyah.js +0 -331
- package/assets/dagre-NK4GIZVX-Dv6vuUbR.js +0 -4
- package/assets/diagram-CBK3MWTC-DJgMDeYd.js +0 -24
- package/assets/diagram-I5XIIV2D-BB9cMoRW.js +0 -24
- package/assets/diagram-ODIL2UCW-BVcRtsdy.js +0 -30
- package/assets/diagram-PFBEJUXE-BbGSOtJx.js +0 -3
- package/assets/diagram-RJA3I4VV-CzkY_8Fo.js +0 -41
- package/assets/diagram-TYUNFSNR-YTl5QdfL.js +0 -200
- package/assets/ebnfDiagram-V4P3TTPT-COVjPAjE.js +0 -1
- package/assets/echarts-BAPDkhe3.js +0 -61
- package/assets/elk-QONTBCTQ-DHsjY8Z_.js +0 -27
- package/assets/erDiagram-KYQIGQAA-CUAbTUl1.js +0 -99
- package/assets/flowDiagram-IUGLLWBU-CWsiqTQC.js +0 -213
- package/assets/ganttDiagram-R7GPNTJY-DetBW0Wm.js +0 -292
- package/assets/gitGraphDiagram-PDYL7XHY-ByrdgJmw.js +0 -106
- package/assets/graph-D8UmR1vK.js +0 -1
- package/assets/index-B17NCAw4.js +0 -758
- package/assets/infoDiagram-MVDRKAX5-BM48fjhU.js +0 -2
- package/assets/ishikawaDiagram-HPEHV2GE-DtHYywHZ.js +0 -70
- package/assets/journeyDiagram-BOSHW7O7-DJ1LiRh3.js +0 -139
- package/assets/kanban-definition-FNSA4HC5-DPPt8pwJ.js +0 -89
- package/assets/katex-CQL9J12G.js +0 -257
- package/assets/markdown-DVehI1Sg.js +0 -314
- package/assets/mermaid-C_q9pug0.js +0 -312
- package/assets/mindmap-definition-6OY57UG3-zbqYOEY6.js +0 -98
- package/assets/pegDiagram-ECIUJNBX-e7QG7TMq.js +0 -1
- package/assets/pieDiagram-GNMPY74T-Duf6YP0N.js +0 -39
- package/assets/quadrantDiagram-D57K4MC3-B2eYoUUy.js +0 -7
- package/assets/railroadDiagram-Y72NRBL7-BWCzPcI_.js +0 -1
- package/assets/requirementDiagram-EQYSW5RA-HhPMEqB1.js +0 -84
- package/assets/sankeyDiagram-SY24JHO5-CMUTwFBB.js +0 -40
- package/assets/sequenceDiagram-BLEHNHQU-C9wR2ll7.js +0 -169
- package/assets/sizeCapture-INFHLROL-DXfz37S6.js +0 -1
- package/assets/stateDiagram-v2-A6IESKWZ-D_gtonhE.js +0 -291
- package/assets/swimlanes-B3ENRKFQ-DdJOuuMV.js +0 -1
- package/assets/swimlanesDiagram-AYQRV4AK-BWt3HxHV.js +0 -8
- package/assets/timeline-definition-JXYKGLGB-DQsdwJe-.js +0 -120
- package/assets/usecaseDiagram-WPOLBNNX-DTRyFq7d.js +0 -370
- package/assets/vennDiagram-Q3Y3IDCW-dihYszm0.js +0 -34
- package/assets/wardleyDiagram-IVAIDKWA-BoPpgYfK.js +0 -78
- package/assets/xychartDiagram-4URNHDU4-DoLjYxeB.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk-QONTBCTQ-VgDftvsU.js","./chunk-4EMNKR2T-DHoYW7g5.js","./chunk-ZCHMQSOR-C5VhW-wL.js","./graph-Dz7AM1Q5.js","./markdown-S2mWvoE-.js","./dagre-NK4GIZVX-BFRQhpii.js","./swimlanes-B3ENRKFQ-D7k7tF5U.js","./cose-bilkent-JH36ORCC-qIQoIBv0.js","./cytoscape.esm-SjxgSg6I.js","./c4Diagram-XDPPPE54-ByfRiJGR.js","./chunk-55XCU76K-Cq25Yw_G.js","./flowDiagram-IUGLLWBU-CRXa9Kxy.js","./chunk-5VM5RSS4-CJaRXFHK.js","./chunk-XXDRQBXY-Ct0MhvQo.js","./chunk-VQ5W62QI-B95zur4F.js","./diagram-TYUNFSNR-DmgVsxqa.js","./swimlanesDiagram-AYQRV4AK-DoQBgB9o.js","./erDiagram-KYQIGQAA-DkpP7sS4.js","./gitGraphDiagram-PDYL7XHY-CwSo663I.js","./chunk-2Q5K7J3B-0YJgChVo.js","./chunk-JWPE2WC7-BP2iXBhe.js","./cynefin-EF2NZ3EQ-CR1E3YiZ.js","./ganttDiagram-R7GPNTJY-Cu2I55Wb.js","./infoDiagram-MVDRKAX5-D3Qknzuo.js","./pieDiagram-GNMPY74T-CniJbr6l.js","./quadrantDiagram-D57K4MC3-BVnDJkCv.js","./xychartDiagram-4URNHDU4-ByfaGjvc.js","./requirementDiagram-EQYSW5RA-BETipHj0.js","./sequenceDiagram-BLEHNHQU-BqCJ2tKG.js","./classDiagram-v2-4MYWR3UA-C1G-Vkj0.js","./stateDiagram-v2-A6IESKWZ-DJUBWLTP.js","./journeyDiagram-BOSHW7O7-DeSrJg9o.js","./timeline-definition-JXYKGLGB-BCNhwnn6.js","./mindmap-definition-6OY57UG3-DW5hqiAe.js","./kanban-definition-FNSA4HC5-DINkB6G7.js","./sankeyDiagram-SY24JHO5-ByEYqT7T.js","./diagram-I5XIIV2D-bITyafYX.js","./diagram-RJA3I4VV-CK-FlhGV.js","./blockDiagram-RJAE7QA3--gzkMGi2.js","./diagram-ODIL2UCW-Dlb4hg_-.js","./architectureDiagram-ZHVYKT53-BvLudDvk.js","./diagram-PFBEJUXE-CRfen0O7.js","./ishikawaDiagram-HPEHV2GE-9qYT75tk.js","./vennDiagram-Q3Y3IDCW-Ba2eaO68.js","./diagram-CBK3MWTC-DlueL6XZ.js","./usecaseDiagram-WPOLBNNX-DRa_Rgl3.js","./wardleyDiagram-IVAIDKWA-W_i9vzY-.js","./cynefinDiagram-WF24UDRP-DaJFvZ3b.js","./railroadDiagram-Y72NRBL7-BNKZpJJb.js","./chunk-2E7WHVMD-TfbC_dmh.js","./ebnfDiagram-V4P3TTPT-B9KGI9eQ.js","./abnfDiagram-WEYOIA3C-CKV_7Upb.js","./pegDiagram-ECIUJNBX-BWy_tkzy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as t}from"./markdown-S2mWvoE-.js";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const i={},o=function(t,e,r){let o=Promise.resolve();if(e&&e.length>0){let t=function(t){return Promise.all(t.map(t=>Promise.resolve(t).then(t=>({status:"fulfilled",value:t}),t=>({status:"rejected",reason:t}))))};const a=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),s=n?.nonce||n?.getAttribute("nonce");o=t(e.map(t=>{if(t=function(t,e){return new URL(t,e).href}(t,r),t in i)return;i[t]=!0;const e=t.endsWith(".css"),o=e?'[rel="stylesheet"]':"";if(!!r)for(let r=a.length-1;r>=0;r--){const i=a[r];if(i.href===t&&(!e||"stylesheet"===i.rel))return}else if(document.querySelector(`link[href="${t}"]${o}`))return;const n=document.createElement("link");return n.rel=e?"stylesheet":"modulepreload",e||(n.as="script"),n.crossOrigin="",n.href=t,s&&n.setAttribute("nonce",s),document.head.appendChild(n),e?new Promise((e,r)=>{n.addEventListener("load",e),n.addEventListener("error",()=>r(new Error(`Unable to preload CSS for ${t}`)))}):void 0}))}function a(t){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=t,window.dispatchEvent(e),!e.defaultPrevented)throw t}return o.then(e=>{for(const t of e||[])"rejected"===t.status&&a(t.reason);return t().catch(a)})};var a,n=Object.defineProperty,s=(t,e)=>n(t,"name",{value:e,configurable:!0}),l=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h={exports:{}};var c=(a||(a=1,h.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",a="minute",n="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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,y={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),a=r-o<0,n=e.clone().add(i+(a?-1:1),h);return+(-(i+(r-o)/(a?o-n:n-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:n,m:a,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},C="en",b={};b[C]=y;var k="$isDayjsObject",w=function(t){return t instanceof _||!(!t||!t[k])},S=function t(e,r,i){var o;if(!e)return C;if("string"==typeof e){var a=e.toLowerCase();b[a]&&(o=a),r&&(b[a]=r,o=a);var n=e.split("-");if(!o&&n.length>1)return t(n[0])}else{var s=e.name;b[s]=e,o=s}return!i&&o&&(C=o),o||!i&&C},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new _(r)},B=x;B.l=S,B.i=w,B.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(B.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return B},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return B.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!B.u(e)||e,c=B.p(t),p=function(t,e){var o=B.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(s)},g=function(t,e){return B.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var C=this.$locale().weekStart||0,b=(f<C?f+7:f)-C;return p(i?m-b:m+(6-b),y);case s:case u:return g(x+"Hours",0);case n:return g(x+"Minutes",1);case a:return g(x+"Seconds",2);case o:return g(x+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=B.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[n]=c+"Hours",r[a]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[B.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=B.p(c),f=function(t){var e=T(p);return B.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var y=(u={},u[a]=e,u[n]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return B.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=B.z(this),a=this.$H,n=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,a){return t&&(t[r]||t(e,i))||o[r].slice(0,a)},u=function(t){return B.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return B.s(e.$y,4,"0");case"M":return s+1;case"MM":return B.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return B.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return B.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(a,n,!0);case"A":return g(a,n,!1);case"m":return String(n);case"mm":return B.s(n,2,"0");case"s":return String(e.$s);case"ss":return B.s(e.$s,2,"0");case"SSS":return B.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=B.p(u),m=T(i),x=(m.utcOffset()-this.utcOffset())*e,C=this-m,b=function(){return B.m(f,m)};switch(y){case d:g=b()/12;break;case h:g=b();break;case c:g=b()/3;break;case l:g=(C-x)/6048e5;break;case s:g=(C-x)/864e5;break;case n:g=C/r;break;case a:g=C/e;break;case o:g=C/t;break;default:g=C}return p?g:B.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return b[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return B.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),v=_.prototype;return T.prototype=v,[["$ms",i],["$s",o],["$m",a],["$H",n],["$W",s],["$M",h],["$y",d],["$D",u]].forEach(function(t){v[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),T.extend=function(t,e){return t.$i||(t(e,_,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=b[C],T.Ls=b,T.p={},T}()),h.exports);const d=r(c);var u={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},p={trace:s((...t)=>{},"trace"),debug:s((...t)=>{},"debug"),info:s((...t)=>{},"info"),warn:s((...t)=>{},"warn"),error:s((...t)=>{},"error"),fatal:s((...t)=>{},"fatal")},g=s(function(t="fatal"){let e=u.fatal;"string"==typeof t?t.toLowerCase()in u&&(e=u[t]):"number"==typeof t&&(e=t),p.trace=()=>{},p.debug=()=>{},p.info=()=>{},p.warn=()=>{},p.error=()=>{},p.fatal=()=>{},e<=u.fatal&&(p.fatal=console.error?console.error.bind(console,f("FATAL"),"color: orange"):console.log.bind(console,"[35m",f("FATAL"))),e<=u.error&&(p.error=console.error?console.error.bind(console,f("ERROR"),"color: orange"):console.log.bind(console,"[31m",f("ERROR"))),e<=u.warn&&(p.warn=console.warn?console.warn.bind(console,f("WARN"),"color: orange"):console.log.bind(console,"[33m",f("WARN"))),e<=u.info&&(p.info=console.info?console.info.bind(console,f("INFO"),"color: lightblue"):console.log.bind(console,"[34m",f("INFO"))),e<=u.debug&&(p.debug=console.debug?console.debug.bind(console,f("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",f("DEBUG"))),e<=u.trace&&(p.trace=console.debug?console.debug.bind(console,f("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",f("TRACE")))},"setLogLevel"),f=s(t=>`%c${d().format("ss.SSS")} : ${t} : `,"format");const y={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return 255*y.hue2rgb(a,o,t+1/3);case"g":return 255*y.hue2rgb(a,o,t);case"b":return 255*y.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),n=(o+a)/2;if("l"===i)return 100*n;if(o===a)return 0;const s=o-a;if("s"===i)return 100*(n>.5?s/(2-o-a):s/(o+a));switch(o){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},m={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},x={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},C={channel:y,lang:m,unit:x},b={};for(let n_=0;n_<=255;n_++)b[n_]=C.unit.dec2hex(n_);const k=0,w=1,S=2;let T=class{constructor(){this.type=k}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=k}is(t){return this.type===t}};const B=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new T}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=k,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=C.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=C.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=C.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=C.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=C.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=C.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(S)||void 0===e?(this._ensureHSL(),C.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(S)||void 0===e?(this._ensureHSL(),C.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(S)||void 0===e?(this._ensureHSL(),C.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(w)||void 0===e?(this._ensureRGB(),C.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(w)||void 0===e?(this._ensureRGB(),C.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(w)||void 0===e?(this._ensureRGB(),C.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(w),this.changed=!0,this.data.r=t}set g(t){this.type.set(w),this.changed=!0,this.data.g=t}set b(t){this.type.set(w),this.changed=!0,this.data.b=t}set h(t){this.type.set(S),this.changed=!0,this.data.h=t}set s(t){this.type.set(S),this.changed=!0,this.data.s=t}set l(t){this.type.set(S),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),_={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(_.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4==0,n=o>4,s=n?1:17,l=n?8:4,h=a?0:-1,c=n?255:15;return B.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:a?(i&c)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${b[Math.round(e)]}${b[Math.round(r)]}${b[Math.round(i)]}${b[Math.round(255*o)]}`:`#${b[Math.round(e)]}${b[Math.round(r)]}${b[Math.round(i)]}`}},v={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:t=>{const e=t.match(v.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return C.channel.clamp.h(.9*parseFloat(t));case"rad":return C.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return C.channel.clamp.h(360*parseFloat(t))}}return C.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(v.re);if(!r)return;const[,i,o,a,n,s]=r;return B.set({h:v._hue2deg(i),s:C.channel.clamp.s(parseFloat(o)),l:C.channel.clamp.l(parseFloat(a)),a:n?C.channel.clamp.a(s?parseFloat(n)/100:parseFloat(n)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${C.lang.round(e)}, ${C.lang.round(r)}%, ${C.lang.round(i)}%, ${o})`:`hsl(${C.lang.round(e)}, ${C.lang.round(r)}%, ${C.lang.round(i)}%)`}},F={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:t=>{t=t.toLowerCase();const e=F.colors[t];if(e)return _.parse(e)},stringify:t=>{const e=_.stringify(t);for(const r in F.colors)if(F.colors[r]===e)return r}},L={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:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(L.re);if(!r)return;const[,i,o,a,n,s,l,h,c]=r;return B.set({r:C.channel.clamp.r(o?2.55*parseFloat(i):parseFloat(i)),g:C.channel.clamp.g(n?2.55*parseFloat(a):parseFloat(a)),b:C.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:h?C.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${C.lang.round(e)}, ${C.lang.round(r)}, ${C.lang.round(i)}, ${C.lang.round(o)})`:`rgb(${C.lang.round(e)}, ${C.lang.round(r)}, ${C.lang.round(i)})`}},M=t=>{if("string"!=typeof t)return t;const e=_.parse(t)||L.parse(t)||v.parse(t)||F.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},A=t=>!t.changed&&t.color?t.color:t.type.is(S)||void 0===t.data.r?v.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?L.stringify(t):_.stringify(t),$=(t,e)=>{const r=M(t);for(const i in e)r[i]=C.channel.clamp[i](e[i]);return A(r)},E=(t,e,r=0,i=1)=>{if("number"!=typeof t)return $(t,{a:e});const o=B.set({r:C.channel.clamp.r(t),g:C.channel.clamp.g(e),b:C.channel.clamp.b(r),a:C.channel.clamp.a(i)});return A(o)},O=(t,e)=>C.lang.round(M(t)[e]),D=t=>(t=>{const{r:e,g:r,b:i}=M(t),o=.2126*C.channel.toLinear(e)+.7152*C.channel.toLinear(r)+.0722*C.channel.toLinear(i);return C.lang.round(o)})(t)>=.5,I=t=>!D(t),q=(t,e,r)=>{const i=M(t),o=i[e],a=C.channel.clamp[e](o+r);return o!==a&&(i[e]=a),A(i)},P=(t,e)=>q(t,"l",e),z=(t,e)=>q(t,"l",-e),W=(t,e)=>q(t,"a",-e),R=(t,e)=>{const r=M(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return $(t,i)},N=(t,e=100)=>{const r=M(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:n}=M(t),{r:s,g:l,b:h,a:c}=M(e),d=r/100,u=2*d-1,p=n-c,g=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return E(i*g+s*f,o*g+l*f,a*g+h*f,n*d+c*(1-d))})(r,t,e)};var j,H,U=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y=/\s/,V=s(t=>{let e="",r=0,i=0;for(;i<t.length;){const o=t.indexOf("%%",i);if(-1===o)break;const a=t.indexOf("\n",o);if(-1===a)break;let n=o;for(;n>r&&Y.test(t[n-1]);)n--;e+=t.slice(r,n)+"\n",r=a+1,i=r}return e+t.slice(r)},"stripAnyComments"),X=s(t=>"\n"===t||"\r"===t,"isLineBreak"),G=s((t,e)=>{let r=-1;for(let i=e;i<t.length&&Y.test(t[i]);i++)X(t[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),Z=s(t=>{let e=0;for(;e<t.length&&Y.test(t[e])&&!X(t[e]);)e++;const r=t.slice(0,e);if(!t.startsWith("---",e))return;const i=[];for(let s=e+3;s<t.length&&Y.test(t[s]);s++)X(t[s])&&i.push(s);if(0===i.length)return;const o=`${r}---`,a=s(e=>X(t[e])&&t.startsWith(o,e+1)?G(t,e+1+o.length):-1,"closingEnd");let n=-1;for(let s=i[0]+1;s<t.length;s++)-1!==a(s)&&(n=s);if(-1===n)return;let l=i[0];for(const s of i)s<n&&(l=s);const h=l+1;for(let s=h;s<=n;s++){const e=a(s);if(-1!==e)return{indent:r,body:t.slice(h,s),length:e+1}}},"matchFrontMatter"),Q=class extends Error{static{s(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},K={},J=s(function(t,e){const r=Z(t);t=V((r?t.slice(r.length):t).replace(U,""));for(const[i,{detector:o}]of Object.entries(K)){if(o(t,e))return i}throw new Q(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),tt=s((...t)=>{for(const{id:e,detector:r,loader:i}of t)et(e,r,i)},"registerLazyLoadedDiagrams"),et=s((t,e,r)=>{K[t]&&p.warn(`Detector with key ${t} already exists. Overwriting.`),K[t]={detector:e,loader:r},p.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),rt=s(t=>K[t].loader,"getDiagramLoader"),it=s((t,e,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>it(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)return null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e;if(null!=e&&"object"==typeof t&&"object"==typeof e){const i=t;Object.entries(e).forEach(([e,o])=>{if("object"==typeof o){if(null===o)return;Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===i[e]&&(i[e]=Array.isArray(o)?[]:{}),"object"==typeof i[e]&&(i[e]=it(i[e],o,{depth:r-1}))}else"object"!=typeof i[e]&&(Object.hasOwn(t,e)?i[e]=o:Object.defineProperty(t,e,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return t},"assignWithDepth"),ot=it,at="#ffffff",nt="#f2f2f2",st=s((t,e)=>R(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),lt=s(t=>"object"==typeof t&&null!==t&&!Array.isArray(t),"isPlainObject"),ht=s((t,e)=>lt(t)&<(e)?{...t,...e}:e,"applyOverride"),ct=class{static{s(this,"Theme")}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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||P(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||N(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||R(this.primaryColor,{h:64}),this.fillType3=this.fillType3||R(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||R(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||R(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||R(this.primaryColor,{h:128}),this.fillType7=this.fillType7||R(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||R(this.primaryColor,{l:-10}),this.pie5=this.pie5||R(this.secondaryColor,{l:-10}),this.pie6=this.pie6||R(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||R(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||R(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||R(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||R(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||R(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||R(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??R(this.primaryColor,{l:-30}),this.venn2=this.venn2??R(this.secondaryColor,{l:-30}),this.venn3=this.venn3??R(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??R(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??R(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??R(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??R(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(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||R(this.primaryColor,{h:-30}),this.git4=this.git4||R(this.primaryColor,{h:-60}),this.git5=this.git5||R(this.primaryColor,{h:-90}),this.git6=this.git6||R(this.primaryColor,{h:60}),this.git7=this.git7||R(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},dt=s(t=>{const e=new ct;return e.calculate(t),e},"getThemeVariables"),ut=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=E(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=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=E(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=E(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||P(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(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=P(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=P(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=P(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=N(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=R(this.primaryColor,{h:64}),this.fillType3=R(this.secondaryColor,{h:64}),this.fillType4=R(this.primaryColor,{h:-64}),this.fillType5=R(this.secondaryColor,{h:-64}),this.fillType6=R(this.primaryColor,{h:128}),this.fillType7=R(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||N(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||P(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||R(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||R(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});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)]??P(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=P(this.secondaryColor,20),this.git1=P(this.pie2||this.secondaryColor,20),this.git2=P(this.pie3||this.tertiaryColor,20),this.git3=P(this.pie4||R(this.primaryColor,{h:-30}),20),this.git4=P(this.pie5||R(this.primaryColor,{h:-60}),20),this.git5=P(this.pie6||R(this.primaryColor,{h:-90}),10),this.git6=P(this.pie7||R(this.primaryColor,{h:60}),10),this.git7=P(this.pie8||R(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||P("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||P("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||P("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||P("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||P(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||P(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||P(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||P(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},pt=s(t=>{const e=new ut;return e.calculate(t),e},"getThemeVariables"),gt=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=R(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=st(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=E(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||R(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||R(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||R(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(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||P(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||P(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=R(this.primaryColor,{h:64}),this.fillType3=R(this.secondaryColor,{h:64}),this.fillType4=R(this.primaryColor,{h:-64}),this.fillType5=R(this.secondaryColor,{h:-64}),this.fillType6=R(this.primaryColor,{h:128}),this.fillType7=R(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||R(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||R(this.primaryColor,{l:-10}),this.pie5=this.pie5||R(this.secondaryColor,{l:-30}),this.pie6=this.pie6||R(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||R(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||R(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||R(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||R(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||R(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||R(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??R(this.primaryColor,{l:-30}),this.venn2=this.venn2??R(this.secondaryColor,{l:-30}),this.venn3=this.venn3??R(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??R(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??R(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??R(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??R(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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||R(this.primaryColor,{h:-30}),this.git4=this.git4||R(this.primaryColor,{h:-60}),this.git5=this.git5||R(this.primaryColor,{h:-90}),this.git6=this.git6||R(this.primaryColor,{h:60}),this.git7=this.git7||R(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},ft=s(t=>{const e=new gt;return e.calculate(t),e},"getThemeVariables"),yt=class{static{s(this,"Theme")}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=P("#cde498",10),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(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=z(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||R(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||R(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||R(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});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||P(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||P(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=R(this.primaryColor,{h:64}),this.fillType3=R(this.secondaryColor,{h:64}),this.fillType4=R(this.primaryColor,{h:-64}),this.fillType5=R(this.secondaryColor,{h:-64}),this.fillType6=R(this.primaryColor,{h:128}),this.fillType7=R(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||R(this.primaryColor,{l:-30}),this.pie5=this.pie5||R(this.secondaryColor,{l:-30}),this.pie6=this.pie6||R(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||R(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||R(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||R(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||R(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||R(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||R(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??R(this.primaryColor,{l:-30}),this.venn2=this.venn2??R(this.secondaryColor,{l:-30}),this.venn3=this.venn3??R(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??R(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??R(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??R(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??R(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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||R(this.primaryColor,{h:-30}),this.git4=this.git4||R(this.primaryColor,{h:-60}),this.git5=this.git5||R(this.primaryColor,{h:-90}),this.git6=this.git6||R(this.primaryColor,{h:60}),this.git7=this.git7||R(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},mt=s(t=>{const e=new yt;return e.calculate(t),e},"getThemeVariables"),xt=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=P(this.contrast,55),this.background="#ffffff",this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(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||P(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=P(this.contrast,55),this.border2=this.contrast,this.actorBorder=P(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]||N(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||P(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||z(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]||R(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||R(this.mainBkg,{l:-(8+5*t)});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=P(this.contrast,30),this.sectionBkgColor2=P(this.contrast,30),this.taskBorderColor=z(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=P(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(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=R(this.primaryColor,{h:64}),this.fillType3=R(this.secondaryColor,{h:64}),this.fillType4=R(this.primaryColor,{h:-64}),this.fillType5=R(this.secondaryColor,{h:-64}),this.fillType6=R(this.primaryColor,{h:128}),this.fillType7=R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||R(this.primaryColor,{h:-30}),this.git4=this.pie5||R(this.primaryColor,{h:-60}),this.git5=this.pie6||R(this.primaryColor,{h:-90}),this.git6=this.pie7||R(this.primaryColor,{h:60}),this.git7=this.pie8||R(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},Ct=s(t=>{const e=new xt;return e.calculate(t),e},"getThemeVariables"),bt=class{static{s(this,"Theme")}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=st(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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(I(this.background)?P(this.background,4):z(this.background,4));const t="#ECECFE",e="#E9E9F1",r=R(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||P(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||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||R(t,{h:30}),this.cScale4=this.cScale4||R(t,{h:60}),this.cScale5=this.cScale5||R(t,{h:90}),this.cScale6=this.cScale6||R(t,{h:120}),this.cScale7=this.cScale7||R(t,{h:150}),this.cScale8=this.cScale8||R(t,{h:210,l:150}),this.cScale9=this.cScale9||R(t,{h:270}),this.cScale10=this.cScale10||R(t,{h:300}),this.cScale11=this.cScale11||R(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||N(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||P(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(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 i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||R(this.mainBkg,{h:180,s:-15,l:i*(5+3*o)}),this["surfacePeer"+o]=this["surfacePeer"+o]||R(this.mainBkg,{h:180,s:-15,l:i*(8+3*o)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||R(t,{h:64}),this.fillType3=this.fillType3||R(e,{h:64}),this.fillType4=this.fillType4||R(t,{h:-64}),this.fillType5=this.fillType5||R(e,{h:-64}),this.fillType6=this.fillType6||R(t,{h:128}),this.fillType7=this.fillType7||R(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||R(t,{l:-10}),this.pie5=this.pie5||R(e,{l:-10}),this.pie6=this.pie6||R(r,{l:-10}),this.pie7=this.pie7||R(t,{h:60,l:-10}),this.pie8=this.pie8||R(t,{h:-60,l:-10}),this.pie9=this.pie9||R(t,{h:120,l:0}),this.pie10=this.pie10||R(t,{h:60,l:-20}),this.pie11=this.pie11||R(t,{h:-60,l:-20}),this.pie12=this.pie12||R(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||R(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||R(t,{h:-30}),this.git4=this.git4||R(t,{h:-60}),this.git5=this.git5||R(t,{h:-90}),this.git6=this.git6||R(t,{h:60}),this.git7=this.git7||R(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},kt=s(t=>{const e=new bt;return e.calculate(t),e},"getThemeVariables"),wt=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(N("#323D47"),10),this.border1="#ccc",this.border2=E(255,255,255,.25),this.arrowheadColor=N(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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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="calculated"===this.secondBkg?P(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||P(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||N(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||R(this.primaryColor,{h:64}),this.fillType3=this.fillType3||R(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||R(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||R(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||R(this.primaryColor,{h:128}),this.fillType7=this.fillType7||R(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||R(this.primaryColor,{l:-10}),this.pie5=this.pie5||R(this.secondaryColor,{l:-10}),this.pie6=this.pie6||R(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||R(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||R(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||R(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||R(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||R(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(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=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},St=s(t=>{const e=new wt;return e.calculate(t),e},"getThemeVariables"),Tt=class{static{s(this,"Theme")}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=st("#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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(I(this.background)?P(this.background,4):z(this.background,4));const t="#ECECFE",e="#E9E9F1",r=R(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||P(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]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||N(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||P(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(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 i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||R(this.mainBkg,{h:180,s:-15,l:i*(5+3*o)}),this["surfacePeer"+o]=this["surfacePeer"+o]||R(this.mainBkg,{h:180,s:-15,l:i*(8+3*o)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||R(t,{h:64}),this.fillType3=this.fillType3||R(e,{h:64}),this.fillType4=this.fillType4||R(t,{h:-64}),this.fillType5=this.fillType5||R(e,{h:-64}),this.fillType6=this.fillType6||R(t,{h:128}),this.fillType7=this.fillType7||R(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||R(t,{l:-10}),this.pie5=this.pie5||R(e,{l:-10}),this.pie6=this.pie6||R(r,{l:-10}),this.pie7=this.pie7||R(t,{h:60,l:-10}),this.pie8=this.pie8||R(t,{h:-60,l:-10}),this.pie9=this.pie9||R(t,{h:120,l:0}),this.pie10=this.pie10||R(t,{h:60,l:-20}),this.pie11=this.pie11||R(t,{h:-60,l:-20}),this.pie12=this.pie12||R(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||R(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||R(t,{h:-30}),this.git4=this.git4||R(t,{h:-60}),this.git5=this.git5||R(t,{h:-90}),this.git6=this.git6||R(t,{h:60}),this.git7=this.git7||R(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},Bt=s(t=>{const e=new Tt;return e.calculate(t),e},"getThemeVariables"),_t=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(N("#323D47"),10),this.border1="#ccc",this.border2=E(255,255,255,.25),this.arrowheadColor=N(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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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="calculated"===this.secondBkg?P(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||P(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||R(this.primaryColor,{h:30}),this.cScale4=this.cScale4||R(this.primaryColor,{h:60}),this.cScale5=this.cScale5||R(this.primaryColor,{h:90}),this.cScale6=this.cScale6||R(this.primaryColor,{h:120}),this.cScale7=this.cScale7||R(this.primaryColor,{h:150}),this.cScale8=this.cScale8||R(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||R(this.primaryColor,{h:270}),this.cScale10=this.cScale10||R(this.primaryColor,{h:300}),this.cScale11=this.cScale11||R(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||N(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||R(this.primaryColor,{h:64}),this.fillType3=this.fillType3||R(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||R(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||R(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||R(this.primaryColor,{h:128}),this.fillType7=this.fillType7||R(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||R(this.primaryColor,{l:-10}),this.pie5=this.pie5||R(this.secondaryColor,{l:-10}),this.pie6=this.pie6||R(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||R(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||R(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||R(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||R(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||R(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||R(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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(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||R(this.primaryColor,{h:-30}),this.git4=this.git4||R(this.primaryColor,{h:-60}),this.git5=this.git5||R(this.primaryColor,{h:-90}),this.git6=this.git6||R(this.primaryColor,{h:60}),this.git7=this.git7||R(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},vt=s(t=>{const e=new _t;return e.calculate(t),e},"getThemeVariables"),Ft=class{static{s(this,"Theme")}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=st("#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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(I(this.background)?P(this.background,4):z(this.background,4));const t="#ECECFE",e=R(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||P(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 i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||N(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||P(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||z(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||R(this.mainBkg,{h:180,s:-15,l:r*(5+3*i)}),this["surfacePeer"+i]=this["surfacePeer"+i]||R(this.mainBkg,{h:180,s:-15,l:r*(8+3*i)});this.classText=this.classText||this.textColor;for(let i=0;i<8;i++)this["fillType"+i]=this["fillType"+i]||this.bkgColorArray[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||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 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||t,this.quadrant2Fill=this.quadrant2Fill||R(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||"#E9E9F1",this.git2=this.git2||e,this.git3=this.git3||R(t,{h:-30}),this.git4=this.git4||R(t,{h:-60}),this.git5=this.git5||R(t,{h:-90}),this.git6=this.git6||R(t,{h:60}),this.git7=this.git7||R(t,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},Lt=s(t=>{const e=new Ft;return e.calculate(t),e},"getThemeVariables"),Mt=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=P(this.primaryColor,16),this.tertiaryColor=R(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=P(N("#323D47"),10),this.border1="#ccc",this.border2=E(255,255,255,.25),this.arrowheadColor=N(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||R(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||R(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(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="calculated"===this.secondBkg?P(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(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||P(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||N(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||P(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=z(this["cScale"+e],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||R(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor;["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((t,e)=>{this["fillType"+e]=this["fillType"+e]||t});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+(e+1)]=this["pie"+(e+1)]||this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this.borderColorArray[e%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||R(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||R(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||R(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||R(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||R(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||R(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||I(this.quadrant1Fill)?P(this.quadrant1Fill):z(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?z(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||R(this.primaryColor,{h:-30}),this.git4=this.git4||R(this.primaryColor,{h:-60}),this.git5=this.git5||R(this.primaryColor,{h:-90}),this.git6=this.git6||R(this.primaryColor,{h:60}),this.git7=this.git7||R(this.primaryColor,{h:120}),this.darkMode?(this.git0=P(this.git0,25),this.git1=P(this.git1,25),this.git2=P(this.git2,25),this.git3=P(this.git3,25),this.git4=P(this.git4,25),this.git5=P(this.git5,25),this.git6=P(this.git6,25),this.git7=P(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(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||at,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nt}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=ht(this[e],t[e])})}},At={base:{getThemeVariables:dt},dark:{getThemeVariables:pt},default:{getThemeVariables:ft},forest:{getThemeVariables:mt},neutral:{getThemeVariables:Ct},neo:{getThemeVariables:kt},"neo-dark":{getThemeVariables:St},redux:{getThemeVariables:Bt},"redux-dark":{getThemeVariables:vt},"redux-color":{getThemeVariables:Lt},"redux-dark-color":{getThemeVariables:s(t=>{const e=new Mt;return e.calculate(t),e},"getThemeVariables")}},$t={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,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},Et={...$t,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:At.default.getThemeVariables(),sequence:{...$t.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:$t.class?.theme,look:$t.class?.look,layout:$t.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...$t.gantt,tickInterval:void 0,useWidth:void 0},c4:{...$t.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...$t.flowchart,inheritDir:!1},external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...$t.pie,useWidth:984},xyChart:{...$t.xyChart,useWidth:void 0},requirement:{...$t.requirement,useWidth:void 0},packet:{...$t.packet},eventmodeling:{...$t.eventmodeling},treeView:{...$t.treeView,useWidth:void 0},radar:{...$t.radar},usecase:{...$t.usecase},railroad:{...$t.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:{...$t.ishikawa},sankey:{...$t.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:{...$t.venn},cynefin:{...$t.cynefin}},Ot=s((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Ot(t[i],"")]:[...r,e+i],[]),"keyify"),Dt=new Set(Ot(Et,"")),It=Et,qt={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},Pt=s(t=>qt[t]??t,"getDiagramConfigKey"),zt={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Wt=s((t,e)=>{for(const r of Object.keys(t)){const i=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof i||!e.test(i))&&(p.debug("sanitize deleting dictionary entry:",r,i),delete t[r])}},"sanitizeDictionaryConfig"),Rt=s(t=>{if(p.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>Rt(t));else{for(const e of Object.keys(t)){if(p.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Dt.has(e)||null==t[e]){p.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=zt[e];r?Wt(t[e],r):(p.debug("sanitizing object",e),Rt(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(p.debug("sanitizing css option",e),t[e]=Nt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}p.debug("After sanitization",t)}},"sanitizeDirective"),Nt=s(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),jt=Object.freeze(It),Ht=["theme","look","layout"],Ut=new Set(["classic","handDrawn","neo"]),Yt=s((t,e)=>"theme"===t?"null"===e||Object.hasOwn(At,e):"look"!==t||Ut.has(e),"isUsableAppearance"),Vt=s((t,e,r)=>{if(!t)return;const i=t[e];return[i?.[r],t[r]].find(t=>void 0!==t&&Yt(r,t))},"readAppearance"),Xt=s(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),Gt=ot({},jt),Zt={},Qt=[],Kt=ot({},jt),Jt=s((t,e)=>{if(!H)return;const r=[e,...[...Qt].reverse(),Zt,jt],i=t[H];for(const o of Ht)for(const e of r){const r=Vt(e,H,o);if(void 0!==r){t[o]=r,void 0!==i?.[o]&&(i[o]=r);break}}},"resolveAppearance"),te=s((t,e)=>{let r=ot({},t),i={};for(const o of e)le(o),i=ot(i,o);r=ot(r,i),Jt(r,i);if((Boolean(i.theme)||r.theme!==t.theme)&&r.theme&&Object.hasOwn(At,r.theme)){const t=ot({},j),e=ot(t.themeVariables||{},i.themeVariables);r.themeVariables=At[r.theme].getThemeVariables(e)}return ge(Kt=r),Kt},"updateCurrentConfig"),ee=s(t=>{H=void 0===t?void 0:Pt(t),te(Gt,Qt)},"setDiagramConfigScope"),re=s(t=>(Gt=ot({},jt),Gt=ot(Gt,t),Zt=ot({},t),t.theme&&Object.hasOwn(At,t.theme)&&(Gt.themeVariables=At[t.theme].getThemeVariables(t.themeVariables)),te(Gt,Qt),Gt),"setSiteConfig"),ie=s(t=>{j=ot({},t)},"saveConfigFromInitialize"),oe=s(t=>(Gt=ot(Gt,t),Zt=ot(Zt,t),te(Gt,Qt),Gt),"updateSiteConfig"),ae=s(()=>ot({},Gt),"getSiteConfig"),ne=s(t=>(te(Kt,[t]),se()),"setConfig"),se=s(()=>ot({},Kt),"getConfig"),le=s(t=>{t&&(["secure",...Gt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(p.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&le(t[e])}))},"sanitize"),he=s(t=>{Rt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Qt.push(t),te(Gt,Qt)},"addDirective"),ce=s((t=Gt)=>{H=void 0,te(t,Qt=[])},"reset"),de={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."},ue={},pe=s(t=>{ue[t]||(p.warn(de[t]),ue[t]=!0)},"issueWarning"),ge=s(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&pe("LAZY_LOAD_DEPRECATED")},"checkConfig"),fe=s(()=>{let t={};j&&(t=ot(t,j));for(const e of Qt)t=ot(t,e);return t},"getUserDefinedConfig"),ye=s(t=>(null!=t.flowchart?.htmlLabels&&pe("FLOWCHART_HTML_LABELS_DEPRECATED"),Xt(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),me=/<\/?br\s*\/?>/gi,xe=new RegExp(me.source,"i"),Ce=s(t=>{if(!t)return[""];return Le(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),be=(()=>{let t=!1;return()=>{t||(ke(),t=!0)}})();function ke(){const e="data-temp-href-target";t.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),t.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target")&&t.setAttribute("rel","noopener"))})}s(ke,"setupDompurifyHooks");var we=s(e=>{be();return t.sanitize(e)},"removeScript"),Se=s((t,e)=>{if(ye(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=we(t):"loose"!==r&&(t=(t=(t=Le(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=Fe(t))}return t},"sanitizeMore"),Te=s((e,r)=>e?e=r.dompurifyConfig?t.sanitize(Se(e,r),r.dompurifyConfig).toString():t.sanitize(Se(e,r),{FORBID_TAGS:["style"]}).toString():e,"sanitizeText"),Be=s((t,e)=>"string"==typeof t?Te(t,e):t.flat().map(t=>Te(t,e)),"sanitizeTextOrArray"),_e=s(t=>xe.test(t),"hasBreaks"),ve=s(t=>t.split(me),"splitBreaks"),Fe=s(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Le=s(t=>t.replace(me,"#br#"),"breakToPlaceholder"),Me=s(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Ae=s(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),$e=s(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),Ee=s(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const o=e[i-1],a=e[i+1];De(o,a)&&(t=o+","+a,i++,r.pop())}r.push(Ie(t))}return r.join("")},"parseGenericTypes"),Oe=s((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),De=s((t,e)=>{const r=Oe(t,"~"),i=Oe(e,"~");return 1===r&&1===i},"shouldCombineSets"),Ie=s(t=>{const e=Oe(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),qe=s(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Pe=/\$\$(.*?)\$\$/g,ze=s(t=>(t.match(Pe)?.length??0)>0,"hasKatex"),We=s(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Ne(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Re=s(async(t,e)=>{if(!ze(t))return t;if(!(qe()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Pe,"MathML is unsupported in this environment.");{const{default:r}=await o(async()=>{const{default:t}=await(import("./katex-DN8cTsI3.js"));return{default:t}},[],import.meta.url),i=e.forceLegacyMathML||!qe()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(me).map(t=>ze(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Pe,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ne=s(async(t,e)=>Te(await Re(t,e),e),"renderKatexSanitized"),je={getRows:Ce,sanitizeText:Te,sanitizeTextOrArray:Be,hasBreaks:_e,splitBreaks:ve,lineBreakRegex:me,removeScript:we,getUrl:Me,evaluate:Xt,getMax:Ae,getMin:$e},He=s(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Ue=s(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Ye=s(function(t,e,r,i){const o=Ue(e,r,i);He(t,o)},"configureSvgSize"),Ve=s(function(t,e,r,i){const o=e.node().getBBox(),a=o.width,n=o.height;p.info(`SVG bounds: ${a}x${n}`,o);let s=0,l=0;p.info(`Graph bounds: ${s}x${l}`,t),s=a+2*r,l=n+2*r,p.info(`Calculated bounds: ${s}x${l}`),Ye(e,l,s,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),Xe={};function Ge(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}s(Ge,"cssStyleSheetToString");var Ze=s((t,e,r,i)=>{let o="";return t in Xe&&Xe[t]?o=Xe[t]({...r,svgId:i}):p.warn(`No theme found for ${t}`),`& {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),Qe=s((t,e)=>{void 0!==e&&(Xe[t]=e)},"addStylesForDiagram"),Ke=Ze,Je={};l(Je,{clear:()=>or,getAccDescription:()=>lr,getAccTitle:()=>nr,getDiagramTitle:()=>cr,setAccDescription:()=>sr,setAccTitle:()=>ar,setDiagramTitle:()=>hr});var tr="",er="",rr="",ir=s(t=>Te(t,se()),"sanitizeText"),or=s(()=>{tr="",rr="",er=""},"clear"),ar=s(t=>{tr=ir(t).replace(/^\s+/g,"")},"setAccTitle"),nr=s(()=>tr,"getAccTitle"),sr=s(t=>{rr=ir(t).replace(/\n\s+/g,"\n")},"setAccDescription"),lr=s(()=>rr,"getAccDescription"),hr=s(t=>{er=ir(t)},"setDiagramTitle"),cr=s(()=>er,"getDiagramTitle"),dr=p,ur=g,pr=se,gr=ne,fr=jt,yr=s(t=>Te(t,pr()),"sanitizeText"),mr=Ve,xr=s(()=>Je,"getCommonDb"),Cr={},br=s((t,e,r)=>{Cr[t]&&dr.warn(`Diagram with id ${t} already registered. Overwriting.`),Cr[t]=e,r&&et(t,r),Qe(t,e.styles),e.injectUtils?.(dr,ur,pr,yr,mr,xr(),()=>{})},"registerDiagram"),kr=s(t=>{if(t in Cr)return Cr[t];throw new wr(t)},"getDiagram"),wr=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};function Sr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Tr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Br(t){let e,r,i;function o(t,i,o=0,a=t.length){if(o<a){if(0!==e(i,i))return a;do{const e=o+a>>>1;r(t[e],i)<0?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=Sr,r=(e,r)=>Sr(t(e),r),i=(e,r)=>t(e)-r):(e=t===Sr||t===Tr?t:_r,r=t,i=t),{left:o,center:function(t,e,r=0,a=t.length){const n=o(t,e,r,a-1);return n>r&&i(t[n-1],e)>-i(t[n],e)?n-1:n},right:function(t,i,o=0,a=t.length){if(o<a){if(0!==e(i,i))return a;do{const e=o+a>>>1;r(t[e],i)<=0?o=e+1:a=e}while(o<a)}return o}}}function _r(){return 0}const vr=Br(Sr).right;Br(function(t){return null===t?NaN:+t}).center;class Fr extends Map{constructor(t,e=Mr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Lr(this,t))}has(t){return super.has(Lr(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const i=e(r);t.has(i)&&(r=t.get(i),t.delete(i));return r}(this,t))}}function Lr({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function Mr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Ar=Math.sqrt(50),$r=Math.sqrt(10),Er=Math.sqrt(2);function Or(t,e,r){const i=(e-t)/Math.max(0,r),o=Math.floor(Math.log10(i)),a=i/Math.pow(10,o),n=a>=Ar?10:a>=$r?5:a>=Er?2:1;let s,l,h;return o<0?(h=Math.pow(10,-o)/n,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,o)*n,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?Or(t,e,2*r):[s,l,h]}function Dr(t,e,r){return Or(t=+t,e=+e,r=+r)[2]}function Ir(t,e,r){r=+r;const i=(e=+e)<(t=+t),o=i?Dr(e,t,r):Dr(t,e,r);return(i?-1:1)*(o<0?1/-o:o)}function qr(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r<i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function Pr(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r>i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function zr(t){return t}var Wr=1e-6;function Rr(t){return"translate("+t+",0)"}function Nr(t){return"translate(0,"+t+")"}function jr(t){return e=>+t(e)}function Hr(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Ur(){return!this.__axis}function Yr(t,e){var r=[],i=null,o=null,a=6,n=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,h=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Rr:Nr;function u(u){var p=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,g=null==o?e.tickFormat?e.tickFormat.apply(e,r):zr:o,f=Math.max(a,0)+s,y=e.range(),m=+y[0]+l,x=+y[y.length-1]+l,C=(e.bandwidth?Hr:jr)(e.copy(),l),b=u.selection?u.selection():u,k=b.selectAll(".domain").data([null]),w=b.selectAll(".tick").data(p,e).order(),S=w.exit(),T=w.enter().append("g").attr("class","tick"),B=w.select("line"),_=w.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(T),B=B.merge(T.append("line").attr("stroke","currentColor").attr(c+"2",h*a)),_=_.merge(T.append("text").attr("fill","currentColor").attr(c,h*f).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),u!==b&&(k=k.transition(u),w=w.transition(u),B=B.transition(u),_=_.transition(u),S=S.transition(u).attr("opacity",Wr).attr("transform",function(t){return isFinite(t=C(t))?d(t+l):this.getAttribute("transform")}),T.attr("opacity",Wr).attr("transform",function(t){var e=this.parentNode.__axis;return d((e&&isFinite(e=e(t))?e:C(t))+l)})),S.remove(),k.attr("d",4===t||2===t?n?"M"+h*n+","+m+"H"+l+"V"+x+"H"+h*n:"M"+l+","+m+"V"+x:n?"M"+m+","+h*n+"V"+l+"H"+x+"V"+h*n:"M"+m+","+l+"H"+x),w.attr("opacity",1).attr("transform",function(t){return d(C(t)+l)}),B.attr(c+"2",h*a),_.attr(c,h*f).text(g),b.filter(Ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each(function(){this.__axis=C})}return u.scale=function(t){return arguments.length?(e=t,u):e},u.ticks=function(){return r=Array.from(arguments),u},u.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),u):r.slice()},u.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),u):i&&i.slice()},u.tickFormat=function(t){return arguments.length?(o=t,u):o},u.tickSize=function(t){return arguments.length?(a=n=+t,u):a},u.tickSizeInner=function(t){return arguments.length?(a=+t,u):a},u.tickSizeOuter=function(t){return arguments.length?(n=+t,u):n},u.tickPadding=function(t){return arguments.length?(s=+t,u):s},u.offset=function(t){return arguments.length?(l=+t,u):l},u}function Vr(t){return Yr(1,t)}function Xr(t){return Yr(3,t)}var Gr={value:()=>{}};function Zr(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Qr(i)}function Qr(t){this._=t}function Kr(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function Jr(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Gr,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}Qr.prototype=Zr.prototype={constructor:Qr,on:function(t,e){var r,i=this._,o=function(t,e){return t.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");if(i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}(t+"",i),a=-1,n=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<n;)if(r=(t=o[a]).type)i[r]=Jr(i[r],t.name,e);else if(null==e)for(r in i)i[r]=Jr(i[r],t.name,null);return this}for(;++a<n;)if((r=(t=o[a]).type)&&(r=Kr(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Qr(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};var ti="http://www.w3.org/1999/xhtml";const ei={svg:"http://www.w3.org/2000/svg",xhtml:ti,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ri(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),ei.hasOwnProperty(e)?{space:ei[e],local:t}:t}function ii(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===ti&&e.documentElement.namespaceURI===ti?e.createElement(t):e.createElementNS(r,t)}}function oi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ai(t){var e=ri(t);return(e.local?oi:ii)(e)}function ni(){}function si(t){return null==t?ni:function(){return this.querySelector(t)}}function li(){return[]}function hi(t){return null==t?li:function(){return this.querySelectorAll(t)}}function ci(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function di(t){return function(){return this.matches(t)}}function ui(t){return function(e){return e.matches(t)}}var pi=Array.prototype.find;function gi(){return this.firstElementChild}var fi=Array.prototype.filter;function yi(){return Array.from(this.children)}function mi(t){return new Array(t.length)}function xi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ci(t,e,r,i,o,a){for(var n,s=0,l=e.length,h=a.length;s<h;++s)(n=e[s])?(n.__data__=a[s],i[s]=n):r[s]=new xi(t,a[s]);for(;s<l;++s)(n=e[s])&&(o[s]=n)}function bi(t,e,r,i,o,a,n){var s,l,h,c=new Map,d=e.length,u=a.length,p=new Array(d);for(s=0;s<d;++s)(l=e[s])&&(p[s]=h=n.call(l,l.__data__,s,e)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<u;++s)h=n.call(t,a[s],s,a)+"",(l=c.get(h))?(i[s]=l,l.__data__=a[s],c.delete(h)):r[s]=new xi(t,a[s]);for(s=0;s<d;++s)(l=e[s])&&c.get(p[s])===l&&(o[s]=l)}function ki(t){return t.__data__}function wi(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Si(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ti(t){return function(){this.removeAttribute(t)}}function Bi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _i(t,e){return function(){this.setAttribute(t,e)}}function vi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fi(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function Li(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Mi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ai(t){return function(){this.style.removeProperty(t)}}function $i(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Ei(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function Oi(t,e){return t.style.getPropertyValue(e)||Mi(t).getComputedStyle(t,null).getPropertyValue(e)}function Di(t){return function(){delete this[t]}}function Ii(t,e){return function(){this[t]=e}}function qi(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function Pi(t){return t.trim().split(/^|\s+/)}function zi(t){return t.classList||new Wi(t)}function Wi(t){this._node=t,this._names=Pi(t.getAttribute("class")||"")}function Ri(t,e){for(var r=zi(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function Ni(t,e){for(var r=zi(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function ji(t){return function(){Ri(this,t)}}function Hi(t){return function(){Ni(this,t)}}function Ui(t,e){return function(){(e.apply(this,arguments)?Ri:Ni)(this,t)}}function Yi(){this.textContent=""}function Vi(t){return function(){this.textContent=t}}function Xi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Gi(){this.innerHTML=""}function Zi(t){return function(){this.innerHTML=t}}function Qi(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ki(){this.nextSibling&&this.parentNode.appendChild(this)}function Ji(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function to(){return null}function eo(){var t=this.parentNode;t&&t.removeChild(this)}function ro(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function io(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oo(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function ao(t,e,r){return function(){var i,o=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var n=0,s=o.length;n<s;++n)if((i=o[n]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(i):this.__on=[i]}}function no(t,e,r){var i=Mi(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function so(t,e){return function(){return no(this,t,e)}}function lo(t,e){return function(){return no(this,t,e.apply(this,arguments))}}xi.prototype={constructor:xi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Wi.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ho=[null];function co(t,e){this._groups=t,this._parents=e}function uo(){return new co([[document.documentElement]],ho)}function po(t){return"string"==typeof t?new co([[document.querySelector(t)]],[document.documentElement]):new co([[t]],ho)}function go(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function fo(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function yo(){}co.prototype=uo.prototype={constructor:co,select:function(t){"function"!=typeof t&&(t=si(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,n,s=e[o],l=s.length,h=i[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(n=t.call(a,a.__data__,c,s))&&("__data__"in a&&(n.__data__=a.__data__),h[c]=n);return new co(i,this._parents)},selectAll:function(t){t="function"==typeof t?ci(t):hi(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var n,s=e[a],l=s.length,h=0;h<l;++h)(n=s[h])&&(i.push(t.call(n,n.__data__,h,s)),o.push(n));return new co(i,o)},selectChild:function(t){return this.select(null==t?gi:function(t){return function(){return pi.call(this.children,t)}}("function"==typeof t?t:ui(t)))},selectChildren:function(t){return this.selectAll(null==t?yi:function(t){return function(){return fi.call(this.children,t)}}("function"==typeof t?t:ui(t)))},filter:function(t){"function"!=typeof t&&(t=di(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,n=e[o],s=n.length,l=i[o]=[],h=0;h<s;++h)(a=n[h])&&t.call(a,a.__data__,h,n)&&l.push(a);return new co(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ki);var r=e?bi:Ci,i=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=o.length,n=new Array(a),s=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=o[h],u=d.length,p=wi(t.call(c,c&&c.__data__,h,i)),g=p.length,f=s[h]=new Array(g),y=n[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,x,C=0,b=0;C<g;++C)if(m=f[C]){for(C>=b&&(b=C+1);!(x=y[b])&&++b<g;);m._next=x||null}}return(n=new co(n,i))._enter=s,n._exit=l,n},enter:function(){return new co(this._enter||this._groups.map(mi),this._parents)},exit:function(){return new co(this._exit||this._groups.map(mi),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,n=Math.min(o,a),s=new Array(o),l=0;l<n;++l)for(var h,c=r[l],d=i[l],u=c.length,p=s[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)s[l]=r[l];return new co(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],a=o.length-1,n=o[a];--a>=0;)(i=o[a])&&(n&&4^i.compareDocumentPosition(n)&&n.parentNode.insertBefore(i,n),n=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=Si);for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var n,s=r[a],l=s.length,h=o[a]=new Array(l),c=0;c<l;++c)(n=s[c])&&(h[c]=n);h.sort(e)}return new co(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var n=i[o];if(n)return n}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,a=e[r],n=0,s=a.length;n<s;++n)(o=a[n])&&t.call(o,o.__data__,n,a);return this},attr:function(t,e){var r=ri(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?Bi:Ti:"function"==typeof e?r.local?Li:Fi:r.local?vi:_i)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?Ai:"function"==typeof e?Ei:$i)(t,e,null==r?"":r)):Oi(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Di:"function"==typeof e?qi:Ii)(t,e)):this.node()[t]},classed:function(t,e){var r=Pi(t+"");if(arguments.length<2){for(var i=zi(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?Ui:e?ji:Hi)(r,e))},text:function(t){return arguments.length?this.each(null==t?Yi:("function"==typeof t?Xi:Vi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Gi:("function"==typeof t?Qi:Zi)(t)):this.node().innerHTML},raise:function(){return this.each(Ki)},lower:function(){return this.each(Ji)},append:function(t){var e="function"==typeof t?t:ai(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:ai(t),i=null==e?to:"function"==typeof e?e:si(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(eo)},clone:function(t){return this.select(t?io:ro)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,o,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),n=a.length;if(!(arguments.length<2)){for(s=e?ao:oo,i=0;i<n;++i)this.each(s(a[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<n;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?lo:so)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],a=0,n=o.length;a<n;++a)(i=o[a])&&(yield i)}};var mo=.7,xo=1/mo,Co="\\s*([+-]?\\d+)\\s*",bo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wo=/^#([0-9a-f]{3,8})$/,So=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),To=new RegExp(`^rgb\\(${ko},${ko},${ko}\\)$`),Bo=new RegExp(`^rgba\\(${Co},${Co},${Co},${bo}\\)$`),_o=new RegExp(`^rgba\\(${ko},${ko},${ko},${bo}\\)$`),vo=new RegExp(`^hsl\\(${bo},${ko},${ko}\\)$`),Fo=new RegExp(`^hsla\\(${bo},${ko},${ko},${bo}\\)$`),Lo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mo(){return this.rgb().formatHex()}function Ao(){return this.rgb().formatRgb()}function $o(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=wo.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Eo(e):3===r?new qo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Oo(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Oo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=So.exec(t))?new qo(e[1],e[2],e[3],1):(e=To.exec(t))?new qo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bo.exec(t))?Oo(e[1],e[2],e[3],e[4]):(e=_o.exec(t))?Oo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=vo.exec(t))?jo(e[1],e[2]/100,e[3]/100,1):(e=Fo.exec(t))?jo(e[1],e[2]/100,e[3]/100,e[4]):Lo.hasOwnProperty(t)?Eo(Lo[t]):"transparent"===t?new qo(NaN,NaN,NaN,0):null}function Eo(t){return new qo(t>>16&255,t>>8&255,255&t,1)}function Oo(t,e,r,i){return i<=0&&(t=e=r=NaN),new qo(t,e,r,i)}function Do(t){return t instanceof yo||(t=$o(t)),t?new qo((t=t.rgb()).r,t.g,t.b,t.opacity):new qo}function Io(t,e,r,i){return 1===arguments.length?Do(t):new qo(t,e,r,null==i?1:i)}function qo(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Po(){return`#${No(this.r)}${No(this.g)}${No(this.b)}`}function zo(){const t=Wo(this.opacity);return`${1===t?"rgb(":"rgba("}${Ro(this.r)}, ${Ro(this.g)}, ${Ro(this.b)}${1===t?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function No(t){return((t=Ro(t))<16?"0":"")+t.toString(16)}function jo(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Uo(t,e,r,i)}function Ho(t){if(t instanceof Uo)return new Uo(t.h,t.s,t.l,t.opacity);if(t instanceof yo||(t=$o(t)),!t)return new Uo;if(t instanceof Uo)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),a=Math.max(e,r,i),n=NaN,s=a-o,l=(a+o)/2;return s?(n=e===a?(r-i)/s+6*(r<i):r===a?(i-e)/s+2:(e-r)/s+4,s/=l<.5?a+o:2-a-o,n*=60):s=l>0&&l<1?0:n,new Uo(n,s,l,t.opacity)}function Uo(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Yo(t){return(t=(t||0)%360)<0?t+360:t}function Vo(t){return Math.max(0,Math.min(1,t||0))}function Xo(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}go(yo,$o,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Mo,formatHex:Mo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ho(this).formatHsl()},formatRgb:Ao,toString:Ao}),go(qo,Io,fo(yo,{brighter(t){return t=null==t?xo:Math.pow(xo,t),new qo(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new qo(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new qo(Ro(this.r),Ro(this.g),Ro(this.b),Wo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Po,formatHex:Po,formatHex8:function(){return`#${No(this.r)}${No(this.g)}${No(this.b)}${No(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:zo,toString:zo})),go(Uo,function(t,e,r,i){return 1===arguments.length?Ho(t):new Uo(t,e,r,null==i?1:i)},fo(yo,{brighter(t){return t=null==t?xo:Math.pow(xo,t),new Uo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?mo:Math.pow(mo,t),new Uo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,o=2*r-i;return new qo(Xo(t>=240?t-240:t+120,o,i),Xo(t,o,i),Xo(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new Uo(Yo(this.h),Vo(this.s),Vo(this.l),Wo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Wo(this.opacity);return`${1===t?"hsl(":"hsla("}${Yo(this.h)}, ${100*Vo(this.s)}%, ${100*Vo(this.l)}%${1===t?")":`, ${t})`}`}}));const Go=Math.PI/180,Zo=180/Math.PI,Qo=.96422,Ko=.82521,Jo=4/29,ta=6/29,ea=3*ta*ta,ra=ta*ta*ta;function ia(t){if(t instanceof oa)return new oa(t.l,t.a,t.b,t.opacity);if(t instanceof ca)return da(t);t instanceof qo||(t=Do(t));var e,r,i=la(t.r),o=la(t.g),a=la(t.b),n=aa((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?e=r=n:(e=aa((.4360747*i+.3850649*o+.1430804*a)/Qo),r=aa((.0139322*i+.0971045*o+.7141733*a)/Ko)),new oa(116*n-16,500*(e-n),200*(n-r),t.opacity)}function oa(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function aa(t){return t>ra?Math.pow(t,1/3):t/ea+Jo}function na(t){return t>ta?t*t*t:ea*(t-Jo)}function sa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function la(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ha(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof ca)return new ca(t.h,t.c,t.l,t.opacity);if(t instanceof oa||(t=ia(t)),0===t.a&&0===t.b)return new ca(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Zo;return new ca(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new ca(t,e,r,null==i?1:i)}function ca(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function da(t){if(isNaN(t.h))return new oa(t.l,0,0,t.opacity);var e=t.h*Go;return new oa(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}go(oa,function(t,e,r,i){return 1===arguments.length?ia(t):new oa(t,e,r,null==i?1:i)},fo(yo,{brighter(t){return new oa(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new oa(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new qo(sa(3.1338561*(e=Qo*na(e))-1.6168667*(t=1*na(t))-.4906146*(r=Ko*na(r))),sa(-.9787684*e+1.9161415*t+.033454*r),sa(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),go(ca,ha,fo(yo,{brighter(t){return new ca(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ca(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return da(this).rgb()}}));const ua=t=>()=>t;function pa(t,e){return function(r){return t+r*e}}function ga(t){return 1===(t=+t)?fa:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):ua(isNaN(e)?r:e)}}function fa(t,e){var r=e-t;return r?pa(t,r):ua(isNaN(t)?e:t)}const ya=function t(e){var r=ga(e);function i(t,e){var i=r((t=Io(t)).r,(e=Io(e)).r),o=r(t.g,e.g),a=r(t.b,e.b),n=fa(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=a(e),t.opacity=n(e),t+""}}return i.gamma=t,i}(1);function ma(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(a){for(r=0;r<i;++r)o[r]=t[r]*(1-a)+e[r]*a;return o}}function xa(t,e){var r,i=e?e.length:0,o=t?Math.min(i,t.length):0,a=new Array(o),n=new Array(i);for(r=0;r<o;++r)a[r]=Ba(t[r],e[r]);for(;r<i;++r)n[r]=e[r];return function(t){for(r=0;r<o;++r)n[r]=a[r](t);return n}}function Ca(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function ba(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function ka(t,e){var r,i={},o={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=Ba(t[r],e[r]):o[r]=e[r];return function(t){for(r in i)o[r]=i[r](t);return o}}var wa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sa=new RegExp(wa.source,"g");function Ta(t,e){var r,i,o,a=wa.lastIndex=Sa.lastIndex=0,n=-1,s=[],l=[];for(t+="",e+="";(r=wa.exec(t))&&(i=Sa.exec(e));)(o=i.index)>a&&(o=e.slice(a,o),s[n]?s[n]+=o:s[++n]=o),(r=r[0])===(i=i[0])?s[n]?s[n]+=i:s[++n]=i:(s[++n]=null,l.push({i:n,x:ba(r,i)})),a=Sa.lastIndex;return a<e.length&&(o=e.slice(a),s[n]?s[n]+=o:s[++n]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function Ba(t,e){var r,i=typeof e;return null==e||"boolean"===i?ua(e):("number"===i?ba:"string"===i?(r=$o(e))?(e=r,ya):Ta:e instanceof $o?ya:e instanceof Date?Ca:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?ma:Array.isArray(e)?xa:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ka:ba)(t,e)}function _a(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var va,Fa=180/Math.PI,La={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ma(t,e,r,i,o,a){var n,s,l;return(n=Math.sqrt(t*t+e*e))&&(t/=n,e/=n),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,n=-n),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*Fa,skewX:Math.atan(l)*Fa,scaleX:n,scaleY:s}}function Aa(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(a,n){var s=[],l=[];return a=t(a),n=t(n),function(t,i,o,a,n,s){if(t!==o||i!==a){var l=n.push("translate(",null,e,null,r);s.push({i:l-4,x:ba(t,o)},{i:l-2,x:ba(i,a)})}else(o||a)&&n.push("translate("+o+e+a+r)}(a.translateX,a.translateY,n.translateX,n.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(o(r)+"rotate(",null,i)-2,x:ba(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(a.rotate,n.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(o(r)+"skewX(",null,i)-2,x:ba(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(a.skewX,n.skewX,s,l),function(t,e,r,i,a,n){if(t!==r||e!==i){var s=a.push(o(a)+"scale(",null,",",null,")");n.push({i:s-4,x:ba(t,r)},{i:s-2,x:ba(e,i)})}else 1===r&&1===i||a.push(o(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,n.scaleX,n.scaleY,s,l),a=n=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var $a=Aa(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?La:Ma(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Ea=Aa(function(t){return null==t?La:(va||(va=document.createElementNS("http://www.w3.org/2000/svg","g")),va.setAttribute("transform",t),(t=va.transform.baseVal.consolidate())?Ma((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):La)},", ",")",")");const Oa=function(t){return function(e,r){var i=t((e=ha(e)).h,(r=ha(r)).h),o=fa(e.c,r.c),a=fa(e.l,r.l),n=fa(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=o(t),e.l=a(t),e.opacity=n(t),e+""}}}(function(t,e){var r=e-t;return r?pa(t,r>180||r<-180?r-360*Math.round(r/360):r):ua(isNaN(t)?e:t)});var Da,Ia,qa=0,Pa=0,za=0,Wa=0,Ra=0,Na=0,ja="object"==typeof performance&&performance.now?performance:Date,Ha="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ua(){return Ra||(Ha(Ya),Ra=ja.now()+Na)}function Ya(){Ra=0}function Va(){this._call=this._time=this._next=null}function Xa(t,e,r){var i=new Va;return i.restart(t,e,r),i}function Ga(){Ra=(Wa=ja.now())+Na,qa=Pa=0;try{!function(){Ua(),++qa;for(var t,e=Da;e;)(t=Ra-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qa}()}finally{qa=0,function(){var t,e,r=Da,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Da=e);Ia=t,Qa(i)}(),Ra=0}}function Za(){var t=ja.now(),e=t-Wa;e>1e3&&(Na-=e,Wa=t)}function Qa(t){qa||(Pa&&(Pa=clearTimeout(Pa)),t-Ra>24?(t<1/0&&(Pa=setTimeout(Ga,t-ja.now()-Na)),za&&(za=clearInterval(za))):(za||(Wa=ja.now(),za=setInterval(Za,1e3)),qa=1,Ha(Ga)))}function Ka(t,e,r){var i=new Va;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Va.prototype=Xa.prototype={constructor:Va,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Ua():+r)+(null==e?0:+e),this._next||Ia===this||(Ia?Ia._next=this:Da=this,Ia=this),this._call=t,this._time=r,Qa()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qa())}};var Ja=Zr("start","end","cancel","interrupt"),tn=[];function en(t,e,r,i,o,a){var n=t.__transition;if(n){if(r in n)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function a(t){r.state=1,r.timer.restart(n,r.delay,r.time),r.delay<=t&&n(t-r.delay)}function n(a){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return Ka(n);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(Ka(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(a))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function s(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),a=-1,n=i.length;++a<n;)i[a].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=Xa(a,0,r.time)}(t,r,{name:e,index:i,group:o,on:Ja,tween:tn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function rn(t,e){var r=an(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function on(t,e){var r=an(t,e);if(r.state>3)throw new Error("too late; already running");return r}function an(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function nn(t,e){var r,i;return function(){var o=on(this,t),a=o.tween;if(a!==r)for(var n=0,s=(i=r=a).length;n<s;++n)if(i[n].name===e){(i=i.slice()).splice(n,1);break}o.tween=i}}function sn(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var a=on(this,t),n=a.tween;if(n!==i){o=(i=n).slice();for(var s={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=s;break}l===h&&o.push(s)}a.tween=o}}function ln(t,e,r){var i=t._id;return t.each(function(){var t=on(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return an(t,i).value[e]}}function hn(t,e){var r;return("number"==typeof e?ba:e instanceof $o?ya:(r=$o(e))?(e=r,ya):Ta)(t,e)}function cn(t){return function(){this.removeAttribute(t)}}function dn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function un(t,e,r){var i,o,a=r+"";return function(){var n=this.getAttribute(t);return n===a?null:n===i?o:o=e(i=n,r)}}function pn(t,e,r){var i,o,a=r+"";return function(){var n=this.getAttributeNS(t.space,t.local);return n===a?null:n===i?o:o=e(i=n,r)}}function gn(t,e,r){var i,o,a;return function(){var n,s,l=r(this);if(null!=l)return(n=this.getAttribute(t))===(s=l+"")?null:n===i&&s===o?a:(o=s,a=e(i=n,l));this.removeAttribute(t)}}function fn(t,e,r){var i,o,a;return function(){var n,s,l=r(this);if(null!=l)return(n=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:n===i&&s===o?a:(o=s,a=e(i=n,l));this.removeAttributeNS(t.space,t.local)}}function yn(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function mn(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function xn(t,e){return function(){rn(this,t).delay=+e.apply(this,arguments)}}function Cn(t,e){return e=+e,function(){rn(this,t).delay=e}}function bn(t,e){return function(){on(this,t).duration=+e.apply(this,arguments)}}function kn(t,e){return e=+e,function(){on(this,t).duration=e}}var wn=uo.prototype.constructor;function Sn(t){return function(){this.style.removeProperty(t)}}var Tn=0;function Bn(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function _n(){return++Tn}var vn=uo.prototype;Bn.prototype={constructor:Bn,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=si(t));for(var i=this._groups,o=i.length,a=new Array(o),n=0;n<o;++n)for(var s,l,h=i[n],c=h.length,d=a[n]=new Array(c),u=0;u<c;++u)(s=h[u])&&(l=t.call(s,s.__data__,u,h))&&("__data__"in s&&(l.__data__=s.__data__),d[u]=l,en(d[u],e,r,u,d,an(s,r)));return new Bn(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=hi(t));for(var i=this._groups,o=i.length,a=[],n=[],s=0;s<o;++s)for(var l,h=i[s],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=an(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&en(u,e,r,f,p,g);a.push(p),n.push(l)}return new Bn(a,n,e,r)},selectChild:vn.selectChild,selectChildren:vn.selectChildren,filter:function(t){"function"!=typeof t&&(t=di(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,n=e[o],s=n.length,l=i[o]=[],h=0;h<s;++h)(a=n[h])&&t.call(a,a.__data__,h,n)&&l.push(a);return new Bn(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),n=new Array(i),s=0;s<a;++s)for(var l,h=e[s],c=r[s],d=h.length,u=n[s]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;s<i;++s)n[s]=e[s];return new Bn(n,this._parents,this._name,this._id)},selection:function(){return new wn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=_n(),i=this._groups,o=i.length,a=0;a<o;++a)for(var n,s=i[a],l=s.length,h=0;h<l;++h)if(n=s[h]){var c=an(n,e);en(n,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Bn(i,this._parents,t,r)},call:vn.call,nodes:vn.nodes,node:vn.node,size:vn.size,empty:vn.empty,each:vn.each,on:function(t,e){var r=this._id;return arguments.length<2?an(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?rn:on;return function(){var n=a(this,t),s=n.on;s!==i&&(o=(i=s).copy()).on(e,r),n.on=o}}(r,t,e))},attr:function(t,e){var r=ri(t),i="transform"===r?Ea:hn;return this.attrTween(t,"function"==typeof e?(r.local?fn:gn)(r,i,ln(this,"attr."+t,e)):null==e?(r.local?dn:cn)(r):(r.local?pn:un)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=ri(t);return this.tween(r,(i.local?yn:mn)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?$a:hn;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var a=Oi(this,t),n=(this.style.removeProperty(t),Oi(this,t));return a===n?null:a===r&&n===i?o:o=e(r=a,i=n)}}(t,i)).on("end.style."+t,Sn(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,a;return function(){var n=Oi(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Oi(this,t)),n===l?null:n===i&&l===o?a:(o=l,a=e(i=n,s))}}(t,i,ln(this,"style."+t,e))).each(function(t,e){var r,i,o,a,n="style."+e,s="end."+n;return function(){var l=on(this,t),h=l.on,c=null==l.value[n]?a||(a=Sn(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(s,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,a=r+"";return function(){var n=Oi(this,t);return n===a?null:n===i?o:o=e(i=n,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function a(){var a=e.apply(this,arguments);return a!==o&&(i=(o=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ln(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=an(this.node(),r).tween,a=0,n=o.length;a<n;++a)if((i=o[a]).name===t)return i.value;return null}return this.each((null==e?nn:sn)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xn:Cn)(e,t)):an(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?bn:kn)(e,t)):an(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){on(this,t).ease=e}}(e,t)):an(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;on(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,n){var s={value:n},l={value:function(){0===--o&&a()}};r.each(function(){var r=on(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===o&&a()})},[Symbol.iterator]:vn[Symbol.iterator]};var Fn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ln(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}uo.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,o,a=t.__transition,n=!0;if(a){for(o in e=null==e?null:e+"",a)(r=a[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]):n=!1;n&&delete t.__transition}}(this,t)})},uo.prototype.transition=function(t){var e,r;t instanceof Bn?(e=t._id,t=t._name):(e=_n(),(r=Fn).time=Ua(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var n,s=i[a],l=s.length,h=0;h<l;++h)(n=s[h])&&en(n,t,e,h,s,r||Ln(n,e));return new Bn(i,this._parents,t,e)};const Mn=Math.PI,An=2*Mn,$n=1e-6,En=An-$n;function On(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Dn{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?On:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return On;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,e,r,i,o){if(t=+t,e=+e,r=+r,i=+i,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,s=r-t,l=i-e,h=a-t,c=n-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>$n)if(Math.abs(c*s-l*h)>$n&&o){let u=r-a,p=i-n,g=s*s+l*l,f=u*u+p*p,y=Math.sqrt(g),m=Math.sqrt(d),x=o*Math.tan((Mn-Math.acos((g+d-f)/(2*y*m)))/2),C=x/m,b=x/y;Math.abs(C-1)>$n&&this._append`L${t+C*h},${e+C*c}`,this._append`A${o},${o},0,0,${+(c*u>h*p)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,o,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let n=r*Math.cos(i),s=r*Math.sin(i),l=t+n,h=e+s,c=1^a,d=a?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>$n||Math.abs(this._y1-h)>$n)&&this._append`L${l},${h}`,r&&(d<0&&(d=d%An+An),d>En?this._append`A${r},${r},0,1,${c},${t-n},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>$n&&this._append`A${r},${r},0,${+(d>=Mn)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function In(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function qn(t){return(t=In(Math.abs(t)))?t[1]:NaN}var Pn,zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wn(t){if(!(e=zn.exec(t)))throw new Error("invalid format: "+t);var e;return new Rn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Rn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Nn(t,e){var r=In(t,e);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}Wn.prototype=Rn.prototype,Rn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const jn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nn(100*t,e),r:Nn,s:function(t,e){var r=In(t,e);if(!r)return Pn=void 0,t.toPrecision(e);var i=r[0],o=r[1],a=o-(Pn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,n=i.length;return a===n?i:a>n?i+new Array(a-n+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+In(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hn(t){return t}var Un,Yn,Vn,Xn=Array.prototype.map,Gn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zn(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Hn:(e=Xn.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var o=t.length,a=[],n=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(o-=s,o+s)),!((l+=s+1)>i));)s=e[n=(n+1)%e.length];return a.reverse().join(r)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",n=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Hn:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Xn.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t,e){var r=(t=Wn(t)).fill,d=t.align,u=t.sign,p=t.symbol,g=t.zero,f=t.width,y=t.comma,m=t.precision,x=t.trim,C=t.type;"n"===C?(y=!0,C="g"):jn[C]||(void 0===m&&(m=12),x=!0,C="g"),(g||"0"===r&&"="===d)&&(g=!0,r="0",d="=");var b=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),k=("$"===p?a:/[%p]/.test(C)?l:"")+(e&&void 0!==e.suffix?e.suffix:""),w=jn[C],S=/[defgprs%]/.test(C);function T(t){var e,o,a,l=b,p=k;if("c"===C)p=w(t)+p,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),m),x&&(t=function(t){t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),T&&0===+t&&"+"!==u&&(T=!1),l=(T?"("===u?u:h:"-"===u||"("===u?"":u)+l,p=("s"!==C||isNaN(t)||void 0===Pn?"":Gn[8+Pn/3])+p+(T&&"("===u?")":""),S)for(e=-1,o=t.length;++e<o;)if(48>(a=t.charCodeAt(e))||a>57){p=(46===a?n+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}y&&!g&&(t=i(t,1/0));var B=l.length+t.length+p.length,_=B<f?new Array(f-B+1).join(r):"";switch(y&&g&&(t=i(_+t,_.length?f-p.length:1/0),_=""),d){case"<":t=l+t+p+_;break;case"=":t=l+_+t+p;break;case"^":t=_.slice(0,B=_.length>>1)+l+t+p+_.slice(B);break;default:t=_+l+t+p}return s(t)}return m=void 0===m?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),T.toString=function(){return t+""},T}return{format:d,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(qn(e)/3))),i=Math.pow(10,-r),o=d(((t=Wn(t)).type="f",t),{suffix:Gn[8+r/3]});return function(t){return o(i*t)}}}}function Qn(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function Kn(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ts)):void 0===e&&(e=Jn);for(var r,i,o,a,n,s=new is(t),l=[s];r=l.pop();)if((o=e(r.data))&&(n=(o=Array.from(o)).length))for(r.children=o,a=n-1;a>=0;--a)l.push(i=o[a]=new is(o[a])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(rs)}function Jn(t){return t.children}function ts(t){return Array.isArray(t)?t[1]:null}function es(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function rs(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function is(t){this.data=t,this.depth=this.height=0,this.parent=null}function os(){return 0}function as(t){return function(){return t}}function ns(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ss(t,e,r,i,o){for(var a,n=t.children,s=-1,l=n.length,h=t.value&&(i-e)/t.value;++s<l;)(a=n[s]).y0=r,a.y1=o,a.x0=e,a.x1=e+=a.value*h}function ls(t,e,r,i,o){for(var a,n=t.children,s=-1,l=n.length,h=t.value&&(o-r)/t.value;++s<l;)(a=n[s]).x0=e,a.x1=i,a.y0=r,a.y1=r+=a.value*h}Un=Zn({thousands:",",grouping:[3],currency:["$",""]}),Yn=Un.format,Vn=Un.formatPrefix,is.prototype=Kn.prototype={constructor:is,count:function(){return this.eachAfter(Qn)},each:function(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this},eachAfter:function(t,e){for(var r,i,o,a=this,n=[a],s=[],l=-1;a=n.pop();)if(s.push(a),r=a.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var r,i,o=this,a=[o],n=-1;o=a.pop();)if(t.call(e,o,++n,this),r=o.children)for(i=r.length-1;i>=0;--i)a.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,o=i&&i.length;--o>=0;)r+=i[o].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),o=null;t=r.pop(),e=i.pop();for(;t===e;)o=t,t=r.pop(),e=i.pop();return o}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;t!==r;)i.splice(o,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return Kn(this).eachBefore(es)},[Symbol.iterator]:function*(){var t,e,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(yield o,e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length)}};const hs=function t(e){function r(t,r,i,o,a){!function(t,e,r,i,o,a){for(var n,s,l,h,c,d,u,p,g,f,y,m=[],x=e.children,C=0,b=0,k=x.length,w=e.value;C<k;){l=o-r,h=a-i;do{c=x[b++].value}while(!c&&b<k);for(d=u=c,y=c*c*(f=Math.max(h/l,l/h)/(w*t)),g=Math.max(u/y,y/d);b<k;++b){if(c+=s=x[b].value,s<d&&(d=s),s>u&&(u=s),y=c*c*f,(p=Math.max(u/y,y/d))>g){c-=s;break}g=p}m.push(n={value:c,dice:l<h,children:x.slice(C,b)}),n.dice?ss(n,r,i,o,w?i+=h*c/w:a):ls(n,r,i,w?r+=l*c/w:o,a),w-=c,C=b}}(e,t,r,i,o,a)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function cs(){var t=hs,e=!1,r=1,i=1,o=[0],a=os,n=os,s=os,l=os,h=os;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(d),o=[0],e&&t.eachBefore(ns),t}function d(e){var r=o[e.depth],i=e.x0+r,c=e.y0+r,d=e.x1-r,u=e.y1-r;d<i&&(i=d=(i+d)/2),u<c&&(c=u=(c+u)/2),e.x0=i,e.y0=c,e.x1=d,e.y1=u,e.children&&(r=o[e.depth+1]=a(e)/2,i+=h(e)-r,c+=n(e)-r,(d-=s(e)-r)<i&&(i=d=(i+d)/2),(u-=l(e)-r)<c&&(c=u=(c+u)/2),t(e,i,c,d,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw new Error;return t}(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:as(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(n="function"==typeof t?t:as(+t),c):n},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:as(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:as(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:as(+t),c):h},c}function ds(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const us=Symbol("implicit");function ps(){var t=new Fr,e=[],r=[],i=us;function o(o){let a=t.get(o);if(void 0===a){if(i!==us)return i;t.set(o,a=e.push(o)-1)}return r[a%r.length]}return o.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Fr;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(r=Array.from(t),o):r.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return ps(e,r).unknown(i)},ds.apply(o,arguments),o}function gs(){var t,e,r=ps().unknown(void 0),i=r.domain,o=r.range,a=0,n=1,s=!1,l=0,h=0,c=.5;function d(){var r=i().length,d=n<a,u=d?n:a,p=d?a:n;t=(p-u)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),u+=(p-u-t*(r-l))*c,e=t*(1-l),s&&(u=Math.round(u),e=Math.round(e));var g=function(t,e,r){t=+t,e=+e,r=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+r;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(o);++i<o;)a[i]=t+i*r;return a}(r).map(function(e){return u+t*e});return o(d?g.reverse():g)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),d()):i()},r.range=function(t){return arguments.length?([a,n]=t,a=+a,n=+n,d()):[a,n]},r.rangeRound=function(t){return[a,n]=t,a=+a,n=+n,s=!0,d()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,d()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),d()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,d()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},r.copy=function(){return gs(i(),[a,n]).round(s).paddingInner(l).paddingOuter(h).align(c)},ds.apply(d(),arguments)}function fs(t){return+t}var ys=[0,1];function ms(t){return t}function xs(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Cs(t,e,r){var i=t[0],o=t[1],a=e[0],n=e[1];return o<i?(i=xs(o,i),a=r(n,a)):(i=xs(i,o),a=r(a,n)),function(t){return a(i(t))}}function bs(t,e,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),n=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++n<i;)o[n]=xs(t[n],t[n+1]),a[n]=r(e[n],e[n+1]);return function(e){var r=vr(t,e,1,i)-1;return a[r](o[r](e))}}function ks(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ws(){var t,e,r,i,o,a,n=ys,s=ys,l=Ba,h=ms;function c(){var t=Math.min(n.length,s.length);return h!==ms&&(h=function(t,e){var r;return t>e&&(r=t,t=e,e=r),function(r){return Math.max(t,Math.min(e,r))}}(n[0],n[t-1])),i=t>2?bs:Cs,o=a=null,d}function d(e){return null==e||isNaN(e=+e)?r:(o||(o=i(n.map(t),s,l)))(t(h(e)))}return d.invert=function(r){return h(e((a||(a=i(s,n.map(t),ba)))(r)))},d.domain=function(t){return arguments.length?(n=Array.from(t,fs),c()):n.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),l=_a,c()},d.clamp=function(t){return arguments.length?(h=!!t||ms,c()):h!==ms},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(r=t,d):r},function(r,i){return t=r,e=i,c()}}function Ss(){return ws()(ms,ms)}function Ts(t,e,r,i){var o,a=Ir(t,e,r);switch((i=Wn(null==i?",f":i)).type){case"s":var n=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qn(e)/3)))-qn(Math.abs(t)))}(a,n))||(i.precision=o),Vn(i,n);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,qn(e)-qn(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=function(t){return Math.max(0,-qn(Math.abs(t)))}(a))||(i.precision=o-2*("%"===i.type))}return Yn(i)}function Bs(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[o,a,n]=i?Or(e,t,r):Or(t,e,r);if(!(a>=o))return[];const s=a-o+1,l=new Array(s);if(i)if(n<0)for(let h=0;h<s;++h)l[h]=(a-h)/-n;else for(let h=0;h<s;++h)l[h]=(a-h)*n;else if(n<0)for(let h=0;h<s;++h)l[h]=(o+h)/-n;else for(let h=0;h<s;++h)l[h]=(o+h)*n;return l}(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var i=e();return Ts(i[0],i[i.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var i,o,a=e(),n=0,s=a.length-1,l=a[n],h=a[s],c=10;for(h<l&&(o=l,l=h,h=o,o=n,n=s,s=o);c-- >0;){if((o=Dr(l,h,r))===i)return a[n]=l,a[s]=h,e(a);if(o>0)l=Math.floor(l/o)*o,h=Math.ceil(h/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,h=Math.floor(h*o)/o}i=o}return t},t}function _s(){var t=Ss();return t.copy=function(){return ks(t,_s())},ds.apply(t,arguments),Bs(t)}const vs=new Date,Fs=new Date;function Ls(t,e,r,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),o.round=t=>{const e=o(t),r=o.ceil(t);return t-e<r-t?e:r},o.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),o.range=(r,i,a)=>{const n=[];if(r=o.ceil(r),a=null==a?1:Math.floor(a),!(r<i&&a>0))return n;let s;do{n.push(s=new Date(+r)),e(r,a),t(r)}while(s<r&&r<i);return n},o.filter=r=>Ls(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(o.count=(e,i)=>(vs.setTime(+e),Fs.setTime(+i),t(vs),t(Fs),Math.floor(r(vs,Fs))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const Ms=Ls(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ms.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Ls(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ms:null),Ms.range;const As=1e3,$s=6e4,Es=36e5,Os=864e5,Ds=6048e5,Is=2592e6,qs=31536e6,Ps=Ls(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*As)},(t,e)=>(e-t)/As,t=>t.getUTCSeconds());Ps.range;const zs=Ls(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*As)},(t,e)=>{t.setTime(+t+e*$s)},(t,e)=>(e-t)/$s,t=>t.getMinutes());zs.range;const Ws=Ls(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*$s)},(t,e)=>(e-t)/$s,t=>t.getUTCMinutes());Ws.range;const Rs=Ls(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*As-t.getMinutes()*$s)},(t,e)=>{t.setTime(+t+e*Es)},(t,e)=>(e-t)/Es,t=>t.getHours());Rs.range;const Ns=Ls(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Es)},(t,e)=>(e-t)/Es,t=>t.getUTCHours());Ns.range;const js=Ls(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*$s)/Os,t=>t.getDate()-1);js.range;const Hs=Ls(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Os,t=>t.getUTCDate()-1);Hs.range;const Us=Ls(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Os,t=>Math.floor(t/Os));function Ys(t){return Ls(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*$s)/Ds)}Us.range;const Vs=Ys(0),Xs=Ys(1),Gs=Ys(2),Zs=Ys(3),Qs=Ys(4),Ks=Ys(5),Js=Ys(6);function tl(t){return Ls(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/Ds)}Vs.range,Xs.range,Gs.range,Zs.range,Qs.range,Ks.range,Js.range;const el=tl(0),rl=tl(1),il=tl(2),ol=tl(3),al=tl(4),nl=tl(5),sl=tl(6);el.range,rl.range,il.range,ol.range,al.range,nl.range,sl.range;const ll=Ls(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth());ll.range;const hl=Ls(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth());hl.range;const cl=Ls(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());cl.every=t=>isFinite(t=Math.floor(t))&&t>0?Ls(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null,cl.range;const dl=Ls(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());dl.every=t=>isFinite(t=Math.floor(t))&&t>0?Ls(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null,dl.range;const[ul,pl]=function(t,e,r,i,o,a){const n=[[Ps,1,As],[Ps,5,5e3],[Ps,15,15e3],[Ps,30,3e4],[a,1,$s],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,Es],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,Os],[i,2,1728e5],[r,1,Ds],[e,1,Is],[e,3,7776e6],[t,1,qs]];function s(e,r,i){const o=Math.abs(r-e)/i,a=Br(([,,t])=>t).right(n,o);if(a===n.length)return t.every(Ir(e/qs,r/qs,i));if(0===a)return Ms.every(Math.max(Ir(e,r,i),1));const[s,l]=n[o/n[a-1][2]<n[a][2]/o?a-1:a];return s.every(l)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const o=r&&"function"==typeof r.range?r:s(t,e,r),a=o?o.range(t,+e+1):[];return i?a.reverse():a},s]}(cl,ll,Vs,js,Rs,zs);function gl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function fl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function yl(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var ml,xl,Cl={"-":"",_:" ",0:"0"},bl=/^\s*\d+/,kl=/^%/,wl=/[\\^$*+?|[\]().{}]/g;function Sl(t,e,r){var i=t<0?"-":"",o=(i?-t:t)+"",a=o.length;return i+(a<r?new Array(r-a+1).join(e)+o:o)}function Tl(t){return t.replace(wl,"\\$&")}function Bl(t){return new RegExp("^(?:"+t.map(Tl).join("|")+")","i")}function _l(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function vl(t,e,r){var i=bl.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Fl(t,e,r){var i=bl.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Ll(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Ml(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Al(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function $l(t,e,r){var i=bl.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function El(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Ol(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Dl(t,e,r){var i=bl.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function Il(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function ql(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function Pl(t,e,r){var i=bl.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function zl(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function Wl(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Rl(t,e,r){var i=bl.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Nl(t,e,r){var i=bl.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function jl(t,e,r){var i=bl.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Hl(t,e,r){var i=kl.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Ul(t,e,r){var i=bl.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Yl(t,e,r){var i=bl.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Vl(t,e){return Sl(t.getDate(),e,2)}function Xl(t,e){return Sl(t.getHours(),e,2)}function Gl(t,e){return Sl(t.getHours()%12||12,e,2)}function Zl(t,e){return Sl(1+js.count(cl(t),t),e,3)}function Ql(t,e){return Sl(t.getMilliseconds(),e,3)}function Kl(t,e){return Ql(t,e)+"000"}function Jl(t,e){return Sl(t.getMonth()+1,e,2)}function th(t,e){return Sl(t.getMinutes(),e,2)}function eh(t,e){return Sl(t.getSeconds(),e,2)}function rh(t){var e=t.getDay();return 0===e?7:e}function ih(t,e){return Sl(Vs.count(cl(t)-1,t),e,2)}function oh(t){var e=t.getDay();return e>=4||0===e?Qs(t):Qs.ceil(t)}function ah(t,e){return t=oh(t),Sl(Qs.count(cl(t),t)+(4===cl(t).getDay()),e,2)}function nh(t){return t.getDay()}function sh(t,e){return Sl(Xs.count(cl(t)-1,t),e,2)}function lh(t,e){return Sl(t.getFullYear()%100,e,2)}function hh(t,e){return Sl((t=oh(t)).getFullYear()%100,e,2)}function ch(t,e){return Sl(t.getFullYear()%1e4,e,4)}function dh(t,e){var r=t.getDay();return Sl((t=r>=4||0===r?Qs(t):Qs.ceil(t)).getFullYear()%1e4,e,4)}function uh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sl(e/60|0,"0",2)+Sl(e%60,"0",2)}function ph(t,e){return Sl(t.getUTCDate(),e,2)}function gh(t,e){return Sl(t.getUTCHours(),e,2)}function fh(t,e){return Sl(t.getUTCHours()%12||12,e,2)}function yh(t,e){return Sl(1+Hs.count(dl(t),t),e,3)}function mh(t,e){return Sl(t.getUTCMilliseconds(),e,3)}function xh(t,e){return mh(t,e)+"000"}function Ch(t,e){return Sl(t.getUTCMonth()+1,e,2)}function bh(t,e){return Sl(t.getUTCMinutes(),e,2)}function kh(t,e){return Sl(t.getUTCSeconds(),e,2)}function wh(t){var e=t.getUTCDay();return 0===e?7:e}function Sh(t,e){return Sl(el.count(dl(t)-1,t),e,2)}function Th(t){var e=t.getUTCDay();return e>=4||0===e?al(t):al.ceil(t)}function Bh(t,e){return t=Th(t),Sl(al.count(dl(t),t)+(4===dl(t).getUTCDay()),e,2)}function _h(t){return t.getUTCDay()}function vh(t,e){return Sl(rl.count(dl(t)-1,t),e,2)}function Fh(t,e){return Sl(t.getUTCFullYear()%100,e,2)}function Lh(t,e){return Sl((t=Th(t)).getUTCFullYear()%100,e,2)}function Mh(t,e){return Sl(t.getUTCFullYear()%1e4,e,4)}function Ah(t,e){var r=t.getUTCDay();return Sl((t=r>=4||0===r?al(t):al.ceil(t)).getUTCFullYear()%1e4,e,4)}function $h(){return"+0000"}function Eh(){return"%"}function Oh(t){return+t}function Dh(t){return Math.floor(+t/1e3)}function Ih(t){return new Date(t)}function qh(t){return t instanceof Date?+t:+new Date(+t)}function Ph(t,e,r,i,o,a,n,s,l,h){var c=Ss(),d=c.invert,u=c.domain,p=h(".%L"),g=h(":%S"),f=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),C=h("%B"),b=h("%Y");function k(t){return(l(t)<t?p:s(t)<t?g:n(t)<t?f:a(t)<t?y:i(t)<t?o(t)<t?m:x:r(t)<t?C:b)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?u(Array.from(t,qh)):u().map(Ih)},c.ticks=function(e){var r=u();return t(r[0],r[r.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?k:h(e)},c.nice=function(t){var r=u();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?u(function(t,e){var r,i=0,o=(t=t.slice()).length-1,a=t[i],n=t[o];return n<a&&(r=i,i=o,o=r,r=a,a=n,n=r),t[i]=e.floor(a),t[o]=e.ceil(n),t}(r,t)):c},c.copy=function(){return ks(c,Ph(t,e,r,i,o,a,n,s,l,h))},c}function zh(){return ds.apply(Ph(ul,pl,cl,ll,Vs,js,Rs,zs,Ps,xl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){ml=function(t){var e=t.dateTime,r=t.date,i=t.time,o=t.periods,a=t.days,n=t.shortDays,s=t.months,l=t.shortMonths,h=Bl(o),c=_l(o),d=Bl(a),u=_l(a),p=Bl(n),g=_l(n),f=Bl(s),y=_l(s),m=Bl(l),x=_l(l),C={a:function(t){return n[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Vl,e:Vl,f:Kl,g:hh,G:dh,H:Xl,I:Gl,j:Zl,L:Ql,m:Jl,M:th,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Oh,s:Dh,S:eh,u:rh,U:ih,V:ah,w:nh,W:sh,x:null,X:null,y:lh,Y:ch,Z:uh,"%":Eh},b={a:function(t){return n[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ph,e:ph,f:xh,g:Lh,G:Ah,H:gh,I:fh,j:yh,L:mh,m:Ch,M:bh,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Oh,s:Dh,S:kh,u:wh,U:Sh,V:Bh,w:_h,W:vh,x:null,X:null,y:Fh,Y:Mh,Z:$h,"%":Eh},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=g.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=d.exec(e.slice(r));return i?(t.w=u.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return T(t,e,r,i)},d:ql,e:ql,f:jl,g:El,G:$l,H:zl,I:zl,j:Pl,L:Nl,m:Il,M:Wl,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:Dl,Q:Ul,s:Yl,S:Rl,u:Fl,U:Ll,V:Ml,w:vl,W:Al,x:function(t,e,i){return T(t,r,e,i)},X:function(t,e,r){return T(t,i,e,r)},y:El,Y:$l,Z:Ol,"%":Hl};function w(t,e){return function(r){var i,o,a,n=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(n.push(t.slice(l,s)),null!=(o=Cl[i=t.charAt(++s)])?i=t.charAt(++s):o="e"===i?" ":"0",(a=e[i])&&(i=a(r,o)),n.push(i),l=s+1);return n.push(t.slice(l,s)),n.join("")}}function S(t,e){return function(r){var i,o,a=yl(1900,void 0,1);if(T(a,t,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(o=(i=fl(yl(a.y,0,1))).getUTCDay(),i=o>4||0===o?rl.ceil(i):rl(i),i=Hs.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(o=(i=gl(yl(a.y,0,1))).getDay(),i=o>4||0===o?Xs.ceil(i):Xs(i),i=js.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?fl(yl(a.y,0,1)).getUTCDay():gl(yl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,fl(a)):gl(a)}}function T(t,e,r,i){for(var o,a,n=0,s=e.length,l=r.length;n<s;){if(i>=l)return-1;if(37===(o=e.charCodeAt(n++))){if(o=e.charAt(n++),!(a=k[o in Cl?e.charAt(n++):o])||(i=a(t,r,i))<0)return-1}else if(o!=r.charCodeAt(i++))return-1}return i}return C.x=w(r,C),C.X=w(i,C),C.c=w(e,C),b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),{format:function(t){var e=w(t+="",C);return e.toString=function(){return t},e},parse:function(t){var e=S(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=S(t+="",!0);return e.toString=function(){return t},e}}}(t),xl=ml.format,ml.parse,ml.utcFormat,ml.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Wh=function(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Rh(t){return function(){return t}}const Nh=Math.abs,jh=Math.atan2,Hh=Math.cos,Uh=Math.max,Yh=Math.min,Vh=Math.sin,Xh=Math.sqrt,Gh=1e-12,Zh=Math.PI,Qh=Zh/2,Kh=2*Zh;function Jh(t){return t>=1?Qh:t<=-1?-Qh:Math.asin(t)}function tc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Dn(e)}function ec(t){return t.innerRadius}function rc(t){return t.outerRadius}function ic(t){return t.startAngle}function oc(t){return t.endAngle}function ac(t){return t&&t.padAngle}function nc(t,e,r,i,o,a,n){var s=t-r,l=e-i,h=(n?a:-a)/Xh(s*s+l*l),c=h*l,d=-h*s,u=t+c,p=e+d,g=r+c,f=i+d,y=(u+g)/2,m=(p+f)/2,x=g-u,C=f-p,b=x*x+C*C,k=o-a,w=u*f-g*p,S=(C<0?-1:1)*Xh(Uh(0,k*k*b-w*w)),T=(w*C-x*S)/b,B=(-w*x-C*S)/b,_=(w*C+x*S)/b,v=(-w*x+C*S)/b,F=T-y,L=B-m,M=_-y,A=v-m;return F*F+L*L>M*M+A*A&&(T=_,B=v),{cx:T,cy:B,x01:-c,y01:-d,x11:T*(o/k-1),y11:B*(o/k-1)}}function sc(){var t=ec,e=rc,r=Rh(0),i=null,o=ic,a=oc,n=ac,s=null,l=tc(h);function h(){var h,c,d=+t.apply(this,arguments),u=+e.apply(this,arguments),p=o.apply(this,arguments)-Qh,g=a.apply(this,arguments)-Qh,f=Nh(g-p),y=g>p;if(s||(s=h=l()),u<d&&(c=u,u=d,d=c),u>Gh)if(f>Kh-Gh)s.moveTo(u*Hh(p),u*Vh(p)),s.arc(0,0,u,p,g,!y),d>Gh&&(s.moveTo(d*Hh(g),d*Vh(g)),s.arc(0,0,d,g,p,y));else{var m,x,C=p,b=g,k=p,w=g,S=f,T=f,B=n.apply(this,arguments)/2,_=B>Gh&&(i?+i.apply(this,arguments):Xh(d*d+u*u)),v=Yh(Nh(u-d)/2,+r.apply(this,arguments)),F=v,L=v;if(_>Gh){var M=Jh(_/d*Vh(B)),A=Jh(_/u*Vh(B));(S-=2*M)>Gh?(k+=M*=y?1:-1,w-=M):(S=0,k=w=(p+g)/2),(T-=2*A)>Gh?(C+=A*=y?1:-1,b-=A):(T=0,C=b=(p+g)/2)}var $=u*Hh(C),E=u*Vh(C),O=d*Hh(w),D=d*Vh(w);if(v>Gh){var I,q=u*Hh(b),P=u*Vh(b),z=d*Hh(k),W=d*Vh(k);if(f<Zh)if(I=function(t,e,r,i,o,a,n,s){var l=r-t,h=i-e,c=n-o,d=s-a,u=d*l-c*h;if(!(u*u<Gh))return[t+(u=(c*(e-a)-d*(t-o))/u)*l,e+u*h]}($,E,z,W,q,P,O,D)){var R=$-I[0],N=E-I[1],j=q-I[0],H=P-I[1],U=1/Vh(function(t){return t>1?0:t<-1?Zh:Math.acos(t)}((R*j+N*H)/(Xh(R*R+N*N)*Xh(j*j+H*H)))/2),Y=Xh(I[0]*I[0]+I[1]*I[1]);F=Yh(v,(d-Y)/(U-1)),L=Yh(v,(u-Y)/(U+1))}else F=L=0}T>Gh?L>Gh?(m=nc(z,W,$,E,u,L,y),x=nc(q,P,O,D,u,L,y),s.moveTo(m.cx+m.x01,m.cy+m.y01),L<v?s.arc(m.cx,m.cy,L,jh(m.y01,m.x01),jh(x.y01,x.x01),!y):(s.arc(m.cx,m.cy,L,jh(m.y01,m.x01),jh(m.y11,m.x11),!y),s.arc(0,0,u,jh(m.cy+m.y11,m.cx+m.x11),jh(x.cy+x.y11,x.cx+x.x11),!y),s.arc(x.cx,x.cy,L,jh(x.y11,x.x11),jh(x.y01,x.x01),!y))):(s.moveTo($,E),s.arc(0,0,u,C,b,!y)):s.moveTo($,E),d>Gh&&S>Gh?F>Gh?(m=nc(O,D,q,P,d,-F,y),x=nc($,E,z,W,d,-F,y),s.lineTo(m.cx+m.x01,m.cy+m.y01),F<v?s.arc(m.cx,m.cy,F,jh(m.y01,m.x01),jh(x.y01,x.x01),!y):(s.arc(m.cx,m.cy,F,jh(m.y01,m.x01),jh(m.y11,m.x11),!y),s.arc(0,0,d,jh(m.cy+m.y11,m.cx+m.x11),jh(x.cy+x.y11,x.cx+x.x11),y),s.arc(x.cx,x.cy,F,jh(x.y11,x.x11),jh(x.y01,x.x01),!y))):s.arc(0,0,d,w,k,y):s.lineTo(O,D)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Zh/2;return[Hh(i)*r,Vh(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Rh(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Rh(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:Rh(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Rh(+t),h):i},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Rh(+t),h):o},h.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Rh(+t),h):a},h.padAngle=function(t){return arguments.length?(n="function"==typeof t?t:Rh(+t),h):n},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}function lc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function hc(t){this._context=t}function cc(t){return new hc(t)}function dc(t){return t[0]}function uc(t){return t[1]}function pc(t,e){var r=Rh(!0),i=null,o=cc,a=null,n=tc(s);function s(s){var l,h,c,d=(s=lc(s)).length,u=!1;for(null==i&&(a=o(c=n())),l=0;l<=d;++l)!(l<d&&r(h=s[l],l,s))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+t(h,l,s),+e(h,l,s));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?dc:Rh(t),e="function"==typeof e?e:void 0===e?uc:Rh(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Rh(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Rh(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Rh(!!t),s):r},s.curve=function(t){return arguments.length?(o=t,null!=i&&(a=o(i)),s):o},s.context=function(t){return arguments.length?(null==t?i=a=null:a=o(i=t),s):i},s}function gc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function fc(t){return t}function yc(){var t=fc,e=gc,r=null,i=Rh(0),o=Rh(Kh),a=Rh(0);function n(n){var s,l,h,c,d,u=(n=lc(n)).length,p=0,g=new Array(u),f=new Array(u),y=+i.apply(this,arguments),m=Math.min(Kh,Math.max(-Kh,o.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/u,a.apply(this,arguments)),C=x*(m<0?-1:1);for(s=0;s<u;++s)(d=f[g[s]=s]=+t(n[s],s,n))>0&&(p+=d);for(null!=e?g.sort(function(t,r){return e(f[t],f[r])}):null!=r&&g.sort(function(t,e){return r(n[t],n[e])}),s=0,h=p?(m-u*C)/p:0;s<u;++s,y=c)l=g[s],c=y+((d=f[l])>0?d*h:0)+C,f[l]={data:n[l],index:s,value:d,startAngle:y,endAngle:c,padAngle:x};return f}return n.value=function(e){return arguments.length?(t="function"==typeof e?e:Rh(+e),n):t},n.sortValues=function(t){return arguments.length?(e=t,r=null,n):e},n.sort=function(t){return arguments.length?(r=t,e=null,n):r},n.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Rh(+t),n):i},n.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Rh(+t),n):o},n.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Rh(+t),n):a},n}hc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};class mc{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function xc(t){return new mc(t,!0)}function Cc(t){return new mc(t,!1)}function bc(){}function kc(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function wc(t){this._context=t}function Sc(t){return new wc(t)}function Tc(t){this._context=t}function Bc(t){this._context=t}function _c(t,e){this._basis=new wc(t),this._beta=e}wc.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:kc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:kc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Tc.prototype={areaStart:bc,areaEnd:bc,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:kc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Bc.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:kc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_c.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],a=e[0],n=t[r]-o,s=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*n),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const vc=function t(e){function r(t){return 1===e?new wc(t):new _c(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Fc(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Lc(t,e){this._context=t,this._k=(1-e)/6}Lc.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:Fc(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Fc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mc=function t(e){function r(t){return new Lc(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ac(t,e){this._context=t,this._k=(1-e)/6}Ac.prototype={areaStart:bc,areaEnd:bc,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $c=function t(e){function r(t){return new Ac(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ec(t,e){this._context=t,this._k=(1-e)/6}Ec.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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:Fc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Oc=function t(e){function r(t){return new Ec(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Dc(t,e,r){var i=t._x1,o=t._y1,a=t._x2,n=t._y2;if(t._l01_a>Gh){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Gh){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,n=(n*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,o,a,n,t._x2,t._y2)}function Ic(t,e){this._context=t,this._alpha=e}Ic.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Dc(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qc=function t(e){function r(t){return e?new Ic(t,e):new Lc(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Pc(t,e){this._context=t,this._alpha=e}Pc.prototype={areaStart:bc,areaEnd:bc,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Dc(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zc=function t(e){function r(t){return e?new Pc(t,e):new Ac(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Wc(t,e){this._context=t,this._alpha=e}Wc.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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:Dc(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rc=function t(e){function r(t){return e?new Wc(t,e):new Ec(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Nc(t){this._context=t}function jc(t){return t<0?-1:1}function Hc(t,e,r){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),n=(r-t._y1)/(o||i<0&&-0),s=(a*o+n*i)/(i+o);return(jc(a)+jc(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(s))||0}function Uc(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Yc(t,e,r){var i=t._x0,o=t._y0,a=t._x1,n=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,o+s*e,a-s,n-s*r,a,n)}function Vc(t){this._context=t}function Xc(t){this._context=new Gc(t)}function Gc(t){this._context=t}function Zc(t){return new Vc(t)}function Qc(t){return new Xc(t)}function Kc(t){this._context=t}function Jc(t){var e,r,i=t.length-1,o=new Array(i),a=new Array(i),n=new Array(i);for(o[0]=0,a[0]=2,n[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,a[e]=4,n[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,a[i-1]=7,n[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/a[e-1],a[e]-=r,n[e]-=r*n[e-1];for(o[i-1]=n[i-1]/a[i-1],e=i-2;e>=0;--e)o[e]=(n[e]-o[e+1])/a[e];for(a[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-o[e+1];return[o,a]}function td(t){return new Kc(t)}function ed(t,e){this._context=t,this._t=e}function rd(t){return new ed(t,.5)}function id(t){return new ed(t,0)}function od(t){return new ed(t,1)}function ad(t,e,r){this.k=t,this.x=e,this.y=r}Nc.prototype={areaStart:bc,areaEnd:bc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Vc.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:Yc(this,this._t0,Uc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Yc(this,Uc(this,r=Hc(this,t,e)),r);break;default:Yc(this,this._t0,r=Hc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Xc.prototype=Object.create(Vc.prototype)).point=function(t,e){Vc.prototype.point.call(this,e,t)},Gc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,a){this._context.bezierCurveTo(e,t,i,r,a,o)}},Kc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Jc(t),o=Jc(e),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],o[0][a],i[1][a],o[1][a],t[n],e[n]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},ed.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},ad.prototype={constructor:ad,scale:function(t){return 1===t?this:new ad(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ad(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ad.prototype;var nd=s(t=>{const{securityLevel:e}=pr();let r=po("body");if("sandbox"===e){const e=po(`#i${t}`);r=po((e.node()?.contentDocument??document).body)}return r.select(`#${t}`)},"selectSvgElement");function sd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}s(sd,"getDefaultExportFromCjs");var ld,hd,cd,dd,ud,pd,gd,fd,yd,md,xd,Cd,bd,kd,wd,Sd,Td,Bd,_d,vd,Fd,Ld,Md,Ad,$d,Ed,Od,Dd,Id,qd,Pd,zd,Wd,Rd,Nd,jd,Hd,Ud,Yd,Vd,Xd,Gd,Zd,Qd,Kd={},Jd={},tu={};function eu(){if(ld)return tu;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function i(t,e){if(e){const r=Object.keys(e);for(let i=0,o=r.length;i<o;i+=1){const o=r[i];t[o]=e[o]}}return t}function o(t,e){let r="";for(let i=0;i<e;i+=1)r+=t;return r}function a(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}return ld=1,s(t,"isNothing"),s(e,"isObject"),s(r,"toArray"),s(i,"extend"),s(o,"repeat"),s(a,"isNegativeZero"),tu.isNothing=t,tu.isObject=e,tu.toArray=r,tu.repeat=o,tu.isNegativeZero=a,tu.extend=i,tu}function ru(){if(cd)return hd;function t(t,e){let r="";const i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function e(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return cd=1,s(t,"formatError"),s(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=s(function(e){return this.name+": "+t(this,e)},"toString"),hd=e}function iu(){if(ud)return dd;ud=1;const t=eu();function e(t,e,r,i,o){let a="",n="";const s=Math.floor(o/2)-1;return i-e>s&&(a=" ... ",e=i-s+a.length),r-i>s&&(n=" ...",r=i+s-n.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+n,pos:i-e+a.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function i(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],s=[];let l,h=-1;for(;l=a.exec(i.buffer);)s.push(l.index),n.push(l.index+l[0].length),i.position<=l.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let c="";const d=Math.min(i.line+o.linesAfter,s.length).toString().length,u=o.maxLength-(o.indent+d+3);for(let g=1;g<=o.linesBefore&&!(h-g<0);g++){const a=e(i.buffer,n[h-g],s[h-g],i.position-(n[h]-n[h-g]),u);c=t.repeat(" ",o.indent)+r((i.line-g+1).toString(),d)+" | "+a.str+"\n"+c}const p=e(i.buffer,n[h],s[h],i.position,u);c+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+p.str+"\n",c+=t.repeat("-",o.indent+d+3+p.pos)+"^\n";for(let g=1;g<=o.linesAfter&&!(h+g>=s.length);g++){const a=e(i.buffer,n[h+g],s[h+g],i.position-(n[h]-n[h+g]),u);c+=t.repeat(" ",o.indent)+r((i.line+g+1).toString(),d)+" | "+a.str+"\n"}return c.replace(/\n$/,"")}return s(e,"getLine"),s(r,"padStart"),s(i,"makeSnippet"),dd=i}function ou(){if(gd)return pd;gd=1;const t=ru(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(t){const e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function o(o,a){if(a=a||{},Object.keys(a).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(t){return t},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return s(i,"compileStyleAliases"),s(o,"Type2"),pd=o}function au(){if(yd)return fd;yd=1;const t=ru(),e=ou();function r(t,e){const r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function i(){const t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}s(e,"collectType");for(let r=0,i=arguments.length;r<i;r+=1)arguments[r].forEach(e);return t}function o(t){return this.extend(t)}return s(r,"compileList"),s(i,"compileMap"),s(o,"Schema2"),o.prototype.extend=s(function(a){let n=[],s=[];if(a instanceof e)s.push(a);else if(Array.isArray(a))s=s.concat(a);else{if(!a||!Array.isArray(a.implicit)&&!Array.isArray(a.explicit))throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(s=s.concat(a.explicit))}n.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),s.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const l=Object.create(o.prototype);return l.implicit=(this.implicit||[]).concat(n),l.explicit=(this.explicit||[]).concat(s),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=i(l.compiledImplicit,l.compiledExplicit),l},"extend"),fd=o}function nu(){if(xd)return md;xd=1;const t=ou();return md=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:s(function(t){return null!==t?t:""},"construct")})}function su(){if(bd)return Cd;bd=1;const t=ou();return Cd=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:s(function(t){return null!==t?t:[]},"construct")})}function lu(){if(wd)return kd;wd=1;const t=ou();return kd=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:s(function(t){return null!==t?t:{}},"construct")})}function hu(){if(Td)return Sd;Td=1;const t=au();return Sd=new t({explicit:[nu(),su(),lu()]})}function cu(){if(_d)return Bd;_d=1;const t=ou();function e(t){if(null===t)return!0;const e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function i(t){return null===t}return s(e,"resolveYamlNull"),s(r,"constructYamlNull"),s(i,"isNull"),Bd=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:i,represent:{canonical:s(function(){return"~"},"canonical"),lowercase:s(function(){return"null"},"lowercase"),uppercase:s(function(){return"NULL"},"uppercase"),camelcase:s(function(){return"Null"},"camelcase"),empty:s(function(){return""},"empty")},defaultStyle:"lowercase"})}function du(){if(Fd)return vd;Fd=1;const t=ou();function e(t){if(null===t)return!1;const e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function i(t){return"[object Boolean]"===Object.prototype.toString.call(t)}return s(e,"resolveYamlBoolean"),s(r,"constructYamlBoolean"),s(i,"isBoolean"),vd=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:i,represent:{lowercase:s(function(t){return t?"true":"false"},"lowercase"),uppercase:s(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:s(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),vd}function uu(){if(Md)return Ld;Md=1;const t=eu(),e=ou();function r(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function i(t){return t>=48&&t<=55}function o(t){return t>=48&&t<=57}function a(t){if(null===t)return!1;const e=t.length;let a=0,s=!1;if(!e)return!1;let l=t[a];if("-"!==l&&"+"!==l||(l=t[++a]),"0"===l){if(a+1===e)return!0;if(l=t[++a],"b"===l){for(a++;a<e;a++){if(l=t[a],"0"!==l&&"1"!==l)return!1;s=!0}return s&&isFinite(n(t))}if("x"===l){for(a++;a<e;a++){if(!r(t.charCodeAt(a)))return!1;s=!0}return s&&isFinite(n(t))}if("o"===l){for(a++;a<e;a++){if(!i(t.charCodeAt(a)))return!1;s=!0}return s&&isFinite(n(t))}}for(;a<e;a++){if(!o(t.charCodeAt(a)))return!1;s=!0}return!!s&&isFinite(n(t))}function n(t){let e=t,r=1,i=e[0];if("-"!==i&&"+"!==i||("-"===i&&(r=-1),e=e.slice(1),i=e[0]),"0"===e)return 0;if("0"===i){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function l(t){return n(t)}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!t.isNegativeZero(e)}return s(r,"isHexCode"),s(i,"isOctCode"),s(o,"isDecCode"),s(a,"resolveYamlInteger"),s(n,"parseYamlInteger"),s(l,"constructYamlInteger"),s(h,"isInteger"),Ld=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:h,represent:{binary:s(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:s(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:s(function(t){return t.toString(10)},"decimal"),hexadecimal:s(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function pu(){if($d)return Ad;$d=1;const t=eu(),e=ou(),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 o(t){return null!==t&&(!!r.test(t)&&(!!isFinite(parseFloat(t,10))||i.test(t)))}function a(t){let e=t.toLowerCase();const r="-"===e[0]?-1:1;return"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}s(o,"resolveYamlFloat"),s(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function l(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";const i=e.toString(10);return n.test(i)?i.replace("e",".e"):i}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return s(l,"representYamlFloat"),s(h,"isFloat"),Ad=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:h,represent:l,defaultStyle:"lowercase"})}function gu(){return Od?Ed:(Od=1,Ed=hu().extend({implicit:[cu(),du(),uu(),pu()]}))}function fu(){return Id?Dd:(Id=1,Dd=gu())}function yu(){if(Pd)return qd;Pd=1;const t=ou(),e=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(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function o(t){let i=0,o=null,a=e.exec(t);if(null===a&&(a=r.exec(t)),null===a)throw new Error("Date resolve error");const n=+a[1],s=+a[2]-1,l=+a[3];if(!a[4])return new Date(Date.UTC(n,s,l));const h=+a[4],c=+a[5],d=+a[6];if(a[7]){for(i=a[7].slice(0,3);i.length<3;)i+="0";i=+i}if(a[9]){o=6e4*(60*+a[10]+ +(a[11]||0)),"-"===a[9]&&(o=-o)}const u=new Date(Date.UTC(n,s,l,h,c,d,i));return o&&u.setTime(u.getTime()-o),u}function a(t){return t.toISOString()}return s(i,"resolveYamlTimestamp"),s(o,"constructYamlTimestamp"),s(a,"representYamlTimestamp"),qd=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:o,instanceOf:Date,represent:a})}function mu(){if(Wd)return zd;Wd=1;const t=ou();function e(t){return"<<"===t||null===t}return s(e,"resolveYamlMerge"),zd=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function xu(){if(Nd)return Rd;Nd=1;const t=ou(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0;const i=t.length,o=e;for(let e=0;e<i;e++){const i=o.indexOf(t.charAt(e));if(!(i>64)){if(i<0)return!1;r+=6}}return r%8==0}function i(t){const r=t.replace(/[\r\n=]/g,""),i=r.length,o=e;let a=0;const n=[];for(let e=0;e<i;e++)e%4==0&&e&&(n.push(a>>16&255),n.push(a>>8&255),n.push(255&a)),a=a<<6|o.indexOf(r.charAt(e));const s=i%4*6;return 0===s?(n.push(a>>16&255),n.push(a>>8&255),n.push(255&a)):18===s?(n.push(a>>10&255),n.push(a>>2&255)):12===s&&n.push(a>>4&255),new Uint8Array(n)}function o(t){let r="",i=0;const o=t.length,a=e;for(let e=0;e<o;e++)e%3==0&&e&&(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+t[e];const n=o%3;return 0===n?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function a(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return s(r,"resolveYamlBinary"),s(i,"constructYamlBinary"),s(o,"representYamlBinary"),s(a,"isBinary"),Rd=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})}function Cu(){if(Hd)return jd;Hd=1;const t=ou(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(t){if(null===t)return!0;const i=[],o=t;for(let a=0,n=o.length;a<n;a+=1){const t=o[a];let n,s=!1;if("[object Object]"!==r.call(t))return!1;for(n in t)if(e.call(t,n)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==i.indexOf(n))return!1;i.push(n)}return!0}function o(t){return null!==t?t:[]}return s(i,"resolveYamlOmap"),s(o,"constructYamlOmap"),jd=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:o})}function bu(){if(Yd)return Ud;Yd=1;const t=ou(),e=Object.prototype.toString;function r(t){if(null===t)return!0;const r=t,i=new Array(r.length);for(let o=0,a=r.length;o<a;o+=1){const t=r[o];if("[object Object]"!==e.call(t))return!1;const a=Object.keys(t);if(1!==a.length)return!1;i[o]=[a[0],t[a[0]]]}return!0}function i(t){if(null===t)return[];const e=t,r=new Array(e.length);for(let i=0,o=e.length;i<o;i+=1){const t=e[i],o=Object.keys(t);r[i]=[o[0],t[o[0]]]}return r}return s(r,"resolveYamlPairs"),s(i,"constructYamlPairs"),Ud=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})}function ku(){if(Xd)return Vd;Xd=1;const t=ou(),e=Object.prototype.hasOwnProperty;function r(t){if(null===t)return!0;const r=t;for(const i in r)if(e.call(r,i)&&null!==r[i])return!1;return!0}function i(t){return null!==t?t:{}}return s(r,"resolveYamlSet"),s(i,"constructYamlSet"),Vd=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})}function wu(){return Zd?Gd:(Zd=1,Gd=fu().extend({implicit:[yu(),mu()],explicit:[xu(),Cu(),bu(),ku()]}))}function Su(){if(Qd)return Jd;Qd=1;const t=eu(),e=ru(),r=iu(),i=wu(),o=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=/[\x85\u2028\u2029]/,l=/[,\[\]{}]/,h=/^(?:!|!!|![0-9A-Za-z-]+!)$/,c=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function u(t){return 10===t||13===t}function p(t){return 9===t||32===t}function g(t){return 9===t||32===t||10===t||13===t}function f(t){return 44===t||91===t||93===t||123===t||125===t}function y(t){if(t>=48&&t<=57)return t-48;const e=32|t;return e>=97&&e<=102?e-97+10:-1}function m(t){return 120===t?2:117===t?4:85===t?8:0}function x(t){return t>=48&&t<=57?t-48:-1}function C(t){switch(t){case 48:return"\0";case 97:return"";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"";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""}}function b(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function k(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}s(d,"_class"),s(u,"isEol"),s(p,"isWhiteSpace"),s(g,"isWsOrEol"),s(f,"isFlowIndicator"),s(y,"fromHexCode"),s(m,"escapedHexLen"),s(x,"fromDecimalCode"),s(C,"simpleEscapeSequence"),s(b,"charFromCodepoint"),s(k,"setProperty");const w=new Array(256),S=new Array(256);for(let s=0;s<256;s++)w[s]=C(s)?1:0,S[s]=C(s);function T(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||i,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.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=[]}function B(t,i){const o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=r(o),new e(i,o)}function _(t,e){throw B(t,e)}function v(t,e){t.onWarning&&t.onWarning.call(null,B(t,e))}function F(t,e,r){const i=t.anchorMapTransactions;if(0!==i.length){const r=i[i.length-1];o.call(r,e)||(r[e]={existed:o.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function L(t){t.anchorMapTransactions.push(Object.create(null))}function M(t){const e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;const i=r[r.length-1],a=Object.keys(e);for(let n=0,s=a.length;n<s;n+=1){const t=a[n];o.call(i,t)||(i[t]=e[t])}}function A(t){const e=t.anchorMapTransactions.pop(),r=Object.keys(e);for(let i=r.length-1;i>=0;i-=1){const o=e[r[i]];o.existed?t.anchorMap[r[i]]=o.value:delete t.anchorMap[r[i]]}}function $(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function E(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}s(T,"State"),s(B,"generateError"),s(_,"throwError"),s(v,"throwWarning"),s(F,"storeAnchor"),s(L,"beginAnchorTransaction"),s(M,"commitAnchorTransaction"),s(A,"rollbackAnchorTransaction"),s($,"snapshotState"),s(E,"restoreState");const O={YAML:s(function(t,e,r){null!==t.version&&_(t,"duplication of %YAML directive"),1!==r.length&&_(t,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&_(t,"ill-formed argument of the YAML directive");const o=parseInt(i[1],10),a=parseInt(i[2],10);1!==o&&_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&v(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,e,r){let i;2!==r.length&&_(t,"TAG directive accepts exactly two arguments");const a=r[0];i=r[1],h.test(a)||_(t,"ill-formed tag handle (first argument) of the TAG directive"),o.call(t.tagMap,a)&&_(t,'there is a previously declared suffix for "'+a+'" tag handle'),c.test(i)||_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(n){_(t,"tag prefix is malformed: "+i)}t.tagMap[a]=i},"handleTagDirective")};function D(t,e,r,i){if(e<r){const o=t.input.slice(e,r);if(i)for(let e=0,r=o.length;e<r;e+=1){const r=o.charCodeAt(e);9===r||r>=32&&r<=1114111||_(t,"expected valid JSON character")}else a.test(o)&&_(t,"the stream contains non-printable characters");t.result+=o}}function I(e,r,i,a){t.isObject(i)||_(e,"cannot merge mappings; the provided source object is unacceptable");const n=Object.keys(i);for(let t=0,s=n.length;t<s;t+=1){const s=n[t];-1!==e.maxTotalMergeKeys&&++e.totalMergeKeys>e.maxTotalMergeKeys&&_(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),o.call(r,s)||(k(r,s,i[s]),a[s]=!0)}}function q(t,e,r,i,a,n,s,l,h){if(Array.isArray(a))for(let o=0,c=(a=Array.prototype.slice.call(a)).length;o<c;o+=1)Array.isArray(a[o])&&_(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===d(a[o])&&(a[o]="[object Object]");if("object"==typeof a&&"[object Object]"===d(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(let o=0,c=n.length;o<c;o+=1)I(t,e,n[o],r);else I(t,e,n,r);else t.json||o.call(r,a)||!o.call(e,a)||(t.line=s||t.line,t.lineStart=l||t.lineStart,t.position=h||t.position,_(t,"duplicated mapping key")),k(e,a,n),delete r[a];return e}function P(t){const e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):_(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function z(t,e,r){let i=0,o=t.input.charCodeAt(t.position);for(;0!==o;){for(;p(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!u(o))break;for(P(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&v(t,"deficient indentation"),i}function W(t){let e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||(e+=3,r=t.input.charCodeAt(e),0!==r&&!g(r)))}function R(e,r){1===r?e.result+=" ":r>1&&(e.result+=t.repeat("\n",r-1))}function N(t,e,r){let i,o,a,n,s,l;const h=t.kind,c=t.result;let d=t.input.charCodeAt(t.position);if(g(d)||f(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if(63===d||45===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))return!1}for(t.kind="scalar",t.result="",i=o=t.position,a=!1;0!==d;){if(58===d){const e=t.input.charCodeAt(t.position+1);if(g(e)||r&&f(e))break}else if(35===d){if(g(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&W(t)||r&&f(d))break;if(u(d)){if(n=t.line,s=t.lineStart,l=t.lineIndent,z(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=o,t.line=n,t.lineStart=s,t.lineIndent=l;break}}a&&(D(t,i,o,!1),R(t,t.line-n),i=o=t.position,a=!1),p(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return D(t,i,o,!1),!!t.result||(t.kind=h,t.result=c,!1)}function j(t,e){let r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(D(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),39!==o)return!0;r=t.position,t.position++,i=t.position}else u(o)?(D(t,r,i,!0),R(t,z(t,!1,e)),r=i=t.position):t.position===t.lineStart&&W(t)?_(t,"unexpected end of the document within a single quoted scalar"):(t.position++,p(o)||(i=t.position));_(t,"unexpected end of the stream within a single quoted scalar")}function H(t,e){let r,i,o,a=t.input.charCodeAt(t.position);if(34!==a)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return D(t,r,t.position,!0),t.position++,!0;if(92===a){if(D(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),u(a))z(t,!1,e);else if(a<256&&w[a])t.result+=S[a],t.position++;else if((o=m(a))>0){let e=o,r=0;for(;e>0;e--)a=t.input.charCodeAt(++t.position),(o=y(a))>=0?r=(r<<4)+o:_(t,"expected hexadecimal character");t.result+=b(r),t.position++}else _(t,"unknown escape sequence");r=i=t.position}else u(a)?(D(t,r,i,!0),R(t,z(t,!1,e)),r=i=t.position):t.position===t.lineStart&&W(t)?_(t,"unexpected end of the document within a double quoted scalar"):(t.position++,p(a)||(i=t.position))}_(t,"unexpected end of the stream within a double quoted scalar")}function U(t,e){let r,i,o,a=!0;const n=t.tag;let s;const l=t.anchor;let h,c,d,u;const p=Object.create(null);let f,y,m,x=t.input.charCodeAt(t.position);if(91===x)h=93,u=!1,s=[];else{if(123!==x)return!1;h=125,u=!0,s={}}for(null!==t.anchor&&F(t,t.anchor,s),x=t.input.charCodeAt(++t.position);0!==x;){if(z(t,!0,e),x=t.input.charCodeAt(t.position),x===h)return t.position++,t.tag=n,t.anchor=l,t.kind=u?"mapping":"sequence",t.result=s,!0;if(a?44===x&&_(t,"expected the node content, but found ','"):_(t,"missed comma between flow collection entries"),y=f=m=null,c=d=!1,63===x){g(t.input.charCodeAt(t.position+1))&&(c=d=!0,t.position++,z(t,!0,e))}r=t.line,i=t.lineStart,o=t.position,J(t,e,1,!1,!0),y=t.tag,f=t.result,z(t,!0,e),x=t.input.charCodeAt(t.position),!d&&t.line!==r||58!==x||(c=!0,x=t.input.charCodeAt(++t.position),z(t,!0,e),J(t,e,1,!1,!0),m=t.result),u?q(t,s,p,y,f,m,r,i,o):c?s.push(q(t,null,p,y,f,m,r,i,o)):s.push(f),z(t,!0,e),x=t.input.charCodeAt(t.position),44===x?(a=!0,x=t.input.charCodeAt(++t.position)):a=!1}_(t,"unexpected end of the stream within a flow collection")}function Y(e,r){let i,o,a=1,n=!1,s=!1,l=r,h=0,c=!1,d=e.input.charCodeAt(e.position);if(124===d)i=!1;else{if(62!==d)return!1;i=!0}for(e.kind="scalar",e.result="";0!==d;)if(d=e.input.charCodeAt(++e.position),43===d||45===d)1===a?a=43===d?3:2:_(e,"repeat of a chomping mode identifier");else{if(!((o=x(d))>=0))break;0===o?_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?_(e,"repeat of an indentation width identifier"):(l=r+o-1,s=!0)}if(p(d)){do{d=e.input.charCodeAt(++e.position)}while(p(d));if(35===d)do{d=e.input.charCodeAt(++e.position)}while(!u(d)&&0!==d)}for(;0!==d;){for(P(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndent<l)&&32===d;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>l&&(l=e.lineIndent),u(d)){h++;continue}if(s||0!==l||_(e,"missing indentation for block scalar"),e.lineIndent<l){3===a?e.result+=t.repeat("\n",n?1+h:h):1===a&&n&&(e.result+="\n");break}i?p(d)?(c=!0,e.result+=t.repeat("\n",n?1+h:h)):c?(c=!1,e.result+=t.repeat("\n",h+1)):0===h?n&&(e.result+=" "):e.result+=t.repeat("\n",h):e.result+=t.repeat("\n",n?1+h:h),n=!0,s=!0,h=0;const r=e.position;for(;!u(d)&&0!==d;)d=e.input.charCodeAt(++e.position);D(e,r,e.position,!1)}return!0}function V(t,e){const r=t.tag,i=t.anchor,o=[];let a=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&F(t,t.anchor,o);let n=t.input.charCodeAt(t.position);for(;0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,_(t,"tab characters must not be used in indentation")),45===n);){if(!g(t.input.charCodeAt(t.position+1)))break;if(a=!0,t.position++,z(t,!0,-1)&&t.lineIndent<=e){o.push(null),n=t.input.charCodeAt(t.position);continue}const r=t.line;if(J(t,e,3,!1,!0),o.push(t.result),z(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)_(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!a&&(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0)}function X(t,e,r){let i,o,a,n;const s=t.tag,l=t.anchor,h={},c=Object.create(null);let d=null,u=null,f=null,y=!1,m=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&F(t,t.anchor,h);let x=t.input.charCodeAt(t.position);for(;0!==x;){y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,_(t,"tab characters must not be used in indentation"));const C=t.input.charCodeAt(t.position+1),b=t.line;if(63!==x&&58!==x||!g(C)){if(o=t.line,a=t.lineStart,n=t.position,!J(t,r,2,!1,!0))break;if(t.line===b){for(x=t.input.charCodeAt(t.position);p(x);)x=t.input.charCodeAt(++t.position);if(58===x)x=t.input.charCodeAt(++t.position),g(x)||_(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(q(t,h,c,d,u,null,o,a,n),d=u=f=null),m=!0,y=!1,i=!1,d=t.tag,u=t.result;else{if(!m)return t.tag=s,t.anchor=l,!0;_(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return t.tag=s,t.anchor=l,!0;_(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===x?(y&&(q(t,h,c,d,u,null,o,a,n),d=u=f=null),m=!0,y=!0,i=!0):y?(y=!1,i=!0):_(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,x=C;if((t.line===b||t.lineIndent>e)&&(y&&(o=t.line,a=t.lineStart,n=t.position),J(t,e,4,!0,i)&&(y?u=t.result:f=t.result),y||(q(t,h,c,d,u,f,o,a,n),d=u=f=null),z(t,!0,-1),x=t.input.charCodeAt(t.position)),(t.line===b||t.lineIndent>e)&&0!==x)_(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&q(t,h,c,d,u,null,o,a,n),m&&(t.tag=s,t.anchor=l,t.kind="mapping",t.result=h),m}function G(t){let e,r,i=!1,a=!1,n=t.input.charCodeAt(t.position);if(33!==n)return!1;null!==t.tag&&_(t,"duplication of a tag property"),n=t.input.charCodeAt(++t.position),60===n?(i=!0,n=t.input.charCodeAt(++t.position)):33===n?(a=!0,e="!!",n=t.input.charCodeAt(++t.position)):e="!";let s=t.position;if(i){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&62!==n);t.position<t.length?(r=t.input.slice(s,t.position),n=t.input.charCodeAt(++t.position)):_(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!g(n);)33===n&&(a?_(t,"tag suffix cannot contain exclamation marks"):(e=t.input.slice(s-1,t.position+1),h.test(e)||_(t,"named tag handle cannot contain such characters"),a=!0,s=t.position+1)),n=t.input.charCodeAt(++t.position);r=t.input.slice(s,t.position),l.test(r)&&_(t,"tag suffix cannot contain flow indicator characters")}r&&!c.test(r)&&_(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(d){_(t,"tag name is malformed: "+r)}return i?t.tag=r:o.call(t.tagMap,e)?t.tag=t.tagMap[e]+r:"!"===e?t.tag="!"+r:"!!"===e?t.tag="tag:yaml.org,2002:"+r:_(t,'undeclared tag handle "'+e+'"'),!0}function Z(t){let e=t.input.charCodeAt(t.position);if(38!==e)return!1;null!==t.anchor&&_(t,"duplication of an anchor property"),e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!g(e)&&!f(e);)e=t.input.charCodeAt(++t.position);return t.position===r&&_(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(r,t.position),!0}function Q(t){let e=t.input.charCodeAt(t.position);if(42!==e)return!1;e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!g(e)&&!f(e);)e=t.input.charCodeAt(++t.position);t.position===r&&_(t,"name of an alias node must contain at least one character");const i=t.input.slice(r,t.position);return o.call(t.anchorMap,i)||_(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],z(t,!0,-1),!0}function K(t,e,r,i){const o=$(t);return L(t),E(t,e),t.tag=null,t.anchor=null,t.kind=null,t.result=null,X(t,r,i)&&"mapping"===t.kind?(M(t),!0):(A(t),E(t,o),!1)}function J(t,e,r,i,a){let n,s,l,h,c,d=1,u=!1,p=!1,g=null;t.depth>=t.maxDepth&&_(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const f=n=s=4===r||3===r;if(i&&z(t,!0,-1)&&(u=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;;){const r=t.input.charCodeAt(t.position),i=$(t);if(u&&(33===r&&null!==t.tag||38===r&&null!==t.anchor))break;if(!G(t)&&!Z(t))break;null===g&&(g=i),z(t,!0,-1)?(u=!0,s=f,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):s=!1}if(s&&(s=u||a),1===d||4===r)if(h=1===r||2===r?e:e+1,c=t.position-t.lineStart,1===d)if(s&&(V(t,c)||X(t,c,h))||U(t,h))p=!0;else{const e=t.input.charCodeAt(t.position);null!==g&&f&&!s&&124!==e&&62!==e&&K(t,g,g.position-g.lineStart,h)||n&&Y(t,h)||j(t,h)||H(t,h)?p=!0:Q(t)?(p=!0,null===t.tag&&null===t.anchor||_(t,"alias node should not have any properties")):N(t,h,1===r)&&(p=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&F(t,t.anchor,t.result)}else 0===d&&(p=s&&V(t,c));if(null===t.tag)null!==t.anchor&&F(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&_(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e<r;e+=1)if(l=t.implicitTypes[e],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&F(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))l=t.typeMap[t.kind||"fallback"][t.tag];else{l=null;const e=t.typeMap.multi[t.kind||"fallback"];for(let r=0,i=e.length;r<i;r+=1)if(t.tag.slice(0,e[r].tag.length)===e[r].tag){l=e[r];break}}l||_(t,"unknown tag !<"+t.tag+">"),null!==t.result&&l.kind!==t.kind&&_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&F(t,t.anchor,t.result)):_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||p}function tt(t){const e=t.position;let r,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(z(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){i=!0,r=t.input.charCodeAt(++t.position);let e=t.position;for(;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);const a=t.input.slice(e,t.position),n=[];for(a.length<1&&_(t,"directive name must not be less than one character in length");0!==r;){for(;p(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!u(r));break}if(u(r))break;for(e=t.position;0!==r&&!g(r);)r=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==r&&P(t),o.call(O,a)?O[a](t,a,n):v(t,'unknown document directive "'+a+'"')}z(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,z(t,!0,-1)):i&&_(t,"directives end mark is expected"),J(t,t.lineIndent-1,4,!1,!0),z(t,!0,-1),t.checkLineBreaks&&n.test(t.input.slice(e,t.position))&&v(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&W(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,z(t,!0,-1)):t.position<t.length-1&&_(t,"end of the stream or a document separator is expected")}function et(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));const r=new T(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,_(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)tt(r);return r.documents}function rt(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);const i=et(t,r);if("function"!=typeof e)return i;for(let o=0,a=i.length;o<a;o+=1)e(i[o])}function it(t,r){const i=et(t,r);if(0!==i.length){if(1===i.length)return i[0];throw new e("expected a single document in the stream, but found more")}}return s(D,"captureSegment"),s(I,"mergeMappings"),s(q,"storeMappingPair"),s(P,"readLineBreak"),s(z,"skipSeparationSpace"),s(W,"testDocumentSeparator"),s(R,"writeFoldedLines"),s(N,"readPlainScalar"),s(j,"readSingleQuotedScalar"),s(H,"readDoubleQuotedScalar"),s(U,"readFlowCollection"),s(Y,"readBlockScalar"),s(V,"readBlockSequence"),s(X,"readBlockMapping"),s(G,"readTagProperty"),s(Z,"readAnchorProperty"),s(Q,"readAlias"),s(K,"tryReadBlockMappingFromProperty"),s(J,"composeNode"),s(tt,"readDocument"),s(et,"loadDocuments"),s(rt,"loadAll2"),s(it,"load2"),Jd.loadAll=rt,Jd.load=it,Jd}s(eu,"requireCommon"),s(ru,"requireException"),s(iu,"requireSnippet"),s(ou,"requireType"),s(au,"requireSchema"),s(nu,"requireStr"),s(su,"requireSeq"),s(lu,"requireMap"),s(hu,"requireFailsafe"),s(cu,"require_null"),s(du,"requireBool"),s(uu,"requireInt"),s(pu,"requireFloat"),s(gu,"requireJson"),s(fu,"requireCore"),s(yu,"requireTimestamp"),s(mu,"requireMerge"),s(xu,"requireBinary"),s(Cu,"requireOmap"),s(bu,"requirePairs"),s(ku,"requireSet"),s(wu,"require_default"),s(Su,"requireLoader");var Tu,Bu,_u={};function vu(){if(Tu)return _u;Tu=1;const t=eu(),e=ru(),r=wu(),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,n={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},l=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(t,e){if(null===e)return{};const r={},i=Object.keys(e);for(let a=0,n=i.length;a<n;a+=1){let n=i[a],s=String(e[n]);"!!"===n.slice(0,2)&&(n="tag:yaml.org,2002:"+n.slice(2));const l=t.compiledTypeMap.fallback[n];l&&o.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[n]=s}return r}function d(r){let i,o;const a=r.toString(16).toUpperCase();if(r<=255)i="x",o=2;else if(r<=65535)i="u",o=4;else{if(!(r<=4294967295))throw new e("code point within a string may not be greater than 0xFFFFFFFF");i="U",o=8}return"\\"+i+t.repeat("0",o-a.length)+a}s(c,"compileStyleMap"),s(d,"encodeHex");function u(e){this.schema=e.schema||r,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=c(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function p(e,r){const i=t.repeat(" ",r);let o=0,a="";const n=e.length;for(;o<n;){let t;const r=e.indexOf("\n",o);-1===r?(t=e.slice(o),o=n):(t=e.slice(o,r+1),o=r+1),t.length&&"\n"!==t&&(a+=i),a+=t}return a}function g(e,r){return"\n"+t.repeat(" ",e.indent*r)}function f(t,e){for(let r=0,i=t.implicitTypes.length;r<i;r+=1){if(t.implicitTypes[r].resolve(e))return!0}return!1}function y(t){return 32===t||9===t}function m(t){return t>=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&t!==a||t>=65536&&t<=1114111}function x(t){return m(t)&&t!==a&&13!==t&&10!==t}function C(t,e,r){const i=x(t),o=i&&!y(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||x(e)&&!y(e)&&35===t||58===e&&o}function b(t){return m(t)&&t!==a&&!y(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function k(t){return!y(t)&&58!==t}function w(t,e){const r=t.charCodeAt(e);let i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?1024*(r-55296)+i-56320+65536:r}function S(t){return/^\n* /.test(t)}s(u,"State"),s(p,"indentString"),s(g,"generateNextLine"),s(f,"testImplicitResolving"),s(y,"isWhitespace"),s(m,"isPrintable"),s(x,"isNsCharOrWhitespace"),s(C,"isPlainSafe"),s(b,"isPlainSafeFirst"),s(k,"isPlainSafeLast"),s(w,"codePointAt"),s(S,"needIndentIndicator");function T(t,e,r,i,o,a,n,s){let l,h=0,c=null,d=!1,u=!1;const p=-1!==i;let g=-1,f=b(w(t,0))&&k(w(t,t.length-1));if(e||n)for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=w(t,l),!m(h))return 5;f=f&&C(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=w(t,l),10===h)d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!m(h))return 5;f=f&&C(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&S(t)?5:n?2===a?5:2:u?4:3:!f||n||o(t)?2===a?5:2:1}function B(t,r,i,o,a){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==l.indexOf(r)||h.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";const n=t.indent*Math.max(1,i),c=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),d=o||t.flowLevel>-1&&i>=t.flowLevel;function u(e){return f(t,e)}switch(s(u,"testAmbiguity"),T(r,d,t.indent,c,u,t.quotingType,t.forceQuotes&&!o,a)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+_(r,t.indent)+v(p(r,n));case 4:return">"+_(r,t.indent)+v(p(F(r,c),n));case 5:return'"'+M(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function _(t,e){const r=S(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function v(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function F(t,e){const r=/(\n+)([^\n]*)/g;let i,o,a=function(){let i=t.indexOf("\n");return i=-1!==i?i:t.length,r.lastIndex=i,L(t.slice(0,i),e)}(),n="\n"===t[0]||" "===t[0];for(;o=r.exec(t);){const t=o[1],r=o[2];i=" "===r[0],a+=t+(n||i||""===r?"":"\n")+L(r,e),n=i}return a}function L(t,e){if(""===t||" "===t[0])return t;const r=/ [^ ]/g;let i,o,a=0,n=0,s=0,l="";for(;i=r.exec(t);)s=i.index,s-a>e&&(o=n>a?n:s,l+="\n"+t.slice(a,o),a=o+1),n=s;return l+="\n",t.length-a>e&&n>a?l+=t.slice(a,n)+"\n"+t.slice(n+1):l+=t.slice(a),l.slice(1)}function M(t){let e="",r=0;for(let i=0;i<t.length;r>=65536?i+=2:i++){r=w(t,i);const o=n[r];!o&&m(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=o||d(r)}return e}function A(t,e,r){let i="";const o=t.tag;for(let a=0,n=r.length;a<n;a+=1){let o=r[a];t.replacer&&(o=t.replacer.call(r,String(a),o)),(I(t,e,o,!1,!1)||void 0===o&&I(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump)}t.tag=o,t.dump="["+i+"]"}function $(t,e,r,i){let o="";const a=t.tag;for(let n=0,s=r.length;n<s;n+=1){let a=r[n];t.replacer&&(a=t.replacer.call(r,String(n),a)),(I(t,e+1,a,!0,!0,!1,!0)||void 0===a&&I(t,e+1,null,!0,!0,!1,!0))&&(i&&""===o||(o+=g(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump)}t.tag=a,t.dump=o||"[]"}function E(t,e,r){let i="";const o=t.tag,a=Object.keys(r);for(let n=0,s=a.length;n<s;n+=1){let o="";""!==i&&(o+=", "),t.condenseFlow&&(o+='"');const s=a[n];let l=r[s];t.replacer&&(l=t.replacer.call(r,s,l)),I(t,e,s,!1,!1)&&(t.dump.length>1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),I(t,e,l,!1,!1)&&(o+=t.dump,i+=o))}t.tag=o,t.dump="{"+i+"}"}function O(t,r,i,o){let a="";const n=t.tag,s=Object.keys(i);if(!0===t.sortKeys)s.sort();else if("function"==typeof t.sortKeys)s.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,l=s.length;e<l;e+=1){let n="";o&&""===a||(n+=g(t,r));const l=s[e];let h=i[l];if(t.replacer&&(h=t.replacer.call(i,l,h)),!I(t,r+1,l,!0,!0,!0))continue;const c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?n+="?":n+="? "),n+=t.dump,c&&(n+=g(t,r)),I(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?n+=":":n+=": ",n+=t.dump,a+=n)}t.tag=n,t.dump=a||"{}"}function D(t,r,a){const n=a?t.explicitTypes:t.implicitTypes;for(let s=0,l=n.length;s<l;s+=1){const l=n[s];if((l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof r&&r instanceof l.instanceOf)&&(!l.predicate||l.predicate(r))){if(a?l.multi&&l.representName?t.tag=l.representName(r):t.tag=l.tag:t.tag="?",l.represent){const a=t.styleMap[l.tag]||l.defaultStyle;let n;if("[object Function]"===i.call(l.represent))n=l.represent(r,a);else{if(!o.call(l.represent,a))throw new e("!<"+l.tag+'> tag resolver accepts not "'+a+'" style');n=l.represent[a](r,a)}t.dump=n}return!0}}return!1}function I(t,r,o,a,n,s,l){t.tag=null,t.dump=o,D(t,o,!1)||D(t,o,!0);const h=i.call(t.dump),c=a;a&&(a=t.flowLevel<0||t.flowLevel>r);const d="[object Object]"===h||"[object Array]"===h;let u,p;if(d&&(u=t.duplicates.indexOf(o),p=-1!==u),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&r>0)&&(n=!1),p&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&p&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===h)a&&0!==Object.keys(t.dump).length?(O(t,r,t.dump,n),p&&(t.dump="&ref_"+u+t.dump)):(E(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===h)a&&0!==t.dump.length?(t.noArrayIndent&&!l&&r>0?$(t,r-1,t.dump,n):$(t,r,t.dump,n),p&&(t.dump="&ref_"+u+t.dump)):(A(t,r,t.dump),p&&(t.dump="&ref_"+u+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&B(t,t.dump,r,s,c)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function q(t,e){const r=[],i=[];P(t,r,i);const o=i.length;for(let a=0;a<o;a+=1)e.duplicates.push(r[i[a]]);e.usedDuplicates=new Array(o)}function P(t,e,r){if(null!==t&&"object"==typeof t){const i=e.indexOf(t);if(-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(let o=0,a=t.length;o<a;o+=1)P(t[o],e,r);else{const i=Object.keys(t);for(let o=0,a=i.length;o<a;o+=1)P(t[i[o]],e,r)}}}function z(t,e){const r=new u(e=e||{});r.noRefs||q(t,r);let i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),I(r,0,i,!0,!0)?r.dump+"\n":""}return s(T,"chooseScalarStyle"),s(B,"writeScalar"),s(_,"blockHeader"),s(v,"dropEndingNewline"),s(F,"foldString"),s(L,"foldLine"),s(M,"escapeString"),s(A,"writeFlowSequence"),s($,"writeBlockSequence"),s(E,"writeFlowMapping"),s(O,"writeBlockMapping"),s(D,"detectType"),s(I,"writeNode"),s(q,"getDuplicateReferences"),s(P,"inspectNode"),s(z,"dump2"),_u.dump=z,_u}function Fu(){if(Bu)return Kd;Bu=1;const t=Su(),e=vu();function r(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}return s(r,"renamed"),Kd.Type=ou(),Kd.Schema=au(),Kd.FAILSAFE_SCHEMA=hu(),Kd.JSON_SCHEMA=gu(),Kd.CORE_SCHEMA=fu(),Kd.DEFAULT_SCHEMA=wu(),Kd.load=t.load,Kd.loadAll=t.loadAll,Kd.dump=e.dump,Kd.YAMLException=ru(),Kd.types={binary:xu(),float:pu(),map:lu(),null:cu(),pairs:bu(),set:ku(),timestamp:yu(),bool:du(),int:uu(),merge:mu(),omap:Cu(),seq:su(),str:nu()},Kd.safeLoad=r("safeLoad","load"),Kd.safeLoadAll=r("safeLoadAll","loadAll"),Kd.safeDump=r("safeDump","dump"),Kd}s(vu,"requireDumper"),s(Fu,"requireJsYaml");var Lu=sd(Fu()),{Type:Mu,Schema:Au,FAILSAFE_SCHEMA:$u,JSON_SCHEMA:Eu,CORE_SCHEMA:Ou,DEFAULT_SCHEMA:Du,load:Iu,loadAll:qu,dump:Pu,YAMLException:zu,types:Wu,safeLoad:Ru,safeLoadAll:Nu,safeDump:ju}=Lu,Hu=s((t,e)=>{const{theme:r,themeVariables:i}=e,{useGradient:o,gradientStart:a,gradientStop:n}=i??{},l=t.attr("id"),h=r?.includes("dark")?"#FFFFFF":"#000000",c=s((e,r,i)=>t.append("defs").append("filter").attr("id",e).attr("height",r).attr("width",r).append("feDropShadow").attr("dx",i).attr("dy",i).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",h),"dropShadow");if(c(`${l}-drop-shadow`,"130%","4"),c(`${l}-drop-shadow-small`,"150%","2"),!o)return;const d=t.append("linearGradient").attr("id",`${l}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),Uu=s(t=>{const{handDrawnSeed:e}=pr();return{fill:t,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Yu=s(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Vu=s(t=>{const e=Xu([...t.cssCompiledStyles||[],...t.cssStyles||[],...Yu(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),Xu=s(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),Gu=s(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),Zu=s(t=>{const{stylesArray:e}=Vu(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];Gu(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),Qu=s((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=pr(),{nodeBorder:o,mainBkg:a}=r,{stylesMap:n}=Vu(t);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||o,seed:i,strokeWidth:n.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Ku(n.get("stroke-dasharray"))},e)},"userNodeOverrides"),Ku=s(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");const Ju=Object.freeze({left:0,top:0,width:16,height:16}),tp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ep=Object.freeze({...Ju,...tp}),rp=Object.freeze({...ep,body:"",hidden:!1}),ip=Object.freeze({width:null,height:null}),op=Object.freeze({...ip,...tp}),ap=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function np(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in rp)i in tp?i in t&&!(i in r)&&(r[i]=tp[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function sp(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function n(t){a=np(i[t]||o[t],a)}return n(e),r.forEach(n),np(t,a)}function lp(t,e){if(t.icons[e])return sp(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(o[e]=[r].concat(a))}return o[e]}),o}(t,[e])[e];return r?sp(t,e,r):null}const hp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cp=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dp(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(hp);if(null===i||!i.length)return t;const o=[];let a=i.shift(),n=cp.test(a);for(;;){if(n){const t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(a=i.shift(),void 0===a)return o.join("");n=!n}}const up=/\sid="(\S+)"/g,pp=new Map;function gp(t){const e=[];let r;for(;r=up.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=pp.get(t)||0;return pp.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var fp,yp,mp={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},xp=new Map,Cp=new Map,bp=s(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(p.debug("Registering icon pack:",e.name),"loader"in e)Cp.set(e.name,e.loader);else{if(!("icons"in e))throw p.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');xp.set(e.name,e.icons)}}},"registerIconPacks"),kp=s(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),e=o.pop(),r={provider:o.length>0?o[0]:i,prefix:e,name:t};return ap(r)?r:null}const a=o[0],n=a.split("-");if(n.length>1){const t={provider:i,prefix:n.shift(),name:n.join("-")};return ap(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:a};return ap(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=xp.get(i);if(!o){const t=Cp.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},xp.set(i,o)}catch(um){throw p.error(um),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=lp(o,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),wp=s(async t=>{try{return await kp(t),!0}catch{return!1}},"isIconAvailable"),Sp=s(async(t,e,r)=>{let i;try{i=await kp(t,e?.fallbackPrefix)}catch(um){p.error(um),i=mp}const o=function(t,e){const r={...ep,...t},i={...op,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let n,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:n=o.height/2+o.top,e.unshift("rotate(90 "+n.toString()+" "+n.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n=o.width/2+o.left,e.unshift("rotate(-90 "+n.toString()+" "+n.toString()+")")}s%2==1&&(o.left!==o.top&&(n=o.left,o.left=o.top,o.top=n),o.width!==o.height&&(n=o.width,o.width=o.height,o.height=n)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;const n=t.indexOf(">",a);if(-1===n)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(n+1)}return{defs:r,content:t}}(t);return o=i.defs,a=e+i.content+r,o?"<defs>"+o+"</defs>"+a:a;var o,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const n=i.width,s=i.height,l=o.width,h=o.height;let c,d;null===n?(d=null===s?"1em":"auto"===s?h:s,c=dp(d,l/h)):(c="auto"===n?l:n,d=null===s?dp(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[o.left,o.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:a}}(i,e),a=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(gp(o.body),{...o.attributes,...r});return Te(a,se())},"getIconSVG"),Tp={},Bp={};var _p=function(){if(yp)return Tp;yp=1,Object.defineProperty(Tp,"__esModule",{value:!0}),Tp.sanitizeUrl=function(i){if(!i)return t.BLANK_URL;var o,a=r(i.trim());do{o=(a=r(a=e(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim())).match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex)}while(o&&o.length>0);var n=a;if(!n)return t.BLANK_URL;if(function(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}(n))return n;var s=n.trimStart(),l=s.match(t.urlSchemeRegex);if(!l)return n;var h=l[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(h))return t.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return t.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var t=(fp||(fp=1,Object.defineProperty(Bp,"__esModule",{value:!0}),Bp.BLANK_URL=Bp.relativeFirstCharacters=Bp.whitespaceEscapeCharsRegex=Bp.urlSchemeRegex=Bp.ctrlCharactersRegex=Bp.htmlCtrlEntityRegex=Bp.htmlEntitiesRegex=Bp.invalidProtocolRegex=void 0,Bp.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Bp.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Bp.htmlCtrlEntityRegex=/&(newline|tab);/gi,Bp.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Bp.urlSchemeRegex=/^.+(:|:)/gim,Bp.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Bp.relativeFirstCharacters=[".","/"],Bp.BLANK_URL="about:blank"),Bp);function e(e){return e.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function r(t){try{return decodeURIComponent(t)}catch(um){return t}}return Tp}();function vp(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Fp(){}function Lp(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Mp(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ap="[object RegExp]",$p="[object String]",Ep="[object Number]",Op="[object Boolean]",Dp="[object Arguments]",Ip="[object Symbol]",qp="[object Date]",Pp="[object Map]",zp="[object Set]",Wp="[object Array]",Rp="[object ArrayBuffer]",Np="[object Object]",jp="[object DataView]",Hp="[object Uint8Array]",Up="[object Uint8ClampedArray]",Yp="[object Uint16Array]",Vp="[object Uint32Array]",Xp="[object Int8Array]",Gp="[object Int16Array]",Zp="[object Int32Array]",Qp="[object Float32Array]",Kp="[object Float64Array]",Jp="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function tg(t){return void 0!==Jp.Buffer&&Jp.Buffer.isBuffer(t)}function eg(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}function rg(t){return"__proto__"===t}function ig(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function og(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ag(t,e,r,i=new Map,o=void 0){const a=o?.(t,e,r,i);if(void 0!==a)return a;if(ig(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=ag(t[a],a,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[a,n]of t)e.set(a,ag(n,a,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const a of t)e.add(ag(a,void 0,r,i,o));return e}if(tg(t))return t.subarray();if(og(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=ag(t[a],a,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),ng(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),ng(e,t,r,i,o),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),ng(e,t,r,i,o),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,ng(e,t,r,i,o),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),ng(e,t,r,i,o),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),ng(e,t,r,i,o),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),ng(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch(Mp(t)){case Dp:case Wp:case Rp:case jp:case Op:case qp:case Qp:case Kp:case Xp:case Gp:case Zp:case Pp:case Ep:case Np:case Ap:case zp:case $p:case Ip:case Hp:case Up:case Yp:case Vp:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),ng(e,t,r,i,o),e}return t}function ng(t,e,r=t,i,o){const a=[...Object.keys(e),...Lp(e)];for(let n=0;n<a.length;n++){const s=a[n],l=Object.getOwnPropertyDescriptor(t,s);(null==l||l.writable)&&(t[s]=ag(e[s],s,r,i,o))}}function sg(t,e){return function(t,e){return ag(t,void 0,t,new Map,e)}(t,(e,r,i,o)=>{if("object"==typeof t){if("[object Object]"===Mp(t)&&"function"!=typeof t.constructor){const e={};return o.set(t,e),ng(e,t,i,o),e}switch(Object.prototype.toString.call(t)){case Ep:case $p:case Op:{const e=new t.constructor(t?.valueOf());return ng(e,t),e}case Dp:{const e={};return ng(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function lg(t){return sg(t)}function hg(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===Mp(t)}function cg(t){return"object"==typeof t&&null!==t}function dg(t){return cg(t)&&eg(t)}function ug(t){return og(t)}function pg(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);const n=t.apply(this,i);return r.cache=a.set(o,n)||a,n};return r.cache=new(pg.Cache||Map),r}function gg(t){if(ig(t))return t;const e=Mp(t);if(!function(t){switch(Mp(t)){case Dp:case Wp:case Rp:case jp:case Op:case qp:case Qp:case Kp:case Xp:case Gp:case Zp:case Pp:case Ep:case Np:case Ap:case zp:case $p:case Ip:case Hp:case Up:case Yp:case Vp:return!0;default:return!1}}(t))return{};if(r=t,Array.isArray(r)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var r;if(ug(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if("[object ArrayBuffer]"===e)return new ArrayBuffer(t.byteLength);if("[object DataView]"===e){const e=t,r=e.buffer,i=e.byteOffset,o=e.byteLength,a=new ArrayBuffer(o),n=new Uint8Array(r,i,o);return new Uint8Array(a).set(n),new DataView(a)}if("[object Boolean]"===e||"[object Number]"===e||"[object String]"===e){const r=new(0,t.constructor)(t.valueOf());return"[object String]"===e?function(t,e){const r=e.valueOf().length;for(const i in e)Object.hasOwn(e,i)&&(Number.isNaN(Number(i))||Number(i)>=r)&&(t[i]=e[i])}(r,t):fg(r,t),r}if("[object Date]"===e)return new Date(Number(t));if("[object RegExp]"===e){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if("[object Symbol]"===e)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===e){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if("[object Set]"===e){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if("[object Arguments]"===e){const e=t,r={};return fg(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const i={};return function(t,e){const r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(i,t),fg(i,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let i=0;i<r.length;i++){const o=r[i];Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}}(i,t),i}function fg(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}function yg(t,e,r,i){if(ig(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if(ig(t))return t;if(Array.isArray(t)||og(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)t in e||(e[t]=void 0)}const o=[...Object.keys(e),...Lp(e)];for(let a=0;a<o.length;a++){const n=o[a];if(rg(n))continue;let s=e[n],l=t[n];if(hg(s)&&(s={...s}),hg(l)&&(l={...l}),tg(s)&&(s=lg(s)),Array.isArray(s))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(dg(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,s,n,t,e,i);void 0!==h?t[n]=h:Array.isArray(s)||cg(l)&&cg(s)&&(vp(l)||vp(s)||ug(l)||ug(s))?t[n]=yg(l,s,r,i):null==l&&vp(s)?t[n]=yg({},s,r,i):null==l&&ug(s)?t[n]=lg(s):void 0!==l&&void 0===s||(t[n]=s)}return t}function mg(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let a=0;a<r.length;a++)o=yg(o,r[a],i,new Map);return o}(t,...e,Fp)}function xg(t){if(null==t)return!0;if(eg(t))return!!("function"==typeof t.splice||"string"==typeof t||tg(t)||ug(t)||hg(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}pg.Cache=Map;var Cg="",bg={curveBasis:Sc,curveBasisClosed:function(t){return new Tc(t)},curveBasisOpen:function(t){return new Bc(t)},curveBumpX:xc,curveBumpY:Cc,curveBundle:vc,curveCardinalClosed:$c,curveCardinalOpen:Oc,curveCardinal:Mc,curveCatmullRomClosed:zc,curveCatmullRomOpen:Rc,curveCatmullRom:qc,curveLinear:cc,curveLinearClosed:function(t){return new Nc(t)},curveMonotoneX:Zc,curveMonotoneY:Qc,curveNatural:td,curveStep:rd,curveStepAfter:od,curveStepBefore:id},kg=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wg=s(function(t,e){const r=Sg(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);Rt(t),i=ot(i,[...t])}else i=r.args;if(!i)return;let o=J(t,e);const a="config";return void 0!==i[a]&&("flowchart-v2"===o&&(o="flowchart"),i[o]=i[a],delete i[a]),i},"detectInit"),Sg=s(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${kg.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),p.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(i=U.exec(t));)if(i.index===U.lastIndex&&U.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return p.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Tg=s(function(t){return t.replace(U,"")},"removeDirectives"),Bg=s(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function _g(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return bg[r]??e}function vg(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?_p.sanitizeUrl(r):r}s(_g,"interpolateToCurve"),s(vg,"formatUrl");var Fg=s((t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a)return void p.error(`Function name: ${t} not found in window`);a[o](...e)},"runFunc");function Lg(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Mg(t){let e,r=0;t.forEach(t=>{r+=Lg(t,e),e=t});return Eg(t,r/2)}function Ag(t){return 1===t.length?t[0]:Mg(t)}s(Lg,"distance"),s(Mg,"traverseEdge"),s(Ag,"calcLabelPosition");var $g=s((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Eg=s((t,e)=>{let r,i=e;for(const o of t){if(r){const t=Lg(o,r);if(0===t)return r;if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:o.x,y:o.y};if(e>0&&e<1)return{x:$g((1-e)*r.x+e*o.x,5),y:$g((1-e)*r.y+e*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Og=s((t,e,r)=>{p.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Eg(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(e[0].x+i.x)/2,n.y=-Math.cos(a)*o+(e[0].y+i.y)/2,n},"calcCardinalityPosition");function Dg(t,e,r){const i=structuredClone(r);p.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const o=Eg(i,25+t),a=10+.5*t,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,s.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):"end_right"===e?(s.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2,s.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2):(s.x=Math.sin(n)*a+(i[0].x+o.x)/2,s.y=-Math.cos(n)*a+(i[0].y+o.y)/2),s}function Ig(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}s(Dg,"calcTerminalLabelPosition"),s(Ig,"getStylesFromArray");var qg=0,Pg=s(()=>(qg++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qg),"generateId");function zg(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}s(zg,"makeRandomHex");var Wg=s(t=>zg(t.length),"random"),Rg=s(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"),Ng=s(function(t,e){const r=e.text.replace(je.lineBreakRegex," "),[,i]=tf(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o},"drawSimpleText"),jg=pg((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),je.hasBreaks(t))return t;const i=t.split(" ").filter(Boolean),o=[];let a="";return i.forEach((t,n)=>{const s=Yg(`${t} `,r),l=Yg(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=Hg(t,e,"-",r);o.push(a,...i),a=n}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");n+1===i.length&&o.push(a)}),o.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Hg=pg((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let n="";return o.forEach((t,s)=>{const l=`${n}${t}`;if(Yg(l,i)>=e){const t=s+1,e=o.length===t,i=`${l}${r}`;a.push(e?l:i),n=""}else n=l}),{hyphenatedStrings:a,remainingWord:n}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ug(t,e){return Xg(t,e).height}function Yg(t,e){return Xg(t,e).width}s(Ug,"calculateTextHeight"),s(Yg,"calculateTextWidth");var Vg,Xg=pg((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=tf(r),n=["sans-serif",i],s=t.split(je.lineBreakRegex),l=[],h=po("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of n){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of s){const i=Rg();i.text=r||"";const n=Ng(c,i).style("font-size",a).style("font-weight",o).style("font-family",d),s=(n._groups||n)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,s.width)),t=Math.round(s.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}c.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Gg=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{s(this,"InitIDGenerator")}},Zg=s(function(t){return Vg=Vg||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Vg.innerHTML=t,unescape(Vg.textContent)},"entityDecode");function Qg(t){return"str"in t}function Kg(t){return t instanceof Error?t.message:String(t)}s(Qg,"isDetailedError"),s(Kg,"getErrorMessage");var Jg=s((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),tf=s(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ef(t,e){return mg({},t,e)}s(ef,"cleanAndMerge");var rf={assignWithDepth:ot,wrapLabel:jg,calculateTextHeight:Ug,calculateTextWidth:Yg,calculateTextDimensions:Xg,cleanAndMerge:ef,detectInit:wg,detectDirective:Sg,isSubstringInArray:Bg,interpolateToCurve:_g,calcLabelPosition:Ag,calcCardinalityPosition:Og,calcTerminalLabelPosition:Dg,formatUrl:vg,getStylesFromArray:Ig,generateId:Pg,random:Wg,runFunc:Fg,entityDecode:Zg,insertTitle:Jg,isLabelCoordinateInPath:lf,parseFontSize:tf,InitIDGenerator:Gg},of=s(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),af=s(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),nf=s((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function sf(t){return t??null}function lf(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}function hf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}s(sf,"handleUndefinedAttr"),s(lf,"isLabelCoordinateInPath");var cf={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function df(t){cf=t}var uf={exec:()=>null};function pf(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(ff.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var gf=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ff={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},yf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mf=/(?:[*+-]|\d{1,9}[.)])/,xf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cf=pf(xf).replace(/bull/g,mf).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(),bf=pf(xf).replace(/bull/g,mf).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(),kf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sf=pf(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tf=pf(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mf).getRegex(),Bf="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",_f=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,vf=pf("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_f).replace("tag",Bf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ff=pf(kf).replace("hr",yf).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",Bf).getRegex(),Lf={blockquote:pf(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ff).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Sf,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:yf,html:vf,lheading:Cf,list:Tf,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ff,table:uf,text:/^[^\n]+/},Mf=pf("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",Bf).getRegex(),Af={...Lf,lheading:bf,table:Mf,paragraph:pf(kf).replace("hr",yf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mf).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",Bf).getRegex()},$f={...Lf,html:pf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_f).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:uf,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pf(kf).replace("hr",yf).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Cf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ef=/^( {2,}|\\)\n(?!\s*$)/,Of=/[\p{P}\p{S}]/u,Df=/[\s\p{P}\p{S}]/u,If=/[^\s\p{P}\p{S}]/u,qf=pf(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Df).getRegex(),Pf=/(?!~)[\p{P}\p{S}]/u,zf=pf(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gf?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Wf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Rf=pf(Wf,"u").replace(/punct/g,Of).getRegex(),Nf=pf(Wf,"u").replace(/punct/g,Pf).getRegex(),jf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hf=pf(jf,"gu").replace(/notPunctSpace/g,If).replace(/punctSpace/g,Df).replace(/punct/g,Of).getRegex(),Uf=pf(jf,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Pf).getRegex(),Yf=pf("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,If).replace(/punctSpace/g,Df).replace(/punct/g,Of).getRegex(),Vf=pf(/\\(punct)/,"gu").replace(/punct/g,Of).getRegex(),Xf=pf(/^<(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(),Gf=pf(_f).replace("(?:--\x3e|$)","--\x3e").getRegex(),Zf=pf("^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",Gf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Kf=pf(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Qf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Jf=pf(/^!?\[(label)\]\[(ref)\]/).replace("label",Qf).replace("ref",wf).getRegex(),ty=pf(/^!?\[(ref)\](?:\[\])?/).replace("ref",wf).getRegex(),ey=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ry={_backpedal:uf,anyPunctuation:Vf,autolink:Xf,blockSkip:zf,br:Ef,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:uf,emStrongLDelim:Rf,emStrongRDelimAst:Hf,emStrongRDelimUnd:Yf,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Kf,nolink:ty,punctuation:qf,reflink:Jf,reflinkSearch:pf("reflink|nolink(?!\\()","g").replace("reflink",Jf).replace("nolink",ty).getRegex(),tag:Zf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:uf},iy={...ry,link:pf(/^!?\[(label)\]\((.*?)\)/).replace("label",Qf).getRegex(),reflink:pf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qf).getRegex()},oy={...ry,emStrongRDelimAst:Uf,emStrongLDelim:Nf,url:pf(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ey).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:pf(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ey).getRegex()},ay={...oy,br:pf(Ef).replace("{2,}","*").getRegex(),text:pf(oy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ny={normal:Lf,gfm:Af,pedantic:$f},sy={normal:ry,gfm:oy,breaks:ay,pedantic:iy},ly={"&":"&","<":"<",">":">",'"':""","'":"'"},hy=t=>ly[t];function cy(t,e){if(e){if(ff.escapeTest.test(t))return t.replace(ff.escapeReplace,hy)}else if(ff.escapeTestNoEncode.test(t))return t.replace(ff.escapeReplaceNoEncode,hy);return t}function dy(t){try{t=encodeURI(t).replace(ff.percentDecode,"%")}catch{return null}return t}function uy(t,e){let r=t.replace(ff.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}),i=r.split(ff.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(ff.slashPipe,"|");return i}function py(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){if(t.charAt(i-o-1)!==e)break;o++}return t.slice(0,i-o)}function gy(t,e,r,i,o){let a=e.href,n=e.title||null,s=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:n,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var fy=class{options;rules;lexer;constructor(t){this.options=t||cf}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:py(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=py(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:py(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=py(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,a=!1,n=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))n.push(t[e]),a=!0;else{if(a)break;n.push(t[e])}t=t.slice(e);let s=n.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),n=this.blockquote(a);o[o.length-1]=n,r=r.substring(0,r.length-e.raw.length)+n.raw,i=i.substring(0,i.length-e.text.length)+n.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),n=this.list(a);o[o.length-1]=n,r=r.substring(0,r.length-c.raw.length)+n.raw,i=i.substring(0,i.length-e.raw.length)+n.raw,t=a.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),n=!1;for(;t;){let r=!1,i="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),n=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||n.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())s+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||a.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(n=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),o.raw+=i}let s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=uy(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of o)a.rows.push(uy(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=py(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),gy(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return gy(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,a=[...i[0]].length-1,n=a,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){n+=o;continue}if((i[5]||i[6])&&a%3&&!((a+o)%3)){s+=o;continue}if(n-=o,n>0)continue;o=Math.min(o,o+n+s);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+o);if(Math.min(a,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},yy=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||cf,this.options.tokenizer=this.options.tokenizer||new fy,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 e={other:ff,block:ny.normal,inline:sy.normal};this.options.pedantic?(e.block=ny.pedantic,e.inline=sy.pedantic):this.options.gfm&&(e.block=ny.gfm,this.options.breaks?e.inline=sy.breaks:e.inline=sy.gfm),this.tokenizer.rules=e}static get rules(){return{block:ny,inline:sy}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(ff.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(ff.tabCharGlobal," ").replace(ff.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){let r;if(a||(n=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,n)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(n=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},my=class{options;parser;constructor(t){this.options=t||cf}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(ff.notSpaceStart)?.[0],o=t.replace(ff.endingNewline,"")+"\n";return i?'<pre><code class="language-'+cy(i)+'">'+(r?o:cy(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:cy(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let a=0;a<t.items.length;a++){let e=t.items[a];i+=this.listitem(e)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+cy(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);e+=this.tablerow({text:r});let i="";for(let o=0;o<t.rows.length;o++){let e=t.rows[o];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}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>${cy(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=dy(t);if(null===o)return i;let a='<a href="'+(t=o)+'"';return e&&(a+=' title="'+cy(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=dy(t);if(null===o)return cy(r);let a=`<img src="${t=o}" alt="${r}"`;return e&&(a+=` title="${cy(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:cy(t.text)}},xy=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""}},Cy=class t{options;renderer;textRenderer;constructor(t){this.options=t||cf,this.options.renderer=this.options.renderer||new my,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xy}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=o;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let o=a,n=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],n+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let a=o;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},by=class{options;block;constructor(t){this.options=t||cf}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?yy.lex:yy.lexInline}provideParser(){return this.block?Cy.parse:Cy.parseInline}},ky=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Cy;Renderer=my;TextRenderer=xy;Lexer=yy;Tokenizer=fy;Hooks=by;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new my(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new fy(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new by;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],a=e[i];by.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&by.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return a.call(e,r)})();let i=o.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return yy.lex(t,e??this.defaults)}parser(t,e){return Cy.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return a(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 e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?yy.lex:yy.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let n=await(o.hooks?await o.hooks.provideParser():t?Cy.parse:Cy.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(n):n})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?yy.lex:yy.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?Cy.parse:Cy.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(fm){return a(fm)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+cy(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function wy(t,e){return ky.parse(t,e)}function Sy(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var a=new RegExp("\n[\t ]{".concat(Math.min.apply(Math,o),"}"),"g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return e.forEach(function(t,e){var r=n.match(/(?:^|\n)( *)$/),o=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:"".concat(o).concat(t)}).join("\n")),n+=a+i[e+1]}),n}wy.options=wy.setOptions=function(t){return ky.setOptions(t),wy.defaults=ky.defaults,df(wy.defaults),wy},wy.getDefaults=hf,wy.defaults=cf,wy.use=function(...t){return ky.use(...t),wy.defaults=ky.defaults,df(wy.defaults),wy},wy.walkTokens=function(t,e){return ky.walkTokens(t,e)},wy.parseInline=ky.parseInline,wy.Parser=Cy,wy.parser=Cy.parse,wy.Renderer=my,wy.TextRenderer=xy,wy.Lexer=yy,wy.lexer=yy.lex,wy.Tokenizer=fy,wy.Hooks=by,wy.parse=wy,wy.options,wy.setOptions,wy.use,wy.walkTokens,wy.parseInline,Cy.parse,yy.lex;var Ty="undefined"!=typeof performance&&"function"==typeof performance.now,By=s(()=>Ty?performance.now():0,"now"),_y="🧜 ",vy={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};function Fy(t,{markdownAutoWrap:e}){return Sy(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function Ly(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function My(t,e={}){const r=Fy(t,e),i=wy.lexer(r),o=[[]];let a=0;function n(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{n(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return s(n,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{n(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function Ay(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function $y(t,{markdownAutoWrap:e}={}){const r=wy.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(p.warn(`Unsupported markdown: ${t.type}`),t.raw)}return s(i,"output"),r.map(i).join("")}(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{s(this,"Profiler")}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,e){if(!this.enabled)return e();const r=By();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(By()-r)}}async tick(t,e){if(!this.enabled)return e();const r=By();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(By()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??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,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const e={name:t,start:By(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),Ty&&"function"==typeof performance.mark)try{performance.mark(`${_y}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const e=By();if(t.duration=e-t.start,Ty&&"function"==typeof performance.measure)try{performance.measure(`${_y}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:vy[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}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(),e){if(!t)return;const r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,o=["ms % phase"],a=s((t,e)=>{const i=" ".repeat(e),n=t.duration.toFixed(1).padStart(8),s=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";o.push(`${n} ${s} ${i}${t.name}`);for(const r of t.children)a(r,e+1);if(t.children.length>0){const e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){const t=r.toFixed(1).padStart(8);o.push(`${t} ${i} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){o.push("—— buckets (summed) ——");for(const t of n)o.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`)}console.log(`${_y}mermaid render profile · ${i}\n${o.join("\n")}`)}}),globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"},s(Fy,"preprocessMarkdown"),s(Ly,"nonMarkdownToLines"),s(My,"markdownToLines"),s(Ay,"nonMarkdownToHTML"),s($y,"markdownToHTML");var Ey=function(t){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function r(){var r=this;r.reads=[],r.writes=[],r.raf=e.bind(t)}function i(t){t.scheduled||(t.scheduled=!0,t.raf(o.bind(null,t)))}function o(t){var e,r=t.writes,o=t.reads;try{o.length,t.runTasks(o),r.length,t.runTasks(r)}catch(um){e=um}if(t.scheduled=!1,(o.length||r.length)&&i(t),e){if(e.message,!t.catch)throw e;t.catch(e)}}function a(t,e){var r=t.indexOf(e);return!!~r&&!!t.splice(r,1)}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}return s(r,"FastDom"),r.prototype={constructor:r,runTasks:s(function(t){for(var e;e=t.shift();)e()},"runTasks"),measure:s(function(t,e){var r=e?t.bind(e):t;return this.reads.push(r),i(this),r},"measure"),mutate:s(function(t,e){var r=e?t.bind(e):t;return this.writes.push(r),i(this),r},"mutate"),clear:s(function(t){return a(this.reads,t)||a(this.writes,t)},"clear"),extend:s(function(t){if("object"!=typeof t)throw new Error("expected object");var e=Object.create(this);return n(e,t),e.fastdom=this,e.initialize&&e.initialize(),e},"extend"),catch:null},s(i,"scheduleFlush"),s(o,"flush"),s(a,"remove"),s(n,"mixin"),t.fastdom=t.fastdom||new r}("undefined"!=typeof window?window:globalThis),Oy={initialize:s(function(){this._tasks=new Map},"initialize"),mutate:s(function(t,e){return Dy(this,"mutate",t,e)},"mutate"),measure:s(function(t,e){return Dy(this,"measure",t,e)},"measure"),clear:s(function(t){var e=this._tasks,r=e.get(t);this.fastdom.clear(r),e.delete(t)},"clear")};function Dy(t,e,r,i){var o,a=t._tasks,n=t.fastdom,s=new Promise(function(t,l){o=n[e](function(){a.delete(s);try{t(i?r.call(i):r())}catch(um){l(um)}},i)});return a.set(s,o),s}s(Dy,"create");var{initialize:Iy,mutate:qy,measure:Py,clear:zy}=Oy,Wy=Oy,Ry=Ey.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(Wy);function Ny(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function jy(t,e){return Hy(t,[],Ny(e.content),e.type)}function Hy(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,n=[...e,o];return t([{content:n.join(""),type:i}])?Hy(t,n,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Uy(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Yy(t,e)}function Yy(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},n=[...i];if(""!==o&&n.push({content:o,type:"normal"}),n.push(a),e(n))return Yy(t,e,r,n);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=jy(e,a);r.push([i]),o.content&&t.unshift(o)}return Yy(t,e,r)}function Vy(t,e){e&&t.attr("style",e)}s(Ny,"splitTextToChars"),s(jy,"splitWordToFitWidth"),s(Hy,"splitWordToFitWidthRecursion"),s(Uy,"splitLineToFitWidth"),s(Yy,"splitLineToFitWidthRecursion"),s(Vy,"applyStyle");async function Xy(t,e,r,i,o=!1,a=se(),n=0){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=ze(e.label)?await Ne(e.label.replace(je.lineBreakRegex,"\n"),a):Te(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),Vy(d,e.labelStyle),d.attr("class",`${c} ${i}`),Vy(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&l.attr("class","labelBkg");const u=await Ry.measure(()=>l.node().getBoundingClientRect());return u.width===r?(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")):u.width<n&&(l.style("display","table"),l.style("width",n+"px"),l.style("text-align","center")),s.node()}function Gy(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function Zy(t,e,r){const i=t.append("text"),o=Gy(i,1,e);tm(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function Qy(t,e,r){const i=t.append("text"),o=Gy(i,1,e);tm(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function Ky(t,e,r,i=!1,o=!1){const a=e.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const c of r){const e=s(e=>Zy(a,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Uy(c,e);for(const t of r){tm(Gy(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return l.node()}function Jy(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function tm(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(Jy(e.content)):i.text(" "+Jy(e.content))})}async function em(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,o)=>(r.push((async()=>{const r=`${i}:${o}`;return await wp(r)?await Sp(r,void 0,{class:"label-icon"}):`<i class='${Te(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}s(Xy,"addHtmlSpan"),s(Gy,"createTspan"),s(Zy,"computeWidthOfText"),s(Qy,"computeDimensionOfText"),s(Ky,"createFormattedText"),s(Jy,"decodeHTMLEntities"),s(tm,"updateTextContentAndStyles"),s(em,"replaceIconSubstring");var rm=s(async(t,e="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:a=!0,markdown:n=!0,isNode:s=!0,width:l=200,minWidth:h=0,addSvgBackground:c=!1}={},d)=>{if(p.debug("XYZ createText",e,r,i,o,a,s,"addSvgBackground: ",c),a){const i=n?$y(e,d):Ay(e),a=await em(af(i),d),u=e.replace(/\\\\/g,"\\"),p={isNode:s,label:ze(e)?u:a,labelStyle:r.replace("fill:","color:")};return await Xy(t,p,l,o,c,d,h)}{const o=af(e.replace(/<br\s*\/?>/g,"<br/>")),a=Ky(l,t,n?My(o.replace("<br>","<br/>"),d):Ly(o),!!e&&c,!s);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");po(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");po(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");po(a).select("text").attr("style",e)}return i?po(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):po(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText"),im=new Set(["redux-color","redux-dark-color"]),om=s(t=>Array.isArray(t)&&t.length>0,"hasPalette"),am=s((t,e)=>null!=t&&im.has(t)&&om(e),"isColorTheme"),nm=/^[\w-]+$/,sm=s(t=>{const e="string"==typeof t||"number"==typeof t?String(t):"";return nm.test(e)?e:"classic"},"safeLook"),lm=s(t=>om(t)?t.length:0,"paletteSlotCount"),hm=s((t,e)=>om(e)?lm(e):"number"==typeof t&&Number.isInteger(t)&&t>0&&t<=64?t:12,"colorSlotCount"),cm=s((t,e,r,i)=>{if(void 0===e||!am(r,i))return;const o=e%lm(i);t.attr("data-color-id",`color-${o}`)},"stampColorSlot");function dm(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,n=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*n-(r-o)*s+i,e[1]=(t-i)*s+(r-o)*n+o}}}function um(t,e){return t[0]===e[0]&&t[1]===e[1]}function pm(t,e,r,i=1){const o=r,a=Math.max(e,.1),n=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(o)for(const h of n)dm(h,s,o);const l=function(t,e,r){const i=[];for(const h of t){const t=[...h];um(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const o=[];e=Math.max(e,.1);const a=[];for(const h of i)for(let t=0;t<h.length-1;t++){const e=h[t],r=h[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);a.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return o;let n=[],s=a[0].ymin,l=0;for(;n.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>s);e++)t=e;a.splice(0,t+1).forEach(t=>{n.push({s:s,edge:t})})}if(n=n.filter(t=>!(t.edge.ymax<=s)),n.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||l%e==0)&&n.length>1)for(let t=0;t<n.length;t+=2){const e=t+1;if(e>=n.length)break;const r=n[t].edge,i=n[e].edge;o.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,n.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),l++}return o}(n,a,i);if(o){for(const t of n)dm(t,s,-o);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),dm(i,e,r)}(l,s,-o)}return l}function gm(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),pm(t,o,i,a||1)}class fm{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=gm(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function ym(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class mm extends fm{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=gm(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],n=.5*r*Math.cos(o),s=.5*r*Math.sin(o);for(const[l,h]of i)ym([l,h])&&a.push([[l[0]-n,l[1]+s],[...h]],[[l[0]+n,l[1]-s],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class xm extends fm{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class Cm{constructor(t){this.helper=t}fillPolygons(t,e){const r=gm(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const n of t){const t=ym(n),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(n[0][0]+n[1][0])/2-i/4,d=Math.min(n[0][1],n[1][1]);for(let n=0;n<l;n++){const t=d+h+n*i,s=c-a+2*Math.random()*a,l=t-a+2*Math.random()*a,u=this.helper.ellipse(s,l,o,o,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class bm{constructor(t){this.helper=t}fillPolygons(t,e){const r=gm(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const a=ym(t),n=Math.floor(a/(r+i)),s=(a+i-n*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<n;d++){const t=d*(r+i),a=t+r,n=[l[0]+t*Math.cos(c)+s*Math.cos(c),l[1]+t*Math.sin(c)+s*Math.sin(c)],h=[l[0]+a*Math.cos(c)+s*Math.cos(c),l[1]+a*Math.sin(c)+s*Math.sin(c)];o.push(...this.helper.doubleLineOps(n[0],n[1],h[0],h[1],e))}}),o}}class km{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=gm(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=ym(t),a=Math.round(o/(2*e));let n=t[0],s=t[1];n[0]>s[0]&&(n=t[1],s=t[0]);const l=Math.atan((s[1]-n[1])/(s[0]-n[0]));for(let h=0;h<a;h++){const t=2*h*e,o=2*(h+1)*e,a=Math.sqrt(2*Math.pow(e,2)),s=[n[0]+t*Math.cos(l),n[1]+t*Math.sin(l)],c=[n[0]+o*Math.cos(l),n[1]+o*Math.sin(l)],d=[s[0]+a*Math.cos(l+Math.PI/4),s[1]+a*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const wm={};class Sm{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Tm={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 Bm(t,e){return t.type===e}function _m(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!Bm(a,2);){let n=0;const s=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return _m("M0,0"+t);o++,n=Tm[a.text],i=a.text}else Bm(a,1)?n=Tm[i]:(o++,n=Tm[a.text],i=a.text);if(!(o+n<r.length))throw new Error("Path data ended short");for(let t=o;t<o+n;t++){const e=r[t];if(!Bm(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof Tm[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),o+=n,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function vm(t){let e=0,r=0,i=0,o=0;const a=[];for(const{key:n,data:s}of t)switch(n){case"M":a.push({key:"M",data:[...s]}),[e,r]=s,[i,o]=s;break;case"m":e+=s[0],r+=s[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function Fm(t){const e=[];let r="",i=0,o=0,a=0,n=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,n]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-s),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),s=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let n=0,h=0;"Q"===r||"T"===r?(n=i+(i-s),h=o+(o-l)):(n=i,h=o);const d=i+2*(n-i)/3,u=o+2*(h-o)/3,p=t+2*(n-t)/3,g=a+2*(h-a)/3;e.push({key:"C",data:[d,u,p,g,t,a]}),s=n,l=h,i=t,o=a;break}case"Q":{const[t,r,a,n]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,p=n+2*(r-n)/3;e.push({key:"C",data:[h,d,u,p,a,n]}),s=t,l=r,i=a,o=n;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],n=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(Mm(i,o,l,h,t,r,a,n,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=n}r=h}return e}function Lm(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Mm(t,e,r,i,o,a,n,s,l,h){const c=(d=n,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=Lm(t,e,-c),[r,i]=Lm(r,i,-c);const n=(t-r)/2,h=(e-i)/2;let d=n*n/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const u=o*o,m=a*a,x=u*m-u*h*h-m*n*n,C=u*h*h+m*n*n,b=(s===l?-1:1)*Math.sqrt(Math.abs(x/C));f=b*o*h/a+(t+r)/2,y=b*-a*n/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=Mm(r=f+o*Math.cos(g),i=y+a*Math.sin(g),e,s,o,a,n,0,l,[g,t,f,y])}m=g-p;const x=Math.cos(p),C=Math.sin(p),b=Math.cos(g),k=Math.sin(g),w=Math.tan(m/4),S=4/3*o*w,T=4/3*a*w,B=[t,e],_=[t+S*C,e-T*x],v=[r+S*k,i-T*b],F=[r,i];if(_[0]=2*B[0]-_[0],_[1]=2*B[1]-_[1],h)return[_,v,F].concat(u);{u=[_,v,F].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=Lm(u[e][0],u[e][1],c),i=Lm(u[e+1][0],u[e+1][1],c),o=Lm(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const Am={randOffset:function(t,e){return Hm(t,e)},randOffsetWithRange:function(t,e,r){return jm(t,e,r)},ellipse:function(t,e,r,i,o){return Im(t,e,o,Dm(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return Um(t,e,r,i,o,!0)}};function $m(t,e,r,i,o){return{type:"path",ops:Um(t,e,r,i,o)}}function Em(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...Um(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...Um(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?$m(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Om(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=Vm(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:Vm(r[0],1.5*(1+.22*e.roughness),Rm(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=Vm(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:Vm(a,1.5*(1+.22*e.roughness),Rm(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&o.push(e)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function Dm(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/o;let n=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return n+=Hm(n*l,r),s+=Hm(s*l,r),{increment:a,rx:n,ry:s}}function Im(t,e,r,i){const[o,a]=Gm(i.increment,t,e,i.rx,i.ry,1,i.increment*jm(.1,jm(.4,1,r),r),r);let n=Xm(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=Gm(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=Xm(o,null,r);n=n.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function qm(t,e,r,i,o,a,n,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Hm(.01*d,l),u+=Hm(.01*u,l);let p=o,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=Zm(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=Zm(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return n&&(s?m.push(...Um(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...Um(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Pm(t,e){const r=Fm(vm(_m(t))),i=[];let o=[0,0],a=[0,0];for(const{key:n,data:s}of r)switch(n){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...Um(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,o,n,l,h]=s;i.push(...Qm(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...Um(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function zm(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Hm(t,e),i[0][1]+Hm(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+Hm(t,e),i[a][1]+Hm(t,e)]})}}return{type:"fillPath",ops:r}}function Wm(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!wm[r])switch(r){case"zigzag":wm[r]||(wm[r]=new mm(e));break;case"cross-hatch":wm[r]||(wm[r]=new xm(e));break;case"dots":wm[r]||(wm[r]=new Cm(e));break;case"dashed":wm[r]||(wm[r]=new bm(e));break;case"zigzag-line":wm[r]||(wm[r]=new km(e));break;default:r="hachure",wm[r]||(wm[r]=new fm(e))}return wm[r]}(e,Am).fillPolygons(t,e)}function Rm(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Nm(t){return t.randomizer||(t.randomizer=new Sm(t.seed||0)),t.randomizer.next()}function jm(t,e,r,i=1){return r.roughness*i*(Nm(r)*(e-t)+t)}function Hm(t,e,r=1){return jm(-t,t,e,r)}function Um(t,e,r,i,o,a=!1){const n=a?o.disableMultiStrokeFill:o.disableMultiStroke,s=Ym(t,e,r,i,o,!0,!1);if(n)return s;const l=Ym(t,e,r,i,o,!0,!0);return s.concat(l)}function Ym(t,e,r,i,o,a,n){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*Nm(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=Hm(p,o,h),g=Hm(g,o,h);const f=[],y=()=>Hm(d,o,h),m=()=>Hm(c,o,h),x=o.preserveVertices;return n?f.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):f.push({op:"move",data:[t+(x?0:Hm(c,o,h)),e+(x?0:Hm(c,o,h))]}),n?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}),f}function Vm(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+Hm(e,r),t[0][1]+Hm(e,r)]),i.push([t[0][0]+Hm(e,r),t[0][1]+Hm(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+Hm(e,r),t[o][1]+Hm(e,r)]),o===t.length-1&&i.push([t[o][0]+Hm(e,r),t[o][1]+Hm(e,r)]);return Xm(i,null,r)}function Xm(t,e,r){const i=t.length,o=[];if(i>3){const e=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(a*t[r+1][0]-a*t[r-1][0])/6,i[1]+(a*t[r+1][1]-a*t[r-1][1])/6],e[2]=[t[r+1][0]+(a*t[r][0]-a*t[r+2][0])/6,t[r+1][1]+(a*t[r][1]-a*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...Ym(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return o}function Gm(t,e,r,i,o,a,n,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=Hm(.5,s)-Math.PI/2;h.push([Hm(a,s)+e+.9*i*Math.cos(c-t),Hm(a,s)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let n=c;n<d;n+=t){const t=[Hm(a,s)+e+i*Math.cos(n),Hm(a,s)+r+o*Math.sin(n)];l.push(t),h.push(t)}h.push([Hm(a,s)+e+i*Math.cos(c+2*Math.PI+.5*n),Hm(a,s)+r+o*Math.sin(c+2*Math.PI+.5*n)]),h.push([Hm(a,s)+e+.98*i*Math.cos(c+n),Hm(a,s)+r+.98*o*Math.sin(c+n)]),h.push([Hm(a,s)+e+.9*i*Math.cos(c+.5*n),Hm(a,s)+r+.9*o*Math.sin(c+.5*n)])}return[h,l]}function Zm(t,e,r,i,o,a,n,s,l){const h=a+Hm(.1,l),c=[];c.push([Hm(s,l)+e+.9*i*Math.cos(h-t),Hm(s,l)+r+.9*o*Math.sin(h-t)]);for(let d=h;d<=n;d+=t)c.push([Hm(s,l)+e+i*Math.cos(d),Hm(s,l)+r+o*Math.sin(d)]);return c.push([e+i*Math.cos(n),r+o*Math.sin(n)]),c.push([e+i*Math.cos(n),r+o*Math.sin(n)]),Xm(c,0,l)}function Qm(t,e,r,i,o,a,n,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(u?0:Hm(h[0],s)),n[1]+(u?0:Hm(h[0],s))]}),c=u?[o,a]:[o+Hm(h[p],s),a+Hm(h[p],s)],l.push({op:"bcurveTo",data:[t+Hm(h[p],s),e+Hm(h[p],s),r+Hm(h[p],s),i+Hm(h[p],s),c[0],c[1]]});return l}function Km(t){return[...t]}function Jm(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(Km(t[0]),Km(t[1]),Km(t[2]),Km(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],a=1-e;i.push(Km(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function tx(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ex(t,e,r){const i=tx(e,r);if(0===i)return tx(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),tx(t,rx(e,r,o))}function rx(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function ix(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],a=t[e+3];let n=3*i[0]-2*r[0]-a[0];n*=n;let s=3*i[1]-2*r[1]-a[1];s*=s;let l=3*o[0]-2*a[0]-r[0];l*=l;let h=3*o[1]-2*a[1]-r[1];return h*=h,n<l&&(n=l),s<h&&(s=h),n+s}(t,e)<r){const r=t[e+0];o.length?(a=o[o.length-1],n=r,Math.sqrt(tx(a,n))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],n=t[e+1],s=t[e+2],l=t[e+3],h=rx(a,n,i),c=rx(n,s,i),d=rx(s,l,i),u=rx(h,c,i),p=rx(c,d,i),g=rx(u,p,i);ix([a,h,u,g],0,r,o),ix([g,p,d,l],0,r,o)}var a,n;return o}function ox(t,e){return ax(t,0,t.length,e)}function ax(t,e,r,i,o){const a=o||[],n=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=ex(t[c],n,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(ax(t,e,h+1,i,a),ax(t,h,r,i,a)):(a.length||a.push(n),a.push(s)),a}function nx(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let a=0;a<o;a++)ix(t,3*a,e,i);return r&&r>0?ax(i,0,i.length,r):i}const sx="none";class lx{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[$m(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),n=[],s=function(t,e,r,i,o){return function(t,e){return Em(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?n.push(zm([o],a)):n.push(Wm([o],a))}return a.stroke!==sx&&n.push(s),this._d("rectangle",n,a)}ellipse(t,e,r,i,o){const a=this._o(o),n=[],s=Dm(r,i,a),l=Im(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=Im(t,e,a,s).opset;r.type="fillPath",n.push(r)}else n.push(Wm([l.estimatedPoints],a));return a.stroke!==sx&&n.push(l.opset),this._d("ellipse",n,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Em(t,!1,r)],r)}arc(t,e,r,i,o,a,n=!1,s){const l=this._o(s),h=[],c=qm(t,e,r,i,o,a,n,!0,l);if(n&&l.fill)if("solid"===l.fillStyle){const n=Object.assign({},l);n.disableMultiStroke=!0;const s=qm(t,e,r,i,o,a,!0,!1,n);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,o,a,n){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=Hm(.01*h,n),c+=Hm(.01*c,n);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/n.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),Wm([g],n)}(t,e,r,i,o,a,l));return l.stroke!==sx&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=Om(t,r);if(r.fill&&r.fill!==sx)if("solid"===r.fillStyle){const e=Om(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...nx(Jm([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...nx(Jm(i),10,(1+r.roughness)/2))}e.length&&i.push(Wm([e],r))}return r.stroke!==sx&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=Em(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(zm([t],r)):i.push(Wm([t],r))),r.stroke!==sx&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==sx,a=r.stroke!==sx,n=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=Fm(vm(_m(t))),o=[];let a=[],n=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...nx(s,1)),s=[]},h=()=>{l(),a.length&&(o.push(a),a=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),n=[u[0],u[1]],a.push(n);break;case"L":l(),a.push([u[0],u[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:n;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),a.push([n[0],n[1]])}if(h(),!r)return o;const c=[];for(const d of o){const t=ox(d,r);t.length&&c.push(t)}return c}(t,0,n?4-4*(r.simplification||1):(1+r.roughness)/2),l=Pm(t,r);if(o)if("solid"===r.fillStyle)if(1===s.length){const e=Pm(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(zm(s,r));else i.push(Wm(s,r));return a&&(n?s.forEach(t=>{i.push(Em(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const o of e){let t=null;switch(o.type){case"path":t={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:sx};break;case"fillPath":t={d:this.opsToPath(o),stroke:sx,strokeWidth:0,fill:r.fill||sx};break;case"fillSketch":t=this.fillSketch(o,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||sx,strokeWidth:r,fill:sx}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class hx{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new lx(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const o of e.ops){const e="number"==typeof r&&r>=0?o.data.map(t=>+t.toFixed(r)):o.data;switch(o.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,n=!1,s){const l=this.gen.arc(t,e,r,i,o,a,n,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const cx="http://www.w3.org/2000/svg";class dx{constructor(t,e){this.svg=t,this.gen=new lx(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(cx,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of e){let e=null;switch(n.type){case"path":e=i.createElementNS(cx,"path"),e.setAttribute("d",this.opsToPath(n,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(cx,"path"),e.setAttribute("d",this.opsToPath(n,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,n,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(cx,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,n=!1,s){const l=this.gen.arc(t,e,r,i,o,a,n,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ux={canvas:(t,e)=>new hx(t,e),svg:(t,e)=>new dx(t,e),generator:t=>new lx(t),newSeed:()=>lx.newSeed()};async function px(t){const e=t.getElementsByTagName("img");if(!e||0===e.length)return;const r=!gx(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){const e=pr().fontSize?pr().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=It.fontSize]=tf(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}s(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function gx(t){if(3===t.nodeType)return""!==t.textContent?.trim();if(1!==t.nodeType)return!1;return"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(gx)}s(px,"configureLabelImages"),s(gx,"hasTextBesidesImages");var fx=s(async(t,e,r)=>{const i=pr(),o=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",sf(e.labelStyle)),n=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),s=e.width?Math.max(e.width-2*(e.padding??0),32):pr().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?s:Number.POSITIVE_INFINITY,h=await Promise.all(n.map(async t=>{const r=a.append("g").attr("class",t.cssClass),o=await rm(r,Te(af(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:e.labelStyle},i);return po(o).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),po(o).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),c=Math.max(...h.map(({box:t})=>t.width),0);let d=0;for(const{el:p,box:g}of h)p.attr("transform",`translate(${c/2-g.x-g.width/2}, ${d-g.y})`),d+=g.height+3;const u=h.length>0?d-3:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-c/2}, ${-u/2})`);return{shapeSvg:o,bbox:a.node().getBBox(),halfPadding:(e.padding??0)/2,label:a}},"c4LabelHelper"),yx=s((t,e)=>{const{x:r,y:i,width:o,height:a}=t;return o>=e?t:"left"in t?{x:r,y:i,width:e,height:a,top:i,left:r,bottom:i+a,right:r+e,toJSON:s(()=>({}),"toJSON")}:{x:r-(e-o)/2,y:i,width:e,height:a}},"withMinWidth"),mx=s(async(t,e,r,{ignoreMinWidth:i=!1}={})=>{if(void 0!==e.stereotype)return fx(t,e,r);let o;const a=e.useHtmlLabels||Xt(pr()?.htmlLabels);o=r||"node default";const n=t.insert("g").attr("class",o).attr("id",e.domId||e.id),s=n.insert("g").attr("class","label").attr("style",sf(e.labelStyle));let l;l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const h=!!e.icon||!!e.img,c="markdown"===e.labelType,d=!l||e.width||i?0:e.minWidth??0,u=await rm(s,Te(af(l),pr()),{useHtmlLabels:a,width:e.width||e.wrappingWidth||pr().flowchart?.wrappingWidth,minWidth:d,classes:c?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:h,markdown:c},pr()),p=(e?.padding??0)/2;let g;if(a){const t=u.children[0],e=po(u);await px(t),g=await Ry.measure(()=>t.getBoundingClientRect()),g=yx(g,d),e.attr("width",g.width),e.attr("height",g.height)}else g=await Ry.measure(()=>u.getBBox()),g=yx(g,d);return a?s.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):s.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:n,bbox:g,halfPadding:p,label:s}},"labelHelper"),xx=s(async(t,e,r)=>{const i=r.useHtmlLabels??ye(pr()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await rm(o,Te(af(e),pr()),{useHtmlLabels:i,width:r.width||pr()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let s;if(ye(pr())){const t=a.children[0],e=po(a);s=await Ry.measure(()=>t.getBoundingClientRect()),e.attr("width",s.width),e.attr("height",s.height)}else s=await Ry.measure(()=>a.getBBox());return i?o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):o.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:n,label:o}},"insertLabel"),Cx=s((t,e,r)=>{if(r)return t.width=r.width,void(t.height=r.height);const i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),bx=s((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function kx(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function wx(t,e,r,i,o,a){const n=[],s=r-t,l=i-e,h=s/a,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+o*Math.sin(c*(e-t));n.push({x:e,y:r})}return n}function Sx(t,e,r,i,o,a){const n=[],s=o*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),a=e+r*Math.sin(i);n.push({x:-o,y:-a})}return n}function Tx(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),n=s((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:n(o,"fill"),"fill-opacity":n(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}s(kx,"createPathFromPoints"),s(wx,"generateFullSineWavePoints"),s(Sx,"generateCirclePoints"),s(Tx,"mergePaths");var Bx=s((t,e)=>{var r,i,o=t.x,a=t.y,n=e.x-o,s=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(n)*h?(s<0&&(h=-h),r=0===s?0:h*n/s,i=h):(n<0&&(l=-l),r=l,i=0===n?0:l*s/n),{x:o+r,y:a+i}},"intersectRect"),_x=Bx;function vx(t,e){return t.intersect(e)}s(vx,"intersectNode");var Fx=vx;function Lx(t,e,r,i){var o=t.x,a=t.y,n=o-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*n*n),h=Math.abs(e*r*n/l);i.x<o&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<a&&(c=-c),{x:o+h,y:a+c}}s(Lx,"intersectEllipse");var Mx=Lx;function Ax(t,e,r){return Mx(t,e,e,r)}s(Ax,"intersectCircle");var $x=Ax;function Ex(t,e,r,i){{const o=e.y-t.y,a=t.x-e.x,n=e.x*t.y-t.x*e.y,s=o*r.x+a*r.y+n,l=o*i.x+a*i.y+n,h=1e-6;if(0!==s&&0!==l&&Ox(s,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&Ox(p,g))return;const f=o*d-c*a;if(0===f)return;return{x:(a*u-d*n)/f,y:(c*n-o*u)/f}}}function Ox(t,e){return t*e>0}s(Ex,"intersectLine"),s(Ox,"sameSign");var Dx=Ex;function Ix(t,e,r){let i=t.x,o=t.y,a=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let l=i-t.width/2-n,h=o-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],o=e[c<e.length-1?c+1:0],n=Dx(t,r,{x:l+i.x,y:h+i.y},{x:l+o.x,y:h+o.y});n&&a.push(n)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),n=e.x-r.x,s=e.y-r.y,l=Math.sqrt(n*n+s*s);return a<l?-1:a===l?0:1}),a[0]):t}s(Ix,"intersectPolygon");var qx={node:Fx,circle:$x,ellipse:Mx,polygon:Ix,rect:_x},Px=s((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),zx=s(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const n=pr(),s=ye(n);return await rm(t,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},n)},"createLabel"),Wx=zx;function Rx(t,e){const{labelStyles:r}=Zu(e);e.labelStyle=r;const i=bx(e);let o=i;i||(o="anchor");const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),{cssStyles:n}=e,s=ux.svg(a),l=Qu(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=s.circle(0,0,2,l),c=a.insert(()=>h,":first-child");return c.attr("class","anchor").attr("style",sf(n)),Cx(e,c),e.intersect=function(t){return p.info("Circle intersect",e,1,t),qx.circle(e,1,t)},a}function Nx(t,e,r,i,o,a,n){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*a*Math.sin(h)*(n?-1:1),f=l-p*o*Math.cos(h)*(n?-1:1),y=Math.atan2((e-f)/a,(t-g)/o);let m=Math.atan2((i-f)/a,(r-g)/o)-y;n&&m<0&&(m+=2*Math.PI),!n&&m>0&&(m-=2*Math.PI);const x=[];for(let C=0;C<20;C++){const t=y+C/19*m,e=g+o*Math.cos(t),r=f+a*Math.sin(t);x.push({x:e,y:r})}return x}function jx(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function Hx(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o,l=s(t=>t+n,"calcTotalHeight"),h=s(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:c,bbox:d}=await mx(t,e,bx(e)),u=l(e?.height?e?.height:d.height),[p,g]=h(u),f=jx(u,p,g),y=(e?.width?e?.width:d.width)+2*a+f-f,m=u,{cssStyles:x}=e,C=[{x:y/2,y:-m/2},{x:-y/2,y:-m/2},...Nx(-y/2,-m/2,-y/2,m/2,p,g,!1),{x:y/2,y:m/2},...Nx(y/2,m/2,y/2,-m/2,p,g,!0)],b=ux.svg(c),k=Qu(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=kx(C),S=b.path(w,k),T=c.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${p/2}, 0)`),Cx(e,T),e.intersect=function(t){return qx.polygon(e,C,t)},c}async function Ux(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{shapeSvg:a,bbox:n,label:l}=await mx(t,e,bx(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(n.width+2*c,e.width??0,80),u=Math.max(Math.min(.08*d,12),5),p=Math.max(n.height+2*c+u,e.height??0),g=-p/2+u,f=p/2,y=.72*d,m=[`M${-d/2},${g}`,`L${-y/2},${f}`,`A${y/2},${u} 0 0 0 ${y/2},${f}`,`L${d/2},${g}`,`A${d/2},${u} 0 0 0 ${-d/2},${g}`,"Z"].join(" "),{cssStyles:x}=e,C=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=ux.svg(a).path(m,Qu(e,{}));C.node()?.appendChild(t),x&&C.attr("style",x)}else C.append("path").attr("d",m).attr("style",o);C.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",d/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),Cx(e,C);const b=g+(f-g)/2;l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${b-n.height/2-(n.y-(n.top??0))})`);const k=s((t,e,r)=>Array.from({length:13},(i,o)=>{const a=Math.PI-o*Math.PI/12;return{x:t*Math.cos(a),y:e+r*u*Math.sin(a)}}),"arc"),w=[...k(d/2,g,-1),...k(y/2,f,1).reverse()];return e.intersect=function(t){return qx.polygon(e,w,t)},a}s(Rx,"anchor"),s(Nx,"generateArcPoints"),s(jx,"calculateArcSagitta"),s(Hx,"bowTieRect"),s(Ux,"bucket");function Yx(t){const{themeVariables:e}=pr(),r=e.clusterBkg,i=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:r,stroke:i,cssClass:"collapsed-group"}}async function Vx(t,e){const r=Yx(e.metadata?.containerType),{fill:i,stroke:o}=r,{nodeStyles:a}=Zu(e),{shapeSvg:n,bbox:s}=await mx(t,e,bx(e)),{theme:l,themeVariables:h}=pr();cm(n,e.colorIndex,l,h.borderColorArray);const c=e.padding??8,d=s.height,u=Math.max(s.width+2*c,80,e?.width??0),p=Math.max(d+8+20+2*c,e?.height??0),g=-u/2,f=-p/2,y=n.select(".label");if(y){e.useHtmlLabels??ye(pr())?y.attr("transform",`translate(${-s.width/2}, ${-s.height/2-14})`):y.attr("transform",`translate(0, ${-s.height/2-14})`)}let m;if("handDrawn"===e.look){const t=ux.svg(n),a=Qu(e,{fill:i,stroke:o,...void 0===r.strokeWidth?{}:{strokeWidth:r.strokeWidth},..."none"===i?{fillWeight:0}:{fillStyle:"solid"}}),s=t.path(Px(g,f,u,p,r.rx),a);m=n.insert(()=>s,":first-child"),m.attr("class","basic label-container "+r.cssClass).attr("style",sf(e.cssStyles))}else m=n.insert("rect",":first-child"),m.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",g).attr("y",f).attr("width",u).attr("height",p).attr("fill",i).attr("stroke",o),void 0!==r.strokeWidth&&m.attr("stroke-width",r.strokeWidth+"px");const x=f+c+d+8;n.append("line").attr("class","collapsed-separator").attr("x1",g+8).attr("y1",x).attr("x2",g+u-8).attr("y2",x).attr("stroke",o).attr("stroke-dasharray","3, 3");const C=x+10;for(let b=-1;b<=1;b++)n.append("circle").attr("class","collapsed-indicator").attr("cx",10*b).attr("cy",C).attr("r",2.5).attr("fill",o);return Cx(e,m),e.calcIntersect=function(t,e){return qx.rect(t,e)},e.intersect=function(t){return qx.rect(e,t)},n}function Xx(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}s(Yx,"getCollapsedStyle"),s(Vx,"collapsedGroup"),s(Xx,"insertPolygonShape");var Gx=["right","left","up","down"],Zx="point",Qx=s(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Kx=s(t=>Gx.filter(e=>t.has(e)).join("|")||Zx,"getDirectionKey"),Jx={"right|left|up|down":s(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":s(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":s(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":s(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":s(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":s(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":s(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":s(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":s(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":s(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":s(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:s(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:s(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:s(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:s(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[Zx]:()=>[{x:0,y:0}]},tC=s((t,e,r,i)=>{const o=Qx(t),a=(r.padding??0)/2,n=e.height+4*a,s=n/2,l=i??e.width+2*s+2*a,h=Kx(o);return(Jx[h]??Jx[Zx])({height:n,midpoint:s,padding:a,width:l})},"getArrowPoints");async function eC(t,e){const r=e,{shapeSvg:i,bbox:o}=await mx(t,r,bx(r)),a=r.padding??0,n=o.height+2*a,s=n/2,l=o.width+2*s+a,h=r.width??0,c=r.positioned&&(r.widthInColumns??1)>1&&h>l?h:l,d=tC(r.directions??[],o,r,c),u=Xx(i,c,n,d);return u.attr("style",r.style??null),Cx(r,u),r.intersect=function(t){return qx.polygon(r,d,t)},i}async function rC(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{shapeSvg:a,bbox:n,label:s}=await mx(t,e,bx(e)),l=r?.nodeBorder??r?.lineColor??"currentColor",h=e.padding??12,c=18,d=Math.max(n.width+2*h,e.width??0,90),u=Math.max(n.height+2*h+c,e.height??0),p=-u/2,{cssStyles:g}=e,f=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=ux.svg(a).path(Px(-d/2,p,d,u,12),Qu(e,{}));f.node()?.appendChild(t),g&&f.attr("style",g)}else f.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",u).attr("rx",12).attr("ry",12).attr("style",o);f.append("line").attr("x1",-d/2).attr("y1",p+c).attr("x2",d/2).attr("y2",p+c).attr("style",`stroke:${l};stroke-width:1px`);for(let m=0;m<3;m++)f.append("circle").attr("cx",-d/2+12+9*m).attr("cy",p+9).attr("r",2.5).attr("style",`fill:${l};stroke:none`);f.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",p+4).attr("width",Math.max(d-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Cx(e,f);const y=p+c+(u-c)/2;return s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${y-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(t){return qx.rect(e,t)},a}s(eC,"block_arrow"),s(rC,"browser");async function iC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?28:o,n="neo"===e.look?24:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=(e?.width??l.width)+("neo"===e.look?2*a:a+12),c=(e?.height??l.height)+("neo"===e.look?2*n:n),d=-c,u=[{x:12,y:d},{x:h,y:d},{x:h,y:0},{x:0,y:0},{x:0,y:d+12},{x:12,y:d}];let p;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=kx(u),o=t.path(i,r);p=s.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&p.attr("style",g)}else p=Xx(s,h,c,u);return i&&p.attr("style",i),Cx(e,p),e.intersect=function(t){return qx.polygon(e,u,t)},s}function oC(t,e){const{nodeStyles:r}=Zu(e);e.label="";const i=t.insert("g").attr("class",bx(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=ux.svg(i),l=Qu(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=kx(n),c=s.path(h,l),d=i.insert(()=>c,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return qx.polygon(e,n,t)},i}async function aC(t,e,r){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:s}=await mx(t,e,bx(e),{ignoreMinWidth:!0}),l=r?.padding??s,h=Math.sqrt(n.width**2+n.height**2)/2,c="neo"===e.look?h+16:h+l;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=ux.svg(a),r=Qu(e,{}),i=t.circle(0,0,2*c,r);d=a.insert(()=>i,":first-child"),d.attr("class","basic label-container").attr("style",sf(u))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",c).attr("cx",0).attr("cy",0);return Cx(e,d),e.calcIntersect=function(t,e){const r=t.width/2;return qx.circle(t,r,e)},e.intersect=function(t){return p.info("Circle intersect",e,c,t),qx.circle(e,c,t)},a}async function nC(t,e){const r=e,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:n}=await mx(t,r,i),s=o.insert("rect",":first-child"),l=r.padding??0,h=r.positioned?r.width??0:a.width+l,c=r.positioned?r.height??0:a.height+l,d=r.positioned?-h/2:-a.width/2-n,u=r.positioned?-c/2:-a.height/2-n;return s.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",h).attr("height",c),Cx(r,s),r.intersect=function(t){return qx.rect(r,t)},o}async function sC(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{shapeSvg:a,bbox:n,label:s}=await mx(t,e,bx(e)),l=r?.nodeBorder??r?.lineColor??"currentColor",h=e.padding??12,c=Math.max(n.width+2*h,e.width??0,90),d=Math.max(n.height+2*h+20,e.height??0),u=-d/2,{cssStyles:p}=e,g=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=ux.svg(a).path(Px(-c/2,u,c,d,12),Qu(e,{}));g.node()?.appendChild(t),p&&g.attr("style",p)}else g.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",d).attr("rx",12).attr("ry",12).attr("style",o);g.append("text").attr("x",-c/2+12).attr("y",u+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Cx(e,g);const f=u+20+(d-20)/2;return s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${f-n.height/2-(n.y-(n.top??0))})`),e.intersect=function(t){return qx.rect(e,t)},a}function lC(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function hC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r,e.label="";const o=t.insert("g").attr("class",bx(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:n}=e,s=ux.svg(o),l=Qu(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,2*a,l),c=lC(a),d=s.path(c,l),u=o.insert(()=>h,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Cx(e,u),e.intersect=function(t){p.info("crossedCircle intersect",e,{radius:a,point:t});return qx.circle(e,a,t)},o}function cC(t,e,r,i=100,o=0,a=180){const n=[],s=o*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),a=e+r*Math.sin(i);n.push({x:-o,y:-a})}return n}async function dC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+s,c=a.height+l,d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...cC(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...cC(h/2+2*d,-d,d,20,-180,-270),...cC(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...cC(h/2,c/2,d,20,0,90)],g=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...cC(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...cC(h/2+.1*h,-d,d,20,-180,-270),...cC(h/2+.1*h,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...cC(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=ux.svg(o),y=Qu(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=kx(p).replace("Z",""),x=f.path(m,y),C=kx(g),b=f.path(C,{...y}),k=o.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${d}, 0)`),n.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Cx(e,k),e.intersect=function(t){return qx.polygon(e,g,t)},o}function uC(t,e,r,i=100,o=0,a=180){const n=[],s=o*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),a=e+r*Math.sin(i);n.push({x:o,y:a})}return n}async function pC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*s:s),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...uC(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...uC(h/2+2*d,-d,d,20,-180,-270),...uC(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...uC(h/2,c/2,d,20,0,90)],g=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...uC(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...uC(h/2+2*d,-d,d,20,-180,-270),...uC(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...uC(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=ux.svg(o),y=Qu(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=kx(p).replace("Z",""),x=f.path(m,y),C=kx(g),b=f.path(C,{...y}),k=o.insert("g",":first-child");return k.insert(()=>b,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-d}, 0)`),n.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Cx(e,k),e.intersect=function(t){return qx.polygon(e,g,t)},o}function gC(t,e,r,i=100,o=0,a=180){const n=[],s=o*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,o=t+r*Math.cos(i),a=e+r*Math.sin(i);n.push({x:-o,y:-a})}return n}async function fC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*s:s),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...gC(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...gC(h/2+2*d,-d,d,20,-180,-270),...gC(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...gC(h/2,c/2,d,20,0,90)],g=[...gC(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...gC(-h/2-d/2,-d,d,20,0,90),...gC(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...gC(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...gC(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...gC(h/2+2*d,-d,d,20,-180,-270),...gC(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...gC(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...gC(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...gC(-h/2-d/2,-d,d,20,0,90),...gC(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...gC(-h/2+d+d/2,c/2,d,30,-180,-270)],y=ux.svg(o),m=Qu(e,{fill:"none"});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=kx(p).replace("Z",""),C=y.path(x,m),b=kx(g).replace("Z",""),k=y.path(b,m),w=kx(f),S=y.path(w,{...m}),T=o.insert("g",":first-child");return T.insert(()=>S,":first-child").attr("stroke-opacity",0),T.insert(()=>C,":first-child"),T.insert(()=>k,":first-child"),T.attr("class","text"),u&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${d-d/4}, 0)`),n.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Cx(e,T),e.intersect=function(t){return qx.polygon(e,f,t)},o}async function yC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(5,l.height+2*n,e?.height??0),c=h/2,d=c-Math.sqrt(Math.max(0,c**2-(l.height/2)**2)),u=Math.max(h/4,d),p=Math.max(20,l.width+2*a+2*u,1.25*(l.width+2*a),e?.width??0),{cssStyles:g}=e,f=ux.svg(s),y=Qu(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=p-c,x=h/4,C=[{x:m,y:0},{x:x,y:0},{x:0,y:h/2},{x:x,y:h},{x:m,y:h},...Sx(-m,-h/2,c,50,270,90)],b=kx(C),k=f.path(b,y),w=s.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-p/2}, ${-h/2})`),Cx(e,w),e.intersect=function(t){return qx.polygon(e,C,t)},s}async function mC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s=e.padding??20,l=Math.max(a.width+2*s,e.width??0,100),h=Math.min(Math.max(.23*l,16),56),c=.27*h,d=Math.max(a.height+2*s,e.height?e.height-(2*h-c):0),u=Math.min(.177*l,.45*d),p=d+2*h-c,g=-p/2,f=g+2*h-c,y=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:m}=e;if("handDrawn"===e.look){const t=ux.svg(o),r=Qu(e,{}),i=t.path(Px(-l/2,f,l,d,u),r),a=t.circle(0,g+h,2*h,r);y.insert(()=>a,":first-child"),y.insert(()=>i,":first-child"),m&&y.attr("style",m)}else y.append("rect").attr("x",-l/2).attr("y",f).attr("width",l).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),y.append("circle").attr("cx",0).attr("cy",g+h).attr("r",h).attr("style",i);Cx(e,y);const x=f+d/2;n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`);const C=g+h,b=180*Math.asin(Math.min(1,(f-C)/h))/Math.PI,k=[...Sx(0,-C,h,24,180+b,-b),...Sx(-(-l/2+u),-(f+u),u,12,90,0),...Sx(-(-l/2+u),-(p/2-u),u,12,360,270),...Sx(-(l/2-u),-(p/2-u),u,12,270,180),...Sx(-(l/2-u),-(f+u),u,12,180,90)];return e.intersect=function(t){return qx.polygon(e,k,t)},o}s(iC,"card"),s(oC,"choice"),s(aC,"circle"),s(nC,"composite"),s(sC,"consoleWindow"),s(lC,"createLine"),s(hC,"crossedCircle"),s(cC,"generateCirclePoints"),s(dC,"curlyBraceLeft"),s(uC,"generateCirclePoints"),s(pC,"curlyBraceRight"),s(gC,"generateCirclePoints"),s(fC,"curlyBraces"),s(yC,"curvedTrapezoid"),s(mC,"person");var xC=s((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),CC=s((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),bC=s((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function kC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?24:o,n="neo"===e.look?24:o,s=e.width??0;if(e.width&&(e.width=e.width-n,e.width<8&&(e.width=8)),e.height){const t=s/2/(2.5+s/50);e.height=e.height-a-3*t,e.height<8&&(e.height=8)}const{shapeSvg:l,bbox:h,label:c}=await mx(t,e,bx(e)),d=Math.max(e.width??0,h.width)+n,u=d/2,p=u/(2.5+d/50),g=Math.max(e.height??0,h.height)+a+p;let f;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=ux.svg(l),r=CC(0,0,d,g,u,p),i=bC(0,p,d,g,u,p),o=Qu(e,{}),a=t.path(r,o),n=t.path(i,Qu(e,{fill:"none"}));f=l.insert(()=>n,":first-child"),f=l.insert(()=>a,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const t=xC(0,0,d,g,u,p);f=l.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",sf(y)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-d/2}, ${-(g/2+p)})`),Cx(e,f),c.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-h.height/2+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){const r=qx.rect(e,t),i=r.x-(e.x??0);if(0!=u&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-p)){let o=p*p*(1-i*i/(u*u));o>0&&(o=Math.sqrt(o)),o=p-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},l}async function wC(t,e,r){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{shapeSvg:a,bbox:n}=await mx(t,e,bx(e)),s=Math.max(n.width+2*r.labelPaddingX,e?.width||0),l=Math.max(n.height+2*r.labelPaddingY,e?.height||0),h=-s/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=ux.svg(a),r=Qu(e,{}),i=u||p?t.path(Px(h,c,s,l,u||0),r):t.rectangle(h,c,s,l,r);d=a.insert(()=>i,":first-child"),d.attr("class","basic label-container").attr("style",sf(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",sf(u)).attr("ry",sf(p)).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return Cx(e,d,"handDrawn"===e.look?void 0:{width:s,height:l}),e.calcIntersect=function(t,e){return qx.rect(t,e)},e.intersect=function(t){return qx.rect(e,t)},a}async function SC(t,e){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:a,width:n,height:s}=e,l={rx:0,ry:0,labelPaddingX:i??2*(a??0),labelPaddingY:o??a??0},h=await wC(t,e,l);if("handDrawn"===e.look){const t=ux.svg(h),r=Qu(e,{}),i=h.select(".basic.label-container > path:nth-child(2)"),o=i.node();if(!o)return h;let a=null;return o instanceof SVGGraphicsElement?(a=o.getBBox(),h.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),h.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),i.remove(),h):h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||n)??0,u=(Number(c.attr("height"))||s)??0;return d>0&&u>0&&c.attr("stroke-dasharray",`${d} ${u}`),h}async function TC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=s.width+o,c=s.height+a,d=.2*c,u=-h/2,p=-c/2-d/2,{cssStyles:g}=e,f=ux.svg(n),y=Qu(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p+d},{x:-u,y:p+d},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+d}],x=f.polygon(m.map(t=>[t.x,t.y]),y),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(e.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(e.padding??0)/2-(s.y-(s.top??0))})`),Cx(e,C),e.intersect=function(t){return qx.rect(e,t)},n}async function BC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e),o="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,n="neo"===e.look?16:a,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e),{ignoreMinWidth:!0}),h=Math.sqrt(l.width**2+l.height**2)/2,c=(e?.width?e?.width/2:h)+(n??0),d=c+o;let u;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{roughness:.2,strokeWidth:2.5}),i=Qu(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*d,r),a=t.circle(0,0,2*c,i);u=s.insert("g",":first-child"),u.attr("class",sf(e.cssClasses)).attr("style",sf(g)),u.node()?.appendChild(o),u.node()?.appendChild(a)}else{u=s.insert("g",":first-child");const t=u.insert("circle",":first-child"),e=u.insert("circle");u.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Cx(e,u),e.intersect=function(t){return p.info("DoubleCircle intersect",e,d,t),qx.circle(e,d,t)},s}async function _C(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:n}=await mx(t,e,bx(e)),{theme:s,themeVariables:l}=pr();cm(o,e.colorIndex,s,l.borderColorArray);const h=n??10,c=a.width/2+2*h,d=a.height/2+2*h;let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=ux.svg(o),r=Qu(e,{}),i=t.ellipse(0,0,2*c,2*d,r);u=o.insert(()=>i,":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else u=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",c).attr("ry",d).attr("cx",0).attr("cy",0);return e.width=2*c,e.height=2*d,Cx(e,u),e.calcIntersect=function(t,e){const r=t.width/2,i=t.height/2;return qx.ellipse(t,r,i,e)},e.intersect=function(t){return qx.ellipse(e,c,d,t)},o}function vC(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",bx(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=ux.svg(a),{nodeBorder:l}=r,h=Qu(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=s.circle(0,0,14,h),d=a.insert(()=>c,":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),n&&n.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),Cx(e,d),e.intersect=function(t){p.info("filledCircle intersect",e,{radius:7,point:t});return qx.circle(e,7,t)},a}s(kC,"cylinder"),s(wC,"drawRect"),s(SC,"datastore"),s(TC,"dividedRectangle"),s(BC,"doublecircle"),s(_C,"usecaseEllipse"),s(vC,"filledCircle");async function FC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=(e?.width?e?.width:s.width)+(a??0),c=e?.height?e?.height:h+s.height,d=[{x:0,y:-c},{x:c,y:-c},{x:c/2,y:0}],{cssStyles:u}=e,g=ux.svg(n),f=Qu(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=kx(d),m=g.path(y,f),x=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",i),e.width=h,e.height=c,Cx(e,x),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-c/2+(e.padding??0)/2+(s.y-(s.top??0))})`),e.intersect=function(t){return p.info("Triangle intersect",e,d,t),qx.polygon(e,d,t)},n}async function LC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s=e.padding??12,l=Math.max(a.width+2*s,e.width??0,90),h=a.height+2*s,c=Math.max(Math.min(.16*h,14),8),d=Math.max(h+c,e.height??0),u=d-c,p=Math.max(.38*l,28),g=-d/2,f=[{x:-l/2,y:g},{x:-l/2+p,y:g},{x:-l/2+p,y:g+c},{x:l/2,y:g+c},{x:l/2,y:d/2},{x:-l/2,y:d/2}],y=[`M${f[0].x},${f[0].y}`,...f.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:m}=e;let x;if("handDrawn"===e.look){const t=ux.svg(o).path(y,Qu(e,{}));x=o.insert(()=>t,":first-child").attr("class","basic label-container"),m&&x.attr("style",m)}else x=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",i);"handDrawn"===e.look?Cx(e,x):Cx(e,x,{width:l,height:d});const C=g+c+u/2;return n.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(t){return qx.polygon(e,f,t)},o}function MC(t,e,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:a}=Zu(e);e.label="";const n=t.insert("g").attr("class",bx(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"!==r&&"RL"!==r||(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const c=-1*l/2,d=-1*h/2,u=ux.svg(n),p=Qu(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=n.insert(()=>g,":first-child");s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),Cx(e,f);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return qx.rect(e,t)},n}async function AC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:s}=await mx(t,e,bx(e)),l=(e?.height?e?.height:Math.max(10,s.height))+2*a,h=l/2,c=h-Math.sqrt(Math.max(0,h**2-(s.height/2)**2)),d=(e?.width?e?.width:Math.max(15,s.width)+2*c)+2*o,{cssStyles:u}=e,g=ux.svg(n),f=Qu(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-d/2,y:-l/2},{x:d/2-h,y:-l/2},...Sx(-d/2+h,0,h,50,90,270),{x:d/2-h,y:l/2},{x:-d/2,y:l/2}],m=kx(y),x=g.path(m,f),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),Cx(e,C),e.intersect=function(t){p.info("Pill intersect",e,{radius:h,point:t});return qx.polygon(e,y,t)},n}s(FC,"flippedTriangle"),s(LC,"folder"),s(MC,"forkJoin"),s(AC,"halfRoundedRectangle");var $C=s((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function EC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e),o="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,n="neo"===e.look?70:a,s="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/o;e.width=(e?.width??0)-2*t-s,e.height=(e.height??0)-n}const{shapeSvg:l,bbox:h}=await mx(t,e,bx(e)),c=(e?.height?e?.height:h.height)+n,d=c/o,u=(e?.width?e?.width:h.width)+2*d+s,p=[{x:d,y:0},{x:u-d,y:0},{x:u,y:-c/2},{x:u-d,y:-c},{x:d,y:-c},{x:0,y:-c/2}];let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=ux.svg(l),r=Qu(e,{}),i=$C(0,0,u,c,d),o=t.path(i,r);g=l.insert(()=>o,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),f&&g.attr("style",f)}else g=Xx(l,u,c,p);return i&&g.attr("style",i),e.width=u,e.height=c,Cx(e,g),e.intersect=function(t){return qx.polygon(e,p,t)},l}async function OC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.label="",e.labelStyle=r;const{shapeSvg:o}=await mx(t,e,bx(e)),a=Math.max(30,e?.width??0),n=Math.max(30,e?.height??0),{cssStyles:s}=e,l=ux.svg(o),h=Qu(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],d=kx(c),u=l.path(d,h),g=o.insert(()=>u,":first-child");return g.attr("class","basic label-container outer-path"),s&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-a/2}, ${-n/2})`),Cx(e,g),e.intersect=function(t){p.info("Pill intersect",e,{points:c});return qx.polygon(e,c,t)},o}async function DC(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zu(e);e.labelStyle=o;const a=e.assetHeight??48,n=e.assetWidth??48,s=Math.max(a,n),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await mx(t,e,"icon-shape default"),u="t"===e.pos,g=s,f=s,{nodeBorder:y}=r,{stylesMap:m}=Vu(e),x=-f/2,C=-g/2,b=e.label?8:0,k=ux.svg(h),w=Qu(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=k.rectangle(x,C,f,g,w),T=Math.max(f,c.width),B=g+c.height+b,_=k.rectangle(-T/2,-B/2,T,B,{...w,fill:"transparent",stroke:"none"}),v=h.insert(()=>S,":first-child"),F=h.insert(()=>_);if(e.icon){const t=h.append("g");t.html(`<g>${await Sp(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,n=r.y;t.attr("transform",`translate(${-i/2-a},${u?c.height/2+b/2-o/2-n:-c.height/2-b/2-o/2-n})`),t.attr("style",`color: ${m.get("stroke")??y};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-B/2:B/2-c.height})`),v.attr("transform",`translate(0,${u?c.height/2+b/2:-c.height/2-b/2})`),Cx(e,F),e.intersect=function(t){if(p.info("iconSquare intersect",e,t),!e.label)return qx.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=u?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return qx.polygon(e,a,t)},h}async function IC(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zu(e);e.labelStyle=o;const a=e.assetHeight??48,n=e.assetWidth??48,s=Math.max(a,n),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await mx(t,e,"icon-shape default"),u=e.label?8:0,g="t"===e.pos,{nodeBorder:f,mainBkg:y}=r,{stylesMap:m}=Vu(e),x=ux.svg(h),C=Qu(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=m.get("fill");C.stroke=b??y;const k=h.append("g");e.icon&&k.html(`<g>${await Sp(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const w=k.node().getBBox(),S=w.width,T=w.height,B=w.x,_=w.y,v=Math.max(S,T)*Math.SQRT2+40,F=x.circle(0,0,v,C),L=Math.max(v,c.width),M=v+c.height+u,A=x.rectangle(-L/2,-M/2,L,M,{...C,fill:"transparent",stroke:"none"}),$=h.insert(()=>F,":first-child"),E=h.insert(()=>A);return k.attr("transform",`translate(${-S/2-B},${g?c.height/2+u/2-T/2-_:-c.height/2-u/2-T/2-_})`),k.attr("style",`color: ${m.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-M/2:M/2-c.height})`),$.attr("transform",`translate(0,${g?c.height/2+u/2:-c.height/2-u/2})`),Cx(e,E),e.intersect=function(t){p.info("iconSquare intersect",e,t);return qx.rect(e,t)},h}async function qC(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zu(e);e.labelStyle=o;const a=e.assetHeight??48,n=e.assetWidth??48,s=Math.max(a,n),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await mx(t,e,"icon-shape default"),g="t"===e.pos,f=s+2*d,y=s+2*d,{nodeBorder:m,mainBkg:x}=r,{stylesMap:C}=Vu(e),b=-y/2,k=-f/2,w=e.label?8:0,S=ux.svg(h),T=Qu(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??x;const _=S.path(Px(b,k,y,f,5),T),v=Math.max(y,c.width),F=f+c.height+w,L=S.rectangle(-v/2,-F/2,v,F,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>_,":first-child").attr("class","icon-shape2"),A=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await Sp(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,n=r.y;t.attr("transform",`translate(${-i/2-a},${g?c.height/2+w/2-o/2-n:-c.height/2-w/2-o/2-n})`),t.attr("style",`color: ${C.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-F/2:F/2-c.height})`),M.attr("transform",`translate(0,${g?c.height/2+w/2:-c.height/2-w/2})`),Cx(e,A),e.intersect=function(t){if(p.info("iconSquare intersect",e,t),!e.label)return qx.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=g?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+w},{x:r+y/2,y:i-o/2+c.height+w},{x:r+y/2,y:i+o/2},{x:r-y/2,y:i+o/2},{x:r-y/2,y:i-o/2+c.height+w},{x:r-c.width/2,y:i-o/2+c.height+w}]:[{x:r-y/2,y:i-o/2},{x:r+y/2,y:i-o/2},{x:r+y/2,y:i-o/2+f},{x:r+c.width/2,y:i-o/2+f},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+f},{x:r-y/2,y:i-o/2+f}];return qx.polygon(e,a,t)},h}async function PC(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zu(e);e.labelStyle=o;const a=e.assetHeight??48,n=e.assetWidth??48,s=Math.max(a,n),l=i?.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await mx(t,e,"icon-shape default"),g="t"===e.pos,f=s+2*d,y=s+2*d,{nodeBorder:m,mainBkg:x}=r,{stylesMap:C}=Vu(e),b=-y/2,k=-f/2,w=e.label?8:0,S=ux.svg(h),T=Qu(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=C.get("fill");T.stroke=B??x;const _=S.path(Px(b,k,y,f,.1),T),v=Math.max(y,c.width),F=f+c.height+w,L=S.rectangle(-v/2,-F/2,v,F,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>_,":first-child"),A=h.insert(()=>L);if(e.icon){const t=h.append("g");t.html(`<g>${await Sp(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,n=r.y;t.attr("transform",`translate(${-i/2-a},${g?c.height/2+w/2-o/2-n:-c.height/2-w/2-o/2-n})`),t.attr("style",`color: ${C.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-F/2:F/2-c.height})`),M.attr("transform",`translate(0,${g?c.height/2+w/2:-c.height/2-w/2})`),Cx(e,A),e.intersect=function(t){if(p.info("iconSquare intersect",e,t),!e.label)return qx.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=g?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+w},{x:r+y/2,y:i-o/2+c.height+w},{x:r+y/2,y:i+o/2},{x:r-y/2,y:i+o/2},{x:r-y/2,y:i-o/2+c.height+w},{x:r-c.width/2,y:i-o/2+c.height+w}]:[{x:r-y/2,y:i-o/2},{x:r+y/2,y:i-o/2},{x:r+y/2,y:i-o/2+f},{x:r+c.width/2,y:i-o/2+f},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+f},{x:r-y/2,y:i-o/2+f}];return qx.polygon(e,a,t)},h}async function zC(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;const{labelStyles:n}=Zu(e);e.labelStyle=n;const s=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?s??0:0,e?.assetWidth??o),h="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,s??0);const{shapeSvg:d,bbox:u,label:g}=await mx(t,e,"image-shape default"),f="t"===e.pos,y=-h/2,m=-c/2,x=e.label?8:0,C=ux.svg(d),b=Qu(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=C.rectangle(y,m,h,c,b),w=Math.max(h,u.width),S=c+u.height+x,T=C.rectangle(-w/2,-S/2,w,S,{...b,fill:"none",stroke:"none"}),B=d.insert(()=>k,":first-child"),_=d.insert(()=>T);if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${f?S/2-c:-S/2})`)}return g.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-c/2-u.height/2-x/2:c/2-u.height/2+x/2})`),B.attr("transform",`translate(0,${f?u.height/2+x/2:-u.height/2-x/2})`),Cx(e,_),e.intersect=function(t){if(p.info("iconSquare intersect",e,t),!e.label)return qx.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=f?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+x},{x:r+h/2,y:i-o/2+u.height+x},{x:r+h/2,y:i+o/2},{x:r-h/2,y:i+o/2},{x:r-h/2,y:i-o/2+u.height+x},{x:r-u.width/2,y:i-o/2+u.height+x}]:[{x:r-h/2,y:i-o/2},{x:r+h/2,y:i-o/2},{x:r+h/2,y:i-o/2+c},{x:r+u.width/2,y:i-o/2+c},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+c},{x:r-h/2,y:i-o/2+c}];return qx.polygon(e,a,t)},d}async function WC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a=o,n="neo"===e.look?2*o:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(l.height+2*a,e.height??0),c=Math.max(l.width+2*n,(e.width??0)-h),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=kx(d),o=t.path(i,r);u=s.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=Xx(s,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Cx(e,u),e.intersect=function(t){return qx.polygon(e,d,t)},s}async function RC(t,e){const{shapeSvg:r,bbox:i,label:o}=await mx(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),Cx(e,a),e.intersect=function(t){return qx.rect(e,t)},r}async function NC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a=o,n="neo"===e.look?2*o:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(l.height+a,e.height??0),c=Math.max(l.width+n,(e.width??0)-h),d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=kx(d),o=t.path(i,r);u=s.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=Xx(s,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Cx(e,u),e.intersect=function(t){return qx.polygon(e,d,t)},s}async function jC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a=o,n="neo"===e.look?2*o:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(l.height+a,e.height??0),c=Math.max(l.width+n,(e.width??0)-h),d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=kx(d),o=t.path(i,r);u=s.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=Xx(s,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Cx(e,u),e.intersect=function(t){return qx.polygon(e,d,t)},s}function HC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",bx(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(35,e?.width??0),s=Math.max(35,e?.height??0),l=[{x:n,y:0},{x:0,y:s+3.5},{x:n-14,y:s+3.5},{x:0,y:2*s},{x:n,y:s-3.5},{x:14,y:s-3.5}],h=ux.svg(o),c=Qu(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=kx(l),u=h.path(d,c),g=o.insert(()=>u,":first-child");return g.attr("class","outer-path"),a&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${n/2},${-s})`),Cx(e,g),e.intersect=function(t){p.info("lightningBolt intersect",e,t);return qx.polygon(e,l,t)},o}s(EC,"hexagon"),s(OC,"hourglass"),s(DC,"icon"),s(IC,"iconCircle"),s(qC,"iconRounded"),s(PC,"iconSquare"),s(zC,"imageSquare"),s(WC,"inv_trapezoid"),s(RC,"labelRect"),s(NC,"lean_left"),s(jC,"lean_right"),s(HC,"lightningBolt");var UC=s((t,e,r,i,o,a,n)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+n}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),YC=s((t,e,r,i,o,a,n)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+n}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),VC=s((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function XC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-n-3*r,e.height<10&&(e.height=10)}const{shapeSvg:s,bbox:l,label:h}=await mx(t,e,bx(e)),c=(e?.width?e?.width:l.width)+2*a,d=c/2,u=d/(2.5+c/50),p=(e?.height?e?.height:l.height)+u+2*n,g=.1*p;let f;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=YC(0,0,c,p,d,u,g),i=VC(0,u,c,p,d,u),o=Qu(e,{}),a=t.path(r,o),n=t.path(i,o);s.insert(()=>n,":first-child").attr("class","line"),f=s.insert(()=>a,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const t=UC(0,0,c,p,d,u,g);f=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",sf(y)).attr("style",i)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),Cx(e,f),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+u-(l.y-(l.top??0))})`),e.intersect=function(t){const r=qx.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},s}async function GC(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10)}const{shapeSvg:s,bbox:l,label:h}=await mx(t,e,bx(e)),c=(e?.width?e?.width:l.width)+2*(a??0),d=(e?.height?e?.height:l.height)+2*(n??0),u="neo"===e.look?d/4:d/8,p=d+u,{cssStyles:g}=e,f=ux.svg(s),y=Qu(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...wx(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],x=f.polygon(m.map(t=>[t.x,t.y]),y),C=s.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(e.padding??0)-u-(l.y-(l.top??0))})`),Cx(e,C),e.intersect=function(t){return qx.polygon(e,m,t)},s}s(XC,"linedCylinder"),s(GC,"linedWaveEdgedRect");var ZC={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},QC=Math.PI/3,KC=s((t,e)=>{const r=.6*e,i=e*Math.sqrt(.64),o=Math.cos(QC),a=-Math.sin(QC),n=r*-a,s=t+r*o,l=i*o,h=i*a;return`M ${n-l} ${s-h} L ${n+l} ${s+h}`},"businessMarkerPathForCircle"),JC={normal:KC(-24,12),hollow:KC(-23,9),awesome:KC(-21,13),icon:"M 12 -8 L 26 -26"},tb=s((t,e,r)=>{const i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel"),eb=s((t,e,r,i,o=!1)=>{if("handDrawn"===e.look){const a=ux.svg(t).path(r,Qu(e,o?{fill:"none"}:{}));return t.insert(()=>a,":first-child").attr("class",i)}const a=t.append("path").attr("class",i).attr("d",r);return o&&a.attr("fill","none"),a},"appendActorPath"),rb=s((t,e,r,i,o,a,n=!1)=>{if("handDrawn"===e.look){const s=ux.svg(t).circle(r,i,2*o,Qu(e,n?{fill:"none"}:{}));return t.insert(()=>s,":first-child").attr("class",a)}const s=t.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",o);return n&&s.attr("fill","none"),s},"appendActorCircle"),ib=s((t,e,r)=>{e.business&&t.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",JC[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function ob(t,e,r,i){const{labelStyles:o,nodeStyles:a}=Zu(e);e.labelStyle=o;const n="icon"===r||void 0!==e.stereotype?{...e,icon:"icon"===r?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:s,bbox:l,label:h}=await mx(t,n,bx(e,`usecase-actor-variant usecase-actor-${r}`)),c=e.accessibleName??e.label;c&&s.attr("role","img").attr("aria-label",c),h.attr("class","label actor-label usecase-actor-label");const{theme:d,themeVariables:u}=pr();let p,g;if(cm(s,e.colorIndex,d,u.borderColorArray),e.stereotype){const t=await xx(s,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});p=t.label.attr("class","label usecase-stereotype"),g=t.bbox}const f=s.append("g").attr("class",`usecase-actor-glyph ${ZC[r]}`).attr("style",a||null);await i(f,e),ib(f,e,r);const y=e.padding??8,m=g?.height??0,x=80+l.height+(g?m+2:0),C=Math.max(56,l.width,g?.width??0)+2*y,b=x+2*y,k=-x/2;f.attr("transform",`translate(0,${k+36})`);let w=k+72+8;p&&g&&(w+=m/2,tb(p,g,w),w+=m/2+2),tb(h,l,w+l.height/2);const S=s.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-C/2).attr("y",-b/2).attr("width",C).attr("height",b).attr("opacity",0).attr("aria-hidden","true");return Cx(e,S),e.intersect=t=>qx.rect(e,t),s}s(ob,"renderUsecaseActor");var ab=["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 nb(t,e){return ob(t,e,"normal",(t,e)=>{eb(t,e,ab,"usecase-actor-stick")})}s(nb,"usecaseActor");var sb=["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 lb(t,e){return ob(t,e,"awesome",(t,e)=>{eb(t,e,sb,"usecase-actor-awesome-silhouette")})}s(lb,"usecaseActorAwesome");var hb=["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 cb(t,e){return ob(t,e,"hollow",(t,e)=>{rb(t,e,0,-23,9,"usecase-actor-hollow-head",!0),eb(t,e,hb,"usecase-actor-hollow-body",!0)})}s(cb,"usecaseActorHollow");var db=52,ub=s(async(t,e)=>{if("handDrawn"===e.look){const r=ux.svg(t).rectangle(-26,-28,db,db,Qu(e,{}));t.insert(()=>r,":first-child").attr("class","usecase-actor-icon-frame")}else t.append("rect").attr("class","usecase-actor-icon-frame").attr("x",-26).attr("y",-28).attr("width",db).attr("height",db).attr("rx",4).attr("ry",4);const r=e.icon??"",i=await wp(r.includes(":")?r:`fa:${r}`),o=await Sp(r,{height:42,width:42,fallbackPrefix:"fa"}),a=t.append("g").attr("class","usecase-actor-icon-symbol"+(i?"":" usecase-actor-icon-fallback")).attr("aria-hidden","true").html(`<g>${o}</g>`),n=a.node()?.getBBox();n&&a.attr("transform",`translate(${-n.width/2-n.x},${-2-n.height/2-n.y})`)},"drawIconActor");async function pb(t,e){return ob(t,e,"icon",ub)}s(pb,"usecaseActorIcon");var gb=s((t,e,r)=>{const i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel");async function fb(t,e){const r=e,{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const a=r.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:n,bbox:s,halfPadding:l,label:h}=await mx(t,a,bx(e,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:c,themeVariables:d}=pr();let u,p;if(cm(n,e.colorIndex,c,d.borderColorArray),r.stereotype){const t=await xx(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});u=t.label.attr("class","label usecase-stereotype"),p=t.bbox}const g=p?2:0,f=s.height+(p?.height??0)+g,y=Math.max(s.width,p?.width??0),m=l??10,x=y/2+2*m,C=f/2+2*m,b=Math.min(Math.max(m/5,1),m/2),k=y/2+b,w=x-b,S=k/x,T=w/x,B=C*Math.sqrt(Math.max(0,1-S*S)),_=-C*Math.sqrt(Math.max(0,1-T*T));let v;if(u&&p&&gb(u,p,-f/2+p.height/2),gb(h,s,f/2-s.height/2),"handDrawn"===e.look){const t=ux.svg(n).ellipse(0,0,2*x,2*C,Qu(e,{}));v=n.insert(()=>t,":first-child").attr("class","basic label-container usecase-business-ellipse")}else v=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",x).attr("ry",C).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${k} ${B} L ${w} ${_}`).attr("fill","none").attr("style",o||null);const F=r.accessibleName??r.label;return F&&n.attr("role","img").attr("aria-label",F),Cx(e,v),e.calcIntersect=(t,e)=>qx.ellipse(t,t.width/2,t.height/2,e),e.intersect=t=>qx.ellipse(e,x,C,t),n}s(fb,"usecaseBusiness");var yb=s((t,e,r,i)=>{const o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);t.attr("transform",`translate(${r-e.width/2-o},${i-e.height/2-a})`)},"positionLabel"),mb=s(t=>{const e=Number.parseFloat(t??"");return Number.isFinite(e)&&e>=0?e:1},"numericStrokeWidth");async function xb(t,e){const r=e,{labelStyles:i,nodeStyles:o}=Zu(e),{stylesMap:a}=Vu(e);e.labelStyle=i;const{shapeSvg:n,bbox:l,label:h}=await mx(t,e,bx(e,"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"),d=[];for(const s of r.jsonRows??[]){const t=await xx(c,s.key,{labelStyle:i,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),r=await xx(c,s.value,{labelStyle:i,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:t.label.attr("class","label usecase-json-key"),bbox:t.bbox},value:{label:r.label.attr("class","label usecase-json-value"),bbox:r.bbox}})}const u=Math.max(0,...d.map(({key:t})=>t.bbox.width))+16,p=Math.max(0,...d.map(({value:t})=>t.bbox.width))+16,g=l.width+16,f=Math.max(g,u+p),y=p+Math.max(0,f-u-p),m=l.height+8,x=d.map(({key:t,value:e})=>Math.max(t.bbox.height,e.bbox.height)+8),C=m+x.reduce((t,e)=>t+e,0),b=mb(a.get("stroke-width")),k=f+2*b,w=C+2*b,S=-f/2,T=-C/2,B="handDrawn"===e.look?ux.svg(n):void 0,_=B?Qu(e,{}):void 0,v=s((t,e,r,i,a,n)=>{if(B&&_){const o=B.rectangle(r,i,a,n,_);return t.insert(()=>o,":first-child").attr("class",e)}return t.insert("rect",":first-child").attr("class",e).attr("x",r).attr("y",i).attr("width",a).attr("height",n).attr("style",o)},"insertCell"),F=v(n,"label-container usecase-json-border",-k/2,-w/2,k,w);v(c,"usecase-json-cell usecase-json-title-cell",S,T,f,m),c.node()?.append(h.node()),yb(h,l,0,T+m/2);let L=T+m;return d.forEach(({key:t,value:e},r)=>{const i=x[r],o=c.append("g").attr("class","usecase-json-row").attr("data-row-index",r).attr("transform",`translate(0,${L})`);v(o,"usecase-json-cell usecase-json-key-cell",S,0,u,i),v(o,"usecase-json-cell usecase-json-value-cell",S+u,0,y,i),o.node()?.append(t.label.node(),e.label.node()),yb(t.label,t.bbox,S+u/2,i/2),yb(e.label,e.bbox,S+u+y/2,i/2),L+=i}),Cx(e,F),e.intersect=t=>qx.rect(e,t),n}async function Cb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o,s="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*s,10),e.height=Math.max((e?.height??0)-2*n-2*s,10));const{shapeSvg:l,bbox:h,label:c}=await mx(t,e,bx(e)),d=(e?.width?e?.width:h.width)+2*a+2*s-2*s,u=(e?.height?e?.height:h.height)+2*n+2*s-2*s,p=-d/2,g=-u/2,{cssStyles:f}=e,y=ux.svg(l),m=Qu(e,{}),x=[{x:p-s,y:g+s},{x:p-s,y:g+u+s},{x:p+d-s,y:g+u+s},{x:p+d-s,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g+u-s},{x:p+d+s,y:g+u-s},{x:p+d+s,y:g-s},{x:p+s,y:g-s},{x:p+s,y:g},{x:p,y:g},{x:p,y:g+s}],C=[{x:p,y:g+s},{x:p+d-s,y:g+s},{x:p+d-s,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g},{x:p,y:g}];"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const b=kx(x);let k=y.path(b,m);const w=kx(C);let S=y.path(w,m);"handDrawn"!==e.look&&(k=Tx(k),S=Tx(S));const T=l.insert("g",":first-child");return T.insert(()=>k),T.insert(()=>S),T.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h.width/2-s-(h.x-(h.left??0))}, ${-h.height/2+s-(h.y-(h.top??0))})`),Cx(e,T),e.intersect=function(t){return qx.polygon(e,x,t)},l}async function bb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s=e.padding??0,l="neo"===e.look?16:s,h="neo"===e.look?12:s;let c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*l,e.height=(e?.height??0)-3*h);const d=Math.max(a.width,e?.width??0)+2*l,u=Math.max(a.height,e?.height??0)+3*h,p="neo"===e.look?u/4:u/8,g=u+(c?p/2:-p/2),f=-d/2,y=-g/2,m=10,{cssStyles:x}=e,C=wx(f-m,y+g+m,f+d-m,y+g+m,p,.8),b=C?.[C.length-1],k=[{x:f-m,y:y+m},{x:f-m,y:y+g+m},...C,{x:f+d-m,y:b.y-m},{x:f+d,y:b.y-m},{x:f+d,y:b.y-20},{x:f+d+m,y:b.y-20},{x:f+d+m,y:y-m},{x:f+m,y:y-m},{x:f+m,y:y},{x:f,y:y},{x:f,y:y+m}],w=[{x:f,y:y+m},{x:f+d-m,y:y+m},{x:f+d-m,y:b.y-m},{x:f+d,y:b.y-m},{x:f+d,y:y},{x:f,y:y}],S=ux.svg(o),T=Qu(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=kx(k),_=S.path(B,T),v=kx(w),F=S.path(v,T),L=o.insert(()=>_,":first-child");return L.insert(()=>F),L.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-p/2})`),n.attr("transform",`translate(${-a.width/2-m-(a.x-(a.left??0))}, ${-a.height/2+m-p-(a.y-(a.top??0))})`),Cx(e,L),e.intersect=function(t){return qx.polygon(e,k,t)},o}async function kb(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;e.useHtmlLabels||ye(se())||(e.centerLabel=!0);const{shapeSvg:a,bbox:n,label:s}=await mx(t,e,bx(e)),l=Math.max(n.width+2*(e.padding??0),e?.width??0),h=Math.max(n.height+2*(e.padding??0),e?.height??0),c=-l/2,d=-h/2,{cssStyles:u}=e,p=ux.svg(a),g=Qu(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,l,h,g),y=a.insert(()=>f,":first-child");return y.attr("class","basic label-container outer-path"),s.attr("class","label noteLabel"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Cx(e,y),e.intersect=function(t){return qx.rect(e,t)},a}s(xb,"usecaseJsonTable"),s(Cb,"multiRect"),s(bb,"multiWaveEdgedRectangle"),s(kb,"note");var wb=s((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Sb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await mx(t,e,bx(e)),n=a.width+(e.padding??0)+(a.height+(e.padding??0)),s=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ux.svg(o),r=Qu(e,{}),i=wb(0,0,n),a=t.path(i,r);l=o.insert(()=>a,":first-child").attr("transform",`translate(${-n/2+.5}, ${n/2})`),h&&l.attr("style",h)}else l=Xx(o,n,n,s),l.attr("transform",`translate(${-n/2+.5}, ${n/2})`);return i&&l.attr("style",i),Cx(e,l),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];return qx.polygon(t,i,e)},e.intersect=function(t){return this.calcIntersect(e,t)},o}async function Tb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?21:o??0,n="neo"===e.look?12:o??0,{shapeSvg:s,bbox:l,label:h}=await mx(t,e,bx(e)),c=l.width+("neo"===e.look?2*a:a),d=Math.max(l.height+("neo"===e.look?2*n:n),e.height??0),u=d/4,p=-Math.max(c,(e.width??0)-u)/2,g=-d/2,f=g/2,y=[{x:p+f,y:g},{x:p,y:0},{x:p+f,y:-g},{x:-p,y:-g},{x:-p,y:g}],{cssStyles:m}=e,x=ux.svg(s),C=Qu(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=kx(y),k=x.path(b,C),w=s.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-f/2},0)`),h.attr("transform",`translate(${-f/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),Cx(e,w),e.intersect=function(t){return qx.polygon(e,y,t)},s}async function Bb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),n=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=e.description,h=e.label,c=await Wx(s,h,e.labelStyle,!0,!0);let d={width:0,height:0};if(ye(pr())){const t=c.children[0],e=po(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}p.info("Text 2",l);const u=l||[],g=c.getBBox(),f=await Wx(s,Array.isArray(u)?u.join("<br/>"):u,e.labelStyle,!0,!0),y=f.children[0],m=po(f);d=y.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);const x=(e.padding||0)/2;po(f).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+x+5)+")"),po(c).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=s.node().getBBox(),s.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const C=d.width+(e.padding||0),b=d.height+(e.padding||0),k=-d.width/2-x,w=-d.height/2-x;let S,T;if("handDrawn"===e.look){const t=ux.svg(a),r=Qu(e,{}),i=t.path(Px(k,w,C,b,e.rx||0),r),o=t.line(-d.width/2-x,-d.height/2-x+g.height+x,d.width/2+x,-d.height/2-x+g.height+x,r);T=a.insert(()=>(p.debug("Rough node insert CXC",i),o),":first-child"),S=a.insert(()=>(p.debug("Rough node insert CXC",i),i),":first-child")}else S=n.insert("rect",":first-child"),T=n.insert("line"),S.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+g.height+x).attr("y2",-d.height/2-x+g.height+x);return Cx(e,S),e.intersect=function(t){return qx.rect(e,t)},a}async function _b(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return wC(t,e,{rx:i,ry:i,labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}s(Sb,"question"),s(Tb,"rect_left_inv_arrow"),s(Bb,"rectWithTitle"),s(_b,"roundedRect");async function vb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=(e?.width??s.width)+2*o+("neo"===e.look?8:16),c=(e?.height??s.height)+2*a,d=h-8,u=c,p=8-h/2,g=-c/2,{cssStyles:f}=e,y=ux.svg(n),m=Qu(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=[{x:p,y:g},{x:p+d,y:g},{x:p+d,y:g+u},{x:p-8,y:g+u},{x:p-8,y:g},{x:p,y:g},{x:p,y:g+u}],C=y.polygon(x.map(t=>[t.x,t.y]),m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path").attr("style",sf(f)),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),f&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${4-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),Cx(e,b),e.intersect=function(t){return qx.rect(e,t)},n}async function Fb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*n,10));const{shapeSvg:s,bbox:l,label:h}=await mx(t,e,bx(e)),c=(e?.width?e?.width:l.width)+2*a,d=1.5*((e?.height?e?.height:l.height)+2*n)/1.5,u=-c/2,p=-d/2,{cssStyles:g}=e,f=ux.svg(s),y=Qu(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p},{x:u,y:p+d},{x:u+c,y:p+d},{x:u+c,y:p-d/2}],x=kx(m),C=f.path(x,y),b=s.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",i),b.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-c/2+(e.padding??0)-(l.x-(l.left??0))}, ${-d/4+(e.padding??0)-(l.y-(l.top??0))})`),Cx(e,b),e.intersect=function(t){return qx.polygon(e,m,t)},s}async function Lb(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r,a={rx:0,ry:0,labelPaddingX:e.labelPaddingX??i,labelPaddingY:o},n=await wC(t,e,a);if(void 0!==e.colorIndex){const{theme:t,themeVariables:r}=pr();cm(n,e.colorIndex,t,r.borderColorArray)}return n}s(vb,"shadedProcess"),s(Fb,"slopedRect"),s(Lb,"squareRect");var Mb=s((t,e,r)=>{const i=t.height+r,o=i*Math.cos(Math.PI/98),a=Math.sqrt(Math.max(0,o**2-t.height**2));return{w:Math.max(t.width+i/4+e,1.5*i+(i-o),t.width+e+i-a),h:i}},"stadiumDimensions");async function Ab(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?40:o,n="neo"===e.look?24:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),{w:h,h:c}=Mb(l,a,n),d=c/2,{cssStyles:u}=e,p=ux.svg(s),g=Qu(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Sx(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Sx(h/2-d,0,d,50,270,450)],y=kx(f),m=p.path(y,g),x=s.insert(()=>m,":first-child");return x.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",i),Cx(e,x),e.intersect=function(t){return qx.polygon(e,f,t)},s}async function $b(t,e){return wC(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5})}function Eb(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:n,stateBorder:s,nodeBorder:l,nodeShadow:h}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),d=ux.svg(c),u=Qu(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=d.circle(0,0,e.width,{...u,stroke:n,strokeWidth:2}),g=s??l,f=5*(e.width??0)/14,y=d.circle(0,0,f,{...u,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>p,":first-child");if(m.insert(()=>y),"handDrawn"!==e.look&&m.attr("class","outer-path"),a&&m.selectAll("path").attr("style",a),o&&m.selectAll("path").attr("style",o),e.width<25&&h&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${r})`)}return Cx(e,m),e.intersect=function(t){return qx.circle(e,(e.width??0)/2,t)},c}function Ob(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=ux.svg(a).circle(0,0,e.width,Uu(i));n=a.insert(()=>t),n.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${r})`)}return Cx(e,n),e.intersect=function(t){return qx.circle(e,(e.width??7)/2,t)},a}s(Ab,"stadium"),s($b,"state"),s(Eb,"stateEnd"),s(Ob,"stateStart");async function Db(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e?.padding??8,a="neo"===e.look?28:o,n="neo"===e.look?12:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(l.width+16+a,e.width??0),c=Math.max(l.height+n,e.height??0),d=h-16,u=c,p=-h/2,g=-c/2,f=[{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("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=t.rectangle(p,g,d+16,u,r),o=t.line(p+8,g,p+8,g+u,r),a=t.line(p+8+d,g,p+8+d,g+u,r);s.insert(()=>o,":first-child"),s.insert(()=>a,":first-child");const n=s.insert(()=>i,":first-child"),{cssStyles:l}=e;n.attr("class","basic label-container").attr("style",sf(l)),Cx(e,n)}else{const t=Xx(s,d,u,f);i&&t.attr("style",i),Cx(e,t)}return e.intersect=function(t){return qx.polygon(e,f,t)},s}s(Db,"subroutine");async function Ib(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*n,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*n),10));const{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=(e?.height?e?.height:l.height)+2*n,c=.2*h,d=.2*h,u=(e?.width?e?.width:l.width)+2*a+c-c,p=h,g=-u/2,f=-p/2,{cssStyles:y}=e,m=ux.svg(s),x=Qu(e,{}),C=[{x:g-c/2,y:f},{x:g+u+c/2,y:f},{x:g+u+c/2,y:f+p},{x:g-c/2,y:f+p}],b=[{x:g+u-c/2,y:f+p},{x:g+u+c/2,y:f+p},{x:g+u+c/2,y:f+p-d}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=kx(C),w=m.path(k,x),S=kx(b),T=m.path(S,{...x,fillStyle:"solid"}),B=s.insert(()=>T,":first-child");return B.insert(()=>w,":first-child"),B.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),Cx(e,B),e.intersect=function(t){return qx.polygon(e,C,t)},s}async function qb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:n}=await mx(t,e,bx(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),h=l/8,c=.2*s,d=.2*l,u=l+h,{cssStyles:p}=e,g=ux.svg(o),f=Qu(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:u/2},...wx(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,h,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2}],m=-s/2+s/2*.1,x=-u/2-.4*d,C=[{x:m+s-c,y:1.3*(x+l)},{x:m+s,y:x+l-d},{x:m+s,y:.9*(x+l)},...wx(m+s,1.25*(x+l),m+s-c,1.3*(x+l),.02*-l,.5)],b=kx(y),k=g.path(b,f),w=kx(C),S=g.path(w,{...f,fillStyle:"solid"}),T=o.insert(()=>S,":first-child");return T.insert(()=>k,":first-child"),T.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-s/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Cx(e,T),e.intersect=function(t){return qx.polygon(e,y,t)},o}async function Pb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await mx(t,e,bx(e)),n=Math.max(a.width+(e.padding??0),e?.width||0),s=Math.max(a.height+(e.padding??0),e?.height||0),l=-n/2,h=-s/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",s),Cx(e,c),e.intersect=function(t){return qx.rect(e,t)},o}s(Ib,"taggedRect"),s(qb,"taggedWaveEdgedRectangle"),s(Pb,"text");var zb=s((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Wb=s((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Rb=s((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Nb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?12:o/2,n=e.height??0;if(e.height&&(e.height=e.height-a,e.height<5&&(e.height=5)),e.width){const t=n/2/(2.5+n/50);e.width=e.width-a-3*t,e.width<10&&(e.width=10)}const{shapeSvg:s,bbox:l,label:h}=await mx(t,e,bx(e)),c=Math.max(e.height??0,l.height)+a,d=c/2,u=d/(2.5+c/50),p=Math.max(e.width??0,l.width)+u+a,{cssStyles:g}=e;let f;if("handDrawn"===e.look){const t=ux.svg(s),r=Wb(0,0,p,c,u,d),i=Rb(0,0,p,c,u,d),o=t.path(r,Qu(e,{})),a=t.path(i,Qu(e,{fill:"none"}));f=s.insert(()=>a,":first-child"),f=s.insert(()=>o,":first-child"),f.attr("class","basic label-container"),g&&f.attr("style",g)}else{const t=zb(0,0,p,c,u,d);f=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",sf(g)).attr("style",i),f.attr("class","basic label-container outer-path"),g&&f.selectAll("path").attr("style",g),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",u),f.attr("transform",`translate(${-p/2}, ${c/2} )`),h.attr("transform",`translate(${-l.width/2-u-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),Cx(e,f),e.intersect=function(t){const r=qx.rect(e,t),i=r.y-(e.y??0);if(0!=d&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-u)){let o=u*u*(1-i*i/(d*d));0!=o&&(o=Math.sqrt(Math.abs(o))),o=u-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},s}async function jb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a=(e.look,o),n="neo"===e.look?2*o:o,{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=Math.max(l.height+a,e.height??0),c=Math.max(l.width+n,(e.width??0)-h),d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=ux.svg(s),r=Qu(e,{}),i=kx(d),o=t.path(i,r);u=s.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=Xx(s,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,Cx(e,u),e.intersect=function(t){return qx.polygon(e,d,t)},s}async function Hb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o;(e.width||e.height)&&(e.height=(e.height??0)-2*n,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+2*n,{cssStyles:d}=e,u=ux.svg(s),p=Qu(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-h/2*.8,y:-c/2},{x:h/2*.8,y:-c/2},{x:h/2,y:-c/2*.6},{x:h/2,y:c/2},{x:-h/2,y:c/2},{x:-h/2,y:-c/2*.6}],f=kx(g),y=u.path(f,p),m=s.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),Cx(e,m),e.intersect=function(t){return qx.polygon(e,g,t)},s}s(Nb,"tiltedCylinder"),s(jb,"trapezoid"),s(Hb,"trapezoidalPentagon");async function Ub(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=Xt(pr().flowchart?.htmlLabels),c=(e?.width?e?.width:s.width)+a,d=e?.height?e?.height:c+s.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-d}],{cssStyles:g}=e,f=ux.svg(n),y=Qu(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=kx(u),x=f.path(m,y),C=n.insert(()=>x,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),e.width=c,e.height=d,Cx(e,C),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${d/2-(s.height+(e.padding??0)/(h?2:1)-(s.y-(s.top??0)))})`),e.intersect=function(t){return p.info("Triangle intersect",e,u,t),qx.polygon(e,u,t)},n}async function Yb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?12:o;let s=!0;(e.width||e.height)&&(s=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10));const{shapeSvg:l,bbox:h,label:c}=await mx(t,e,bx(e)),d=(e?.width?e?.width:h.width)+2*(a??0),u=(e?.height?e?.height:h.height)+2*(n??0),p="neo"===e.look?u/4:u/8,g=u+(s?p:-p),{cssStyles:f}=e,y=14-d,m=y>0?y/2:0,x=ux.svg(l),C=Qu(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=[{x:-d/2-m,y:g/2},...wx(-d/2-m,g/2,d/2+m,g/2,p,.8),{x:d/2+m,y:-g/2},{x:-d/2-m,y:-g/2}],k=kx(b),w=x.path(k,C),S=l.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))},${-u/2+(e.padding??0)-p-(h.y-(h.top??0))})`),Cx(e,S),e.intersect=function(t){return qx.polygon(e,b,t)},l}async function Vb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,n="neo"===e.look?20:o;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-n-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:s,bbox:l}=await mx(t,e,bx(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+n,d=c/8,u=c+2*d,{cssStyles:p}=e,g=ux.svg(s),f=Qu(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...wx(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...wx(h/2,-u/2,-h/2,-u/2,d,-1)],m=kx(y),x=g.path(m,f),C=s.insert(()=>x,":first-child");return C.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),Cx(e,C),e.intersect=function(t){return qx.polygon(e,y,t)},s}s(Ub,"triangle"),s(Yb,"waveEdgedRectangle"),s(Vb,"waveRectangle");var Xb=10;async function Gb(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-Xb,10),e.height=Math.max((e?.height??0)-2*a-Xb,10));const{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=(e?.width?e?.width:s.width)+2*o+Xb,c=(e?.height?e?.height:s.height)+2*a+Xb,d=h-Xb,u=c-Xb,p=-d/2,g=-u/2,{cssStyles:f}=e,y=ux.svg(n),m=Qu(e,{}),x=[{x:p-Xb,y:g-Xb},{x:p-Xb,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g-Xb}],C=`M${p-Xb},${g-Xb} L${p+d},${g-Xb} L${p+d},${g+u} L${p-Xb},${g+u} L${p-Xb},${g-Xb}\n M${p-Xb},${g} L${p+d},${g}\n M${p},${g-Xb} L${p},${g+u}`;"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const b=y.path(C,m),k=n.insert(()=>b,":first-child");return k.attr("transform","translate(5, 5)"),k.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${-s.width/2+5-(s.x-(s.left??0))}, ${-s.height/2+5-(s.y-(s.top??0))})`),Cx(e,k),e.intersect=function(t){return qx.polygon(e,x,t)},n}s(Gb,"windowPane");var Zb=new Set(["redux-color","redux-dark-color"]),Qb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Kb(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:o}=se(),{rowEven:a,rowOdd:n,nodeBorder:s,borderColorArray:l}=o;if("handDrawn"===e.look){const{themeVariables:r}=se(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await Kb(t,o)}const h=se();e.useHtmlLabels=h.htmlLabels;let c=h.er?.diagramPadding??10,d=h.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:p,nodeStyles:g}=Zu(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:c,labelPaddingY:1.5*c};Yg(e.label,h)+2*o.labelPaddingX<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const a=await wC(t,e,o);if(null!=i&&Zb.has(i)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%l.length)}if(!Xt(h.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}h.htmlLabels||(c*=1.25,d*=1.25);let f=bx(e);f||(f="node default");const y=t.insert("g").attr("class",f).attr("id",e.domId||e.id),m=await Jb(y,e.label??"",h,0,0,["name"],p);m.height+=d;let x=0;const C=[],b=[];let k=0,w=0,S=0,T=0,B=!0,_=!0;for(const N of r.attributes){const t=await Jb(y,N.type,h,0,x,["attribute-type"],p);k=Math.max(k,t.width+c);const e=await Jb(y,N.name,h,0,x,["attribute-name"],p);w=Math.max(w,e.width+c);const r=await Jb(y,N.keys.join(),h,0,x,["attribute-keys"],p);S=Math.max(S,r.width+c);const i=await Jb(y,N.comment,h,0,x,["attribute-comment"],p);T=Math.max(T,i.width+c);const o=Math.max(t.height,e.height,r.height,i.height)+d;b.push({yOffset:x,rowHeight:o}),x+=o}let v=4;S<=c&&(B=!1,S=0,v--),T<=c&&(_=!1,T=0,v--);const F=y.node().getBBox();if(m.width+2*c-(k+w+S+T)>0){const t=m.width+2*c-(k+w+S+T);k+=t/v,w+=t/v,S>0&&(S+=t/v),T>0&&(T+=t/v)}const L=k+w+S+T,M=ux.svg(y),A=Qu(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let $=0;b.length>0&&($=b.reduce((t,e)=>t+(e?.rowHeight??0),0));const E=Math.max(F.width+2*c,e?.width||0,L),O=Math.max(($??0)+m.height,e?.height||0),D=-E/2,I=-O/2;if(y.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=po(r[e]),o=i.attr("transform");let a=0,n=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),n=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=k:i.attr("class").includes("attribute-keys")?a+=k+w:i.attr("class").includes("attribute-comment")&&(a+=k+w+S))}i.attr("transform",`translate(${D+c/2+a}, ${n+I+m.height+d/2})`)}),y.select(".name").attr("transform","translate("+-m.width/2+", "+(I+d/2)+")"),null!=i&&Zb.has(i)){const t=r.colorIndex??0;y.attr("data-color-id","color-"+t%l.length)}const q=M.rectangle(D,I,E,O,A),P=y.insert(()=>q,":first-child").attr("class","outer-path").attr("style",u.join(""));C.push(0);for(const[N,j]of b.entries()){const t=(N+1)%2==0&&0!==j.yOffset,e=M.rectangle(D,m.height+I+j?.yOffset,E,j?.rowHeight,{...A,fill:t?a:n,stroke:s});y.insert(()=>e,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(t?"even":"odd"))}const z=1e-4;let W=tk(D,m.height+I,E+D,m.height+I,z),R=M.polygon(W.map(t=>[t.x,t.y]),A);if(y.insert(()=>R).attr("class","divider"),W=tk(k+D,m.height+I,k+D,O+I,z),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider"),B){const t=k+w+D;W=tk(t,m.height+I,t,O+I,z),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(_){const t=k+w+S+D;W=tk(t,m.height+I,t,O+I,z),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}for(const N of C){const t=m.height+I+N;W=tk(D,t,E+D,t,z),R=M.polygon(W.map(t=>[t.x,t.y]),A),y.insert(()=>R).attr("class","divider")}if(Cx(e,P),g&&"handDrawn"!==e.look)if(null!=i&&Qb.has(i))y.selectAll("path").attr("style",g);else{const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return qx.rect(e,t)},y}async function Jb(t,e,r,i=0,o=0,a=[],n=""){const s=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",n);e!==Ee(e)&&(e=(e=Ee(e)).replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await rm(s,e,{width:Yg(e,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=l.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Xt(r.htmlLabels)){const t=l.children[0];t.style.textAlign="start";const e=po(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return h}function tk(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function ek(t,e,r,i,o=r.class.padding??12){const a=i?0:3,n=t.insert("g").attr("class",bx(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,d=0,u=0,p=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await rk(s,{text:`«${t}»`},0);d=s.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await rk(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=n.insert("g").attr("class","members-group text");let f=0;for(const x of e.members){f+=await rk(h,x,f,[x.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=n.insert("g").attr("class","methods-group text");let y=0;for(const x of e.methods){y+=await rk(c,x,y,[x.parseClassifier()])+a}let m=n.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=n.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=n.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=n.node().getBBox(),{shapeSvg:n,bbox:m}}async function rk(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=se();let n="useHtmlLabels"in e?e.useHtmlLabels:Xt(a.htmlLabels)??!0,s="";s="text"in e?e.text:e.label,!n&&s.startsWith("\\")&&(s=s.substring(1)),ze(s)&&(n=!0);const l=await rm(o,yr(af(s)),{width:Yg(s,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,c=1;if(n){const t=l.children[0],e=po(l);c=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(c+=t.innerHTML.split("<mrow>").length-1),await px(t),h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{i.includes("font-weight: bolder")&&po(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const t=l.children[0];if(""===l.textContent||l.textContent.includes(">")){t.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===s[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=l.getBBox()}return o.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}async function ik(t,e){const r=pr(),{theme:i,themeVariables:o}=r,{useGradient:a,borderColorArray:n}=o,s=r.class.padding??12,l=s,h=e.useHtmlLabels??Xt(r.htmlLabels)??!0,c=e;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];const{shapeSvg:d,bbox:u}=await ek(t,e,r,h,l);cm(d,e.colorIndex,i,n);const{labelStyles:p,nodeStyles:g}=Zu(e);e.labelStyle=p,e.cssStyles=c.styles||"";const f=c.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));const y=0===c.members.length&&0===c.methods.length&&!r.class?.hideEmptyMembersBox,m=ux.svg(d),x=Qu(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(e.width??0,u.width);let b=Math.max(e.height??0,u.height);const k=(e.height??0)>u.height;0===c.members.length&&0===c.methods.length?b+=l:c.members.length>0&&0===c.methods.length&&(b+=2*l);const w=-C/2,S=-b/2;let T=y?2*s:0===c.members.length&&0===c.methods.length?-s:0;k&&(T=2*s);const B=m.rectangle(w-s,S-s-(y?s:0===c.members.length&&0===c.methods.length?-s/2:0),C+2*s,b+2*s+T,x),_=d.insert(()=>B,":first-child");_.attr("class","basic label-container outer-path");const v=_.node().getBBox(),F=d.select(".annotation-group").node().getBBox().height-(y?s/2:0)||0,L=d.select(".label-group").node().getBBox().height-(y?s/2:0)||0,M=d.select(".members-group").node().getBBox().height-(y?s/2:0)||0,A=(F+L+S+s-(S-s-(y?s:0===c.members.length&&0===c.methods.length?-s/2:0)))/2;if(d.selectAll(".text").each((t,e,i)=>{const o=po(i[e]),a=o.attr("transform");let n=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(n=parseFloat(t[2]))}let u=n+S+s-(y?s:0===c.members.length&&0===c.methods.length?-s/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max(M,l/2);u=k?Math.max(A,F+L+t+S+2*l+s)+2*l:F+L+t+S+4*l+s}0===c.members.length&&0===c.methods.length&&r.class?.hideEmptyMembersBox&&(u=c.annotations.length>0?n-l:n),h||(u-=4);let p=w;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,d.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${u})`)}),c.members.length>0||c.methods.length>0||y){const t=F+L+S+s,r=m.line(v.x,t,v.x+v.width,t+.001,x);d.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",f)}if(y||c.members.length>0||c.methods.length>0){const t=F+L+M+S+2*l+s,r=m.line(v.x,k?Math.max(A,t):t,v.x+v.width,(k?Math.max(A,t):t)+.001,x);d.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",f)}if("handDrawn"!==c.look&&d.selectAll("path").attr("style",f),_.select(":nth-child(2)").attr("style",f),d.selectAll(".divider").select("path").attr("style",f),e.labelStyle?d.selectAll("span").attr("style",e.labelStyle):d.selectAll("span").attr("style",f),!h){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){const t=e[0].replace("color","fill");d.selectAll("tspan").attr("style",t)}else if(p){const e=t.exec(p);if(e){const t=e[0].replace("color","fill");d.selectAll("tspan").attr("style",t)}}}return Cx(e,_),e.intersect=function(t){return qx.rect(e,t)},d}async function ok(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const o=e,a=e,n="verifyMethod"in e,s=bx(e),l=pr(),{themeVariables:h}=l,{borderColorArray:c,requirementEdgeLabelBackground:d}=h,u="elk"===l.layout?"start":"center",p=t.insert("g").attr("class",s).attr("id",e.domId??e.id);let g;g=n?await ak(p,`<<${o.type}>>`,0,e.labelStyle):await ak(p,"<<Element>>",0,e.labelStyle);let f=g;const y=await ak(p,o.name,f,e.labelStyle+"; font-weight: bold;");if(f+=y+20,n){f+=await ak(p,""+(o.requirementId?`ID: ${o.requirementId}`:""),f,e.labelStyle,u);f+=await ak(p,""+(o.text?`Text: ${o.text}`:""),f,e.labelStyle,u);f+=await ak(p,""+(o.risk?`Risk: ${o.risk}`:""),f,e.labelStyle,u),await ak(p,""+(o.verifyMethod?`Verification: ${o.verifyMethod}`:""),f,e.labelStyle,u)}else{f+=await ak(p,""+(a.type?`Type: ${a.type}`:""),f,e.labelStyle,u),await ak(p,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),f,e.labelStyle,u)}const m=(p.node()?.getBBox().width??200)+20,x=(p.node()?.getBBox().height??200)+20,C=-m/2,b=-x/2,k=ux.svg(p),w=Qu(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const S=k.rectangle(C,b,m,x,w),T=p.insert(()=>S,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),c?.length){const t=e.colorIndex??0;p.attr("data-color-id","color-"+t%c.length)}if(p.selectAll(".label").each((t,e,r)=>{const i=po(r[e]),o=i.attr("transform");let a=0,n=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),n=parseFloat(t[2]))}const s=n-x/2;let l=C+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${s+20})`)}),f>g+y+20){const t=b+g+y+20;let r;if("neo"===e.look){const e=.001,i=[[C,t],[C+m,t],[C+m,t+e],[C,t+e]];r=k.polygon(i,w)}else r=k.line(C,t,C+m,t,w);p.insert(()=>r).attr("class","divider")}return Cx(e,T),e.intersect=function(t){return qx.rect(e,t)},i&&"handDrawn"!==e.look&&(d||c?.length)&&p.selectAll("path").attr("style",i),p}async function ak(t,e,r,i="",o="center"){if(""===e)return 0;const a=t.insert("g").attr("class","label").attr("style",i),n=pr(),s=n.htmlLabels??!0,l=await rm(a,yr(af(e)),{width:Yg(e,n)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},n);let h;if(s){const t=l.children[0],e=po(l);"start"===o&&po(t).style("text-align","left"),h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{const t=l.children[0];for(const e of t.children)i&&e.setAttribute("style",i);if("start"===o){t.setAttribute("text-anchor","start");for(const e of t.children)e.setAttribute("text-anchor","start")}h=l.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}s(Kb,"erBox"),s(Jb,"addText"),s(tk,"lineToPolygon"),s(ek,"textHelper"),s(rk,"addText"),s(ik,"classBox"),s(ok,"requirementBox"),s(ak,"addText");var nk=s(t=>{switch(t){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 sk(t,e,{config:r}){const{labelStyles:i,nodeStyles:o}=Zu(e);e.labelStyle=i||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:n,bbox:s,label:l}=await mx(t,e,bx(e)),h=e.padding||10;let c,d="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),c=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=c?await xx(c,"ticket"in e&&e.ticket||"",u):await xx(n,"ticket"in e&&e.ticket||"",u));const{label:f,bbox:y}=await xx(n,"assigned"in e&&e.assigned||"",u);e.width=a;const m=e?.width||0,x=Math.max(g.height,y.height)/2,C=Math.max(s.height+20,e?.height||0)+x,b=-m/2,k=-C/2;let w;l.attr("transform","translate("+(h-m/2)+", "+(-x-s.height/2)+")"),p.attr("transform","translate("+(h-m/2)+", "+(-x+s.height/2)+")"),f.attr("transform","translate("+(h+m/2-y.width-20)+", "+(-x+s.height/2)+")");const{rx:S,ry:T}=e,{cssStyles:B}=e;if("handDrawn"===e.look){const t=ux.svg(n),r=Qu(e,{}),i=S||T?t.path(Px(b,k,m,C,S||0),r):t.rectangle(b,k,m,C,r);w=n.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",B||null)}else{w=n.insert("rect",":first-child"),w.attr("class","basic label-container __APA__").attr("style",o).attr("rx",S??5).attr("ry",T??5).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const t="priority"in e&&e.priority;if(t){const e=n.append("line"),r=b+2,i=k+Math.floor((S??0)/2),o=k+C-Math.floor((S??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",nk(t))}}return Cx(e,w),e.height=C,e.intersect=function(t){return qx.rect(e,t)},n}async function lk(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:n,label:s}=await mx(t,e,bx(e)),l=a.width+10*n,h=a.height+8*n,c=.15*l,{cssStyles:d}=e,u=a.width+20,g=a.height+20,f=Math.max(l,u),y=Math.max(h,g);let m;s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const x=`M0 0 \n a${c},${c} 1 0,0 ${.25*f},${-1*y*.1}\n a${c},${c} 1 0,0 ${.25*f},0\n a${c},${c} 1 0,0 ${.25*f},0\n a${c},${c} 1 0,0 ${.25*f},${.1*y}\n\n a${c},${c} 1 0,0 ${.15*f},${.33*y}\n a${.8*c},${.8*c} 1 0,0 0,${.34*y}\n a${c},${c} 1 0,0 ${-1*f*.15},${.33*y}\n\n a${c},${c} 1 0,0 ${-1*f*.25},${.15*y}\n a${c},${c} 1 0,0 ${-1*f*.25},0\n a${c},${c} 1 0,0 ${-1*f*.25},0\n a${c},${c} 1 0,0 ${-1*f*.25},${-1*y*.15}\n\n a${c},${c} 1 0,0 ${-1*f*.1},${-1*y*.33}\n a${.8*c},${.8*c} 1 0,0 0,${-1*y*.34}\n a${c},${c} 1 0,0 ${.1*f},${-1*y*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=ux.svg(o),r=Qu(e,{}),i=t.path(x,r);m=o.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",sf(d))}else m=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return m.attr("transform",`translate(${-f/2}, ${-y/2})`),Cx(e,m),e.calcIntersect=function(t,e){return qx.rect(t,e)},e.intersect=function(t){return p.info("Bang intersect",e,t),qx.rect(e,t)},o}async function hk(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:n,label:s}=await mx(t,e,bx(e)),l=a.width+2*n,h=a.height+2*n,c=.15*l,d=.25*l,u=.35*l,g=.2*l,{cssStyles:f}=e;let y;const m=`M0 0 \n a${c},${c} 0 0,1 ${.25*l},${-1*l*.1}\n a${u},${u} 1 0,1 ${.4*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.35*l},${.2*l}\n\n a${c},${c} 1 0,1 ${.15*l},${.35*h}\n a${g},${g} 1 0,1 ${-1*l*.15},${.65*h}\n\n a${d},${c} 1 0,1 ${-1*l*.25},${.15*l}\n a${u},${u} 1 0,1 ${-1*l*.5},0\n a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}\n a${g},${g} 1 0,1 ${.1*l},${-1*h*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=ux.svg(o),r=Qu(e,{}),i=t.path(m,r);y=o.insert(()=>i,":first-child"),y.attr("class","basic label-container").attr("style",sf(f))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-h/2})`),Cx(e,y),e.calcIntersect=function(t,e){return qx.rect(t,e)},e.intersect=function(t){return p.info("Cloud intersect",e,t),qx.rect(e,t)},o}async function ck(t,e){const{labelStyles:r,nodeStyles:i}=Zu(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:n,label:s}=await mx(t,e,bx(e)),l=a.width+8*n,h=a.height+2*n,c="neo"===e.look?`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-5}\n H${-l/2}\n Z\n `:`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${-(l-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",c);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>s.node()),Cx(e,d),e.calcIntersect=function(t,e){return qx.rect(t,e)},e.intersect=function(t){return qx.rect(e,t)},o}async function dk(t,e){return aC(t,e,{padding:e.padding??0})}s(sk,"kanbanItem"),s(lk,"bang"),s(hk,"cloud"),s(ck,"defaultMindmapNode"),s(dk,"mindmapCircle");var uk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Lb},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:_b},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ab},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Db},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:kC},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:SC},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:LC},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Ux},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:sC},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:rC},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:mC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:aC},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lk},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hk},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Sb},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:EC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:jC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:NC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:jb},{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:WC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:BC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Pb},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:iC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:vb},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ob},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Eb},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:MC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:OC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:dC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:pC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:fC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:HC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Yb},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:AC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Nb},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:XC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:yC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:TC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ub},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Gb},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:vC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Hb},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:FC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Fb},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:bb},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Cb},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Hx},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:hC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qb},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ib},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Vb},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Tb},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:GC}],pk=s(()=>{const t={state:$b,choice:oC,note:kb,composite:nC,rectWithTitle:Bb,labelRect:RC,block_arrow:eC,collapsedGroup:Vx,iconSquare:PC,iconCircle:IC,icon:DC,iconRounded:qC,imageSquare:zC,anchor:Rx,kanbanItem:sk,mindmapCircle:dk,defaultMindmapNode:ck,classBox:ik,erBox:Kb,requirementBox:ok,usecaseActor:nb,usecaseActorHollow:cb,usecaseActorAwesome:lb,usecaseActorIcon:pb,usecaseBusiness:fb,usecaseEllipse:_C,usecaseJsonTable:xb},e=[...Object.entries(t),...uk.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function gk(t){return t in pk}s(gk,"isValidShape");var fk=s(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),yk=new Map;async function mk(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?pk[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===r.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),o=await a(i,e,r)}else o=await a(t,e,r),i=o;return i.attr("data-look",sf(e.look)),e.tooltip&&o.attr("title",e.tooltip),yk.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}s(mk,"insertNode");var xk=s((t,e)=>{yk.set(e.id,t)},"setNodeElem"),Ck=s(()=>{yk.clear()},"clear"),bk=s(t=>{const e=yk.get(t.id);p.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode"),kk=s(async(t,e)=>{const r=pr(),{theme:i,themeVariables:o,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s,borderColorArray:l}=o,h=s,{labelStyles:c,nodeStyles:d,borderStyles:u,backgroundStyles:g}=Zu(e),f=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.domId??e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);cm(f,e.colorIndex,i,l);const y=Xt(r.flowchart.htmlLabels),m="LR"===e.direction,x=f.insert("g").attr("class","cluster-label swimlane-label"),C=await rm(x,e.label,{style:e.labelStyle,useHtmlLabels:y,isNode:!0,width:e.width});let b=C.getBBox();if(y){const t=C.children[0],e=po(C);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}const k=e.padding??0,w=e.width<=b.width+k?b.width+k:e.width;e.width<=b.width+k?e.diff=(w-e.width)/2-k:e.diff=-k;const S=e.height,T=e.y-S/2,B=e.y+S/2,_=e.x-w/2,v=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:T+S/3,F=m?4:0,L=b.height+2*F;let M,A;if(m){const t=Math.max(L,b.height+2*F),r=_+t,i=Math.max(0,w-t);if("handDrawn"===e.look){const o=ux.svg(f),s=Qu(e,{roughness:.7,fill:n,stroke:h,seed:a}),l=Qu(e,{roughness:.7,fill:"none",stroke:h,seed:a}),c=o.rectangle(_,T,t,S,s);M=f.insert(()=>c,":first-child").attr("class","swimlane-title");const d=o.rectangle(r,T,i,S,l);A=f.insert(()=>d,":first-child").attr("class","swimlane-body"),M.select("path:nth-child(2)").attr("style",u.join(";")),M.select("path").attr("style",g.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),A=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",d).attr("x",_).attr("y",T).attr("width",t).attr("height",S).attr("fill",n).attr("stroke",h),A.attr("class","swimlane-body").attr("style",d).attr("x",r).attr("y",T).attr("width",i).attr("height",S).attr("fill","none").attr("stroke",h);const o=_+t/2,s=e.y;x.attr("transform",`translate(${o}, ${s}) rotate(-90) translate(${-b.width/2}, ${-b.height/2})`)}else{const t=Math.max(0,v-T),r=Math.min(L,t),i=T+r,o=Math.max(0,B-i),s=e.x-w/2;if("handDrawn"===e.look){const t=ux.svg(f),l=Qu(e,{roughness:.7,fill:n,stroke:h,fillWeight:3,seed:a}),c=Qu(e,{roughness:.7,fill:"none",stroke:h,seed:a}),d=t.rectangle(s,T,w,r,l);M=f.insert(()=>d,":first-child").attr("class","swimlane-title");const p=t.rectangle(s,i,w,o,c);A=f.insert(()=>p,":first-child").attr("class","swimlane-body"),M.select("path:nth-child(2)").attr("style",u.join(";")),M.select("path").attr("style",g.join(";").replace("fill","stroke"))}else M=f.insert("rect",":first-child"),A=f.insert("rect",":first-child"),M.attr("class","swimlane-title").attr("style",d).attr("x",s).attr("y",T).attr("width",w).attr("height",r).attr("fill",n).attr("stroke",h),A.attr("class","swimlane-body").attr("style",d).attr("x",s).attr("y",i).attr("width",w).attr("height",o).attr("fill","none").attr("stroke",h);const l=e.x-b.width/2,c=T+(r-b.height)/2;x.attr("transform",`translate(${l}, ${c})`)}if(p.trace("Swimlane data ",e,JSON.stringify(e)),c){const t=x.select("span");t&&t.attr("style",c)}return e.offsetX=0,e.width=w,e.height=S,e.offsetY=b.height-k/2,e.intersect=function(t){return _x(e,t)},{cluster:f,labelBBox:b}},"swimlane"),wk=s(async(t,e)=>{p.info("Creating subgraph rect for ",e.id,e);const r=pr(),{theme:i,themeVariables:o,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s,borderColorArray:l}=o,{labelStyles:h,nodeStyles:c,borderStyles:d,backgroundStyles:u}=Zu(e),g=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);cm(g,e.colorIndex,i,l);const f=ye(r),y=g.insert("g").attr("class","cluster-label ");let m;m="markdown"===e.labelType?await rm(y,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width}):await Wx(y,e.label,e.labelStyle||"",!1,!0);let x=m.getBBox();if(ye(r)){const t=m.children[0],e=po(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const C=e.width<=x.width+e.padding?x.width+e.padding:e.width;e.width<=x.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,k=e.x-C/2,w=e.y-b/2;let S;if(p.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=ux.svg(g),r=Qu(e,{roughness:.7,fill:n,stroke:s,fillWeight:3,seed:a}),i=t.path(Px(k,w,C,b,0),r);S=g.insert(()=>(p.debug("Rough node insert CXC",i),i),":first-child"),S.select("path:nth-child(2)").attr("style",d.join(";")),S.select("path").attr("style",u.join(";").replace("fill","stroke"))}else S=g.insert("rect",":first-child"),S.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",b);const{subGraphTitleTopMargin:T}=fk(r);if(y.attr("transform",`translate(${e.x-x.width/2}, ${e.y-e.height/2+T})`),h){const t=y.select("span");t&&t.attr("style",h)}const B=S.node().getBBox();return e.offsetX=0,e.width=B.width,e.height=B.height,e.offsetY=x.height-e.padding/2,e.intersect=function(t){return _x(e,t)},{cluster:g,labelBBox:x}},"rect"),Sk=s((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const n=i.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return _x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Tk=s(async(t,e)=>{const r=pr(),{theme:i,themeVariables:o,handDrawnSeed:a}=r,{altBackground:n,borderColorArray:s,compositeBackground:l,compositeTitleBackground:h,nodeBorder:c}=o,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);cm(d,e.colorIndex,i,s);const u=d.insert("g",":first-child"),p=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const f=await Wx(p,e.label,e.labelStyle,void 0,!0);let y=f.getBBox();if(ye(r)){const t=f.children[0],e=po(f);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const m=0*e.padding,x=m/2,C=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+m;e.width<=y.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height+m,k=e.height+m-y.height-6,w=e.x-C/2,S=e.y-b/2;e.width=C;const T=e.y-e.height/2-x+y.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=ux.svg(d),i=e.rx||e.ry?r.path(Px(w,S,C,b,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:c,seed:a}):r.rectangle(w,S,C,b,{seed:a});B=d.insert(()=>i,":first-child");const o=r.rectangle(w,T,C,k,{fill:t?n:l,fillStyle:t?"hachure":"solid",stroke:c,seed:a});B=d.insert(()=>i,":first-child"),g=d.insert(()=>o),B.attr("class","outer"),g.attr("class","inner")}else{B=u.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",w).attr("y",S).attr("width",C).attr("height",b).attr("data-look",e.look),g.attr("class","inner").attr("x",w).attr("y",T).attr("width",C).attr("height",k)}p.attr("transform",`translate(${e.x-y.width/2}, ${S+1-(ye(r)?0:3)})`);const _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return _x(e,t)},{cluster:d,labelBBox:y}},"roundedWithTitle"),Bk=s(async(t,e)=>{p.info("Creating subgraph rect for ",e.id,e);const r=pr(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Zu(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=ye(r),g=d.insert("g").attr("class","cluster-label "),f=await rm(g,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width});let y=f.getBBox();if(ye(r)){const t=f.children[0],e=po(f);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const m=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height,C=e.x-m/2,b=e.y-x/2;let k;if(p.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=ux.svg(d),r=Qu(e,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:o}),i=t.path(Px(C,b,m,x,e.rx),r);k=d.insert(()=>(p.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",b).attr("width",m).attr("height",x);const{subGraphTitleTopMargin:w}=fk(r);if(g.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),s){const t=g.select("span");t&&t.attr("style",s)}const S=k.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=y.height-e.padding/2,e.intersect=function(t){return _x(e,t)},{cluster:d,labelBBox:y}},"kanbanSection"),_k=s((t,e)=>{const r=pr(),{theme:i,themeVariables:o,handDrawnSeed:a}=r,{altBackground:n,nodeBorder:s,borderColorArray:l}=o,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);cm(h,e.colorIndex,i,l);const c=h.insert("g",":first-child"),d=0*e.padding,u=e.width+d;e.diff=-e.padding;const p=e.height+d,g=e.x-u/2,f=e.y-p/2;let y;if(e.width=u,"handDrawn"===e.look){const t=ux.svg(h).rectangle(g,f,u,p,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});y=h.insert(()=>t,":first-child").attr("class","divider")}else{y=c.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),y.attr("class",t).attr("x",g).attr("y",f).attr("width",u).attr("height",p).attr("data-look",e.look)}const m=y.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return _x(e,t)},{cluster:h,labelBBox:{}}},"divider"),vk=s(async(t,e,r)=>{p.info(`Creating ${r.cssClass} for `,e.id,e);const i=pr(),{theme:o,themeVariables:a,handDrawnSeed:n}=i,{borderColorArray:s}=a,{labelStyles:l,borderStyles:h}=Zu(e),c=t.insert("g").attr("class","cluster "+r.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);cm(c,e.colorIndex,o,s);const d=ye(i),u=c.insert("g").attr("class","cluster-label");let g={width:0,height:0};const f=e.label?.trim();if(f){let t;if(t="markdown"===e.labelType?await rm(u,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}):await Wx(u,e.label,e.labelStyle||"",!1,!0),g=t.getBBox(),d){const e=t.children[0],r=po(t);g=e.getBoundingClientRect(),r.attr("width",g.width),r.attr("height",g.height)}}const y=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,x=e.x-y/2,C=e.y-m/2;let b;if("handDrawn"===e.look){const t=ux.svg(c),i=Qu(e,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,..."none"===r.fill?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),o=t.path(Px(x,C,y,m,r.rx),i);b=c.insert(()=>o,":first-child"),b.select("path:nth-child(2)").attr("style",h.join(";"))}else b=c.insert("rect",":first-child"),b.attr("rx",r.rx).attr("ry",r.rx).attr("x",x).attr("y",C).attr("width",y).attr("height",m).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&b.attr("stroke-dasharray",r.strokeDash.join(", "));if(f){const{subGraphTitleTopMargin:t}=fk(i);if(u.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+t})`),l){const t=u.select("span");t&&t.attr("style",l)}}const k=b.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=g.height-e.padding/2,e.intersect=function(t){return _x(e,t)},{cluster:c,labelBBox:g}},"createContainerGroup"),Fk=s(async(t,e)=>{const{themeVariables:r}=pr(),i=r.flowContainerStroke||r.secondaryBorderColor;return vk(t,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),Lk=s((t,e)=>{const r=t.boundaryType||"rect",i="package"===r?20:t.padding,o="package"===r?e.height+10:0,a=Math.max(t.width,e.width+i),n="package"===r?Math.max(t.height,o+2*t.padding):t.height,s=t.x-a/2,l=t.y-n/2;return{boundaryType:r,width:a,height:n,x:s,y:l,bodyY:l+o,bodyHeight:n-o,tabHeight:o,tabWidth:"package"===r?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),Mk=s(async(t,e)=>{p.info("Creating usecase system boundary for ",e.id,e);const r=pr(),{theme:i,themeVariables:o,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s,borderColorArray:l}=o,{labelStyles:h,nodeStyles:c}=Zu(e),{stylesMap:d}=Vu(e),u=e.boundaryType||"rect",g=t.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${u} ${e.cssClasses}`).attr("id","string"==typeof e.domId?e.domId:e.id).attr("data-boundary-type",u).attr("data-look",e.look);cm(g,e.colorIndex,i,l);const f=ye(r),y=g.insert("g").attr("class","cluster-label system-boundary-title"),m=await rm(y,e.label,{style:h,useHtmlLabels:f,isNode:!0});let x=m.getBBox();if(f){const t=m.children[0],e=po(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const C=Lk(e,x),{width:b,height:k,x:w,y:S,bodyY:T,bodyHeight:B,tabHeight:_,tabWidth:v}=C;e.diff=e.width<=x.width+e.padding?(b-e.width)/2-e.padding:-e.padding;const F=Qu(e,{fill:d.get("fill")||n,stroke:d.get("stroke")||s,strokeWidth:d.get("stroke-width")?.replace("px","")||1,seed:a});if("handDrawn"===e.look){const t=ux.svg(g),e=t.rectangle(w,T,b,B,F);if(g.insert(()=>e,":first-child").attr("class","boundary-body label-container"),"package"===u){const e=t.rectangle(w,S,v,_,F);g.insert(()=>e,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else g.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",c).attr("x",w).attr("y",T).attr("width",b).attr("height",B),"package"===u&&g.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",c).attr("x",w).attr("y",S).attr("width",v).attr("height",_);const{subGraphTitleTopMargin:L}=fk(r);return"package"===u?y.attr("transform",`translate(${w+(v-x.width)/2}, ${S+(_-x.height)/2})`):y.attr("transform",`translate(${e.x-x.width/2}, ${S+L})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),e.offsetX=0,e.width=b,e.height=k,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return _x(e,t)},{cluster:g,labelBBox:x}},"usecaseSystemBoundary"),Ak={rect:wk,squareRect:wk,roundedWithTitle:Tk,noteGroup:Sk,divider:_k,kanbanSection:Bk,flowGroup:Fk,usecaseSystemBoundary:Mk,swimlane:kk},$k=new Set(["noteGroup","divider"]),Ek=s(t=>!$k.has(t??"rect"),"clusterPaintsTitle"),Ok=new Map,Dk=s(async(t,e)=>{const r=e.shape||"rect",i=await Ak[r](t,e);return Ok.set(e.id,i),i},"insertCluster"),Ik=s(()=>{Ok=new Map},"clear"),qk=s((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),Pk={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},zk={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Wk(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Rk(t),e=Rk(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],n=o-r,s=a-i;return{angle:Math.atan(s/n),deltaX:n,deltaY:s}}s(Wk,"calculateDeltaAndAngle");var Rk=s(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Nk=s(t=>({x:s(function(e,r,i){let o=0;const a=Rk(i[0]).x<Rk(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(Pk,t.arrowTypeStart)){const{angle:e,deltaX:r}=Wk(i[0],i[1]);o=Pk[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pk,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Wk(i[i.length-1],i[i.length-2]);o=Pk[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const n=Math.abs(Rk(e).x-Rk(i[i.length-1]).x),s=Math.abs(Rk(e).y-Rk(i[i.length-1]).y),l=Math.abs(Rk(e).x-Rk(i[0]).x),h=Math.abs(Rk(e).y-Rk(i[0]).y),c=Pk[t.arrowTypeStart],d=Pk[t.arrowTypeEnd];if(n<d&&n>0&&s<d){let t=d+1-n;t*="right"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===a?-1:1,o+=t}return Rk(e).x+o},"x"),y:s(function(e,r,i){let o=0;const a=Rk(i[0]).y<Rk(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(Pk,t.arrowTypeStart)){const{angle:e,deltaY:r}=Wk(i[0],i[1]);o=Pk[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Pk,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Wk(i[i.length-1],i[i.length-2]);o=Pk[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const n=Math.abs(Rk(e).y-Rk(i[i.length-1]).y),s=Math.abs(Rk(e).x-Rk(i[i.length-1]).x),l=Math.abs(Rk(e).y-Rk(i[0]).y),h=Math.abs(Rk(e).x-Rk(i[0]).x),c=Pk[t.arrowTypeStart],d=Pk[t.arrowTypeEnd];if(n<d&&n>0&&s<d){let t=d+1-n;t*="up"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===a?-1:1,o+=t}return Rk(e).y+o},"y")}),"getLineFunctionsWithOffset"),jk=s((t,e,r,i,o,a=!1,n)=>{e.arrowTypeStart&&Yk(t,"start",e.arrowTypeStart,r,i,o,a,n),e.arrowTypeEnd&&Yk(t,"end",e.arrowTypeEnd,r,i,o,a,n)},"addEdgeMarkers"),Hk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Uk=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Yk=s((t,e,r,i,o,a,n=!1,s)=>{if(!r||"none"===r)return;const l=Hk[r],h=l&&Uk.includes(l.type);if(!l)return void p.warn(`Unknown arrow type: ${r}`);const c=`${o}_${a}-${l.type}${"start"===e?"Start":"End"}${n&&h?"-margin":""}`;if(s&&""!==s.trim()){const r=`${c}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(c);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${c})`)},"addEdgeMarker"),Vk=s(t=>"string"==typeof t?t:pr()?.flowchart?.curve,"resolveEdgeCurveType"),Xk=new Map,Gk=new Map,Zk=s(()=>{Xk.clear(),Gk.clear()},"clear"),Qk=s(t=>Boolean(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),Kk=s(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),Jk=s(async(t,e)=>{const r=pr();let i=ye(r);const{labelStyles:o}=Zu(e);e.labelStyle=o;const a=t.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",e.id),s="markdown"===e.labelType,l=await rm(t,e.label,{style:Kk(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},r);let h,c,d;if(n.node().appendChild(l),p.info("abc82",e,e.labelType),i){const t=l.children[0],e=po(l);h=await Ry.measure(()=>t.getBoundingClientRect()),c=h,e.attr("width",h.width),e.attr("height",h.height)}else{const t=po(l).select("text").node();await Ry.measure(()=>{h=l.getBBox(),c=t&&"function"==typeof t.getBBox?t.getBBox():h})}if(n.attr("transform",qk(c,i)),Xk.set(e.id,a),e.width=h.width,e.height=h.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Wx(o,e.startLabelLeft,Kk(e.labelStyle)||"",!1,!1);d=a;let n=a.getBBox();if(i){const t=a.children[0],e=po(a);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}o.attr("transform",qk(n,i)),Gk.get(e.id)||Gk.set(e.id,{}),Gk.get(e.id).startLeft=r,ew(d,e.startLabelLeft,n),tw(e,"startLeft",n)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Wx(o,e.startLabelRight,Kk(e.labelStyle)||"",!1,!1);d=a;let n=a.getBBox();if(i){const t=a.children[0],e=po(a);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}o.attr("transform",qk(n,i)),Gk.get(e.id)||Gk.set(e.id,{}),Gk.get(e.id).startRight=r,ew(d,e.startLabelRight,n),tw(e,"startRight",n)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Wx(o,e.endLabelLeft,Kk(e.labelStyle)||"",!1,!1);d=a;let n=a.getBBox();if(i){const t=a.children[0],e=po(a);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}o.attr("transform",qk(n,i)),Gk.get(e.id)||Gk.set(e.id,{}),Gk.get(e.id).endLeft=r,ew(d,e.endLabelLeft,n),tw(e,"endLeft",n)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await Wx(o,e.endLabelRight,Kk(e.labelStyle)||"",!1,!1);d=a;let n=a.getBBox();if(i){const t=a.children[0],e=po(a);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}o.attr("transform",qk(n,i)),Gk.get(e.id)||Gk.set(e.id,{}),Gk.get(e.id).endRight=r,ew(d,e.endLabelRight,n),tw(e,"endRight",n)}return l},"insertEdgeLabel");function tw(t,e,r){t.terminalLabelSizes??={},t.terminalLabelSizes[e]={width:r.width,height:r.height}}function ew(t,e,r){ye(pr())&&t&&(t.style.width=Math.max(9*e.length,r.width)+"px",t.style.height=r.height+"px")}s(tw,"recordTerminalLabelSize"),s(ew,"setTerminalWidth");var rw=s((t,e)=>{let r=t.x,i=t.y;if(e?.updatedPath){const o=rf.calcLabelPosition(e.updatedPath);if(e.originalPath){const a=rf.calcLabelPosition(e.originalPath);r=t.x+(o.x-a.x),i=t.y+(o.y-a.y)}else r=o.x,i=o.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),iw=s((t,e)=>{p.debug("Moving label abc88 ",t.id,t.label,Xk.get(t.id),e);const r=pr(),{subGraphTitleTotalMargin:i}=fk(r);if(t.label){const r=Xk.get(t.id),{x:o,y:a}=rw(t,e);p.debug("Moving label "+t.label+" from (",t.x,",",t.y,") to (",o,",",a,") abc88"),r.attr("transform",`translate(${o}, ${a+i/2})`)}const o=e.updatedPath?e.updatedPath:e.originalPath;if(t.startLabelLeft){const e=Gk.get(t.id).startLeft;let r=t.x,i=t.y;if(o){const e=rf.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",o);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=Gk.get(t.id).startRight;let r=t.x,i=t.y;if(o){const e=rf.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",o);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=Gk.get(t.id).endLeft;let r=t.x,i=t.y;if(o){const e=rf.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",o);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=Gk.get(t.id).endRight;let r=t.x,i=t.y;if(o){const e=rf.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",o);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),ow=s((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,o=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return o<.001||a<.001?e:a>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),aw=s((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),n=t.width/2,s=t.height/2;return o>=n||a>=s},"outsideNode"),nw=s((t,e,r)=>{p.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),n=t.width/2;let s=r.x<e.x?n-a:n+a;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*n>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;s=c*t/h;const i={x:r.x<e.x?r.x+s:r.x-c+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),p.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${s}`,i),i}{s=r.x<e.x?e.x-n-i:i-n-e.x;let t=h*s/c,o=r.x<e.x?r.x+c-s:r.x-c+s,a=r.y<e.y?r.y+t:r.y-t;return p.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${s}`,{_x:o,_y:a}),0===s&&(o=e.x,a=e.y),0===c&&(o=e.x),0===h&&(a=e.y),{x:o,y:a}}},"intersection"),sw=s((t,e)=>{p.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(p.info("abc88 checking point",t,e),aw(e,t)||o)p.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=nw(e,i,t);p.debug("abc88 inside",t,i,a),p.debug("abc88 intersection",a,e);let n=!1;r.forEach(t=>{n=n||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?p.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),p.debug("returning points",r),r},"cutPathAtIntersect");function lw(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],a=t[i],n=t[i+1];(o.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===n.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}s(lw,"extractCornerPoints");var hw=s(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),cw=s(function(t){const{cornerPointPositions:e}=lw(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],a=t[i],n=hw(e,a,5),s=hw(o,a,5),l=s.x-n.x,h=s.y-n.y;r.push(n);const c=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){p.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;d=a.x===n.x?{x:l<0?n.x-t+c:n.x+t-c,y:h<0?n.y-c:n.y+c}:{x:l<0?n.x-c:n.x+c,y:h<0?n.y-t+c:n.y+t-c}}else p.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(d,s)}else r.push(t[i]);return r},"fixCorners"),dw=s((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4),a=Number.isFinite(o)?Math.max(0,o):0;return`0 ${e} ${Array(a).fill("2 2").join(" ")} ${r}`},"generateDashArray"),uw=s(function(t,e,r,i,o,a,n,s=!1,l=void 0){if(!n)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h,layout:c}=pr(),d=l??c;let u=e.points,g=!1;const f=o;var y=a;const m=[];for(const p in e.cssCompiledStyles)Gu(p)||m.push(e.cssCompiledStyles[p]);if("swimlane"===d){if(!s&&y.intersect&&f.intersect&&Array.isArray(u)&&u.length>=2)if(2===u.length)u=[f.intersect(u[0]),y.intersect(u[1])];else{const t=u.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,o=Math.abs(u[u.length-1].x-r.x)<i&&Math.abs(u[u.length-1].y-r.y)<i,a=f.intersect(e),n=o?r:y.intersect(r),s=Math.abs(n.x-r.x)<i&&Math.abs(n.y-r.y)<i?[]:[n];u=[...Math.abs(a.x-e.x)<i&&Math.abs(a.y-e.y)<i?[]:[a],...t,...s]}u=ow(e,u)}else y.intersect&&f.intersect&&!s&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),u.push(y.intersect(u[u.length-1])));const x=btoa(JSON.stringify(u));e.toCluster&&(p.info("to cluster abc88",r.get(e.toCluster)),u=sw(e.points,r.get(e.toCluster).node),g=!0),e.fromCluster&&(p.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=sw(u.reverse(),r.get(e.fromCluster).node).reverse(),g=!0);let C=u.filter(t=>!Number.isNaN(t.y));const b=Vk(e.curve);"rounded"!==b&&(C=cw(C));let k=cc;switch(b){case"linear":case"rounded":k=cc;break;case"basis":default:k=Sc;break;case"cardinal":k=Mc;break;case"bumpX":k=xc;break;case"bumpY":k=Cc;break;case"catmullRom":k=qc;break;case"monotoneX":k=Zc;break;case"monotoneY":k=Qc;break;case"natural":k=td;break;case"step":k=rd;break;case"stepAfter":k=od;break;case"stepBefore":k=id}const{x:w,y:S}=Nk(e),T=pc().x(w).y(S).curve(k);let B,_;switch(e.thickness){case"normal":default:B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible"}switch(e.pattern){case"solid":default:B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed"}let v="rounded"===b?pw(fw(C,e),5):T(C);const F=Array.isArray(e.style)?e.style:[e.style];let L=F.find(t=>t?.startsWith("stroke:")),M="";e.animate&&(M="edge-animation-fast"),e.animation&&(M="edge-animation-"+e.animation);let A=!1;if("handDrawn"===e.look){const r=ux.svg(t);Object.assign([],C);B+=" transition",_=po(r.path(v,{roughness:.3,seed:h})).select("path").attr("id",`${n}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(M?" "+M:"")).attr("style",F?F.reduce((t,e)=>t+";"+e,""):"");let i=_.attr("d");_.attr("d",i),t.node().appendChild(_.node())}else{const r=m.join(";"),i=F?F.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(F?F.reduce((t,e)=>t+";"+e,""):"");_=t.append("path").attr("d",v).attr("id",`${n}-${e.id}`).attr("class"," "+B+(e.classes?" "+e.classes:"")+(M?" "+M:"")).attr("style",o),L=o.match(/stroke:([^;]+)/)?.[1],A=!0===e.animate||!!e.animation||r.includes("animation");const a=_.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,l=zk[e.arrowTypeStart]||0,h=zk[e.arrowTypeEnd]||0;if("neo"===e.look&&!A){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?dw(s,l,h):`0 ${l} ${s-l-h} ${h}`}; stroke-dashoffset: 0;`;_.attr("style",t+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",e.id),_.attr("data-points",x),_.attr("data-look",sf(e.look)),e.showPoints&&C.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let $="";(pr().flowchart.arrowMarkerAbsolute||pr().state.arrowMarkerAbsolute)&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),p.info("arrowTypeStart",e.arrowTypeStart),p.info("arrowTypeEnd",e.arrowTypeEnd);jk(_,e,$,n,i,!A&&"neo"===e?.look,L);const E=u[Math.floor(u.length/2)];rf.isLabelCoordinateInPath(E,_.attr("d"))||(g=!0);let O={};return g&&(O.updatedPath=u),O.originalPath=e.points,O},"insertEdge");function pw(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a<i;a++){const n=t[a],s=t[a-1],l=t[a+1];if(0===a)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const t=n.x-s.x,i=n.y-s.y,a=l.x-n.x,h=l.y-n.y,c=Math.hypot(t,i),d=Math.hypot(a,h);if(c<o||d<o){r+=`L${n.x},${n.y}`;continue}const u=t/c,p=i/c,g=a/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),x=Math.acos(m);if(x<o||Math.abs(Math.PI-x)<o){r+=`L${n.x},${n.y}`;continue}const C=Math.min(e/Math.sin(x/2),c/2,d/2),b=n.x-u*C,k=n.y-p*C,w=n.x+g*C,S=n.y+f*C;r+=`L${b},${k}`,r+=`Q${n.x},${n.y} ${w},${S}`}}return r}function gw(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function fw(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&Pk[e.arrowTypeStart]){const i=Pk[e.arrowTypeStart],o=t[0],a=t[1],{angle:n}=gw(o,a),s=i*Math.cos(n),l=i*Math.sin(n);r[0].x=o.x+s,r[0].y=o.y+l}const i=t.length;if(i>=2&&Pk[e.arrowTypeEnd]){const o=Pk[e.arrowTypeEnd],a=t[i-1],n=t[i-2],{angle:s}=gw(n,a),l=o*Math.cos(s),h=o*Math.sin(s);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}s(pw,"generateRoundedPath"),s(gw,"calculateDeltaAndAngle"),s(fw,"applyMarkerOffsetsToPoints");var yw=s((t,e,r,i)=>{e.forEach(e=>{Ww[e](t,r,i)})},"insertMarkers"),mw=s((t,e,r)=>{p.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),xw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),Cw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),bw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),kw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),ww=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),Sw=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),Tw=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),Bw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),_w=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),vw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),Fw=s((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Lw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),Mw=s((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Aw=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),$w=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:n}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Ew=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Ow=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:n}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Dw=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),Iw=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),qw=s((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),Pw=s((t,e,r)=>{const i=se(),{themeVariables:o}=i,{strokeWidth:a}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-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",`${a}`)},"requirement_contains_neo"),zw=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).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"),t.append("marker").attr("id",r+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).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"),Ww={extension:mw,composition:xw,aggregation:Cw,dependency:bw,lollipop:kw,point:ww,circle:Sw,cross:Tw,barb:Bw,barbNeo:_w,hierarchy:zw,only_one:vw,zero_or_one:Fw,one_or_more:Lw,zero_or_more:Mw,only_one_neo:Aw,zero_or_one_neo:$w,one_or_more_neo:Ew,zero_or_more_neo:Ow,requirement_arrow:Dw,requirement_contains:qw,requirement_arrow_neo:Iw,requirement_contains_neo:Pw},Rw=yw,Nw={common:je,getConfig:se,insertCluster:Dk,insertEdge:uw,insertEdgeLabel:Jk,insertMarkers:Rw,insertNode:mk,interpolateToCurve:_g,labelHelper:mx,log:p,positionEdgeLabel:iw},jw=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],Hw=Object.create(null),Uw=s(t=>{for(const e of t)Hw[e.name]=e},"registerLayoutLoaders"),Yw=s(()=>{const t=s(async()=>await o(()=>import("./elk-QONTBCTQ-VgDftvsU.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader");return[{name:"elk",loader:t,algorithm:"elk.layered"},...jw.map(e=>({name:e,loader:t,algorithm:e}))]},"elkLayoutLoaders");s(()=>{Uw([{name:"dagre",loader:s(async()=>await o(()=>import("./dagre-NK4GIZVX-BFRQhpii.js"),__vite__mapDeps([5,2,3,4]),import.meta.url),"loader")},{name:"swimlane",loader:s(async()=>await o(()=>import("./swimlanes-B3ENRKFQ-D7k7tF5U.js"),__vite__mapDeps([6,1,2,3,4]),import.meta.url),"loader")},{name:"cose-bilkent",loader:s(async()=>await o(()=>import("./cose-bilkent-JH36ORCC-qIQoIBv0.js"),__vite__mapDeps([7,8,4]),import.meta.url),"loader")},...Yw()])},"registerDefaultLayoutLoaders")();var Vw=s(async(t,e)=>{if(!Object.hasOwn(Hw,t.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const o of t.nodes){const e=o.domId||o.id;o.domId=`${t.diagramId}-${e}`}const r=Hw[t.layoutAlgorithm],i=await r.loader();return Hu(e,t.config),i.render(t,e,Nw,{algorithm:r.algorithm})},"render"),Xw="dagre",Gw=s((t="",{fallback:e=Xw}={})=>{if(Object.hasOwn(Hw,t))return t;for(const r of[e,Xw])if(Object.hasOwn(Hw,r))return p.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${t}, ${e}, nor ${Xw} is registered.`)},"getRegisteredLayoutAlgorithm"),Zw="comm",Qw="rule",Kw="decl",Jw="@keyframes",tS="@layer",eS=Math.abs,rS=String.fromCharCode;function iS(t){return t.trim()}function oS(t,e,r){return t.replace(e,r)}function aS(t,e){return 0|t.charCodeAt(e)}function nS(t,e,r){return t.slice(e,r)}function sS(t){return t.length}function lS(t){return t.length}function hS(t,e){return e.push(t),t}var cS=1,dS=1,uS=0,pS=0,gS=0,fS="";function yS(t,e,r,i,o,a,n,s){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:cS,column:dS,length:n,return:"",siblings:s}}function mS(){return gS=pS>0?aS(fS,--pS):0,dS--,10===gS&&(dS=1,cS--),gS}function xS(){return gS=pS<uS?aS(fS,pS++):0,dS++,10===gS&&(dS=1,cS++),gS}function CS(){return aS(fS,pS)}function bS(){return pS}function kS(t,e){return nS(fS,t,e)}function wS(t){switch(t){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 SS(t){return iS(kS(pS-1,_S(91===t?t+2:40===t?t+1:t)))}function TS(t){for(;(gS=CS())&&gS<33;)xS();return wS(t)>2||wS(gS)>3?"":" "}function BS(t,e){for(;--e&&xS()&&!(gS<48||gS>102||gS>57&&gS<65||gS>70&&gS<97););return kS(t,bS()+(e<6&&32==CS()&&32==xS()))}function _S(t){for(;xS();)switch(gS){case t:return pS;case 34:case 39:34!==t&&39!==t&&_S(gS);break;case 40:41===t&&_S(t);break;case 92:xS()}return pS}function vS(t,e){for(;xS()&&t+gS!==57&&(t+gS!==84||47!==CS()););return"/*"+kS(e,pS-1)+"*"+rS(47===t?t:xS())}function FS(t){for(;!wS(CS());)xS();return kS(t,pS)}function LS(t){return function(t){return fS="",t}(MS("",null,null,null,[""],t=function(t){return cS=dS=1,uS=sS(fS=t),pS=0,[]}(t),0,[0],t))}function MS(t,e,r,i,o,a,n,s,l){for(var h=0,c=0,d=n,u=0,p=0,g=0,f=1,y=1,m=1,x=0,C=0,b="",k=o,w=a,S=i,T=b;y;)switch(g=C,C=xS()){case 40:108!=g&&58==aS(T,d-1)?(x++,T+="("):T+=SS(C);break;case 41:x--,T+=")";break;case 34:case 39:case 91:T+=SS(C);break;case 9:case 10:case 13:case 32:if(x>0){T+=rS(C);break}T+=TS(g);break;case 92:T+=BS(bS()-1,7);continue;case 47:switch(CS()){case 42:case 47:hS($S(vS(xS(),bS()),e,r,l),l),5!=wS(g||1)&&5!=wS(CS()||1)||!sS(T)||" "===nS(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:s[h++]=sS(T)*m;case 125*f:case 59:case 0:if(x>0&&C){T+=rS(C);break}switch(C){case 0:case 125:y=0;case 59+c:-1==m&&(T=oS(T,/\f/g,"")),p>0&&(sS(T)-d||0===f)&&hS(p>32?ES(T+";",i,r,d-1,l):ES(oS(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(hS(S=AS(T,e,r,h,c,o,s,b,k=[],w=[],d,a),a),123===C)if(0===c)MS(T,e,S,S,k,a,d,s,w);else{switch(u){case 99:if(110===aS(T,3))break;case 108:if(97===aS(T,2))break;default:c=0;case 100:case 109:case 115:}c?MS(t,S,S,i&&hS(AS(t,S,S,0,0,o,s,b,o,k=[],d,w),w),o,w,d,s,i?k:w):MS(T,S,S,S,[""],w,0,s,w)}}h=c=p=0,f=m=1,b=T="",d=n;break;case 58:d=1+sS(T),p=g;default:if(f<1)if(123==C)--f;else if(125==C&&0==f++&&125==mS())continue;switch(T+=rS(C),C*f){case 38:m=c>0?1:(T+="\f",-1);break;case 44:if(x>0)break;s[h++]=(sS(T)-1)*m,m=1;break;case 64:45===CS()&&(T+=SS(xS())),u=CS(),c=d=sS(b=T+=FS(bS())),C++;break;case 45:45===g&&2==sS(T)&&(f=0)}}return a}function AS(t,e,r,i,o,a,n,s,l,h,c,d){for(var u=o-1,p=0===o?a:[""],g=lS(p),f=0,y=0,m=0;f<i;++f)for(var x=0,C=nS(t,u+1,u=eS(y=n[f])),b=t;x<g;++x)(b=iS(y>0?p[x]+" "+C:oS(C,/&\f/g,p[x])))&&(l[m++]=b);return yS(t,e,r,0===o?Qw:s,l,h,c,d)}function $S(t,e,r,i){return yS(t,e,r,Zw,rS(gS),nS(t,2,-2),0,i)}function ES(t,e,r,i,o){return yS(t,e,r,Kw,nS(t,0,i),nS(t,i+1,-1),i,o)}function OS(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function DS(t,e,r,i){switch(t.type){case tS:if(t.children.length)break;case"@import":case"@namespace":case Kw:return t.return=t.return||t.value;case Zw:return"";case Jw:return t.return=t.value+"{"+OS(t.children,i)+"}";case Qw:if(!sS(t.value=t.props.join(",")))return""}return sS(r=OS(t.children,i))?t.return=t.value+"{"+r+"}":""}var IS,qS={id:"c4",detector:s(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./c4Diagram-XDPPPE54-ByfRiJGR.js"));return{diagram:t}},__vite__mapDeps([9,10,4]),import.meta.url);return{id:"c4",diagram:t}},"loader")},PS="flowchart-v2",zS=s(t=>/^\s*(graph|flowchart)/.test(t),"detector"),WS=s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-CRXa9Kxy.js").then(t=>t.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,4]),import.meta.url);return{id:PS,diagram:t}},"loader"),RS={id:PS,detector:zS,loader:WS},NS="agentflow",jS={id:NS,detector:s(t=>/^\s*agentflow-beta\b/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-TYUNFSNR-DmgVsxqa.js"));return{diagram:t}},__vite__mapDeps([15,12,13,14,10,4]),import.meta.url);return{id:NS,diagram:t}},"loader")},HS="swimlane",US={id:HS,detector:s(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./swimlanesDiagram-AYQRV4AK-DoQBgB9o.js"));return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,4]),import.meta.url);return{id:HS,diagram:t}},"loader")},YS={id:"er",detector:s(t=>/^\s*erDiagram/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./erDiagram-KYQIGQAA-DkpP7sS4.js"));return{diagram:t}},__vite__mapDeps([17,13,14,4]),import.meta.url);return{id:"er",diagram:t}},"loader")},VS="gitGraph",XS={id:VS,detector:s(t=>/^\s*gitGraph/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./gitGraphDiagram-PDYL7XHY-CwSo663I.js"));return{diagram:t}},__vite__mapDeps([18,19,20,21,4]),import.meta.url);return{id:VS,diagram:t}},"loader")},GS="gantt",ZS={id:GS,detector:s(t=>/^\s*gantt/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./ganttDiagram-R7GPNTJY-Cu2I55Wb.js"));return{diagram:t}},__vite__mapDeps([22,4]),import.meta.url);return{id:GS,diagram:t}},"loader")},QS="info",KS={id:QS,detector:s(t=>/^\s*info/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./infoDiagram-MVDRKAX5-D3Qknzuo.js"));return{diagram:t}},__vite__mapDeps([23,21,4]),import.meta.url);return{id:QS,diagram:t}},"loader")},JS={id:"pie",detector:s(t=>/^\s*pie/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./pieDiagram-GNMPY74T-CniJbr6l.js"));return{diagram:t}},__vite__mapDeps([24,20,21,4]),import.meta.url);return{id:"pie",diagram:t}},"loader")},tT="quadrantChart",eT={id:tT,detector:s(t=>/^\s*quadrantChart/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./quadrantDiagram-D57K4MC3-BVnDJkCv.js"));return{diagram:t}},__vite__mapDeps([25,4]),import.meta.url);return{id:tT,diagram:t}},"loader")},rT="xychart",iT={id:rT,detector:s(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./xychartDiagram-4URNHDU4-ByfaGjvc.js"));return{diagram:t}},__vite__mapDeps([26,4]),import.meta.url);return{id:rT,diagram:t}},"loader")},oT="requirement",aT={id:oT,detector:s(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./requirementDiagram-EQYSW5RA-BETipHj0.js"));return{diagram:t}},__vite__mapDeps([27,13,14,4]),import.meta.url);return{id:oT,diagram:t}},"loader")},nT="sequence",sT={id:nT,detector:s(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./sequenceDiagram-BLEHNHQU-BqCJ2tKG.js"));return{diagram:t}},__vite__mapDeps([28,19,10,4]),import.meta.url);return{id:nT,diagram:t}},"loader")},lT="classDiagram",hT={id:lT,detector:s(t=>/^\s*classDiagram/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./classDiagram-v2-4MYWR3UA-C1G-Vkj0.js"));return{diagram:t}},__vite__mapDeps([29,12,13,14,10,4]),import.meta.url);return{id:lT,diagram:t}},"loader")},cT="stateDiagram",dT={id:cT,detector:s(t=>/^\s*stateDiagram/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./stateDiagram-v2-A6IESKWZ-DJUBWLTP.js"));return{diagram:t}},__vite__mapDeps([30,13,14,10,4]),import.meta.url);return{id:cT,diagram:t}},"loader")},uT="journey",pT={id:uT,detector:s(t=>/^\s*journey/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./journeyDiagram-BOSHW7O7-DeSrJg9o.js"));return{diagram:t}},__vite__mapDeps([31,12,10,4]),import.meta.url);return{id:uT,diagram:t}},"loader")},gT=s(t=>{const e=[];for(const o of t.split(/\s+/)){let t=[...o];for(;t.length>75;)e.push(t.slice(0,75).join("")),t=t.slice(75);t.length>0&&e.push(t.join(""))}const r=[];let i="";for(const o of e){const t=i?`${i} ${o}`:o;[...t].length>75?(r.push(i),i=o):i=t}if(i&&r.push(i),r.length>4){r.length=4;const t=r[3]??"";r[3]=`${[...t].slice(0,72).join("")}...`}return r},"wrapErrorMessage"),fT=s((t,e,r,i)=>{p.debug("rendering svg for syntax error\n");const o=nd(e),a=o.append("g"),n=gT(i?.db.getErrorMessage?.()??""),s=n.length>0?500+56*n.length:512;o.attr("viewBox",`0 0 2412 ${s}`),Ye(o,100,s,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),n.forEach((t,e)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+56*e).attr("font-size","42px").style("text-anchor","middle").text(t)})},"draw"),yT={draw:fT},mT=yT,xT={db:{clear(){IS=void 0},setErrorMessage(t){IS=t},getErrorMessage:()=>IS},renderer:yT,parser:{parse:s(()=>{},"parse")}},CT="flowchart-elk",bT=s((t,e={})=>!!/^\s*flowchart-elk/.test(t)&&(e.layout="elk",!0),"detector"),kT=s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-CRXa9Kxy.js").then(t=>t.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,4]),import.meta.url);return{id:CT,diagram:t}},"loader"),wT={id:CT,detector:bT,loader:kT},ST="timeline",TT={id:ST,detector:s(t=>/^\s*timeline/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./timeline-definition-JXYKGLGB-BCNhwnn6.js"));return{diagram:t}},__vite__mapDeps([32,4]),import.meta.url);return{id:ST,diagram:t}},"loader")},BT="mindmap",_T={id:BT,detector:s(t=>/^\s*mindmap/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./mindmap-definition-6OY57UG3-DW5hqiAe.js"));return{diagram:t}},__vite__mapDeps([33,13,14,4]),import.meta.url);return{id:BT,diagram:t}},"loader")},vT="kanban",FT={id:vT,detector:s(t=>/^\s*kanban/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./kanban-definition-FNSA4HC5-DINkB6G7.js"));return{diagram:t}},__vite__mapDeps([34,12,4]),import.meta.url);return{id:vT,diagram:t}},"loader")},LT="sankey",MT={id:LT,detector:s(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./sankeyDiagram-SY24JHO5-ByEYqT7T.js"));return{diagram:t}},__vite__mapDeps([35,4]),import.meta.url);return{id:LT,diagram:t}},"loader")},AT="packet",$T={id:AT,detector:s(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-I5XIIV2D-bITyafYX.js"));return{diagram:t}},__vite__mapDeps([36,20,21,4]),import.meta.url);return{id:AT,diagram:t}},"loader")},ET="radar",OT={id:ET,detector:s(t=>/^\s*radar-beta/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-RJA3I4VV-CK-FlhGV.js"));return{diagram:t}},__vite__mapDeps([37,20,21,4]),import.meta.url);return{id:ET,diagram:t}},"loader")},DT="block",IT={id:DT,detector:s(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./blockDiagram-RJAE7QA3--gzkMGi2.js"));return{diagram:t}},__vite__mapDeps([38,12,3,4]),import.meta.url);return{id:DT,diagram:t}},"loader")},qT="treeView",PT={id:qT,detector:s(t=>/^\s*treeView-beta/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-ODIL2UCW-Dlb4hg_-.js"));return{diagram:t}},__vite__mapDeps([39,19,20,21,4]),import.meta.url);return{id:qT,diagram:t}},"loader")},zT="architecture",WT={id:zT,detector:s(t=>/^\s*architecture/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./architectureDiagram-ZHVYKT53-BvLudDvk.js"));return{diagram:t}},__vite__mapDeps([40,20,21,8,4]),import.meta.url);return{id:zT,diagram:t}},"loader")},RT="eventmodeling",NT={id:RT,detector:s(t=>/^\s*eventmodeling/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-PFBEJUXE-CRfen0O7.js"));return{diagram:t}},__vite__mapDeps([41,20,21,4]),import.meta.url);return{id:RT,diagram:t}},"loader")},jT="ishikawa",HT={id:jT,detector:s(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./ishikawaDiagram-HPEHV2GE-9qYT75tk.js"));return{diagram:t}},__vite__mapDeps([42,4]),import.meta.url);return{id:jT,diagram:t}},"loader")},UT="venn",YT={id:UT,detector:s(t=>/^\s*venn-beta/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./vennDiagram-Q3Y3IDCW-Ba2eaO68.js"));return{diagram:t}},__vite__mapDeps([43,4]),import.meta.url);return{id:UT,diagram:t}},"loader")},VT="treemap",XT={id:VT,detector:s(t=>/^\s*treemap/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./diagram-CBK3MWTC-DlueL6XZ.js"));return{diagram:t}},__vite__mapDeps([44,20,14,21,4]),import.meta.url);return{id:VT,diagram:t}},"loader")},GT="usecase",ZT={id:GT,detector:s(t=>/^\s*usecase-beta(?:\s|$)/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./usecaseDiagram-WPOLBNNX-DRa_Rgl3.js"));return{diagram:t}},__vite__mapDeps([45,13,14,4]),import.meta.url);return{id:GT,diagram:t}},"loader")},QT="wardley",KT=s(t=>/^\s*wardley-beta/i.test(t),"detector"),JT={id:QT,detector:KT,loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./wardleyDiagram-IVAIDKWA-W_i9vzY-.js"));return{diagram:t}},__vite__mapDeps([46,20,21,4]),import.meta.url);return{id:QT,diagram:t}},"loader")},tB="cynefin",eB={id:tB,detector:s(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./cynefinDiagram-WF24UDRP-DaJFvZ3b.js"));return{diagram:t}},__vite__mapDeps([47,20,21,4]),import.meta.url);return{id:tB,diagram:t}},"loader")},rB="railroad",iB={id:rB,detector:s(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./railroadDiagram-Y72NRBL7-BNKZpJJb.js"));return{diagram:t}},__vite__mapDeps([48,49,20,21,4]),import.meta.url);return{id:rB,diagram:t}},"loader")},oB="railroadEbnf",aB={id:oB,detector:s(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./ebnfDiagram-V4P3TTPT-B9KGI9eQ.js"));return{diagram:t}},__vite__mapDeps([50,49,20,21,4]),import.meta.url);return{id:oB,diagram:t}},"loader")},nB="railroadAbnf",sB={id:nB,detector:s(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./abnfDiagram-WEYOIA3C-CKV_7Upb.js"));return{diagram:t}},__vite__mapDeps([51,49,20,21,4]),import.meta.url);return{id:nB,diagram:t}},"loader")},lB="railroadPeg",hB={id:lB,detector:s(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:s(async()=>{const{diagram:t}=await o(async()=>{const{diagram:t}=await(import("./pegDiagram-ECIUJNBX-BWy_tkzy.js"));return{diagram:t}},__vite__mapDeps([52,49,20,21,4]),import.meta.url);return{id:lB,diagram:t}},"loader")},cB=!1,dB=s(()=>{cB||(cB=!0,br("error",xT,t=>"error"===t.toLowerCase().trim()),br("---",{db:{clear:s(()=>{},"clear")},styles:{},renderer:{draw:s(()=>{},"draw")},parser:{parse:s(()=>{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:s(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),tt(wT,_T,WT),tt(jS,qS,FT,hT,YS,ZS,KS,JS,aT,sT,US,RS,TT,XS,dT,pT,eT,MT,$T,iT,IT,NT,PT,OT,HT,XT,iB,aB,sB,hB,YT,JT,eB,ZT))},"addDiagrams"),uB=s(async()=>{p.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(K).map(async([t,{detector:e,loader:r}])=>{if(r)try{kr(t)}catch{try{const{diagram:t,id:i}=await r();br(i,t,e)}catch(i){throw p.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete K[t],i}}}))).filter(t=>"rejected"===t.status);if(t.length>0){p.error(`Failed to load ${t.length} external diagrams`);for(const e of t)p.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function pB(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function gB(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}s(pB,"setA11yDiagramInfo"),s(gB,"addSVGa11yTitleDescription");var fB=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{s(this,"Diagram")}static async fromText(e,r={}){const i="string"==typeof e?{cleaned:e}:e,o=se(),a=J(i.cleaned,o);try{kr(a)}catch{const t=rt(a);if(!t)throw new Q(`Diagram ${a} not found.`);const{id:e,diagram:r}=await t();br(e,r)}const{db:n,parser:s,renderer:l,init:h}=kr(a);s.parser&&(s.parser.yy=n),n.clear?.(),h?.(o),r.title&&n.setDiagramTitle?.(r.title);let c=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const t=o.maxTextSize??It.maxTextSize;i.withComments.length>t?p.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${t}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):c=i.withComments}const d=of(c)+"\n";return i.frontmatterLineOffset&&n.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await s.parse(d),new t(a,d,n,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},yB=[],mB=s(()=>{yB.forEach(t=>{t()}),yB=[]},"attachFunctions"),xB=s(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function CB(t){const e=Z(t);if(!e)return{text:t,metadata:{}};const r=e.indent,i=r?e.body.split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e.body;let o=Iu(i,{schema:Eu})??{};o="object"!=typeof o||Array.isArray(o)?{}:o;const a={};return o.displayMode&&(a.displayMode=o.displayMode.toString()),o.title&&(a.title=o.title.toString()),o.config&&(a.config=o.config),{text:t.slice(e.length),metadata:a}}s(CB,"extractFrontMatter");var bB=s(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),kB=s(t=>{const{text:e,metadata:r}=CB(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),wB=s(t=>{const e=rf.detectInit(t)??{},r=rf.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:Tg(t),directive:e}},"processDirectives");function SB(t){const e=t,r=bB(t),i=kB(r),o=wB(i.text),a=ef(i.config,o.directive),n=o.text;return{code:{raw:e,cleaned:xB(n),withComments:n,frontmatterLineOffset:r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0},title:i.title,config:a}}function TB(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}s(SB,"preprocessDiagram"),s(TB,"toBase64");var BB=["foreignobject"],_B=["dominant-baseline"];function vB(t){const e=SB(t);let r;ce();try{r=J(e.code.cleaned,se())}catch{r=void 0}return ee(r),he(e.config??{}),e}async function FB(t,e){dB();try{const{code:e,config:r}=vB(t);return{diagramType:(await fB.fromText(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}finally{ee(void 0)}}s(vB,"processAndSetConfigs"),s(FB,"parse");var LB=s((t,e,r=[])=>`.${t} ${e} ${Nt(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),MB=s((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=ye(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{xg(t.styles)||i.forEach(e=>{r.insertRule(LB(t.id,e,t.styles),r.cssRules.length)}),xg(t.textStyles)||r.insertRule(LB(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=Ge(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+Ge(r)},"createCssStyles"),AB=s((t,e)=>OS(LS(`${t}{${e}}`),function(t){var e=lS(t);return function(r,i,o,a){for(var n="",s=0;s<e;s++)n+=t[s](r,i,o,a)||"";return n}}([s(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===Jw)return;e.props=e.props.map(r=>{if(r===t&&Array.isArray(e.children)&&e.children.every(t=>{if("decl"!==t.type)return!1;return new Set(["font-family","font-size","fill"]).has(t.props)}))return r;return(r.startsWith(`${t} `)||r.startsWith(`${t}>`))&&!r.startsWith(`${t} ||`)?r:`${t} ${r}`})}else if(e.type.startsWith("@")){[...["@media","@supports",tS,"@scope","@container","@starting-style"],Jw].includes(e.type)||(p.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=Zw)}},"addNamespace"),DS])),"compileCSS"),$B=s((t,e,r,i)=>{const o=MB(t,r),a=Ke(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return AB(i,a)},"createUserStyles"),EB=s((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=af(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),OB=s((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${TB(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),DB=s((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&n.attr("xmlns:xlink",o),n.append("g"),t},"appendDivSvgG");function IB(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(IB,"sandboxedIframe");var qB=s((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),PB=s(async function(e,r,i){dB();const o=vB(r);let a=o.code;r=a.cleaned;const n=se();p.debug(n),r.length>(n?.maxTextSize??5e4)&&(a={raw:r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cleaned:r});const l=`#${e}`,h="i"+e,c="#"+h,d="d"+e,u="#"+d,g=s(()=>{const t=po(y?c:u).node();t&&"remove"in t&&t.remove()},"removeTempElements");let f=po(document.body);const y="sandbox"===n.securityLevel,m="loose"===n.securityLevel,x=n.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),y){const t=IB(po(i),h);f=po(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=po(i);DB(f,e,d,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(qB(document,e,d,h),y){const t=IB(po(document.body),h);f=po(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=po("body");DB(f,e,d)}let C,b;try{C=await fB.fromText(a,{title:o.title})}catch($){if(n.suppressErrorRendering)throw g(),$;C=await fB.fromText("error"),b=$,C.db.setErrorMessage?.(Kg($))}const k=f.select(u).node(),w=C.type,S=k.firstChild,T=S.firstChild,B=C.renderer.getClasses?.(r,C),_=$B(n,w,B,l),v=document.createElement("style");v.innerHTML=_,S.insertBefore(v,T);try{await C.renderer.draw(r,e,"12.2.0",C)}catch(um){throw n.suppressErrorRendering?g():mT.draw(r,e,"12.2.0"),um}const F=f.select(`${u} svg`),L=C.db.getAccTitle?.(),M=C.db.getAccDescription?.();NB(w,F,L,M);const A=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let r=f.select(u).node().innerHTML;if(p.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),r=EB(r,y,Xt(n.arrowMarkerAbsolute)),y){const t=f.select(u+" svg").node();r=OB(r,t)}else m||(r=t.sanitize(r,{ADD_TAGS:BB,ADD_ATTR:_B,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return mB(),r},"serializeSvg")();if(b)throw b;return g(),{diagramType:w,svg:A,bindFunctions:C.db.bindFunctions}},"renderDiagram"),zB=s(async function(t,e,r){try{return await PB(t,e,r)}finally{ee(void 0)}},"render");function WB(t={}){const e=ot({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),ie(e);const r=jt.theme;e?.theme&&Object.hasOwn(At,e.theme)?e.themeVariables=At[e.theme].getThemeVariables(e.themeVariables):e&&(null!=e.theme&&"null"!==e.theme&&(e.theme=r),e.themeVariables=At[r].getThemeVariables(e.themeVariables));const i="object"==typeof e?re(e):ae();g(i.logLevel),dB()}s(WB,"initialize");var RB=s((t,e={})=>{const{code:r}=SB(t);return fB.fromText(r,e)},"getDiagramFromText");function NB(t,e,r,i){pB(e,t),gB(e,r,i,e.attr("id"))}s(NB,"addA11yInfo");var jB=Object.freeze({render:zB,parse:FB,getDiagramFromText:RB,initialize:WB,getConfig:se,setConfig:ne,getSiteConfig:ae,updateSiteConfig:oe,reset:s(()=>{ce()},"reset"),globalReset:s(()=>{ce(jt)},"globalReset"),defaultConfig:jt});g(se().logLevel),ce(se());var HB=s((t,e,r)=>{p.warn(t),Qg(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),UB=s(async function(t={querySelector:".mermaid"}){try{await YB(t)}catch(um){if(Qg(um)&&p.error(um.str),i_.parseError&&i_.parseError(um),!t.suppressErrors)throw p.error("Use the suppressErrors option to suppress these errors"),um}},"run"),YB=s(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=jB.getConfig();let o;if(p.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}p.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(p.debug("Start On Load: "+i?.startOnLoad),jB.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new rf.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const s=[];for(const h of Array.from(o)){if(p.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;n=h.innerHTML,n=Sy(rf.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=rf.detectInit(n);r&&p.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await r_(e,n,h);h.innerHTML=r,t&&await t(e),i&&i(h)}catch(l){HB(l,s,i_.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),VB=s(function(t){jB.initialize(t)},"initialize"),XB=s(async function(t,e,r){p.warn("mermaid.init is deprecated. Please use run instead."),t&&VB(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await UB(i)},"init"),GB=s(async(t,{lazyLoad:e=!0}={})=>{dB(),tt(...t),!1===e&&await uB()},"registerExternalDiagrams"),ZB=s(function(){if(i_.startOnLoad){const{startOnLoad:t}=jB.getConfig();t&&i_.run().catch(t=>p.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",ZB,!1);var QB=s(function(t){i_.parseError=t},"setParseErrorHandler"),KB=[],JB=!1,t_=s(async()=>{if(!JB){for(JB=!0;KB.length>0;){const t=KB.shift();if(t)try{await t()}catch(um){p.error("Error executing queue",um)}}JB=!1}},"executeQueue"),e_=s(async(t,e)=>new Promise((r,i)=>{const o=s(()=>new Promise((o,a)=>{jB.parse(t,e).then(t=>{o(t),r(t)},t=>{p.error("Error parsing",t),i_.parseError?.(t),a(t),i(t)})}),"performCall");KB.push(o),t_().catch(i)}),"parse"),r_=s((t,e,r)=>new Promise((i,o)=>{const a=s(()=>new Promise((a,n)=>{jB.render(t,e,r).then(t=>{a(t),i(t)},t=>{p.error("Error parsing",t),i_.parseError?.(t),n(t),o(t)})}),"performCall");KB.push(a),t_().catch(o)}),"render"),i_={startOnLoad:!0,mermaidAPI:jB,parse:e_,render:r_,init:XB,run:UB,registerExternalDiagrams:GB,registerLayoutLoaders:Uw,initialize:VB,parseError:void 0,contentLoaded:ZB,setParseErrorHandler:QB,detectType:J,registerIconPacks:bp,getRegisteredDiagramsMetadata:s(()=>Object.keys(K).map(t=>({id:t})),"getRegisteredDiagramsMetadata")},o_=i_;
|
|
3
|
+
/*! Check if previously processed */
|
|
4
|
+
/*!
|
|
5
|
+
* Wait for document loaded before starting the execution
|
|
6
|
+
*/
|
|
7
|
+
const a_=Object.freeze(Object.defineProperty({__proto__:null,default:o_},Symbol.toStringTag,{value:"Module"}));export{_p as $,fr as A,am as B,sm as C,om as D,hm as E,E as F,O as G,im as H,lm as I,Eu as J,l as K,se as L,mr as M,ef as N,It as O,Wg as P,nd as Q,tf as R,sc as S,ps as T,yc as U,_s as V,ft as W,gs as X,Qy as Y,pc as Z,s as _,nr as a,Ks as a$,ze as a0,We as a1,Cg as a2,Me as a3,Ne as a4,Ee as a5,Pg as a6,me as a7,I as a8,P as a9,Ik as aA,Qk as aB,Xk as aC,o as aD,fk as aE,rw as aF,Gk as aG,mx as aH,W as aI,fe as aJ,e as aK,r as aL,cc as aM,Ek as aN,zk as aO,rm as aP,mp as aQ,zh as aR,Pr as aS,qr as aT,Oa as aU,d as aV,Xr as aW,xl as aX,ll as aY,Vs as aZ,Js as a_,z as aa,Ve as ab,Je as ac,Dk as ad,mk as ae,bk as af,Hu as ag,Rw as ah,uw as ai,Jk as aj,iw as ak,gg as al,Ig as am,cm as an,Sp as ao,bp as ap,Xg as aq,ux as ar,Yn as as,Kn as at,cs as au,Zu as av,Gu as aw,Pk as ax,Ck as ay,Zk as az,ar as b,Qs as b0,Zs as b1,Gs as b2,Xs as b3,js as b4,Rs as b5,zs as b6,Ps as b7,Ms as b8,Vr as b9,Wh as ba,My as bb,Cx as bc,xk as bd,a_ as be,pr as c,Ye as d,ot as e,Yg as f,lr as g,pk as h,qx as i,Te as j,po as k,p as l,je as m,Ug as n,gr as o,Gw as p,hr as q,Vw as r,sr as s,cr as t,rf as u,Iu as v,jg as w,gk as x,nf as y,or as z};
|