@codexhost/cli-win32-x64 0.29.2 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +40 -15
- package/app/console-web.js +49 -24
- package/app/desktop-controller.mjs +53 -28
- package/app/host-runtime.mjs +2616 -1978
- package/app/plugins/antigravity/plugin.mjs +40 -15
- package/app/plugins/claude-code/plugin.mjs +40 -15
- package/app/plugins/codebuddy/plugin.mjs +514 -109
- package/app/plugins/codex-usage/plugin.mjs +58 -33
- package/app/plugins/copilot/plugin.mjs +40 -15
- package/app/plugins/cursor-cli/plugin.mjs +40 -15
- package/app/plugins/deepseek-harness/plugin.mjs +40 -15
- package/app/plugins/devin/plugin.mjs +40 -15
- package/app/plugins/grok/plugin.mjs +40 -15
- package/app/plugins/hermes/plugin.mjs +40 -15
- package/app/plugins/kimi-code/plugin.mjs +40 -15
- package/app/plugins/kiro-cli/plugin.mjs +40 -15
- package/app/plugins/omp/plugin.mjs +40 -15
- package/app/plugins/opencode/plugin.mjs +40 -15
- package/app/plugins/pi/plugin.mjs +40 -15
- package/app/plugins/qoder/plugin.mjs +40 -15
- package/app/plugins/qoder-cn/plugin.mjs +40 -15
- package/app/plugins/qwen-code/plugin.mjs +40 -15
- package/app/plugins/workbuddy/plugin.mjs +548 -112
- package/app/plugins/zcode/plugin.mjs +40 -15
- package/app/renderer-extension.js +52 -27
- package/app/web/assets/abnfDiagram-XWFEHMT6-BdinLox4.js +1 -0
- package/app/web/assets/architectureDiagram-CSQXQB3N-DgPBbtvP.js +36 -0
- package/app/web/assets/blockDiagram-BEDRHYPZ-B4ENdwtZ.js +140 -0
- package/app/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
- package/app/web/assets/c4Diagram-M2UUVUY5-DA6Owfyu.js +38 -0
- package/app/web/assets/chunk-2Q5K7J3B-Dvh3qOmo.js +1 -0
- package/app/web/assets/chunk-3GCGMST5-VIkqueym.js +1 -0
- package/app/web/assets/chunk-5VM5RSS4-DTYof_OI.js +15 -0
- package/app/web/assets/chunk-7U7NFRK5-Dp7s2dg0.js +88 -0
- package/app/web/assets/chunk-CNRTWJTD-TKBKxZLU.js +1 -0
- package/app/web/assets/chunk-D5HYT7QG-BRZDovSS.js +1 -0
- package/app/web/assets/chunk-EBZ3SEQC-C9USZ3tT.js +2 -0
- package/app/web/assets/chunk-JWPE2WC7-BrdvVNVo.js +1 -0
- package/app/web/assets/chunk-KTR4FSNJ-C7qwjGba.js +1 -0
- package/app/web/assets/chunk-XXDRQBXY-DlSrRuwN.js +1 -0
- package/app/web/assets/classDiagram-v2-KXABOMEV-BFvB4kwX.js +217 -0
- package/app/web/assets/cose-bilkent-JH36ORCC-UyCAqNvj.js +1 -0
- package/app/web/assets/cynefin-EF2NZ3EQ-CwawUbjJ.js +141 -0
- package/app/web/assets/cynefinDiagram-NJNITYFG-BaWEIQJ0.js +62 -0
- package/app/web/assets/cytoscape.esm-Cm0uQArZ.js +332 -0
- package/app/web/assets/d3-scale-4DPf7zan.js +1 -0
- package/app/web/assets/dagre-KIHZ2IZ3-B7ENIjLG.js +4 -0
- package/app/web/assets/diagram-7YQZDPLS-CxRMU8xq.js +41 -0
- package/app/web/assets/diagram-QBROCOUO-qo7sxm4K.js +200 -0
- package/app/web/assets/diagram-RJJCUUZO-CQiGMCMe.js +30 -0
- package/app/web/assets/diagram-WERXNKYE-D0Jps1As.js +24 -0
- package/app/web/assets/diagram-YHHI257C-p4AB8cqK.js +3 -0
- package/app/web/assets/diagram-YR4HJLHV-Bh6JKT04.js +24 -0
- package/app/web/assets/ebnfDiagram-N527522P-DRac0k4W.js +1 -0
- package/app/web/assets/elk-O5DQBFGD-CWTz5SZP.js +27 -0
- package/app/web/assets/erDiagram-K3K3BIDK-DE3w4BEY.js +99 -0
- package/app/web/assets/flowDiagram-Z6JWZHQI-NYs8bi5t.js +213 -0
- package/app/web/assets/ganttDiagram-3PRQTZWP-Bspp9btW.js +292 -0
- package/app/web/assets/gitGraphDiagram-VXDFKS5L-ByGW1uvv.js +106 -0
- package/app/web/assets/graph-D8UmR1vK.js +1 -0
- package/app/web/assets/grid-E2QIVN74-CegebiIw.js +1 -0
- package/app/web/assets/{index-aSHN2MIG.css → index-BbmB5VLj.css} +1 -1
- package/app/web/assets/{index-0TnaYwHS.js → index-DFPOGLS4.js} +80 -80
- package/app/web/assets/infoDiagram-EZ3ZOAHP-CexmsdZx.js +2 -0
- package/app/web/assets/ishikawaDiagram-S3EKX5GW-BbWqKhg6.js +70 -0
- package/app/web/assets/journeyDiagram-POQNLL5X-27YlCe-1.js +139 -0
- package/app/web/assets/kanban-definition-BH5XI6FM-BAhOdeck.js +89 -0
- package/app/web/assets/langs/{graphql-ChAeyPkT.js → graphql-D6Z3qcRW.js} +1 -1
- package/app/web/assets/langs/{http-BvreBIbD.js → http-XiU9G9In.js} +1 -1
- package/app/web/assets/langs/{php-D8omCIuJ.js → php-DL3xwS-7.js} +1 -1
- package/app/web/assets/langs/{rst-Do7RLLCS.js → rst-DudRVJ9g.js} +1 -1
- package/app/web/assets/langs/{ruby-rH_O_vse.js → ruby-_FqsfqJi.js} +1 -1
- package/app/web/assets/langs/{svelte-xZy73wAj.js → svelte-ClsVJoBT.js} +1 -1
- package/app/web/assets/langs/{vue-C4DW8agZ.js → vue-BiKMXCyK.js} +1 -1
- package/app/web/assets/mermaid.core-sGgCbv5y.js +314 -0
- package/app/web/assets/mindmap-definition-WVAN44T4-CsMIX0Lj.js +98 -0
- package/app/web/assets/pegDiagram-D4NLKWP3-Cs3LXqn_.js +1 -0
- package/app/web/assets/pieDiagram-36ENHN4W-DdQsQX9I.js +39 -0
- package/app/web/assets/quadrantDiagram-ZQUDMS73-D1jOKqx_.js +7 -0
- package/app/web/assets/railroadDiagram-JIZHGYPL-XulrgX5n.js +1 -0
- package/app/web/assets/render-VIF2ZAQL-CSsGw-0I.js +2 -0
- package/app/web/assets/requirementDiagram-AXW2TVFA-CT66GXLN.js +84 -0
- package/app/web/assets/sankeyDiagram-FBCJTAIF-CNRKebNY.js +40 -0
- package/app/web/assets/sequenceDiagram-3LA2ROMG-DVl5y64e.js +169 -0
- package/app/web/assets/sizeCapture-2Q2CQKSF-Kg0XxSga.js +1 -0
- package/app/web/assets/stateDiagram-v2-ATKHQDJO-DYQnfMsS.js +291 -0
- package/app/web/assets/swimlanes-YQL5WMAO-Chqt7pxD.js +1 -0
- package/app/web/assets/swimlanesDiagram-UCCPES4V-BfREktNP.js +8 -0
- package/app/web/assets/timeline-definition-7Z437IG3-aHFxjIT6.js +120 -0
- package/app/web/assets/usecaseDiagram-RDK6N6HP-DsC5tFe4.js +370 -0
- package/app/web/assets/vendor-BKfNgqAm.js +666 -0
- package/app/web/assets/vennDiagram-SHRQU5PJ-C65oZxFn.js +34 -0
- package/app/web/assets/wardleyDiagram-F3OXNVQS-HTkq7DT0.js +78 -0
- package/app/web/assets/xychartDiagram-GDYJKCDI-p1LpQ9MH.js +7 -0
- package/app/web/codexhost-settings.js +39 -39
- package/app/web/index.html +3 -3
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +65 -65
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-locale/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +17 -17
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +16 -16
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +16 -16
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-plan/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +9 -9
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +14 -14
- package/app/web-modules/licenses/DSH-THIRD_PARTY_NOTICES.md +1 -1
- package/app/web-modules/server.mjs +348 -118
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-screenshot.exe +0 -0
- package/libexec/codexhost-shell.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
- package/app/web/assets/vendor-C9g2bw8s.js +0 -410
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-BKfNgqAm.js","./vendor-BNsW4eBh.css","./elk-O5DQBFGD-CWTz5SZP.js","./chunk-3GCGMST5-VIkqueym.js","./chunk-EBZ3SEQC-C9USZ3tT.js","./index-DFPOGLS4.js","./index-BbmB5VLj.css","./graph-D8UmR1vK.js","./dagre-KIHZ2IZ3-B7ENIjLG.js","./swimlanes-YQL5WMAO-Chqt7pxD.js","./grid-E2QIVN74-CegebiIw.js","./render-VIF2ZAQL-CSsGw-0I.js","./cose-bilkent-JH36ORCC-UyCAqNvj.js","./cytoscape.esm-Cm0uQArZ.js","./c4Diagram-M2UUVUY5-DA6Owfyu.js","./chunk-D5HYT7QG-BRZDovSS.js","./flowDiagram-Z6JWZHQI-NYs8bi5t.js","./chunk-KTR4FSNJ-C7qwjGba.js","./chunk-5VM5RSS4-DTYof_OI.js","./chunk-XXDRQBXY-DlSrRuwN.js","./chunk-CNRTWJTD-TKBKxZLU.js","./diagram-QBROCOUO-qo7sxm4K.js","./swimlanesDiagram-UCCPES4V-BfREktNP.js","./erDiagram-K3K3BIDK-DE3w4BEY.js","./gitGraphDiagram-VXDFKS5L-ByGW1uvv.js","./chunk-JWPE2WC7-BrdvVNVo.js","./chunk-2Q5K7J3B-Dvh3qOmo.js","./cynefin-EF2NZ3EQ-CwawUbjJ.js","./ganttDiagram-3PRQTZWP-Bspp9btW.js","./d3-scale-4DPf7zan.js","./infoDiagram-EZ3ZOAHP-CexmsdZx.js","./pieDiagram-36ENHN4W-DdQsQX9I.js","./quadrantDiagram-ZQUDMS73-D1jOKqx_.js","./xychartDiagram-GDYJKCDI-p1LpQ9MH.js","./requirementDiagram-AXW2TVFA-CT66GXLN.js","./sequenceDiagram-3LA2ROMG-DVl5y64e.js","./classDiagram-v2-KXABOMEV-BFvB4kwX.js","./stateDiagram-v2-ATKHQDJO-DYQnfMsS.js","./journeyDiagram-POQNLL5X-27YlCe-1.js","./timeline-definition-7Z437IG3-aHFxjIT6.js","./mindmap-definition-WVAN44T4-CsMIX0Lj.js","./kanban-definition-BH5XI6FM-BAhOdeck.js","./sankeyDiagram-FBCJTAIF-CNRKebNY.js","./diagram-WERXNKYE-D0Jps1As.js","./diagram-7YQZDPLS-CxRMU8xq.js","./blockDiagram-BEDRHYPZ-B4ENdwtZ.js","./diagram-RJJCUUZO-CQiGMCMe.js","./architectureDiagram-CSQXQB3N-DgPBbtvP.js","./diagram-YHHI257C-p4AB8cqK.js","./ishikawaDiagram-S3EKX5GW-BbWqKhg6.js","./vennDiagram-SHRQU5PJ-C65oZxFn.js","./diagram-YR4HJLHV-Bh6JKT04.js","./usecaseDiagram-RDK6N6HP-DsC5tFe4.js","./wardleyDiagram-F3OXNVQS-HTkq7DT0.js","./cynefinDiagram-NJNITYFG-BaWEIQJ0.js","./railroadDiagram-JIZHGYPL-XulrgX5n.js","./chunk-7U7NFRK5-Dp7s2dg0.js","./ebnfDiagram-N527522P-DRac0k4W.js","./abnfDiagram-XWFEHMT6-BdinLox4.js","./pegDiagram-D4NLKWP3-Cs3LXqn_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{g as Ky,_ as It}from"./index-DFPOGLS4.js";var Id=Object.defineProperty,u=(e,t)=>Id(e,"name",{value:t,configurable:!0}),Qy=(e,t)=>{for(var r in t)Id(e,r,{get:t[r],enumerable:!0})},Vs={exports:{}},Jy=Vs.exports,gh;function t0(){return gh||(gh=1,(function(e,t){(function(r,i){e.exports=i()})(Jy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",p="quarter",f="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var M=["th","st","nd","rd"],v=E%100;return"["+E+(M[(v-20)%10]||M[v]||M[0])+"]"}},S=function(E,M,v){var q=String(E);return!q||q.length>=M?E:""+Array(M+1-q.length).join(v)+E},_={s:S,z:function(E){var M=-E.utcOffset(),v=Math.abs(M),q=Math.floor(v/60),z=v%60;return(M<=0?"+":"-")+S(q,2,"0")+":"+S(z,2,"0")},m:function E(M,v){if(M.date()<v.date())return-E(v,M);var q=12*(v.year()-M.year())+(v.month()-M.month()),z=M.clone().add(q,d),I=v-z<0,X=M.clone().add(q+(I?-1:1),d);return+(-(q+(v-z)/(I?z-X:X-z))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:f,w:h,d:c,D:m,h:l,m:n,s:a,ms:o,Q:p}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},B="en",L={};L[B]=b;var F="$isDayjsObject",A=function(E){return E instanceof G||!(!E||!E[F])},H=function E(M,v,q){var z;if(!M)return B;if(typeof M=="string"){var I=M.toLowerCase();L[I]&&(z=I),v&&(L[I]=v,z=I);var X=M.split("-");if(!z&&X.length>1)return E(X[0])}else{var K=M.name;L[K]=M,z=K}return!q&&z&&(B=z),z||!q&&B},R=function(E,M){if(A(E))return E.clone();var v=typeof M=="object"?M:{};return v.date=E,v.args=arguments,new G(v)},$=_;$.l=H,$.i=A,$.w=function(E,M){return R(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var G=(function(){function E(v){this.$L=H(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[F]=!0}var M=E.prototype;return M.parse=function(v){this.$d=(function(q){var z=q.date,I=q.utc;if(z===null)return new Date(NaN);if($.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var X=z.match(x);if(X){var K=X[2]-1||0,lt=(X[7]||"0").substring(0,3);return I?new Date(Date.UTC(X[1],K,X[3]||1,X[4]||0,X[5]||0,X[6]||0,lt)):new Date(X[1],K,X[3]||1,X[4]||0,X[5]||0,X[6]||0,lt)}}return new Date(z)})(v),this.init()},M.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},M.$utils=function(){return $},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(v,q){var z=R(v);return this.startOf(q)<=z&&z<=this.endOf(q)},M.isAfter=function(v,q){return R(v)<this.startOf(q)},M.isBefore=function(v,q){return this.endOf(q)<R(v)},M.$g=function(v,q,z){return $.u(v)?this[q]:this.set(z,v)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(v,q){var z=this,I=!!$.u(q)||q,X=$.p(v),K=function(vt,wt){var Dt=$.w(z.$u?Date.UTC(z.$y,wt,vt):new Date(z.$y,wt,vt),z);return I?Dt:Dt.endOf(c)},lt=function(vt,wt){return $.w(z.toDate()[vt].apply(z.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(wt)),z)},mt=this.$W,kt=this.$M,ft=this.$D,it="set"+(this.$u?"UTC":"");switch(X){case f:return I?K(1,0):K(31,11);case d:return I?K(1,kt):K(0,kt+1);case h:var yt=this.$locale().weekStart||0,St=(mt<yt?mt+7:mt)-yt;return K(I?ft-St:ft+(6-St),kt);case c:case m:return lt(it+"Hours",0);case l:return lt(it+"Minutes",1);case n:return lt(it+"Seconds",2);case a:return lt(it+"Milliseconds",3);default:return this.clone()}},M.endOf=function(v){return this.startOf(v,!1)},M.$set=function(v,q){var z,I=$.p(v),X="set"+(this.$u?"UTC":""),K=(z={},z[c]=X+"Date",z[m]=X+"Date",z[d]=X+"Month",z[f]=X+"FullYear",z[l]=X+"Hours",z[n]=X+"Minutes",z[a]=X+"Seconds",z[o]=X+"Milliseconds",z)[I],lt=I===c?this.$D+(q-this.$W):q;if(I===d||I===f){var mt=this.clone().set(m,1);mt.$d[K](lt),mt.init(),this.$d=mt.set(m,Math.min(this.$D,mt.daysInMonth())).$d}else K&&this.$d[K](lt);return this.init(),this},M.set=function(v,q){return this.clone().$set(v,q)},M.get=function(v){return this[$.p(v)]()},M.add=function(v,q){var z,I=this;v=Number(v);var X=$.p(q),K=function(kt){var ft=R(I);return $.w(ft.date(ft.date()+Math.round(kt*v)),I)};if(X===d)return this.set(d,this.$M+v);if(X===f)return this.set(f,this.$y+v);if(X===c)return K(1);if(X===h)return K(7);var lt=(z={},z[n]=i,z[l]=s,z[a]=r,z)[X]||1,mt=this.$d.getTime()+v*lt;return $.w(mt,this)},M.subtract=function(v,q){return this.add(-1*v,q)},M.format=function(v){var q=this,z=this.$locale();if(!this.isValid())return z.invalidDate||y;var I=v||"YYYY-MM-DDTHH:mm:ssZ",X=$.z(this),K=this.$H,lt=this.$m,mt=this.$M,kt=z.weekdays,ft=z.months,it=z.meridiem,yt=function(wt,Dt,Ut,Te){return wt&&(wt[Dt]||wt(q,I))||Ut[Dt].slice(0,Te)},St=function(wt){return $.s(K%12||12,wt,"0")},vt=it||function(wt,Dt,Ut){var Te=wt<12?"AM":"PM";return Ut?Te.toLowerCase():Te};return I.replace(C,(function(wt,Dt){return Dt||(function(Ut){switch(Ut){case"YY":return String(q.$y).slice(-2);case"YYYY":return $.s(q.$y,4,"0");case"M":return mt+1;case"MM":return $.s(mt+1,2,"0");case"MMM":return yt(z.monthsShort,mt,ft,3);case"MMMM":return yt(ft,mt);case"D":return q.$D;case"DD":return $.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return yt(z.weekdaysMin,q.$W,kt,2);case"ddd":return yt(z.weekdaysShort,q.$W,kt,3);case"dddd":return kt[q.$W];case"H":return String(K);case"HH":return $.s(K,2,"0");case"h":return St(1);case"hh":return St(2);case"a":return vt(K,lt,!0);case"A":return vt(K,lt,!1);case"m":return String(lt);case"mm":return $.s(lt,2,"0");case"s":return String(q.$s);case"ss":return $.s(q.$s,2,"0");case"SSS":return $.s(q.$ms,3,"0");case"Z":return X}return null})(wt)||X.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(v,q,z){var I,X=this,K=$.p(q),lt=R(v),mt=(lt.utcOffset()-this.utcOffset())*i,kt=this-lt,ft=function(){return $.m(X,lt)};switch(K){case f:I=ft()/12;break;case d:I=ft();break;case p:I=ft()/3;break;case h:I=(kt-mt)/6048e5;break;case c:I=(kt-mt)/864e5;break;case l:I=kt/s;break;case n:I=kt/i;break;case a:I=kt/r;break;default:I=kt}return z?I:$.a(I)},M.daysInMonth=function(){return this.endOf(d).$D},M.$locale=function(){return L[this.$L]},M.locale=function(v,q){if(!v)return this.$L;var z=this.clone(),I=H(v,q,!0);return I&&(z.$L=I),z},M.clone=function(){return $.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E})(),O=G.prototype;return R.prototype=O,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",f],["$D",m]].forEach((function(E){O[E[1]]=function(M){return this.$g(M,E[0],E[1])}})),R.extend=function(E,M){return E.$i||(E(M,G,R),E.$i=!0),R},R.locale=H,R.isDayjs=A,R.unix=function(E){return R(1e3*E)},R.en=L[B],R.Ls=L,R.p={},R}))})(Vs)),Vs.exports}var e0=t0();const r0=Ky(e0);var gr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},tt={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},Wn=u(function(e="fatal"){let t=gr.fatal;typeof e=="string"?e.toLowerCase()in gr&&(t=gr[e]):typeof e=="number"&&(t=e),tt.trace=()=>{},tt.debug=()=>{},tt.info=()=>{},tt.warn=()=>{},tt.error=()=>{},tt.fatal=()=>{},t<=gr.fatal&&(tt.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=gr.error&&(tt.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=gr.warn&&(tt.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=gr.info&&(tt.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=gr.debug&&(tt.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=gr.trace&&(tt.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=u(e=>`%c${r0().format("ss.SSS")} : ${e} : `,"format");const Xs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return Xs.hue2rgb(o,s,e+1/3)*255;case"g":return Xs.hue2rgb(o,s,e)*255;case"b":return Xs.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},i0={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},s0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Mt={channel:Xs,lang:i0,unit:s0},Pr={};for(let e=0;e<=255;e++)Pr[e]=Mt.unit.dec2hex(e);const me={ALL:0,RGB:1,HSL:2};let o0=class{constructor(){this.type=me.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=me.ALL}is(t){return this.type===t}};class a0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new o0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=me.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Mt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Mt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Mt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Mt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Mt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Mt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),Mt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),Mt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),Mt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),Mt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),Mt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),Mt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(me.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(me.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(me.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(me.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(me.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(me.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Eo=new a0({r:0,g:0,b:0,a:0},"transparent"),Bi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Bi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Eo.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Pr[Math.round(t)]}${Pr[Math.round(r)]}${Pr[Math.round(i)]}${Pr[Math.round(s*255)]}`:`#${Pr[Math.round(t)]}${Pr[Math.round(r)]}${Pr[Math.round(i)]}`}},Jr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Jr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Mt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Mt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Mt.channel.clamp.h(parseFloat(r)*360)}}return Mt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Jr.re);if(!r)return;const[,i,s,o,a,n]=r;return Eo.set({h:Jr._hue2deg(i),s:Mt.channel.clamp.s(parseFloat(s)),l:Mt.channel.clamp.l(parseFloat(o)),a:a?Mt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Mt.lang.round(t)}, ${Mt.lang.round(r)}%, ${Mt.lang.round(i)}%, ${s})`:`hsl(${Mt.lang.round(t)}, ${Mt.lang.round(r)}%, ${Mt.lang.round(i)}%)`}},as={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=as.colors[e];if(t)return Bi.parse(t)},stringify:e=>{const t=Bi.stringify(e);for(const r in as.colors)if(as.colors[r]===t)return r}},Ji={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ji.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Eo.set({r:Mt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Mt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:Mt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Mt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Mt.lang.round(t)}, ${Mt.lang.round(r)}, ${Mt.lang.round(i)}, ${Mt.lang.round(s)})`:`rgb(${Mt.lang.round(t)}, ${Mt.lang.round(r)}, ${Mt.lang.round(i)})`}},Ke={format:{keyword:as,hex:Bi,rgb:Ji,rgba:Ji,hsl:Jr,hsla:Jr},parse:e=>{if(typeof e!="string")return e;const t=Bi.parse(e)||Ji.parse(e)||Jr.parse(e)||as.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(me.HSL)||e.data.r===void 0?Jr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ji.stringify(e):Bi.stringify(e)},Dd=(e,t)=>{const r=Ke.parse(e);for(const i in t)r[i]=Mt.channel.clamp[i](t[i]);return Ke.stringify(r)},Nr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Dd(e,{a:t});const s=Eo.set({r:Mt.channel.clamp.r(e),g:Mt.channel.clamp.g(t),b:Mt.channel.clamp.b(r),a:Mt.channel.clamp.a(i)});return Ke.stringify(s)},n0=(e,t)=>Mt.lang.round(Ke.parse(e)[t]),l0=e=>{const{r:t,g:r,b:i}=Ke.parse(e),s=.2126*Mt.channel.toLinear(t)+.7152*Mt.channel.toLinear(r)+.0722*Mt.channel.toLinear(i);return Mt.lang.round(s)},h0=e=>l0(e)>=.5,Ae=e=>!h0(e),Pd=(e,t,r)=>{const i=Ke.parse(e),s=i[t],o=Mt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Ke.stringify(i)},Y=(e,t)=>Pd(e,"l",t),U=(e,t)=>Pd(e,"l",-t),w=(e,t)=>{const r=Ke.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Dd(e,i)},c0=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Ke.parse(e),{r:n,g:l,b:c,a:h}=Ke.parse(t),d=r/100,p=d*2-1,f=a-h,y=((p*f===-1?p:(p+f)/(1+p*f))+1)/2,x=1-y,C=i*y+n*x,b=s*y+l*x,S=o*y+c*x,_=a*d+h*(1-d);return Nr(C,b,S,_)},N=(e,t=100)=>{const r=Ke.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,c0(r,e,t)};/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function d0(e){if(Array.isArray(e))return e}function u0(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return n}}function p0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function f0(e,t){return d0(e)||u0(e,t)||g0(e,t)||p0()}function g0(e,t){if(e){if(typeof e=="string")return mh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mh(e,t):void 0}}const Rd=Object.entries,yh=Object.setPrototypeOf,m0=Object.isFrozen,Nd=Object.getPrototypeOf,qd=Object.getOwnPropertyDescriptor;let ne=Object.freeze,pe=Object.seal,Ci=Object.create,Wd=typeof Reflect<"u"&&Reflect,sn=Wd.apply,on=Wd.construct;ne||(ne=function(t){return t});pe||(pe=function(t){return t});sn||(sn=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});on||(on=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const mr=Vt(Array.prototype.forEach),y0=Vt(Array.prototype.lastIndexOf),xh=Vt(Array.prototype.pop),Wi=Vt(Array.prototype.push),x0=Vt(Array.prototype.slice),C0=Vt(Array.prototype.splice),vi=Array.isArray,na=zd(Set),la=Vt(Set.prototype.add),zi=Vt(Set.prototype.has),Zr=Vt(String.prototype.toLowerCase),ha=Vt(String.prototype.toString),Ch=Vt(String.prototype.match),Hi=Vt(String.prototype.replace),bh=Vt(String.prototype.indexOf),b0=Vt(String.prototype.trim),k0=Vt(Number.prototype.toString),S0=Vt(Boolean.prototype.toString),kh=typeof BigInt>"u"?null:Vt(BigInt.prototype.toString),Sh=typeof Symbol>"u"?null:Vt(Symbol.prototype.toString),Le=Vt(Object.prototype.hasOwnProperty),Yi=Vt(Object.prototype.toString),ce=Vt(RegExp.prototype.test),yr=zd(TypeError);function Vt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return sn(e,t,i)}}function zd(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return on(e,r)}}function qt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zr;if(yh&&yh(e,null),!vi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(m0(t)||(t[i]=o),s=o)}e[s]=!0}return e}function w0(e){for(let t=0;t<e.length;t++)Le(e,t)||(e[t]=null);return e}function $e(e){const t=Ci(null);for(const i of Rd(e)){var r=f0(i,2);const s=r[0],o=r[1];Le(e,s)&&(vi(o)?t[s]=w0(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=$e(o):t[s]=o)}return t}function T0(e){switch(typeof e){case"string":return e;case"number":return k0(e);case"boolean":return S0(e);case"bigint":return kh?kh(e):"0";case"symbol":return Sh?Sh(e):"Symbol()";case"undefined":return Yi(e);case"function":case"object":{if(e===null)return Yi(e);const t=e,r=We(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Yi(i)}return Yi(e)}default:return Yi(e)}}function We(e,t){for(;e!==null;){const i=qd(e,t);if(i){if(i.get)return Vt(i.get);if(typeof i.value=="function")return Vt(i.value)}e=Nd(e)}function r(){return null}return r}function _0(e,t){for(;e!==null;){const r=qd(e,t);if(r)return r.get?Vt(r.get):null;e=Nd(e)}return null}function B0(e){try{return ce(e,""),!0}catch{return!1}}const wh=ne(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ca=ne(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),da=ne(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),v0=ne(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ua=ne(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),L0=ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Th=ne(["#text"]),_h=ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pa=ne(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Bh=ne(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$s=ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),A0=pe(/{{[\w\W]*|^[\w\W]*}}/g),F0=pe(/<%[\w\W]*|^[\w\W]*%>/g),E0=pe(/\${[\w\W]*/g),M0=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),O0=pe(/^aria-[\-\w]+$/),vh=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$0=pe(/^(?:\w+script|data):/i),I0=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),D0=pe(/^html$/i),P0=pe(/^[a-z][.\w]*(-[.\w]+)+$/i),fa=pe(/<[/\w!]/g),Lh=pe(/<[/\w]/g),R0=pe(/<\/no(script|embed|frames)/i),Ah=pe(/\/>/i),Jt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},N0=ne(qt({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),q0=function(){return typeof window>"u"?null:window},W0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Fh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ir=function(t,r,i,s){return Le(t,r)&&vi(t[r])?qt(s.base?$e(s.base):{},t[r],s.transform):i},ga=function(t,r,i){const s=Le(t,r)?t[r]:void 0;return s&&typeof s=="object"?$e(s):i()};function Hd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q0();const t=ot=>Hd(ot);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==Jt.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,h=e.trustedTypes,d=n.prototype,p=We(d,"cloneNode"),f=We(d,"remove"),m=We(d,"removeAttributeNode"),y=We(d,"nextSibling"),x=We(d,"childNodes"),C=We(d,"parentNode"),b=We(d,"shadowRoot"),S=We(d,"attributes"),_=a&&a.prototype?We(a.prototype,"nodeType"):null,B=a&&a.prototype?We(a.prototype,"nodeName"):null,L=a&&a.prototype?We(a.prototype,"ownerDocument"):null,F=function(T){return _?_(T):T.nodeType},A=function(T){return B?B(T):T.nodeName},H=_0(d,"namespaceURI"),R=function(T){return H?H(T):T.namespaceURI};if(typeof o=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let $,G="",O,E=!1,M=0;const v=function(){if(M>0)throw yr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(T){v(),M++;try{return $.createHTML(T)}finally{M--}},z=function(T){v(),M++;try{return $.createScriptURL(T)}finally{M--}},I=function(){return E||(O=W0(h,s),E=!0),O},X=r,K=X.implementation,lt=X.createNodeIterator,mt=X.createDocumentFragment,kt=X.getElementsByTagName,ft=i.importNode;let it=Fh();t.isSupported=typeof Rd=="function"&&typeof C=="function"&&K&&K.createHTMLDocument!==void 0;const yt=A0,St=F0,vt=E0,wt=M0,Dt=O0,Ut=$0,Te=I0,Re=P0;let Ar=vh,Ht=null;const Fe=qt({},[...wh,...ca,...da,...ua,...Th]);let zt=null;const Je=qt({},[..._h,...pa,...Bh,...$s]);let he=Object.seal(Ci(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,Fr=null;const Ce=Object.seal(Ci(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,pr=!0,tr=!1,fr=!0,be=!1,g=!0,P=!1,Q=!1,J=null,V=null,k=!1,W=!1,j=!1,st=!1,at=!0,nt=!1;const Z="user-content-";let ht=!0,Ct=!1,Tt=null,_t={},Lt=null;const Pt=qt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let je=null;const Er=qt({},["audio","video","img","source","image","track"]);let Mr=null;const Ql=qt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),As="http://www.w3.org/1998/Math/MathML",Fs="http://www.w3.org/2000/svg",er="http://www.w3.org/1999/xhtml";let ni=er,Go=!1,Vo=null;const Ey=qt({},[As,Fs,er],ha),Jl=ne(["mi","mo","mn","ms","mtext"]);let Xo=qt({},Jl);const th=ne(["annotation-xml"]);let Zo=qt({},th);const My=qt({},["title","style","font","a","script"]);let Ri=null;const Oy=["application/xhtml+xml","text/html"],$y="text/html";let Zt=null,li=null;const Iy=r.createElement("form"),eh=function(T){return T instanceof RegExp||T instanceof Function},Ko=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(li&&li===T)return;(!T||typeof T!="object")&&(T={}),T=$e(T),Ri=Oy.indexOf(T.PARSER_MEDIA_TYPE)===-1?$y:T.PARSER_MEDIA_TYPE,Zt=Ri==="application/xhtml+xml"?ha:Zr,Ht=Ir(T,"ALLOWED_TAGS",Fe,{transform:Zt}),zt=Ir(T,"ALLOWED_ATTR",Je,{transform:Zt}),Vo=Ir(T,"ALLOWED_NAMESPACES",Ey,{transform:ha}),Mr=Ir(T,"ADD_URI_SAFE_ATTR",Ql,{transform:Zt,base:Ql}),je=Ir(T,"ADD_DATA_URI_TAGS",Er,{transform:Zt,base:Er}),Lt=Ir(T,"FORBID_CONTENTS",Pt,{transform:Zt}),Ne=Ir(T,"FORBID_TAGS",$e({}),{transform:Zt}),Fr=Ir(T,"FORBID_ATTR",$e({}),{transform:Zt}),_t=Le(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?$e(T.USE_PROFILES):T.USE_PROFILES:!1,Ee=T.ALLOW_ARIA_ATTR!==!1,pr=T.ALLOW_DATA_ATTR!==!1,tr=T.ALLOW_UNKNOWN_PROTOCOLS||!1,fr=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=T.SAFE_FOR_TEMPLATES||!1,g=T.SAFE_FOR_XML!==!1,P=T.WHOLE_DOCUMENT||!1,W=T.RETURN_DOM||!1,j=T.RETURN_DOM_FRAGMENT||!1,st=T.RETURN_TRUSTED_TYPE||!1,k=T.FORCE_BODY||!1,at=T.SANITIZE_DOM!==!1,nt=T.SANITIZE_NAMED_PROPS||!1,ht=T.KEEP_CONTENT!==!1,Ct=T.IN_PLACE||!1,Ar=B0(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:vh,ni=typeof T.NAMESPACE=="string"?T.NAMESPACE:er,Xo=ga(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>qt({},Jl)),Zo=ga(T,"HTML_INTEGRATION_POINTS",()=>qt({},th));const D=ga(T,"CUSTOM_ELEMENT_HANDLING",()=>Ci(null));if(he=Ci(null),Le(D,"tagNameCheck")&&eh(D.tagNameCheck)&&(he.tagNameCheck=D.tagNameCheck),Le(D,"attributeNameCheck")&&eh(D.attributeNameCheck)&&(he.attributeNameCheck=D.attributeNameCheck),Le(D,"allowCustomizedBuiltInElements")&&typeof D.allowCustomizedBuiltInElements=="boolean"&&(he.allowCustomizedBuiltInElements=D.allowCustomizedBuiltInElements),pe(he),be&&(pr=!1),j&&(W=!0),_t&&(Ht=qt({},Th),zt=Ci(null),_t.html===!0&&(qt(Ht,wh),qt(zt,_h)),_t.svg===!0&&(qt(Ht,ca),qt(zt,pa),qt(zt,$s)),_t.svgFilters===!0&&(qt(Ht,da),qt(zt,pa),qt(zt,$s)),_t.mathMl===!0&&(qt(Ht,ua),qt(zt,Bh),qt(zt,$s))),Ce.tagCheck=null,Ce.attributeCheck=null,Le(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?Ce.tagCheck=T.ADD_TAGS:vi(T.ADD_TAGS)&&(Ht===Fe&&(Ht=$e(Ht)),qt(Ht,T.ADD_TAGS,Zt))),Le(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?Ce.attributeCheck=T.ADD_ATTR:vi(T.ADD_ATTR)&&(zt===Je&&(zt=$e(zt)),qt(zt,T.ADD_ATTR,Zt))),Le(T,"ADD_FORBID_CONTENTS")&&vi(T.ADD_FORBID_CONTENTS)&&(Lt===Pt&&(Lt=$e(Lt)),qt(Lt,T.ADD_FORBID_CONTENTS,Zt)),ht&&(Ht["#text"]=!0),P&&qt(Ht,["html","head","body"]),Ht.table&&(qt(Ht,["tbody"]),delete Ne.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const et=$;$=T.TRUSTED_TYPES_POLICY;try{G=q("")}catch(rt){throw $=et,rt}}else T.TRUSTED_TYPES_POLICY===null?($=void 0,G=""):($===void 0&&($=I()),$&&typeof G=="string"&&(G=q("")));ne&&ne(T),li=T},rh=qt({},[...ca,...da,...v0]),ih=qt({},[...ua,...L0]),Dy=function(T,D,et){return D.namespaceURI===er?T==="svg":D.namespaceURI===As?T==="svg"&&(et==="annotation-xml"||Xo[et]):!!rh[T]},Py=function(T,D,et){return D.namespaceURI===er?T==="math":D.namespaceURI===Fs?T==="math"&&Zo[et]:!!ih[T]},Ry=function(T,D,et){return D.namespaceURI===Fs&&!Zo[et]||D.namespaceURI===As&&!Xo[et]?!1:!ih[T]&&(My[T]||!rh[T])},Ny=function(T){const D=R(T),et=Zr(A(T)),rt=C(T);let Bt,Et;return rt&&F(rt)===Jt.element?(Bt={namespaceURI:R(rt)},Et=Zr(A(rt))):(Bt={namespaceURI:ni},Et="template"),Vo[D]?D===Fs?Dy(et,Bt,Et):D===As?Py(et,Bt,Et):D===er?Ry(et,Bt,Et):!!(Ri==="application/xhtml+xml"&&Vo[D]):!1},Or=function(T){Wi(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(f(T),!C(T))throw yr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},sh=function(T,D,et){try{m(T,D)}catch{try{T.removeAttribute(et)}catch{}}},Qo=function(T){ta(T);const D=x(T);D&&mr(x0(D),rt=>{try{f(rt)}catch{}});const et=F(T)===Jt.element?S(T):null;if(et)for(let rt=et.length-1;rt>=0;--rt){const Bt=et[rt],Et=Bt&&Bt.name;typeof Et=="string"&&sh(T,Bt,Et)}},hi=function(T,D,et){if(!et)try{et=D.getAttributeNode(T)}catch{et=null}Wi(t.removed,{attribute:et||null,from:D});try{et?m(D,et):D.removeAttribute(T)}catch{try{D.removeAttribute(T)}catch{}}if(T==="is")if(W||j)try{Or(D)}catch{}else try{D.setAttribute(T,"")}catch{}},oh=function(T){const D=S(T);if(D)for(let et=D.length-1;et>=0;--et){const rt=D[et],Bt=rt&&rt.name;typeof Bt!="string"||zt[Zt(Bt)]||sh(T,rt,Bt)}},Jo=function(T,D){let et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const rt=[T];for(;rt.length>0;){const Bt=rt.pop();if(D(Bt)===!1)continue;if(et&&F(Bt)===Jt.element){const Rt=b(Bt);$r(Rt)&&rt.push(Rt)}const Et=x(Bt);if(Et)for(let Rt=Et.length-1;Rt>=0;--Rt)rt.push(Et[Rt])}},ta=function(T){Jo(T,D=>{F(D)===Jt.element&&oh(D)})},ea=function(T){const D=[];return Jo(T,et=>{D.push(et)},!0),D},qy=function(T,D){const et=na();mr(ea(T),rt=>{F(rt)===Jt.element&&la(et,rt)}),mr(D,rt=>{F(rt)===Jt.element&&!zi(et,rt)&&oh(rt)})},ah=function(T,D){let et=!1;return mr(t.removed,rt=>{rt.element&&(et=et||rt.element===T,ta(rt.element))}),qy(T,D),et},Wy=8,zy=function(T,D){const et=Tt;let rt=null;const Bt=()=>(rt||(rt=na(),mr(D,Et=>{la(rt,Et)})),rt);for(let Et=0;;Et++){const Rt=ea(T),se=[T];let rr=!1;if(mr(Rt,ke=>{F(ke)===Jt.documentFragment?Wi(se,ke):!rr&&!zi(et,ke)&&(rr=zi(Bt(),ke))}),!rr)return;if(Et>=Wy)throw yr("the tree kept changing during in-place sanitization; refusing to return it");mr(se,(ke,_e)=>{Hy(ke,_e>0,T,Bt())})}},Hy=function(T,D,et,rt){const Bt=ra(T);let Et;for(;Et=Bt.nextNode();)!zi(rt,Et)||zi(Tt,Et)||(D&&Ge(it.uponSanitizeShadowNode,Et,null),sa(Et,et),oa(Et,et),$r(Et.content)&&qi(Et.content))},Yy=function(T){Tt&&la(Tt,T)},nh=function(T,D){return g?T==="patchsrc"?!0:T==="for"&&D!=="label"&&D!=="output":!1},Uy=function(T){g&&Jo(T,D=>{const et=F(D);if(et===Jt.processingInstruction||et===Jt.comment&&ce(Lh,D.data)){try{f(D)}catch{}return!1}if(et===Jt.element){const rt=D,Bt=Zt(A(D));try{rt.hasAttribute&&rt.hasAttribute("patchsrc")&&rt.removeAttribute("patchsrc"),rt.hasAttribute&&rt.hasAttribute("for")&&nh("for",Bt)&&rt.removeAttribute("for")}catch{}}return!0})},lh=function(T){let D=null,et=null;if(k)T="<remove></remove>"+T;else{const Et=Ch(T,/^[\r\n\t ]+/);et=Et&&Et[0]}Ri==="application/xhtml+xml"&&ni===er&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const rt=$?q(T):T;if(ni===er)try{D=new c().parseFromString(rt,Ri)}catch{}if(!D||!D.documentElement){D=K.createDocument(ni,"template",null);try{D.documentElement.innerHTML=Go?G:rt}catch{}}const Bt=D.body||D.documentElement;return T&&et&&Bt.insertBefore(r.createTextNode(et),Bt.childNodes[0]||null),ni===er?kt.call(D,P?"html":"body")[0]:P?D.documentElement:Bt},ra=function(T){const D=L?L(T):T.ownerDocument;return lt.call(D||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Es=function(T){return T=Hi(T,yt," "),T=Hi(T,St," "),T=Hi(T,vt," "),T},ia=function(T){var D;hh(T);const et=(D=T.querySelectorAll)===null||D===void 0?void 0:D.call(T,"template");et&&mr(et,rt=>{$r(rt.content)&&ia(rt.content)})},hh=function(T){T.normalize();const D=L?L(T):T.ownerDocument,et=lt.call(D||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let rt=et.nextNode();for(;rt;)rt.data=Es(rt.data),rt=et.nextNode()},Ms=function(T){const D=B?B(T):null;return typeof D!="string"||Zt(D)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==S(T)||typeof T.removeAttribute!="function"||typeof T.removeAttributeNode!="function"||typeof T.getAttributeNode!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==_(T)||T.childNodes!==x(T)},$r=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return _(T)===Jt.documentFragment}catch{return!1}},Ni=function(T){if(!_||typeof T!="object"||T===null)return!1;try{return typeof _(T)=="number"}catch{return!1}};function Ge(ot,T,D){ot.length!==0&&mr(ot,et=>{et.call(t,T,D,li)})}const jy=function(T,D){return!!(g&&T.hasChildNodes()&&!Ni(T.firstElementChild)&&ce(fa,T.textContent)&&ce(fa,T.innerHTML)||g&&N0[D]&&F(T)===Jt.element&&R(T)===er&&(Ni(T.firstElementChild)||typeof T.textContent=="string"&&ce(fa,T.textContent))||T.nodeType===Jt.processingInstruction||g&&T.nodeType===Jt.comment&&ce(Lh,T.data))},Os=function(T,D){if(T instanceof RegExp)return ce(T,D);if(T instanceof Function){for(var et=arguments.length,rt=new Array(et>2?et-2:0),Bt=2;Bt<et;Bt++)rt[Bt-2]=arguments[Bt];return!!T(D,...rt)}return!1},Gy=function(T,D,et){if(!Ne[D]&&uh(D)&&Os(he.tagNameCheck,D))return!1;if(ht&&!Lt[D]&&!Lt[Zr(D)]){const rt=C(T),Bt=x(T);if(Bt&&rt){const Et=Bt.length;for(let Rt=Et-1;Rt>=0;--Rt){const se=T===et?p(Bt[Rt],!0):Bt[Rt];rt.insertBefore(se,y(T))}}}return Or(T),!0},ch=function(T,D,et,rt){return T.length===0?D:D===et||D===rt?$e(D):D},ci=function(T,D){return T===D||C(T)!==null?!1:(Ct&&ta(T),!0)},sa=function(T,D){if(Yy(T),Ge(it.beforeSanitizeElements,T,null),ci(T,D))return!0;if(Ms(T))return Or(T),!0;const et=Zt(A(T));if(Ht=ch(it.uponSanitizeElement,Ht,Fe,J),Ge(it.uponSanitizeElement,T,{tagName:et,allowedTags:Ht}),ci(T,D))return!0;if(jy(T,et))return Or(T),!0;if(Ne[et]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(et))&&!Ht[et]){const rt=Gy(T,et,D);return rt===!1&&(Ge(it.afterSanitizeElements,T,null),ci(T,D))?!0:rt}if(F(T)===Jt.element&&!Ny(T)||(et==="noscript"||et==="noembed"||et==="noframes")&&ce(R0,T.innerHTML))return Or(T),!0;if(be&&T.nodeType===Jt.text){const rt=Es(T.textContent);T.textContent!==rt&&(Wi(t.removed,{element:T.cloneNode()}),T.textContent=rt)}return Ge(it.afterSanitizeElements,T,null),ci(T,D)},dh=function(T,D,et){if(Fr[D]||nh(D,T)||at&&(D==="id"||D==="name")&&(et in r||et in Iy))return!1;const rt=zt[D]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(D,T);return pr&&ce(wt,D)||Ee&&ce(Dt,D)?!0:rt?Mr[D]||ce(Ar,Hi(et,Te,""))||(D==="src"||D==="xlink:href"||D==="href")&&T!=="script"&&bh(et,"data:")===0&&je[T]||tr&&!ce(Ut,Hi(et,Te,""))?!0:!et:uh(T)&&Os(he.tagNameCheck,T)&&Os(he.attributeNameCheck,D,T)||D==="is"&&he.allowCustomizedBuiltInElements&&Os(he.tagNameCheck,et)},Vy=qt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),uh=function(T){return!Vy[Zr(T)]&&ce(Re,T)},Xy=function(T,D,et,rt){if($&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!et)switch(h.getAttributeType(T,D)){case"TrustedHTML":return q(rt);case"TrustedScriptURL":return z(rt)}return rt},Zy=function(T,D,et,rt){try{return et?T.setAttributeNS(et,D,rt):T.setAttribute(D,rt),Ms(T)?(Or(T),!1):!0}catch{return hi(D,T),!1}},ph=function(T,D){return g&&ce(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,D)?!0:Zr(T)==="attributename"&&Ch(D,"href")!==null},oa=function(T,D){if(Ge(it.beforeSanitizeAttributes,T,null),ci(T,D))return;const et=T.attributes;if(!et||Ms(T))return;zt=ch(it.uponSanitizeAttribute,zt,Je,V);const rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:zt,forceKeepAttr:void 0};let Bt=et.length;const Et=Zt(T.nodeName);for(;Bt--;){const Rt=et[Bt],se=Rt.name,rr=Rt.namespaceURI,ke=Rt.value,_e=Zt(se),di=ke;let Be=se==="value"?di:b0(di),fh=!1;if(rt.attrName=_e,rt.attrValue=Be,rt.keepAttr=!0,rt.forceKeepAttr=void 0,Ge(it.uponSanitizeAttribute,T,rt),Be=rt.attrValue,nt&&(_e==="id"||_e==="name")&&bh(Be,Z)!==0&&(hi(se,T,Rt),Be=Z+Be,fh=!0),ph(se,Be)){hi(se,T,Rt);continue}if(!rt.forceKeepAttr){if(!rt.keepAttr){hi(se,T,Rt);continue}if(!fr&&ce(Ah,Be)){hi(se,T,Rt);continue}if(be&&(Be=Es(Be)),!dh(Et,_e,Be)){hi(se,T,Rt);continue}Be=Xy(Et,_e,rr,Be),Be!==di&&Zy(T,se,rr,Be)&&fh&&xh(t.removed)}}Ge(it.afterSanitizeAttributes,T,null),ci(T,D)},qi=function(T){let D=null;const et=ra(T);for(Ge(it.beforeSanitizeShadowDOM,T,null);D=et.nextNode();)if(Ge(it.uponSanitizeShadowNode,D,null),sa(D,T),oa(D,T),$r(D.content)&&qi(D.content),F(D)===Jt.element){const rt=b(D);$r(rt)&&(aa(rt),qi(rt))}be&&hh(T),Ge(it.afterSanitizeShadowDOM,T,null)},aa=function(T){const D=[{node:T,shadow:null}];for(;D.length>0;){const et=D.pop();if(et.shadow){qi(et.shadow);continue}const rt=et.node,Bt=F(rt)===Jt.element,Et=x(rt);if(Et)for(let Rt=Et.length-1;Rt>=0;--Rt)D.push({node:Et[Rt],shadow:null});if(Bt){const Rt=B?B(rt):null;if(typeof Rt=="string"&&Zt(Rt)==="template"){const se=rt.content;$r(se)&&D.push({node:se,shadow:null})}}if(Bt){const Rt=b(rt);$r(Rt)&&D.push({node:null,shadow:Rt},{node:Rt,shadow:null})}}};return t.sanitize=function(ot){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,et=null,rt=null,Bt=null;if(Go=!ot,Go&&(ot="<!-->"),typeof ot!="string"&&!Ni(ot)&&(ot=T0(ot),typeof ot!="string"))throw yr("dirty is not a string, aborting");if(!t.isSupported)return ot;Q?(Ht=J,zt=V):Ko(T),(it.uponSanitizeElement.length>0||it.uponSanitizeAttribute.length>0)&&(Ht=$e(Ht)),it.uponSanitizeAttribute.length>0&&(zt=$e(zt)),t.removed=[];const Et=Ct&&typeof ot!="string"&&Ni(ot);let Rt=[];const se=Tt;if(Et){Uy(ot);const _e=A(ot);if(typeof _e=="string"){const di=Zt(_e);if(!Ht[di]||Ne[di])throw Qo(ot),yr("root node is forbidden and cannot be sanitized in-place")}if(Ms(ot))throw Qo(ot),yr("root node is clobbered and cannot be sanitized in-place");Rt=ea(ot),Tt=na()}else if(Ni(ot))D=lh("<!---->"),et=D.ownerDocument.importNode(ot,!0),et.nodeType===Jt.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?D=et:D.appendChild(et),aa(D);else{if(!W&&!be&&!P&&ot.indexOf("<")===-1)return $&&st?q(ot):ot;if(D=lh(ot),!D)return W?null:st?G:""}D&&k&&Or(D.firstChild);const rr=Et?ot:D;try{Et&&aa(ot);const _e=ra(rr);for(;rt=_e.nextNode();)sa(rt,rr),oa(rt,rr),$r(rt.content)&&qi(rt.content);Et&&zy(ot,Rt)}catch(_e){throw Et&&(Qo(ot),ah(ot,Rt)),_e}finally{Tt=se}if(Et){if(ah(ot,Rt))throw yr("a node selected for removal could not be safely returned; refusing to sanitize in place");return be&&ia(ot),ot}if(W){if(be&&ia(D),j)for(Bt=mt.call(D.ownerDocument);D.firstChild;)Bt.appendChild(D.firstChild);else Bt=D;return(zt.shadowroot||zt.shadowrootmode)&&(Bt=ft.call(i,Bt,!0)),Bt}let ke=P?D.outerHTML:D.innerHTML;return P&&Ht["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&ce(D0,D.ownerDocument.doctype.name)&&(ke="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
|
|
4
|
+
`+ke),be&&(ke=Es(ke)),$&&st?q(ke):ke},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ko(ot),Q=!0,J=Ht,V=zt},t.clearConfig=function(){li=null,Q=!1,J=null,V=null,$=O,G=""},t.isValidAttribute=function(ot,T,D){li||Ko({});const et=Zt(ot),rt=Zt(T);return typeof D=="string"&&(ph(T,D)||!fr&&ce(Ah,D))?!1:dh(et,rt,D)},t.addHook=function(ot,T){typeof T=="function"&&Le(it,ot)&&Wi(it[ot],T)},t.removeHook=function(ot,T){if(Le(it,ot)){if(T!==void 0){const D=y0(it[ot],T);return D===-1?void 0:C0(it[ot],D,1)[0]}return xh(it[ot])}},t.removeHooks=function(ot){Le(it,ot)&&(it[ot]=[])},t.removeAllHooks=function(){it=Fh()},t}var Ai=Hd(),ns=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,so=/\s/,z0=u(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const o=e.indexOf(`
|
|
5
|
+
`,s);if(o===-1)break;let a=s;for(;a>r&&so.test(e[a-1]);)a--;t+=e.slice(r,a)+`
|
|
6
|
+
`,r=o+1,i=r}return t+e.slice(r)},"stripAnyComments"),Zs=u(e=>e===`
|
|
7
|
+
`||e==="\r","isLineBreak"),H0=u((e,t)=>{let r=-1;for(let i=t;i<e.length&&so.test(e[i]);i++)Zs(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),Yd=u(e=>{let t=0;for(;t<e.length&&so.test(e[t])&&!Zs(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let h=t+3;h<e.length&&so.test(e[h]);h++)Zs(e[h])&&i.push(h);if(i.length===0)return;const s=`${r}---`,o=u(h=>Zs(e[h])&&e.startsWith(s,h+1)?H0(e,h+1+s.length):-1,"closingEnd"),a=i[0]+1;let n=-1;for(let h=a;h<e.length;h++)o(h)!==-1&&(n=h);if(n===-1)return;let l=i[0];for(const h of i)h<n&&(l=h);const c=l+1;for(let h=c;h<=n;h++){const d=o(h);if(d!==-1)return{indent:r,body:e.slice(c,h),length:d+1}}},"matchFrontMatter"),Ud=class extends Error{static{u(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},ei={},Mo=u(function(e,t){const r=Yd(e);e=z0((r?e.slice(r.length):e).replace(ns,""));for(const[i,{detector:s}]of Object.entries(ei))if(s(e,t))return i;throw new Ud(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),an=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)jd(t,r,i)},"registerLazyLoadedDiagrams"),jd=u((e,t,r)=>{ei[e]&&tt.warn(`Detector with key ${e} already exists. Overwriting.`),ei[e]={detector:t,loader:r},tt.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Y0=u(e=>ei[e].loader,"getDiagramLoader"),nn=u((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>nn(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=nn(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),re=nn,hr="#ffffff",cr="#f2f2f2",Ft=u((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Eh=u(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Qe=u((e,t)=>Eh(e)&&Eh(t)?{...e,...t}:t,"applyOverride"),U0=class{static{u(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||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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?U(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],25);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]||Y(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])}),Object.hasOwn(e,"nodeBorder")&&!Object.hasOwn(e,"useGradient")&&(this.useGradient=!1)}},j0=u(e=>{const t=new U0;return t.calculate(e),t},"getThemeVariables"),G0=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(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=Y(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Nr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Nr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Nr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=Y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Y(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let 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["cScalePeer"+e]=this["cScalePeer"+e]||Y(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??Y(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||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||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},V0=u(e=>{const t=new G0;return t.calculate(e),t},"getThemeVariables"),X0=class{static{u(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=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=Ft(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Nr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},Z0=u(e=>{const t=new X0;return t.calculate(e),t},"getThemeVariables"),K0=class{static{u(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=Y("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=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=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},Q0=u(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),J0=class{static{u(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(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||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let 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]||Y(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},tx=u(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),ex=class{static{u(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=Ft(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(e,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||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||w(e,{h:30}),this.cScale4=this.cScale4||w(e,{h:60}),this.cScale5=this.cScale5||w(e,{h:90}),this.cScale6=this.cScale6||w(e,{h:120}),this.cScale7=this.cScale7||w(e,{h:150}),this.cScale8=this.cScale8||w(e,{h:210,l:150}),this.cScale9=this.cScale9||w(e,{h:270}),this.cScale10=this.cScale10||w(e,{h:300}),this.cScale11=this.cScale11||w(e,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=U(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=U(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||N(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||U(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||w(e,{h:64}),this.fillType3=this.fillType3||w(t,{h:64}),this.fillType4=this.fillType4||w(e,{h:-64}),this.fillType5=this.fillType5||w(t,{h:-64}),this.fillType6=this.fillType6||w(e,{h:128}),this.fillType7=this.fillType7||w(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||w(e,{l:-10}),this.pie5=this.pie5||w(t,{l:-10}),this.pie6=this.pie6||w(r,{l:-10}),this.pie7=this.pie7||w(e,{h:60,l:-10}),this.pie8=this.pie8||w(e,{h:-60,l:-10}),this.pie9=this.pie9||w(e,{h:120,l:0}),this.pie10=this.pie10||w(e,{h:60,l:-20}),this.pie11=this.pie11||w(e,{h:-60,l:-20}),this.pie12=this.pie12||w(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor: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||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},rx=u(e=>{const t=new ex;return t.calculate(e),t},"getThemeVariables"),ix=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(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=Y(N("#323D47"),10),this.border1="#ccc",this.border2=Nr(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||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||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=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],25);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]||Y(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},sx=u(e=>{const t=new ix;return t.calculate(e),t},"getThemeVariables"),ox=class{static{u(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=Ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(e,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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=U(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=U(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||N(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||U(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||w(e,{h:64}),this.fillType3=this.fillType3||w(t,{h:64}),this.fillType4=this.fillType4||w(e,{h:-64}),this.fillType5=this.fillType5||w(t,{h:-64}),this.fillType6=this.fillType6||w(e,{h:128}),this.fillType7=this.fillType7||w(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||w(e,{l:-10}),this.pie5=this.pie5||w(t,{l:-10}),this.pie6=this.pie6||w(r,{l:-10}),this.pie7=this.pie7||w(e,{h:60,l:-10}),this.pie8=this.pie8||w(e,{h:-60,l:-10}),this.pie9=this.pie9||w(e,{h:120,l:0}),this.pie10=this.pie10||w(e,{h:60,l:-20}),this.pie11=this.pie11||w(e,{h:-60,l:-20}),this.pie12=this.pie12||w(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor: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||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},ax=u(e=>{const t=new ox;return t.calculate(e),t},"getThemeVariables"),nx=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(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=Y(N("#323D47"),10),this.border1="#ccc",this.border2=Nr(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||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||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=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],25);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]||Y(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},lx=u(e=>{const t=new nx;return t.calculate(e),t},"getThemeVariables"),hx=class{static{u(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=Ft("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?Y(this.background,4):U(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(e,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 s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||N(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||Y(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||U(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor;for(let s=0;s<8;s++)this["fillType"+s]=this["fillType"+s]||this.bkgColorArray[s];for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["pie"+(s+1)]=this["pie"+(s+1)]||this["cScale"+s];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 s=0;s<8;s++)this["venn"+(s+1)]=this["venn"+(s+1)]??this.borderColorArray[s%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor: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||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},cx=u(e=>{const t=new hx;return t.calculate(e),t},"getThemeVariables"),dx=class{static{u(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(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=Y(N("#323D47"),10),this.border1="#ccc",this.border2=Nr(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||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||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=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||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||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||N(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||Y(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||U(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=U(this["cScale"+r],75);const e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((r,i)=>{this["fillType"+i]=this["fillType"+i]||r});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+(r+1)]=this["pie"+(r+1)]||this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this.borderColorArray[r%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||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||hr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||cr}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Qe(this[r],e[r])})}},ux=u(e=>{const t=new dx;return t.calculate(e),t},"getThemeVariables"),Tr={base:{getThemeVariables:j0},dark:{getThemeVariables:V0},default:{getThemeVariables:Z0},forest:{getThemeVariables:Q0},neutral:{getThemeVariables:tx},neo:{getThemeVariables:rx},"neo-dark":{getThemeVariables:sx},redux:{getThemeVariables:ax},"redux-dark":{getThemeVariables:lx},"redux-color":{getThemeVariables:cx},"redux-dark-color":{getThemeVariables:ux}},Kt={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,stepDuration:1,stepNumbers:!1,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,colorBy:"branch",padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:5e4,maxEdges:500,grid:{lineHops:"arc",placements:{},columns:0,rowGap:50,columnGap:50,cellGap:20,containerPadding:20,titleGap:8,horizontalAlign:"center",verticalAlign:"center",curve:"rounded",edgeCornerRadius:5},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},Gd={...Kt,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},layered:{edgeRouting:"rounded",lineHops:!0},themeCSS:void 0,themeVariables:Tr.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:Kt.class?.theme,look:Kt.class?.look,layout:Kt.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},usecase:{...Kt.usecase},railroad:{...Kt.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:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn},cynefin:{...Kt.cynefin}},Vd=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Vd(e[i],"")]:[...r,t+i],[]),"keyify"),px=new Set(Vd(Gd,"")),zn=Gd,fx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},gx=u(e=>fx[e]??e,"getDiagramConfigKey"),mx=new Set(["__proto__","constructor","prototype"]),yx=["left","center","right"],xx=["top","center","bottom"];function Xd(e){return typeof e=="number"&&Number.isSafeInteger(e)}u(Xd,"isValidGridCoordinate");function Zd(e){return typeof e=="string"&&yx.includes(e)}u(Zd,"isGridHorizontalAlign");function Kd(e){return typeof e=="string"&&xx.includes(e)}u(Kd,"isGridVerticalAlign");function Si(e,t,r,i=e){if(r!==void 0&&!Xd(r)){const s=i===e?"":` (node "${i}")`,o=r===null?"null":typeof r;let a;switch(typeof r){case"string":a=JSON.stringify(r);break;case"number":case"bigint":case"boolean":case"symbol":a=String(r);break;default:a=r===null?"null":Array.isArray(r)?"[array]":`[${typeof r}]`}const n=new Error(`GRID_INVALID_COORDINATE: Invalid ${t} for placement "${e}"${s}: expected a safe integer; received ${a} (${o}).`);throw n.code="GRID_INVALID_COORDINATE",n.details={nodeId:i,placementId:e,field:t,value:r},n}}u(Si,"validateGridCoordinate");function Qd(e,t){if(typeof e=="object"&&e!==null&&!Array.isArray(e))for(const[r,i]of Object.entries(e)){const s=Array.isArray(i)?i:[i];for(const[o,a]of s.entries()){if(typeof a!="object"||a===null||Array.isArray(a))continue;const n=a,l=Array.isArray(i)?`${r}[${o}]`:r;Object.hasOwn(n,"row")&&Si(l,"row",n.row),Object.hasOwn(n,"column")&&Si(l,"column",n.column)}}for(const r of t){if(typeof r.metadata!="object"||r.metadata===null||Array.isArray(r.metadata))continue;const i=r.metadata;Object.hasOwn(i,"row")&&Si(r.id,"row",i.row),Object.hasOwn(i,"column")&&Si(r.id,"column",i.column)}}u(Qd,"validateGridPlacementCoordinates");function Jd(e){if(Array.isArray(e)){tt.debug("sanitize emptying grid placements array"),e.length=0;return}for(const t of Object.keys(e)){const r=e[t];if(mx.has(t)||typeof r!="object"||r===null){tt.debug("sanitize deleting object dictionary entry:",t,r),delete e[t];continue}const i=Array.isArray(r)?r:[r];if(i.length===0||Object.keys(i).length!==i.length||i.some(s=>typeof s!="object"||s===null||Array.isArray(s))){tt.debug("sanitize deleting invalid grid placement sequence:",t,r),delete e[t];continue}for(const[s,o]of i.entries()){const a=o,n=Array.isArray(r)?`${t}[${s}]`:t;for(const l of Object.keys(a)){if(l==="row"||l==="column"){Si(n,l,a[l]);continue}tu(l,a[l])||(tt.debug("sanitize deleting grid placement property:",l),delete a[l])}}}}u(Jd,"sanitizeGridPlacements");function tu(e,t){switch(e){case"horizontalAlign":return Zd(t);case"verticalAlign":return Kd(t);default:return!1}}u(tu,"isValidGridPlacementProperty");var Cx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},bx=u((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(tt.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ln=u((e,t)=>{if(tt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(r=>ln(r,t));return}for(const r of Object.keys(e)){if(tt.debug("Checking key",r),r.startsWith("__")||r.includes("proto")||r.includes("constr")||!px.has(r)||e[r]==null){tt.debug("sanitize deleting key: ",r),delete e[r];continue}if(typeof e[r]=="object"){const s=Cx[r];s?bx(e[r],s):t==="grid"&&r==="placements"?Jd(e[r]):(tt.debug("sanitizing object",r),ln(e[r],r));continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const s of i)r.includes(s)&&(tt.debug("sanitizing css option",r),e[r]=ru(e[r]))}if(e.themeVariables)for(const r of Object.keys(e.themeVariables)){const i=e.themeVariables[r];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[r]="")}tt.debug("After sanitization",e)}},"sanitizeDirectiveValue"),eu=u(e=>{ln(e)},"sanitizeDirective"),ru=u(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),qr=Object.freeze(zn),kx=["theme","look","layout"],Sx=new Set(["classic","handDrawn","neo"]),wx=u((e,t)=>e==="theme"?t==="null"||Object.hasOwn(Tr,t):e!=="look"||Sx.has(t),"isUsableAppearance"),Tx=u((e,t,r)=>e?[e[t]?.[r],e[r]].find(s=>s!==void 0&&wx(r,s)):void 0,"readAppearance"),dr=u(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Se=re({},qr),oo,ao={},_r=[],ls=re({},qr),hs,_x=u((e,t)=>{if(!hs)return;const r=[t,...[..._r].reverse(),ao,qr],i=e[hs];for(const s of kx)for(const o of r){const a=Tx(o,hs,s);if(a!==void 0){e[s]=a,i?.[s]!==void 0&&(i[s]=a);break}}},"resolveAppearance"),Oi=u((e,t)=>{let r=re({},e),i={};for(const o of t)ou(o),i=re(i,o);if(r=re(r,i),_x(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(Tr,r.theme)){const o=re({},oo),a=re(o.themeVariables||{},i.themeVariables);r.themeVariables=Tr[r.theme].getThemeVariables(a)}return ls=r,Ex(ls),ls},"updateCurrentConfig"),Hn=u(e=>{hs=e===void 0?void 0:gx(e),Oi(Se,_r)},"setDiagramConfigScope"),Bx=u(e=>(Se=re({},qr),Se=re(Se,e),ao=re({},e),e.theme&&Object.hasOwn(Tr,e.theme)&&(Se.themeVariables=Tr[e.theme].getThemeVariables(e.themeVariables)),Oi(Se,_r),Se),"setSiteConfig"),vx=u(e=>{oo=re({},e)},"saveConfigFromInitialize"),Lx=u(e=>(Se=re(Se,e),ao=re(ao,e),Oi(Se,_r),Se),"updateSiteConfig"),iu=u(()=>re({},Se),"getSiteConfig"),su=u(e=>(Oi(ls,[e]),Gt()),"setConfig"),Gt=u(()=>re({},ls),"getConfig"),ou=u(e=>{e&&(["secure",...Se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(tt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&ou(e[t])}))},"sanitize"),Ax=u(e=>{eu(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),_r.push(e),Oi(Se,_r)},"addDirective"),fs=u((e=Se)=>{_r=[],hs=void 0,Oi(e,_r)},"reset"),Fx={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."},Mh={},au=u(e=>{Mh[e]||(tt.warn(Fx[e]),Mh[e]=!0)},"issueWarning"),Ex=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&au("LAZY_LOAD_DEPRECATED")},"checkConfig"),AL=u(()=>{let e={};oo&&(e=re(e,oo));for(const t of _r)e=re(e,t);return e},"getUserDefinedConfig"),le=u(e=>(e.flowchart?.htmlLabels!=null&&au("FLOWCHART_HTML_LABELS_DEPRECATED"),dr(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Cs=/<\/?br\s*\/?>/gi,Mx=new RegExp(Cs.source,"i"),Ox=u(e=>e?hu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),$x=(()=>{let e=!1;return()=>{e||(nu(),e=!0)}})();function nu(){const e="data-temp-href-target";Ai.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ai.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}u(nu,"setupDompurifyHooks");var lu=u(e=>($x(),Ai.sanitize(e)),"removeScript"),Oh=u((e,t)=>{if(le(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=lu(e):r!=="loose"&&(e=hu(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Rx(e))}return e},"sanitizeMore"),ze=u((e,t)=>e&&(t.dompurifyConfig?e=Ai.sanitize(Oh(e,t),t.dompurifyConfig).toString():e=Ai.sanitize(Oh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Ix=u((e,t)=>typeof e=="string"?ze(e,t):e.flat().map(r=>ze(r,t)),"sanitizeTextOrArray"),Dx=u(e=>Mx.test(e),"hasBreaks"),Px=u(e=>e.split(Cs),"splitBreaks"),Rx=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),hu=u(e=>e.replace(Cs,"#br#"),"breakToPlaceholder"),Nx=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),qx=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Wx=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),$h=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];zx(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Hx(s))}return r.join("")},"parseGenericTypes"),hn=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),zx=u((e,t)=>{const r=hn(e,"~"),i=hn(t,"~");return r===1&&i===1},"shouldCombineSets"),Hx=u(e=>{const t=hn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ih=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),cn=/\$\$(.*?)\$\$/g,gs=u(e=>(e.match(cn)?.length??0)>0,"hasKatex"),FL=u(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await cu(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Yx=u(async(e,t)=>{if(!gs(e))return e;if(!(Ih()||t.legacyMathML||t.forceLegacyMathML))return e.replace(cn,"MathML is unsupported in this environment.");{const{default:r}=await It(async()=>{const{default:s}=await import("./vendor-BKfNgqAm.js").then(o=>o.x);return{default:s}},__vite__mapDeps([0,1]),import.meta.url),i=t.forceLegacyMathML||!Ih()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Cs).map(s=>gs(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(cn,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),cu=u(async(e,t)=>ze(await Yx(e,t),t),"renderKatexSanitized"),bs={getRows:Ox,sanitizeText:ze,sanitizeTextOrArray:Ix,hasBreaks:Dx,splitBreaks:Px,lineBreakRegex:Cs,removeScript:lu,getUrl:Nx,evaluate:dr,getMax:qx,getMin:Wx},Ux=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),jx=u(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),du=u(function(e,t,r,i){const s=jx(t,r,i);Ux(e,s)},"configureSvgSize"),Gx=u(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;tt.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;tt.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,tt.info(`Calculated bounds: ${n}x${l}`),du(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Ks={};function dn(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
8
|
+
`)}u(dn,"cssStyleSheetToString");var Vx=u((e,t,r,i)=>{let s="";return e in Ks&&Ks[e]?s=Ks[e]({...r,svgId:i}):tt.warn(`No theme found for ${e}`),`& {
|
|
9
|
+
font-family: ${r.fontFamily};
|
|
10
|
+
font-size: ${r.fontSize};
|
|
11
|
+
fill: ${r.textColor}
|
|
12
|
+
}
|
|
13
|
+
@keyframes edge-animation-frame {
|
|
14
|
+
from {
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@keyframes dash {
|
|
19
|
+
to {
|
|
20
|
+
stroke-dashoffset: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
& .edge-animation-slow {
|
|
24
|
+
stroke-dasharray: 9,5 !important;
|
|
25
|
+
stroke-dashoffset: 900;
|
|
26
|
+
animation: dash 50s linear infinite;
|
|
27
|
+
stroke-linecap: round;
|
|
28
|
+
}
|
|
29
|
+
& .edge-animation-fast {
|
|
30
|
+
stroke-dasharray: 9,5 !important;
|
|
31
|
+
stroke-dashoffset: 900;
|
|
32
|
+
animation: dash 20s linear infinite;
|
|
33
|
+
stroke-linecap: round;
|
|
34
|
+
}
|
|
35
|
+
/* Classes common for multiple diagrams */
|
|
36
|
+
|
|
37
|
+
& .error-icon {
|
|
38
|
+
fill: ${r.errorBkgColor};
|
|
39
|
+
}
|
|
40
|
+
& .error-text {
|
|
41
|
+
fill: ${r.errorTextColor};
|
|
42
|
+
stroke: ${r.errorTextColor};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .edge-thickness-normal {
|
|
46
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
47
|
+
}
|
|
48
|
+
& .edge-thickness-thick {
|
|
49
|
+
stroke-width: 3.5px
|
|
50
|
+
}
|
|
51
|
+
& .edge-pattern-solid {
|
|
52
|
+
stroke-dasharray: 0;
|
|
53
|
+
}
|
|
54
|
+
& .edge-thickness-invisible {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
& .edge-pattern-dashed{
|
|
59
|
+
stroke-dasharray: 3;
|
|
60
|
+
}
|
|
61
|
+
.edge-pattern-dotted {
|
|
62
|
+
stroke-dasharray: 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .marker {
|
|
66
|
+
fill: ${r.lineColor};
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
& .marker.cross {
|
|
70
|
+
stroke: ${r.lineColor};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& svg {
|
|
74
|
+
font-family: ${r.fontFamily};
|
|
75
|
+
font-size: ${r.fontSize};
|
|
76
|
+
}
|
|
77
|
+
& p {
|
|
78
|
+
margin: 0
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${s}
|
|
82
|
+
.node .neo-node {
|
|
83
|
+
stroke: ${r.nodeBorder};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
87
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
88
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
89
|
+
}
|
|
90
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
91
|
+
filter: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
[data-look="neo"].node path {
|
|
96
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
97
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-look="neo"].node .outer-path {
|
|
101
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-look="neo"].node .neo-line path {
|
|
105
|
+
stroke: ${r.nodeBorder};
|
|
106
|
+
filter: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[data-look="neo"].node circle{
|
|
110
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
111
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-look="neo"].node circle .state-start{
|
|
115
|
+
fill: #000000;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-look="neo"].icon-shape .icon {
|
|
119
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
120
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
124
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
125
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
${t}
|
|
129
|
+
`},"getStyles"),Xx=u((e,t)=>{t!==void 0&&(Ks[e]=t)},"addStylesForDiagram"),Zx=Vx,uu={};Qy(uu,{clear:()=>Kx,getAccDescription:()=>eC,getAccTitle:()=>Jx,getDiagramTitle:()=>iC,setAccDescription:()=>tC,setAccTitle:()=>Qx,setDiagramTitle:()=>rC});var Yn="",Un="",jn="",Gn=u(e=>ze(e,Gt()),"sanitizeText"),Kx=u(()=>{Yn="",jn="",Un=""},"clear"),Qx=u(e=>{Yn=Gn(e).replace(/^\s+/g,"")},"setAccTitle"),Jx=u(()=>Yn,"getAccTitle"),tC=u(e=>{jn=Gn(e).replace(/\n\s+/g,`
|
|
130
|
+
`)},"setAccDescription"),eC=u(()=>jn,"getAccDescription"),rC=u(e=>{Un=Gn(e)},"setDiagramTitle"),iC=u(()=>Un,"getDiagramTitle"),Dh=tt,sC=Wn,$t=Gt,EL=su,ML=qr,Vn=u(e=>ze(e,$t()),"sanitizeText"),oC=Gx,aC=u(()=>uu,"getCommonDb"),no={},lo=u((e,t,r)=>{no[e]&&Dh.warn(`Diagram with id ${e} already registered. Overwriting.`),no[e]=t,r&&jd(e,r),Xx(e,t.styles),t.injectUtils?.(Dh,sC,$t,Vn,oC,aC(),()=>{})},"registerDiagram"),un=u(e=>{if(e in no)return no[e];throw new nC(e)},"getDiagram"),nC=class extends Error{static{u(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}},pn="http://www.w3.org/1999/xhtml",Ph={svg:"http://www.w3.org/2000/svg",xhtml:pn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pu(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Ph.hasOwnProperty(t)?{space:Ph[t],local:e}:e}function lC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===pn&&t.documentElement.namespaceURI===pn?t.createElement(e):t.createElementNS(r,e)}}function hC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fu(e){var t=pu(e);return(t.local?hC:lC)(t)}function cC(){}function gu(e){return e==null?cC:function(){return this.querySelector(e)}}function dC(e){typeof e!="function"&&(e=gu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new He(i,this._parents)}function uC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pC(){return[]}function fC(e){return e==null?pC:function(){return this.querySelectorAll(e)}}function gC(e){return function(){return uC(e.apply(this,arguments))}}function mC(e){typeof e=="function"?e=gC(e):e=fC(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new He(i,s)}function yC(e){return function(){return this.matches(e)}}function mu(e){return function(t){return t.matches(e)}}var xC=Array.prototype.find;function CC(e){return function(){return xC.call(this.children,e)}}function bC(){return this.firstElementChild}function kC(e){return this.select(e==null?bC:CC(typeof e=="function"?e:mu(e)))}var SC=Array.prototype.filter;function wC(){return Array.from(this.children)}function TC(e){return function(){return SC.call(this.children,e)}}function _C(e){return this.selectAll(e==null?wC:TC(typeof e=="function"?e:mu(e)))}function BC(e){typeof e!="function"&&(e=yC(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new He(i,this._parents)}function yu(e){return new Array(e.length)}function vC(){return new He(this._enter||this._groups.map(yu),this._parents)}function ho(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ho.prototype={constructor:ho,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function LC(e){return function(){return e}}function AC(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new ho(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function FC(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,p=new Array(h),f;for(n=0;n<h;++n)(l=t[n])&&(p[n]=f=a.call(l,l.__data__,n,t)+"",c.has(f)?s[n]=l:c.set(f,l));for(n=0;n<d;++n)f=a.call(e,o[n],n,o)+"",(l=c.get(f))?(i[n]=l,l.__data__=o[n],c.delete(f)):r[n]=new ho(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(p[n])===l&&(s[n]=l)}function EC(e){return e.__data__}function MC(e,t){if(!arguments.length)return Array.from(this,EC);var r=t?FC:AC,i=this._parents,s=this._groups;typeof e!="function"&&(e=LC(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],p=d.length,f=OC(e.call(h,h&&h.__data__,c,i)),m=f.length,y=n[c]=new Array(m),x=a[c]=new Array(m),C=l[c]=new Array(p);r(h,d,y,x,C,f,t);for(var b=0,S=0,_,B;b<m;++b)if(_=y[b]){for(b>=S&&(S=b+1);!(B=x[S])&&++S<m;);_._next=B||null}}return a=new He(a,i),a._enter=n,a._exit=l,a}function OC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $C(){return new He(this._exit||this._groups.map(yu),this._parents)}function IC(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function DC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,p=n[l]=new Array(d),f,m=0;m<d;++m)(f=c[m]||h[m])&&(p[m]=f);for(;l<s;++l)n[l]=r[l];return new He(n,this._parents)}function PC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function RC(e){e||(e=NC);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new He(s,this._parents).order()}function NC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function WC(){return Array.from(this)}function zC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function HC(){let e=0;for(const t of this)++e;return e}function YC(){return!this.node()}function UC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function jC(e){return function(){this.removeAttribute(e)}}function GC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VC(e,t){return function(){this.setAttribute(e,t)}}function XC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function KC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function QC(e,t){var r=pu(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?GC:jC:typeof t=="function"?r.local?KC:ZC:r.local?XC:VC)(r,t))}function xu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function JC(e){return function(){this.style.removeProperty(e)}}function tb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function eb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function rb(e,t,r){return arguments.length>1?this.each((t==null?JC:typeof t=="function"?eb:tb)(e,t,r??"")):ib(this.node(),e)}function ib(e,t){return e.style.getPropertyValue(t)||xu(e).getComputedStyle(e,null).getPropertyValue(t)}function sb(e){return function(){delete this[e]}}function ob(e,t){return function(){this[e]=t}}function ab(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function nb(e,t){return arguments.length>1?this.each((t==null?sb:typeof t=="function"?ab:ob)(e,t)):this.node()[e]}function Cu(e){return e.trim().split(/^|\s+/)}function Xn(e){return e.classList||new bu(e)}function bu(e){this._node=e,this._names=Cu(e.getAttribute("class")||"")}bu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ku(e,t){for(var r=Xn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Su(e,t){for(var r=Xn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function lb(e){return function(){ku(this,e)}}function hb(e){return function(){Su(this,e)}}function cb(e,t){return function(){(t.apply(this,arguments)?ku:Su)(this,e)}}function db(e,t){var r=Cu(e+"");if(arguments.length<2){for(var i=Xn(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?cb:t?lb:hb)(r,t))}function ub(){this.textContent=""}function pb(e){return function(){this.textContent=e}}function fb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function gb(e){return arguments.length?this.each(e==null?ub:(typeof e=="function"?fb:pb)(e)):this.node().textContent}function mb(){this.innerHTML=""}function yb(e){return function(){this.innerHTML=e}}function xb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Cb(e){return arguments.length?this.each(e==null?mb:(typeof e=="function"?xb:yb)(e)):this.node().innerHTML}function bb(){this.nextSibling&&this.parentNode.appendChild(this)}function kb(){return this.each(bb)}function Sb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wb(){return this.each(Sb)}function Tb(e){var t=typeof e=="function"?e:fu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _b(){return null}function Bb(e,t){var r=typeof e=="function"?e:fu(e),i=t==null?_b:typeof t=="function"?t:gu(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function vb(){var e=this.parentNode;e&&e.removeChild(this)}function Lb(){return this.each(vb)}function Ab(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Fb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Eb(e){return this.select(e?Fb:Ab)}function Mb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ob(e){return function(t){e.call(this,t,this.__data__)}}function $b(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Ib(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function Db(e,t,r){return function(){var i=this.__on,s,o=Ob(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function Pb(e,t,r){var i=$b(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?Db:Ib,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function wu(e,t,r){var i=xu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Rb(e,t){return function(){return wu(this,e,t)}}function Nb(e,t){return function(){return wu(this,e,t.apply(this,arguments))}}function qb(e,t){return this.each((typeof t=="function"?Nb:Rb)(e,t))}function*Wb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var zb=[null];function He(e,t){this._groups=e,this._parents=t}function Hb(){return this}He.prototype={constructor:He,select:dC,selectAll:mC,selectChild:kC,selectChildren:_C,filter:BC,data:MC,enter:vC,exit:$C,join:IC,merge:DC,selection:Hb,order:PC,sort:RC,call:qC,nodes:WC,node:zC,size:HC,empty:YC,each:UC,attr:QC,style:rb,property:nb,classed:db,text:gb,html:Cb,raise:kb,lower:wb,append:Tb,insert:Bb,remove:Lb,clone:Eb,datum:Mb,on:Pb,dispatch:qb,[Symbol.iterator]:Wb};function Ot(e){return typeof e=="string"?new He([[document.querySelector(e)]],[document.documentElement]):new He([[e]],zb)}var Yb=0;function Rh(){this._="@"+(++Yb).toString(36)}Rh.prototype={constructor:Rh,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const ts=Math.PI,fn=2*ts,Kr=1e-6,Ub=fn-Kr;function Tu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Tu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}function _u(e,t,r,i){return e===r&&t===i}function Gb(e){const t=Math.floor(e);if(!(t<=15))return _u;const r=10**t,i=function(s){return Math.round(s*r)};return function(s,o,a,n){return i(s)===i(a)&&i(o)===i(n)}}class Vb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Tu:jb(t),this._equal=t==null?_u:Gb(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,p=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>Kr)if(!(Math.abs(d*l-c*h)>Kr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=s-n,y=l*l+c*c,x=f*f+m*m,C=Math.sqrt(y),b=Math.sqrt(p),S=o*Math.tan((ts-Math.acos((y+p-x)/(2*C*b)))/2),_=S/b,B=S/C;Math.abs(_-1)>Kr&&this._append`L${t+_*h},${r+_*d}`,this._append`A${o},${o},0,0,${+(d*f>h*m)},${this._x1=t+B*l},${this._y1=r+B*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,p=a?s-o:o-s;if(this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Kr||Math.abs(this._y1-h)>Kr)&&this._append`L${c},${h}`,!!i){if(p<0&&(p=p%fn+fn),p>Ub)this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`;else if(p>Kr){const f=t+i*Math.cos(o),m=r+i*Math.sin(o);if(p>=ts&&this._equal(c,h,f,m)){p/=2;let y=s+p;this._append`A${i},${i},0,${+(p>=ts)},${d},${t+i*Math.cos(y)},${r+i*Math.sin(y)}`}this._append`A${i},${i},0,${+(p>=ts)},${d},${this._x1=f},${this._y1=m}`}}}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Qt(e){return function(){return e}}const Nh=Math.abs,fe=Math.atan2,Gr=Math.cos,Xb=Math.max,ma=Math.min,ir=Math.sin,wi=Math.sqrt,ye=1e-12,ms=Math.PI,co=ms/2,Qs=2*ms;function Zb(e){return e>1?0:e<-1?ms:Math.acos(e)}function qh(e){return e>=1?co:e<=-1?-co:Math.asin(e)}function Bu(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new Vb(t)}function Kb(e){return e.innerRadius}function Qb(e){return e.outerRadius}function Jb(e){return e.startAngle}function tk(e){return e.endAngle}function ek(e){return e&&e.padAngle}function rk(e,t,r,i,s,o,a,n){var l=r-e,c=i-t,h=a-s,d=n-o,p=d*l-h*c;if(!(p*p<ye))return p=(h*(t-o)-d*(e-s))/p,[e+p*l,t+p*c]}function Is(e,t,r,i,s,o,a){var n=e-r,l=t-i,c=(a?o:-o)/wi(n*n+l*l),h=c*l,d=-c*n,p=e+h,f=t+d,m=r+h,y=i+d,x=(p+m)/2,C=(f+y)/2,b=m-p,S=y-f,_=b*b+S*S,B=s-o,L=p*y-m*f,F=(S<0?-1:1)*wi(Xb(0,B*B*_-L*L)),A=(L*S-b*F)/_,H=(-L*b-S*F)/_,R=(L*S+b*F)/_,$=(-L*b+S*F)/_,G=A-x,O=H-C,E=R-x,M=$-C;return G*G+O*O>E*E+M*M&&(A=R,H=$),{cx:A,cy:H,x01:-h,y01:-d,x11:A*(s/B-1),y11:H*(s/B-1)}}function OL(){var e=Kb,t=Qb,r=Qt(0),i=null,s=Jb,o=tk,a=ek,n=null,l=Bu(c);function c(){var h,d,p=+e.apply(this,arguments),f=+t.apply(this,arguments),m=s.apply(this,arguments)-co,y=o.apply(this,arguments)-co,x=Nh(y-m),C=y>m;if(n||(n=h=l()),f<p&&(d=f,f=p,p=d),!(f>ye))n.moveTo(0,0);else if(x>Qs-ye)n.moveTo(f*Gr(m),f*ir(m)),n.arc(0,0,f,m,y,!C),p>ye&&(n.moveTo(p*Gr(y),p*ir(y)),n.arc(0,0,p,y,m,C));else{var b=m,S=y,_=m,B=y,L=x,F=x,A=a.apply(this,arguments)/2,H=A>ye&&(i?+i.apply(this,arguments):wi(p*p+f*f)),R=ma(Nh(f-p)/2,+r.apply(this,arguments)),$=R,G=R,O,E;if(H>ye){var M=qh(H/p*ir(A)),v=qh(H/f*ir(A));(L-=M*2)>ye?(M*=C?1:-1,_+=M,B-=M):(L=0,_=B=(m+y)/2),(F-=v*2)>ye?(v*=C?1:-1,b+=v,S-=v):(F=0,b=S=(m+y)/2)}var q=f*Gr(b),z=f*ir(b),I=p*Gr(B),X=p*ir(B);if(R>ye){var K=f*Gr(S),lt=f*ir(S),mt=p*Gr(_),kt=p*ir(_),ft;if(x<ms)if(ft=rk(q,z,mt,kt,K,lt,I,X)){var it=q-ft[0],yt=z-ft[1],St=K-ft[0],vt=lt-ft[1],wt=1/ir(Zb((it*St+yt*vt)/(wi(it*it+yt*yt)*wi(St*St+vt*vt)))/2),Dt=wi(ft[0]*ft[0]+ft[1]*ft[1]);$=ma(R,(p-Dt)/(wt-1)),G=ma(R,(f-Dt)/(wt+1))}else $=G=0}F>ye?G>ye?(O=Is(mt,kt,q,z,f,G,C),E=Is(K,lt,I,X,f,G,C),n.moveTo(O.cx+O.x01,O.cy+O.y01),G<R?n.arc(O.cx,O.cy,G,fe(O.y01,O.x01),fe(E.y01,E.x01),!C):(n.arc(O.cx,O.cy,G,fe(O.y01,O.x01),fe(O.y11,O.x11),!C),n.arc(0,0,f,fe(O.cy+O.y11,O.cx+O.x11),fe(E.cy+E.y11,E.cx+E.x11),!C),n.arc(E.cx,E.cy,G,fe(E.y11,E.x11),fe(E.y01,E.x01),!C))):(n.moveTo(q,z),n.arc(0,0,f,b,S,!C)):n.moveTo(q,z),!(p>ye)||!(L>ye)?n.lineTo(I,X):$>ye?(O=Is(I,X,K,lt,p,-$,C),E=Is(q,z,mt,kt,p,-$,C),n.lineTo(O.cx+O.x01,O.cy+O.y01),$<R?n.arc(O.cx,O.cy,$,fe(O.y01,O.x01),fe(E.y01,E.x01),!C):(n.arc(O.cx,O.cy,$,fe(O.y01,O.x01),fe(O.y11,O.x11),!C),n.arc(0,0,p,fe(O.cy+O.y11,O.cx+O.x11),fe(E.cy+E.y11,E.cx+E.x11),C),n.arc(E.cx,E.cy,$,fe(E.y11,E.x11),fe(E.y01,E.x01),!C))):n.arc(0,0,p,B,_,C)}if(n.closePath(),h)return n=null,h+""||null}return c.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+s.apply(this,arguments)+ +o.apply(this,arguments))/2-ms/2;return[Gr(d)*h,ir(d)*h]},c.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Qt(+h),c):e},c.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Qt(+h),c):t},c.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Qt(+h),c):r},c.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Qt(+h),c):i},c.startAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Qt(+h),c):s},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:Qt(+h),c):o},c.padAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Qt(+h),c):a},c.context=function(h){return arguments.length?(n=h??null,c):n},c}function vu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Lu(e){this._context=e}Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function cs(e){return new Lu(e)}function ik(e){return e[0]}function sk(e){return e[1]}function ok(e,t){var r=Qt(!0),i=null,s=cs,o=null,a=Bu(n);e=typeof e=="function"?e:e===void 0?ik:Qt(e),t=typeof t=="function"?t:t===void 0?sk:Qt(t);function n(l){var c,h=(l=vu(l)).length,d,p=!1,f;for(i==null&&(o=s(f=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(d,c,l),+t(d,c,l));if(f)return o=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Qt(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Qt(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Qt(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}function ak(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function nk(e){return e}function $L(){var e=nk,t=ak,r=null,i=Qt(0),s=Qt(Qs),o=Qt(0);function a(n){var l,c=(n=vu(n)).length,h,d,p=0,f=new Array(c),m=new Array(c),y=+i.apply(this,arguments),x=Math.min(Qs,Math.max(-Qs,s.apply(this,arguments)-y)),C,b=Math.min(Math.abs(x)/c,o.apply(this,arguments)),S=b*(x<0?-1:1),_;for(l=0;l<c;++l)(_=m[f[l]=l]=+e(n[l],l,n))>0&&(p+=_);for(t!=null?f.sort(function(B,L){return t(m[B],m[L])}):r!=null&&f.sort(function(B,L){return r(n[B],n[L])}),l=0,d=p?(x-c*S)/p:0;l<c;++l,y=C)h=f[l],_=m[h],C=y+(_>0?_*d:0)+S,m[h]={data:n[h],index:l,value:_,startAngle:y,endAngle:C,padAngle:b};return m}return a.value=function(n){return arguments.length?(e=typeof n=="function"?n:Qt(+n),a):e},a.sortValues=function(n){return arguments.length?(t=n,r=null,a):t},a.sort=function(n){return arguments.length?(r=n,t=null,a):r},a.startAngle=function(n){return arguments.length?(i=typeof n=="function"?n:Qt(+n),a):i},a.endAngle=function(n){return arguments.length?(s=typeof n=="function"?n:Qt(+n),a):s},a.padAngle=function(n){return arguments.length?(o=typeof n=="function"?n:Qt(+n),a):o},a}class Au{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Fu(e){return new Au(e,!0)}function Eu(e){return new Au(e,!1)}function Wr(){}function uo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Oo(e){this._context=e}Oo.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:uo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gn(e){return new Oo(e)}function Mu(e){this._context=e}Mu.prototype={areaStart:Wr,areaEnd:Wr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lk(e){return new Mu(e)}function Ou(e){this._context=e}Ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hk(e){return new Ou(e)}function $u(e,t){this._basis=new Oo(e),this._beta=t}$u.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var ck=(function e(t){function r(i){return t===1?new Oo(i):new $u(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function po(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Zn(e,t){this._context=e,this._k=(1-t)/6}Zn.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:po(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:po(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Iu=(function e(t){function r(i){return new Zn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Kn(e,t){this._context=e,this._k=(1-t)/6}Kn.prototype={areaStart:Wr,areaEnd:Wr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:po(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var dk=(function e(t){function r(i){return new Kn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Qn(e,t){this._context=e,this._k=(1-t)/6}Qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:po(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var uk=(function e(t){function r(i){return new Qn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Jn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>ye){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ye){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Du(e,t){this._context=e,this._alpha=t}Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Pu=(function e(t){function r(i){return t?new Du(i,t):new Zn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ru(e,t){this._context=e,this._alpha=t}Ru.prototype={areaStart:Wr,areaEnd:Wr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var pk=(function e(t){function r(i){return t?new Ru(i,t):new Kn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Nu(e,t){this._context=e,this._alpha=t}Nu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fk=(function e(t){function r(i){return t?new Nu(i,t):new Qn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function qu(e){this._context=e}qu.prototype={areaStart:Wr,areaEnd:Wr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function gk(e){return new qu(e)}function Wh(e){return e<0?-1:1}function zh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Wh(o)+Wh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Hh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ya(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function fo(e){this._context=e}fo.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:ya(this,this._t0,Hh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ya(this,Hh(this,r=zh(this,e,t)),r);break;default:ya(this,this._t0,r=zh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Wu(e){this._context=new zu(e)}(Wu.prototype=Object.create(fo.prototype)).point=function(e,t){fo.prototype.point.call(this,t,e)};function zu(e){this._context=e}zu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Hu(e){return new fo(e)}function Yu(e){return new Wu(e)}function Uu(e){this._context=e}Uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Yh(e),s=Yh(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Yh(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function ju(e){return new Uu(e)}function $o(e,t){this._context=e,this._t=t}$o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Gu(e){return new $o(e,.5)}function Vu(e){return new $o(e,0)}function Xu(e){return new $o(e,1)}var mk=u(e=>{const{securityLevel:t}=$t();let r=Ot("body");if(t==="sandbox"){const o=Ot(`#i${e}`).node()?.contentDocument??document;r=Ot(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}u(Zu,"getDefaultExportFromCjs");var ge={},Ds={},Dr={},Uh;function $i(){if(Uh)return Dr;Uh=1;function e(a){return typeof a>"u"||a===null}u(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}u(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}u(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}u(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}u(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return u(o,"isNegativeZero"),Dr.isNothing=e,Dr.isObject=t,Dr.toArray=r,Dr.repeat=s,Dr.isNegativeZero=o,Dr.extend=i,Dr}u($i,"requireCommon");var xa,jh;function Ii(){if(jh)return xa;jh=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
131
|
+
|
|
132
|
+
`+r.mark.snippet),o+" "+s):o}u(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return u(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=u(function(i){return this.name+": "+e(this,i)},"toString"),xa=t,xa}u(Ii,"requireException");var Ca,Gh;function Ku(){if(Gh)return Ca;Gh=1;const e=$i();function t(s,o,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-o>d&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}u(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}u(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const p=Math.min(s.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+p+3);for(let y=1;y<=o.linesBefore&&!(h-y<0);y++){const x=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),f);d=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),p)+" | "+x.str+`
|
|
133
|
+
`+d}const m=t(s.buffer,n[h],l[h],s.position,f);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),p)+" | "+m.str+`
|
|
134
|
+
`,d+=e.repeat("-",o.indent+p+3+m.pos)+`^
|
|
135
|
+
`;for(let y=1;y<=o.linesAfter&&!(h+y>=l.length);y++){const x=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),f);d+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),p)+" | "+x.str+`
|
|
136
|
+
`}return d.replace(/\n$/,"")}return u(i,"makeSnippet"),Ca=i,Ca}u(Ku,"requireSnippet");var ba,Vh;function xe(){if(Vh)return ba;Vh=1;const e=Ii(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}u(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" 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(n){return n},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),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return u(s,"Type2"),ba=s,ba}u(xe,"requireType");var ka,Xh;function tl(){if(Xh)return ka;Xh=1;const e=Ii(),t=xe();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}u(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}u(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}u(i,"compileMap");function s(o){return this.extend(o)}return u(s,"Schema2"),s.prototype.extend=u(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),ka=s,ka}u(tl,"requireSchema");var Sa,Zh;function el(){if(Zh)return Sa;Zh=1;const e=xe();return Sa=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(t){return t!==null?t:""},"construct")}),Sa}u(el,"requireStr");var wa,Kh;function rl(){if(Kh)return wa;Kh=1;const e=xe();return wa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(t){return t!==null?t:[]},"construct")}),wa}u(rl,"requireSeq");var Ta,Qh;function il(){if(Qh)return Ta;Qh=1;const e=xe();return Ta=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(t){return t!==null?t:{}},"construct")}),Ta}u(il,"requireMap");var _a,Jh;function sl(){if(Jh)return _a;Jh=1;const e=tl();return _a=new e({explicit:[el(),rl(),il()]}),_a}u(sl,"requireFailsafe");var Ba,tc;function ol(){if(tc)return Ba;tc=1;const e=xe();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}u(t,"resolveYamlNull");function r(){return null}u(r,"constructYamlNull");function i(s){return s===null}return u(i,"isNull"),Ba=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"}),Ba}u(ol,"require_null");var va,ec;function al(){if(ec)return va;ec=1;const e=xe();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}u(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}u(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return u(i,"isBoolean"),va=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:u(function(s){return s?"true":"false"},"lowercase"),uppercase:u(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),va}u(al,"requireBool");var La,rc;function nl(){if(rc)return La;rc=1;const e=$i(),t=xe();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}u(r,"isHexCode");function i(c){return c>=48&&c<=55}u(i,"isOctCode");function s(c){return c>=48&&c<=57}u(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let d=0,p=!1;if(!h)return!1;let f=c[d];if((f==="-"||f==="+")&&(f=c[++d]),f==="0"){if(d+1===h)return!0;if(f=c[++d],f==="b"){for(d++;d<h;d++){if(f=c[d],f!=="0"&&f!=="1")return!1;p=!0}return p&&isFinite(a(c))}if(f==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;p=!0}return p&&isFinite(a(c))}if(f==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;p=!0}return p&&isFinite(a(c))}}for(;d<h;d++){if(!s(c.charCodeAt(d)))return!1;p=!0}return p?isFinite(a(c)):!1}u(o,"resolveYamlInteger");function a(c){let h=c,d=1,p=h[0];if((p==="-"||p==="+")&&(p==="-"&&(d=-1),h=h.slice(1),p=h[0]),h==="0")return 0;if(p==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}u(a,"parseYamlInteger");function n(c){return a(c)}u(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return u(l,"isInteger"),La=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:u(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:u(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:u(function(c){return c.toString(10)},"decimal"),hexadecimal:u(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),La}u(nl,"requireInt");var Aa,ic;function ll(){if(ic)return Aa;ic=1;const e=$i(),t=xe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}u(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}u(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}u(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return u(l,"isFloat"),Aa=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),Aa}u(ll,"requireFloat");var Fa,sc;function hl(){return sc||(sc=1,Fa=sl().extend({implicit:[ol(),al(),nl(),ll()]})),Fa}u(hl,"requireJson");var Ea,oc;function cl(){return oc||(oc=1,Ea=hl()),Ea}u(cl,"requireCore");var Ma,ac;function dl(){if(ac)return Ma;ac=1;const e=xe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}u(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,p=+c[3];if(!c[4])return new Date(Date.UTC(h,d,p));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],b=+(c[11]||0);l=(C*60+b)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,d,p,f,m,y,n));return l&&x.setTime(x.getTime()-l),x}u(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return u(o,"representYamlTimestamp"),Ma=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Ma}u(dl,"requireTimestamp");var Oa,nc;function ul(){if(nc)return Oa;nc=1;const e=xe();function t(r){return r==="<<"||r===null}return u(t,"resolveYamlMerge"),Oa=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Oa}u(ul,"requireMerge");var $a,lc;function pl(){if(lc)return $a;lc=1;const e=xe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
137
|
+
\r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}u(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let f=0;f<l;f++)f%4===0&&f&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const p=l%4*6;return p===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):p===18?(d.push(h>>10&255),d.push(h>>2&255)):p===12&&d.push(h>>4&255),new Uint8Array(d)}u(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let p=0;p<c;p++)p%3===0&&p&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[p];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}u(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return u(o,"isBinary"),$a=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),$a}u(pl,"requireBinary");var Ia,hc;function fl(){if(hc)return Ia;hc=1;const e=xe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a={},n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let p;for(p in h)if(t.call(h,p))if(!d)d=!0;else return!1;if(!d||t.call(a,p))return!1;Object.defineProperty(a,p,{value:!0})}return!0}u(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return u(s,"constructYamlOmap"),Ia=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Ia}u(fl,"requireOmap");var Da,cc;function gl(){if(cc)return Da;cc=1;const e=xe(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}u(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return u(i,"constructYamlPairs"),Da=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Da}u(gl,"requirePairs");var Pa,dc;function ml(){if(dc)return Pa;dc=1;const e=xe(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}u(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return u(i,"constructYamlSet"),Pa=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Pa}u(ml,"requireSet");var Ra,uc;function Io(){return uc||(uc=1,Ra=cl().extend({implicit:[dl(),ul()],explicit:[pl(),fl(),gl(),ml()]})),Ra}u(Io,"require_default");var pc;function Qu(){if(pc)return Ds;pc=1;const e=$i(),t=Ii(),r=Ku(),i=Io(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,d=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(g){return Object.prototype.toString.call(g)}u(C,"_class");function b(g){return g===10||g===13}u(b,"isEol");function S(g){return g===9||g===32}u(S,"isWhiteSpace");function _(g){return g===9||g===32||g===10||g===13}u(_,"isWsOrEol");function B(g){return g===44||g===91||g===93||g===123||g===125}u(B,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const P=g|32;return P>=97&&P<=102?P-97+10:-1}u(L,"fromHexCode");function F(g){return g===120?2:g===117?4:g===85?8:0}u(F,"escapedHexLen");function A(g){return g>=48&&g<=57?g-48:-1}u(A,"fromDecimalCode");function H(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
138
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}u(H,"simpleEscapeSequence");function R(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}u(R,"charFromCodepoint");function $(g,P,Q){P==="__proto__"?Object.defineProperty(g,P,{configurable:!0,enumerable:!0,writable:!0,value:Q}):g[P]=Q}u($,"setProperty");const G=new Array(256),O=new Array(256);for(let g=0;g<256;g++)G[g]=H(g)?1:0,O[g]=H(g);function E(g,P){this.input=g,this.filename=P.filename||null,this.schema=P.schema||i,this.onWarning=P.onWarning||null,this.legacy=P.legacy||!1,this.json=P.json||!1,this.listener=P.listener||null,this.maxDepth=typeof P.maxDepth=="number"?P.maxDepth:100,this.maxTotalMergeKeys=typeof P.maxTotalMergeKeys=="number"?P.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}u(E,"State");function M(g,P){const Q={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return Q.snippet=r(Q),new t(P,Q)}u(M,"generateError");function v(g,P){throw M(g,P)}u(v,"throwError");function q(g,P){g.onWarning&&g.onWarning.call(null,M(g,P))}u(q,"throwWarning");function z(g,P,Q){const J=g.anchorMapTransactions;if(J.length!==0){const V=J[J.length-1];s.call(V,P)||(V[P]={existed:s.call(g.anchorMap,P),value:g.anchorMap[P]})}g.anchorMap[P]=Q}u(z,"storeAnchor");function I(g){g.anchorMapTransactions.push(Object.create(null))}u(I,"beginAnchorTransaction");function X(g){const P=g.anchorMapTransactions.pop(),Q=g.anchorMapTransactions;if(Q.length===0)return;const J=Q[Q.length-1],V=Object.keys(P);for(let k=0,W=V.length;k<W;k+=1){const j=V[k];s.call(J,j)||(J[j]=P[j])}}u(X,"commitAnchorTransaction");function K(g){const P=g.anchorMapTransactions.pop(),Q=Object.keys(P);for(let J=Q.length-1;J>=0;J-=1){const V=P[Q[J]];V.existed?g.anchorMap[Q[J]]=V.value:delete g.anchorMap[Q[J]]}}u(K,"rollbackAnchorTransaction");function lt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}u(lt,"snapshotState");function mt(g,P){g.position=P.position,g.line=P.line,g.lineStart=P.lineStart,g.lineIndent=P.lineIndent,g.firstTabInLine=P.firstTabInLine,g.tag=P.tag,g.anchor=P.anchor,g.kind=P.kind,g.result=P.result}u(mt,"restoreState");const kt={YAML:u(function(P,Q,J){P.version!==null&&v(P,"duplication of %YAML directive"),J.length!==1&&v(P,"YAML directive accepts exactly one argument");const V=/^([0-9]+)\.([0-9]+)$/.exec(J[0]);V===null&&v(P,"ill-formed argument of the YAML directive");const k=parseInt(V[1],10),W=parseInt(V[2],10);k!==1&&v(P,"unacceptable YAML version of the document"),P.version=J[0],P.checkLineBreaks=W<2,W!==1&&W!==2&&q(P,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(P,Q,J){let V;J.length!==2&&v(P,"TAG directive accepts exactly two arguments");const k=J[0];V=J[1],y.test(k)||v(P,"ill-formed tag handle (first argument) of the TAG directive"),s.call(P.tagMap,k)&&v(P,'there is a previously declared suffix for "'+k+'" tag handle'),x.test(V)||v(P,"ill-formed tag prefix (second argument) of the TAG directive");try{V=decodeURIComponent(V)}catch{v(P,"tag prefix is malformed: "+V)}P.tagMap[k]=V},"handleTagDirective")};function ft(g,P,Q,J){if(P<Q){const V=g.input.slice(P,Q);if(J)for(let k=0,W=V.length;k<W;k+=1){const j=V.charCodeAt(k);j===9||j>=32&&j<=1114111||v(g,"expected valid JSON character")}else p.test(V)&&v(g,"the stream contains non-printable characters");g.result+=V}}u(ft,"captureSegment");function it(g){g.totalMergeKeys++,g.maxTotalMergeKeys!==-1&&g.totalMergeKeys>g.maxTotalMergeKeys&&v(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")")}u(it,"chargeMergeWork");function yt(g,P,Q,J){e.isObject(Q)||v(g,"cannot merge mappings; the provided source object is unacceptable"),it(g);const V=Object.keys(Q);for(let k=0,W=V.length;k<W;k+=1){const j=V[k];it(g),s.call(P,j)||($(P,j,Q[j]),J[j]=!0)}}u(yt,"mergeMappings");function St(g,P,Q,J,V,k,W,j,st){if(Array.isArray(V)){V=Array.prototype.slice.call(V);for(let at=0,nt=V.length;at<nt;at+=1)Array.isArray(V[at])&&v(g,"nested arrays are not supported inside keys"),typeof V=="object"&&C(V[at])==="[object Object]"&&(V[at]="[object Object]")}if(typeof V=="object"&&C(V)==="[object Object]"&&(V="[object Object]"),V=String(V),P===null&&(P={}),J==="tag:yaml.org,2002:merge")if(Array.isArray(k)){k.length>100&&v(g,"abnormal merge sequence size");for(let at=0,nt=k.length;at<nt;at+=1)yt(g,P,k[at],Q)}else yt(g,P,k,Q);else!g.json&&!s.call(Q,V)&&s.call(P,V)&&(g.line=W||g.line,g.lineStart=j||g.lineStart,g.position=st||g.position,v(g,"duplicated mapping key")),$(P,V,k),delete Q[V];return P}u(St,"storeMappingPair");function vt(g){const P=g.input.charCodeAt(g.position);P===10?g.position++:P===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):v(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}u(vt,"readLineBreak");function wt(g,P,Q){let J=0,V=g.input.charCodeAt(g.position);for(;V!==0;){for(;S(V);)V===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),V=g.input.charCodeAt(++g.position);if(P&&V===35)do V=g.input.charCodeAt(++g.position);while(V!==10&&V!==13&&V!==0);if(b(V))for(vt(g),V=g.input.charCodeAt(g.position),J++,g.lineIndent=0;V===32;)g.lineIndent++,V=g.input.charCodeAt(++g.position);else break}return Q!==-1&&J!==0&&g.lineIndent<Q&&q(g,"deficient indentation"),J}u(wt,"skipSeparationSpace");function Dt(g){let P=g.position,Q=g.input.charCodeAt(P);return!!((Q===45||Q===46)&&Q===g.input.charCodeAt(P+1)&&Q===g.input.charCodeAt(P+2)&&(P+=3,Q=g.input.charCodeAt(P),Q===0||_(Q)))}u(Dt,"testDocumentSeparator");function Ut(g,P){P===1?g.result+=" ":P>1&&(g.result+=e.repeat(`
|
|
139
|
+
`,P-1))}u(Ut,"writeFoldedLines");function Te(g,P,Q){let J,V,k,W,j,st;const at=g.kind,nt=g.result;let Z=g.input.charCodeAt(g.position);if(_(Z)||B(Z)||Z===35||Z===38||Z===42||Z===33||Z===124||Z===62||Z===39||Z===34||Z===37||Z===64||Z===96)return!1;if(Z===63||Z===45){const ht=g.input.charCodeAt(g.position+1);if(_(ht)||Q&&B(ht))return!1}for(g.kind="scalar",g.result="",J=V=g.position,k=!1;Z!==0;){if(Z===58){const ht=g.input.charCodeAt(g.position+1);if(_(ht)||Q&&B(ht))break}else if(Z===35){const ht=g.input.charCodeAt(g.position-1);if(_(ht))break}else{if(g.position===g.lineStart&&Dt(g)||Q&&B(Z))break;if(b(Z))if(W=g.line,j=g.lineStart,st=g.lineIndent,wt(g,!1,-1),g.lineIndent>=P){k=!0,Z=g.input.charCodeAt(g.position);continue}else{g.position=V,g.line=W,g.lineStart=j,g.lineIndent=st;break}}k&&(ft(g,J,V,!1),Ut(g,g.line-W),J=V=g.position,k=!1),S(Z)||(V=g.position+1),Z=g.input.charCodeAt(++g.position)}return ft(g,J,V,!1),g.result?!0:(g.kind=at,g.result=nt,!1)}u(Te,"readPlainScalar");function Re(g,P){let Q,J,V=g.input.charCodeAt(g.position);if(V!==39)return!1;for(g.kind="scalar",g.result="",g.position++,Q=J=g.position;(V=g.input.charCodeAt(g.position))!==0;)if(V===39)if(ft(g,Q,g.position,!0),V=g.input.charCodeAt(++g.position),V===39)Q=g.position,g.position++,J=g.position;else return!0;else b(V)?(ft(g,Q,J,!0),Ut(g,wt(g,!1,P)),Q=J=g.position):g.position===g.lineStart&&Dt(g)?v(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(V)||(J=g.position));v(g,"unexpected end of the stream within a single quoted scalar")}u(Re,"readSingleQuotedScalar");function Ar(g,P){let Q,J,V,k=g.input.charCodeAt(g.position);if(k!==34)return!1;for(g.kind="scalar",g.result="",g.position++,Q=J=g.position;(k=g.input.charCodeAt(g.position))!==0;){if(k===34)return ft(g,Q,g.position,!0),g.position++,!0;if(k===92){if(ft(g,Q,g.position,!0),k=g.input.charCodeAt(++g.position),b(k))wt(g,!1,P);else if(k<256&&G[k])g.result+=O[k],g.position++;else if((V=F(k))>0){let W=V,j=0;for(;W>0;W--)k=g.input.charCodeAt(++g.position),(V=L(k))>=0?j=(j<<4)+V:v(g,"expected hexadecimal character");g.result+=R(j),g.position++}else v(g,"unknown escape sequence");Q=J=g.position}else b(k)?(ft(g,Q,J,!0),Ut(g,wt(g,!1,P)),Q=J=g.position):g.position===g.lineStart&&Dt(g)?v(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(k)||(J=g.position))}v(g,"unexpected end of the stream within a double quoted scalar")}u(Ar,"readDoubleQuotedScalar");function Ht(g,P){let Q=!0,J,V,k;const W=g.tag;let j;const st=g.anchor;let at,nt,Z,ht;const Ct=Object.create(null);let Tt,_t,Lt,Pt=g.input.charCodeAt(g.position);if(Pt===91)at=93,ht=!1,j=[];else if(Pt===123)at=125,ht=!0,j={};else return!1;for(g.anchor!==null&&z(g,g.anchor,j),Pt=g.input.charCodeAt(++g.position);Pt!==0;){if(wt(g,!0,P),Pt=g.input.charCodeAt(g.position),Pt===at)return g.position++,g.tag=W,g.anchor=st,g.kind=ht?"mapping":"sequence",g.result=j,!0;if(Q?Pt===44&&v(g,"expected the node content, but found ','"):v(g,"missed comma between flow collection entries"),_t=Tt=Lt=null,nt=Z=!1,Pt===63){const je=g.input.charCodeAt(g.position+1);_(je)&&(nt=Z=!0,g.position++,wt(g,!0,P))}J=g.line,V=g.lineStart,k=g.position,Ee(g,P,o,!1,!0),_t=g.tag,Tt=g.result,wt(g,!0,P),Pt=g.input.charCodeAt(g.position),(Z||g.line===J)&&Pt===58&&(nt=!0,Pt=g.input.charCodeAt(++g.position),wt(g,!0,P),Ee(g,P,o,!1,!0),Lt=g.result),ht?St(g,j,Ct,_t,Tt,Lt,J,V,k):nt?j.push(St(g,null,Ct,_t,Tt,Lt,J,V,k)):j.push(Tt),wt(g,!0,P),Pt=g.input.charCodeAt(g.position),Pt===44?(Q=!0,Pt=g.input.charCodeAt(++g.position)):Q=!1}v(g,"unexpected end of the stream within a flow collection")}u(Ht,"readFlowCollection");function Fe(g,P){let Q,J=c,V=!1,k=!1,W=P,j=0,st=!1,at,nt=g.input.charCodeAt(g.position);if(nt===124)Q=!1;else if(nt===62)Q=!0;else return!1;for(g.kind="scalar",g.result="";nt!==0;)if(nt=g.input.charCodeAt(++g.position),nt===43||nt===45)c===J?J=nt===43?d:h:v(g,"repeat of a chomping mode identifier");else if((at=A(nt))>=0)at===0?v(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):k?v(g,"repeat of an indentation width identifier"):(W=P+at-1,k=!0);else break;if(S(nt)){do nt=g.input.charCodeAt(++g.position);while(S(nt));if(nt===35)do nt=g.input.charCodeAt(++g.position);while(!b(nt)&&nt!==0)}for(;nt!==0;){for(vt(g),g.lineIndent=0,nt=g.input.charCodeAt(g.position);(!k||g.lineIndent<W)&&nt===32;)g.lineIndent++,nt=g.input.charCodeAt(++g.position);if(!k&&g.lineIndent>W&&(W=g.lineIndent),b(nt)){j++;continue}if(!k&&W===0&&v(g,"missing indentation for block scalar"),g.lineIndent<W){J===d?g.result+=e.repeat(`
|
|
140
|
+
`,V?1+j:j):J===c&&V&&(g.result+=`
|
|
141
|
+
`);break}Q?S(nt)?(st=!0,g.result+=e.repeat(`
|
|
142
|
+
`,V?1+j:j)):st?(st=!1,g.result+=e.repeat(`
|
|
143
|
+
`,j+1)):j===0?V&&(g.result+=" "):g.result+=e.repeat(`
|
|
144
|
+
`,j):g.result+=e.repeat(`
|
|
145
|
+
`,V?1+j:j),V=!0,k=!0,j=0;const Z=g.position;for(;!b(nt)&&nt!==0;)nt=g.input.charCodeAt(++g.position);ft(g,Z,g.position,!1)}return!0}u(Fe,"readBlockScalar");function zt(g,P){const Q=g.tag,J=g.anchor,V=[];let k=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&z(g,g.anchor,V);let W=g.input.charCodeAt(g.position);for(;W!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation")),W===45);){const j=g.input.charCodeAt(g.position+1);if(!_(j))break;if(k=!0,g.position++,wt(g,!0,-1)&&g.lineIndent<=P){V.push(null),W=g.input.charCodeAt(g.position);continue}const st=g.line;if(Ee(g,P,n,!1,!0),V.push(g.result),wt(g,!0,-1),W=g.input.charCodeAt(g.position),(g.line===st||g.lineIndent>P)&&W!==0)v(g,"bad indentation of a sequence entry");else if(g.lineIndent<P)break}return k?(g.tag=Q,g.anchor=J,g.kind="sequence",g.result=V,!0):!1}u(zt,"readBlockSequence");function Je(g,P,Q){let J,V,k,W;const j=g.tag,st=g.anchor,at={},nt=Object.create(null);let Z=null,ht=null,Ct=null,Tt=!1,_t=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&z(g,g.anchor,at);let Lt=g.input.charCodeAt(g.position);for(;Lt!==0;){!Tt&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation"));const Pt=g.input.charCodeAt(g.position+1),je=g.line;if((Lt===63||Lt===58)&&_(Pt))Lt===63?(Tt&&(St(g,at,nt,Z,ht,null,V,k,W),Z=ht=Ct=null),_t=!0,Tt=!0,J=!0):Tt?(Tt=!1,J=!0):v(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,Lt=Pt;else{if(V=g.line,k=g.lineStart,W=g.position,!Ee(g,Q,a,!1,!0))break;if(g.line===je){for(Lt=g.input.charCodeAt(g.position);S(Lt);)Lt=g.input.charCodeAt(++g.position);if(Lt===58)Lt=g.input.charCodeAt(++g.position),_(Lt)||v(g,"a whitespace character is expected after the key-value separator within a block mapping"),Tt&&(St(g,at,nt,Z,ht,null,V,k,W),Z=ht=Ct=null),_t=!0,Tt=!1,J=!1,Z=g.tag,ht=g.result;else if(_t)v(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=j,g.anchor=st,!0}else if(_t)v(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=j,g.anchor=st,!0}if((g.line===je||g.lineIndent>P)&&(Tt&&(V=g.line,k=g.lineStart,W=g.position),Ee(g,P,l,!0,J)&&(Tt?ht=g.result:Ct=g.result),Tt||(St(g,at,nt,Z,ht,Ct,V,k,W),Z=ht=Ct=null),wt(g,!0,-1),Lt=g.input.charCodeAt(g.position)),(g.line===je||g.lineIndent>P)&&Lt!==0)v(g,"bad indentation of a mapping entry");else if(g.lineIndent<P)break}return Tt&&St(g,at,nt,Z,ht,null,V,k,W),_t&&(g.tag=j,g.anchor=st,g.kind="mapping",g.result=at),_t}u(Je,"readBlockMapping");function he(g){let P=!1,Q=!1,J,V,k=g.input.charCodeAt(g.position);if(k!==33)return!1;g.tag!==null&&v(g,"duplication of a tag property"),k=g.input.charCodeAt(++g.position),k===60?(P=!0,k=g.input.charCodeAt(++g.position)):k===33?(Q=!0,J="!!",k=g.input.charCodeAt(++g.position)):J="!";let W=g.position;if(P){do k=g.input.charCodeAt(++g.position);while(k!==0&&k!==62);g.position<g.length?(V=g.input.slice(W,g.position),k=g.input.charCodeAt(++g.position)):v(g,"unexpected end of the stream within a verbatim tag")}else{for(;k!==0&&!_(k);)k===33&&(Q?v(g,"tag suffix cannot contain exclamation marks"):(J=g.input.slice(W-1,g.position+1),y.test(J)||v(g,"named tag handle cannot contain such characters"),Q=!0,W=g.position+1)),k=g.input.charCodeAt(++g.position);V=g.input.slice(W,g.position),m.test(V)&&v(g,"tag suffix cannot contain flow indicator characters")}V&&!x.test(V)&&v(g,"tag name cannot contain such characters: "+V);try{V=decodeURIComponent(V)}catch{v(g,"tag name is malformed: "+V)}return P?g.tag=V:s.call(g.tagMap,J)?g.tag=g.tagMap[J]+V:J==="!"?g.tag="!"+V:J==="!!"?g.tag="tag:yaml.org,2002:"+V:v(g,'undeclared tag handle "'+J+'"'),!0}u(he,"readTagProperty");function Ne(g){let P=g.input.charCodeAt(g.position);if(P!==38)return!1;g.anchor!==null&&v(g,"duplication of an anchor property"),P=g.input.charCodeAt(++g.position);const Q=g.position;for(;P!==0&&!_(P)&&!B(P);)P=g.input.charCodeAt(++g.position);return g.position===Q&&v(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(Q,g.position),!0}u(Ne,"readAnchorProperty");function Fr(g){let P=g.input.charCodeAt(g.position);if(P!==42)return!1;P=g.input.charCodeAt(++g.position);const Q=g.position;for(;P!==0&&!_(P)&&!B(P);)P=g.input.charCodeAt(++g.position);g.position===Q&&v(g,"name of an alias node must contain at least one character");const J=g.input.slice(Q,g.position);return s.call(g.anchorMap,J)||v(g,'unidentified alias "'+J+'"'),g.result=g.anchorMap[J],wt(g,!0,-1),!0}u(Fr,"readAlias");function Ce(g,P,Q,J){const V=lt(g);return I(g),mt(g,P),g.tag=null,g.anchor=null,g.kind=null,g.result=null,Je(g,Q,J)&&g.kind==="mapping"?(X(g),!0):(K(g),mt(g,V),!1)}u(Ce,"tryReadBlockMappingFromProperty");function Ee(g,P,Q,J,V){let k,W,j=1,st=!1,at=!1,nt=null,Z,ht,Ct;g.depth>=g.maxDepth&&v(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const Tt=k=W=l===Q||n===Q;if(J&&wt(g,!0,-1)&&(st=!0,g.lineIndent>P?j=1:g.lineIndent===P?j=0:g.lineIndent<P&&(j=-1)),j===1)for(;;){const _t=g.input.charCodeAt(g.position),Lt=lt(g);if(st&&(_t===33&&g.tag!==null||_t===38&&g.anchor!==null)||!he(g)&&!Ne(g))break;nt===null&&(nt=Lt),wt(g,!0,-1)?(st=!0,W=Tt,g.lineIndent>P?j=1:g.lineIndent===P?j=0:g.lineIndent<P&&(j=-1)):W=!1}if(W&&(W=st||V),j===1||l===Q)if(o===Q||a===Q?ht=P:ht=P+1,Ct=g.position-g.lineStart,j===1)if(W&&(zt(g,Ct)||Je(g,Ct,ht))||Ht(g,ht))at=!0;else{const _t=g.input.charCodeAt(g.position);nt!==null&&Tt&&!W&&_t!==124&&_t!==62&&Ce(g,nt,nt.position-nt.lineStart,ht)||k&&Fe(g,ht)||Re(g,ht)||Ar(g,ht)?at=!0:Fr(g)?(at=!0,(g.tag!==null||g.anchor!==null)&&v(g,"alias node should not have any properties")):Te(g,ht,o===Q)&&(at=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&z(g,g.anchor,g.result)}else j===0&&(at=W&&zt(g,Ct));if(g.tag===null)g.anchor!==null&&z(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&v(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let _t=0,Lt=g.implicitTypes.length;_t<Lt;_t+=1)if(Z=g.implicitTypes[_t],Z.resolve(g.result)){g.result=Z.construct(g.result),g.tag=Z.tag,g.anchor!==null&&z(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))Z=g.typeMap[g.kind||"fallback"][g.tag];else{Z=null;const _t=g.typeMap.multi[g.kind||"fallback"];for(let Lt=0,Pt=_t.length;Lt<Pt;Lt+=1)if(g.tag.slice(0,_t[Lt].tag.length)===_t[Lt].tag){Z=_t[Lt];break}}Z||v(g,"unknown tag !<"+g.tag+">"),g.result!==null&&Z.kind!==g.kind&&v(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+Z.kind+'", not "'+g.kind+'"'),Z.resolve(g.result,g.tag)?(g.result=Z.construct(g.result,g.tag),g.anchor!==null&&z(g,g.anchor,g.result)):v(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||at}u(Ee,"composeNode");function pr(g){const P=g.position;let Q=!1,J;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(J=g.input.charCodeAt(g.position))!==0&&(wt(g,!0,-1),J=g.input.charCodeAt(g.position),!(g.lineIndent>0||J!==37));){Q=!0,J=g.input.charCodeAt(++g.position);let V=g.position;for(;J!==0&&!_(J);)J=g.input.charCodeAt(++g.position);const k=g.input.slice(V,g.position),W=[];for(k.length<1&&v(g,"directive name must not be less than one character in length");J!==0;){for(;S(J);)J=g.input.charCodeAt(++g.position);if(J===35){do J=g.input.charCodeAt(++g.position);while(J!==0&&!b(J));break}if(b(J))break;for(V=g.position;J!==0&&!_(J);)J=g.input.charCodeAt(++g.position);W.push(g.input.slice(V,g.position))}J!==0&&vt(g),s.call(kt,k)?kt[k](g,k,W):q(g,'unknown document directive "'+k+'"')}if(wt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,wt(g,!0,-1)):Q&&v(g,"directives end mark is expected"),Ee(g,g.lineIndent-1,l,!1,!0),wt(g,!0,-1),g.checkLineBreaks&&f.test(g.input.slice(P,g.position))&&q(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&Dt(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,wt(g,!0,-1));return}g.position<g.length-1&&v(g,"end of the stream or a document separator is expected")}u(pr,"readDocument");function tr(g,P){g=String(g),P=P||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
146
|
+
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const Q=new E(g,P),J=g.indexOf("\0");for(J!==-1&&(Q.position=J,v(Q,"null byte is not allowed in input")),Q.input+="\0";Q.input.charCodeAt(Q.position)===32;)Q.lineIndent+=1,Q.position+=1;for(;Q.position<Q.length-1;)pr(Q);return Q.documents}u(tr,"loadDocuments");function fr(g,P,Q){P!==null&&typeof P=="object"&&typeof Q>"u"&&(Q=P,P=null);const J=tr(g,Q);if(typeof P!="function")return J;for(let V=0,k=J.length;V<k;V+=1)P(J[V])}u(fr,"loadAll2");function be(g,P){const Q=tr(g,P);if(Q.length!==0){if(Q.length===1)return Q[0];throw new t("expected a single document in the stream, but found more")}}return u(be,"load2"),Ds.loadAll=fr,Ds.load=be,Ds}u(Qu,"requireLoader");var Na={},fc;function Ju(){if(fc)return Na;fc=1;const e=$i(),t=Ii(),r=Io(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,d=34,p=35,f=37,m=38,y=39,x=42,C=44,b=45,S=58,_=61,B=62,L=63,F=64,A=91,H=93,R=96,$=123,G=124,O=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function q(k,W){if(W===null)return{};const j={},st=Object.keys(W);for(let at=0,nt=st.length;at<nt;at+=1){let Z=st[at],ht=String(W[Z]);Z.slice(0,2)==="!!"&&(Z="tag:yaml.org,2002:"+Z.slice(2));const Ct=k.compiledTypeMap.fallback[Z];Ct&&s.call(Ct.styleAliases,ht)&&(ht=Ct.styleAliases[ht]),j[Z]=ht}return j}u(q,"compileStyleMap");function z(k){let W,j;const st=k.toString(16).toUpperCase();if(k<=255)W="x",j=2;else if(k<=65535)W="u",j=4;else if(k<=4294967295)W="U",j=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+W+e.repeat("0",j-st.length)+st}u(z,"encodeHex");const I=1,X=2;function K(k){this.schema=k.schema||r,this.indent=Math.max(1,k.indent||2),this.noArrayIndent=k.noArrayIndent||!1,this.skipInvalid=k.skipInvalid||!1,this.flowLevel=e.isNothing(k.flowLevel)?-1:k.flowLevel,this.styleMap=q(this.schema,k.styles||null),this.sortKeys=k.sortKeys||!1,this.lineWidth=k.lineWidth||80,this.noRefs=k.noRefs||!1,this.noCompatMode=k.noCompatMode||!1,this.condenseFlow=k.condenseFlow||!1,this.quotingType=k.quotingType==='"'?X:I,this.forceQuotes=k.forceQuotes||!1,this.replacer=typeof k.replacer=="function"?k.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}u(K,"State");function lt(k,W){const j=e.repeat(" ",W);let st=0,at="";const nt=k.length;for(;st<nt;){let Z;const ht=k.indexOf(`
|
|
147
|
+
`,st);ht===-1?(Z=k.slice(st),st=nt):(Z=k.slice(st,ht+1),st=ht+1),Z.length&&Z!==`
|
|
148
|
+
`&&(at+=j),at+=Z}return at}u(lt,"indentString");function mt(k,W){return`
|
|
149
|
+
`+e.repeat(" ",k.indent*W)}u(mt,"generateNextLine");function kt(k,W){for(let j=0,st=k.implicitTypes.length;j<st;j+=1)if(k.implicitTypes[j].resolve(W))return!0;return!1}u(kt,"testImplicitResolving");function ft(k){return k===c||k===a}u(ft,"isWhitespace");function it(k){return k>=32&&k<=126||k>=161&&k<=55295&&k!==8232&&k!==8233||k>=57344&&k<=65533&&k!==o||k>=65536&&k<=1114111}u(it,"isPrintable");function yt(k){return it(k)&&k!==o&&k!==l&&k!==n}u(yt,"isNsCharOrWhitespace");function St(k,W,j){const st=yt(k),at=st&&!ft(k);return(j?st:st&&k!==C&&k!==A&&k!==H&&k!==$&&k!==O)&&k!==p&&!(W===S&&!at)||yt(W)&&!ft(W)&&k===p||W===S&&at}u(St,"isPlainSafe");function vt(k){return it(k)&&k!==o&&!ft(k)&&k!==b&&k!==L&&k!==S&&k!==C&&k!==A&&k!==H&&k!==$&&k!==O&&k!==p&&k!==m&&k!==x&&k!==h&&k!==G&&k!==_&&k!==B&&k!==y&&k!==d&&k!==f&&k!==F&&k!==R}u(vt,"isPlainSafeFirst");function wt(k){return!ft(k)&&k!==S}u(wt,"isPlainSafeLast");function Dt(k,W){const j=k.charCodeAt(W);let st;return j>=55296&&j<=56319&&W+1<k.length&&(st=k.charCodeAt(W+1),st>=56320&&st<=57343)?(j-55296)*1024+st-56320+65536:j}u(Dt,"codePointAt");function Ut(k){return/^\n* /.test(k)}u(Ut,"needIndentIndicator");const Te=1,Re=2,Ar=3,Ht=4,Fe=5;function zt(k,W,j,st,at,nt,Z,ht){let Ct,Tt=0,_t=null,Lt=!1,Pt=!1;const je=st!==-1;let Er=-1,Mr=vt(Dt(k,0))&&wt(Dt(k,k.length-1));if(W||Z)for(Ct=0;Ct<k.length;Tt>=65536?Ct+=2:Ct++){if(Tt=Dt(k,Ct),!it(Tt))return Fe;Mr=Mr&&St(Tt,_t,ht),_t=Tt}else{for(Ct=0;Ct<k.length;Tt>=65536?Ct+=2:Ct++){if(Tt=Dt(k,Ct),Tt===n)Lt=!0,je&&(Pt=Pt||Ct-Er-1>st&&k[Er+1]!==" ",Er=Ct);else if(!it(Tt))return Fe;Mr=Mr&&St(Tt,_t,ht),_t=Tt}Pt=Pt||je&&Ct-Er-1>st&&k[Er+1]!==" "}return!Lt&&!Pt?Mr&&!Z&&!at(k)?Te:nt===X?Fe:Re:j>9&&Ut(k)?Fe:Z?nt===X?Fe:Re:Pt?Ht:Ar}u(zt,"chooseScalarStyle");function Je(k,W,j,st,at){k.dump=(function(){if(W.length===0)return k.quotingType===X?'""':"''";if(!k.noCompatMode&&(M.indexOf(W)!==-1||v.test(W)))return k.quotingType===X?'"'+W+'"':"'"+W+"'";const nt=k.indent*Math.max(1,j),Z=k.lineWidth===-1?-1:Math.max(Math.min(k.lineWidth,40),k.lineWidth-nt),ht=st||k.flowLevel>-1&&j>=k.flowLevel;function Ct(Tt){return kt(k,Tt)}switch(u(Ct,"testAmbiguity"),zt(W,ht,k.indent,Z,Ct,k.quotingType,k.forceQuotes&&!st,at)){case Te:return W;case Re:return"'"+W.replace(/'/g,"''")+"'";case Ar:return"|"+he(W,k.indent)+Ne(lt(W,nt));case Ht:return">"+he(W,k.indent)+Ne(lt(Fr(W,Z),nt));case Fe:return'"'+Ee(W)+'"';default:throw new t("impossible error: invalid scalar style")}})()}u(Je,"writeScalar");function he(k,W){const j=Ut(k)?String(W):"",st=k[k.length-1]===`
|
|
150
|
+
`,nt=st&&(k[k.length-2]===`
|
|
151
|
+
`||k===`
|
|
152
|
+
`)?"+":st?"":"-";return j+nt+`
|
|
153
|
+
`}u(he,"blockHeader");function Ne(k){return k[k.length-1]===`
|
|
154
|
+
`?k.slice(0,-1):k}u(Ne,"dropEndingNewline");function Fr(k,W){const j=/(\n+)([^\n]*)/g;let st=(function(){let ht=k.indexOf(`
|
|
155
|
+
`);return ht=ht!==-1?ht:k.length,j.lastIndex=ht,Ce(k.slice(0,ht),W)})(),at=k[0]===`
|
|
156
|
+
`||k[0]===" ",nt,Z;for(;Z=j.exec(k);){const ht=Z[1],Ct=Z[2];nt=Ct[0]===" ",st+=ht+(!at&&!nt&&Ct!==""?`
|
|
157
|
+
`:"")+Ce(Ct,W),at=nt}return st}u(Fr,"foldString");function Ce(k,W){if(k===""||k[0]===" ")return k;const j=/ [^ ]/g;let st,at=0,nt,Z=0,ht=0,Ct="";for(;st=j.exec(k);)ht=st.index,ht-at>W&&(nt=Z>at?Z:ht,Ct+=`
|
|
158
|
+
`+k.slice(at,nt),at=nt+1),Z=ht;return Ct+=`
|
|
159
|
+
`,k.length-at>W&&Z>at?Ct+=k.slice(at,Z)+`
|
|
160
|
+
`+k.slice(Z+1):Ct+=k.slice(at),Ct.slice(1)}u(Ce,"foldLine");function Ee(k){let W="",j=0;for(let st=0;st<k.length;j>=65536?st+=2:st++){j=Dt(k,st);const at=E[j];!at&&it(j)?(W+=k[st],j>=65536&&(W+=k[st+1])):W+=at||z(j)}return W}u(Ee,"escapeString");function pr(k,W,j){let st="";const at=k.tag;for(let nt=0,Z=j.length;nt<Z;nt+=1){let ht=j[nt];k.replacer&&(ht=k.replacer.call(j,String(nt),ht)),(P(k,W,ht,!1,!1)||typeof ht>"u"&&P(k,W,null,!1,!1))&&(st!==""&&(st+=","+(k.condenseFlow?"":" ")),st+=k.dump)}k.tag=at,k.dump="["+st+"]"}u(pr,"writeFlowSequence");function tr(k,W,j,st){let at="";const nt=k.tag;for(let Z=0,ht=j.length;Z<ht;Z+=1){let Ct=j[Z];k.replacer&&(Ct=k.replacer.call(j,String(Z),Ct)),(P(k,W+1,Ct,!0,!0,!1,!0)||typeof Ct>"u"&&P(k,W+1,null,!0,!0,!1,!0))&&((!st||at!=="")&&(at+=mt(k,W)),k.dump&&n===k.dump.charCodeAt(0)?at+="-":at+="- ",at+=k.dump)}k.tag=nt,k.dump=at||"[]"}u(tr,"writeBlockSequence");function fr(k,W,j){let st="";const at=k.tag,nt=Object.keys(j);for(let Z=0,ht=nt.length;Z<ht;Z+=1){let Ct="";st!==""&&(Ct+=", "),k.condenseFlow&&(Ct+='"');const Tt=nt[Z];let _t=j[Tt];k.replacer&&(_t=k.replacer.call(j,Tt,_t)),P(k,W,Tt,!1,!1)&&(k.dump.length>1024&&(Ct+="? "),Ct+=k.dump+(k.condenseFlow?'"':"")+":"+(k.condenseFlow?"":" "),P(k,W,_t,!1,!1)&&(Ct+=k.dump,st+=Ct))}k.tag=at,k.dump="{"+st+"}"}u(fr,"writeFlowMapping");function be(k,W,j,st){let at="";const nt=k.tag,Z=Object.keys(j);if(k.sortKeys===!0)Z.sort();else if(typeof k.sortKeys=="function")Z.sort(k.sortKeys);else if(k.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let ht=0,Ct=Z.length;ht<Ct;ht+=1){let Tt="";(!st||at!=="")&&(Tt+=mt(k,W));const _t=Z[ht];let Lt=j[_t];if(k.replacer&&(Lt=k.replacer.call(j,_t,Lt)),!P(k,W+1,_t,!0,!0,!0))continue;const Pt=k.tag!==null&&k.tag!=="?"||k.dump&&k.dump.length>1024;Pt&&(k.dump&&n===k.dump.charCodeAt(0)?Tt+="?":Tt+="? "),Tt+=k.dump,Pt&&(Tt+=mt(k,W)),P(k,W+1,Lt,!0,Pt)&&(k.dump&&n===k.dump.charCodeAt(0)?Tt+=":":Tt+=": ",Tt+=k.dump,at+=Tt)}k.tag=nt,k.dump=at||"{}"}u(be,"writeBlockMapping");function g(k,W,j){const st=j?k.explicitTypes:k.implicitTypes;for(let at=0,nt=st.length;at<nt;at+=1){const Z=st[at];if((Z.instanceOf||Z.predicate)&&(!Z.instanceOf||typeof W=="object"&&W instanceof Z.instanceOf)&&(!Z.predicate||Z.predicate(W))){if(j?Z.multi&&Z.representName?k.tag=Z.representName(W):k.tag=Z.tag:k.tag="?",Z.represent){const ht=k.styleMap[Z.tag]||Z.defaultStyle;let Ct;if(i.call(Z.represent)==="[object Function]")Ct=Z.represent(W,ht);else if(s.call(Z.represent,ht))Ct=Z.represent[ht](W,ht);else throw new t("!<"+Z.tag+'> tag resolver accepts not "'+ht+'" style');k.dump=Ct}return!0}}return!1}u(g,"detectType");function P(k,W,j,st,at,nt,Z){k.tag=null,k.dump=j,g(k,j,!1)||g(k,j,!0);const ht=i.call(k.dump),Ct=st;st&&(st=k.flowLevel<0||k.flowLevel>W);const Tt=ht==="[object Object]"||ht==="[object Array]";let _t,Lt;if(Tt&&(_t=k.duplicates.indexOf(j),Lt=_t!==-1),(k.tag!==null&&k.tag!=="?"||Lt||k.indent!==2&&W>0)&&(at=!1),Lt&&k.usedDuplicates[_t])k.dump="*ref_"+_t;else{if(Tt&&Lt&&!k.usedDuplicates[_t]&&(k.usedDuplicates[_t]=!0),ht==="[object Object]")st&&Object.keys(k.dump).length!==0?(be(k,W,k.dump,at),Lt&&(k.dump="&ref_"+_t+k.dump)):(fr(k,W,k.dump),Lt&&(k.dump="&ref_"+_t+" "+k.dump));else if(ht==="[object Array]")st&&k.dump.length!==0?(k.noArrayIndent&&!Z&&W>0?tr(k,W-1,k.dump,at):tr(k,W,k.dump,at),Lt&&(k.dump="&ref_"+_t+k.dump)):(pr(k,W,k.dump),Lt&&(k.dump="&ref_"+_t+" "+k.dump));else if(ht==="[object String]")k.tag!=="?"&&Je(k,k.dump,W,nt,Ct);else{if(ht==="[object Undefined]")return!1;if(k.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+ht)}if(k.tag!==null&&k.tag!=="?"){let Pt=encodeURI(k.tag[0]==="!"?k.tag.slice(1):k.tag).replace(/!/g,"%21");k.tag[0]==="!"?Pt="!"+Pt:Pt.slice(0,18)==="tag:yaml.org,2002:"?Pt="!!"+Pt.slice(18):Pt="!<"+Pt+">",k.dump=Pt+" "+k.dump}}return!0}u(P,"writeNode");function Q(k,W){const j=[],st=[];J(k,j,st);const at=st.length;for(let nt=0;nt<at;nt+=1)W.duplicates.push(j[st[nt]]);W.usedDuplicates=new Array(at)}u(Q,"getDuplicateReferences");function J(k,W,j){if(k!==null&&typeof k=="object"){const st=W.indexOf(k);if(st!==-1)j.indexOf(st)===-1&&j.push(st);else if(W.push(k),Array.isArray(k))for(let at=0,nt=k.length;at<nt;at+=1)J(k[at],W,j);else{const at=Object.keys(k);for(let nt=0,Z=at.length;nt<Z;nt+=1)J(k[at[nt]],W,j)}}}u(J,"inspectNode");function V(k,W){W=W||{};const j=new K(W);j.noRefs||Q(k,j);let st=k;return j.replacer&&(st=j.replacer.call({"":st},"",st)),P(j,0,st,!0,!0)?j.dump+`
|
|
161
|
+
`:""}return u(V,"dump2"),Na.dump=V,Na}u(Ju,"requireDumper");var gc;function tp(){if(gc)return ge;gc=1;const e=Qu(),t=Ju();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return u(r,"renamed"),ge.Type=xe(),ge.Schema=tl(),ge.FAILSAFE_SCHEMA=sl(),ge.JSON_SCHEMA=hl(),ge.CORE_SCHEMA=cl(),ge.DEFAULT_SCHEMA=Io(),ge.load=e.load,ge.loadAll=e.loadAll,ge.dump=t.dump,ge.YAMLException=Ii(),ge.types={binary:pl(),float:ll(),map:il(),null:ol(),pairs:gl(),set:ml(),timestamp:dl(),bool:al(),int:nl(),merge:ul(),omap:fl(),seq:rl(),str:el()},ge.safeLoad=r("safeLoad","load"),ge.safeLoadAll=r("safeLoadAll","loadAll"),ge.safeDump=r("safeDump","dump"),ge}u(tp,"requireJsYaml");var yk=tp(),xk=Zu(yk),{Type:IL,Schema:DL,FAILSAFE_SCHEMA:PL,JSON_SCHEMA:Ck,CORE_SCHEMA:RL,DEFAULT_SCHEMA:NL,load:bk,loadAll:qL,dump:WL,YAMLException:zL,types:HL,safeLoad:YL,safeLoadAll:UL,safeDump:jL}=xk,kk=u((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:o,gradientStop:a}=i??{},n=e.attr("id"),l=r?.includes("dark")?"#FFFFFF":"#000000",c=u((d,p,f)=>e.append("defs").append("filter").attr("id",d).attr("height",p).attr("width",p).append("feDropShadow").attr("dx",f).attr("dy",f).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",l),"dropShadow");if(c(`${n}-drop-shadow`,"130%","4"),c(`${n}-drop-shadow-small`,"150%","2"),!s)return;const h=e.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",a).attr("stop-opacity",1)},"insertLookDefs"),Sk=u(e=>{const{handDrawnSeed:t}=$t();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),wk=u(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),jr=u(e=>{const t=Tk([...e.cssCompiledStyles||[],...e.cssStyles||[],...wk(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Tk=u(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),ep=u(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),ut=u(e=>{const{stylesArray:t}=jr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];ep(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),dt=u((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=$t(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=jr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:_k(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),_k=u(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Bk=new Set(["redux-color","redux-dark-color"]),vk=12,Lk=64,yl=u(e=>Array.isArray(e)&&e.length>0,"hasPalette"),Ak=u((e,t)=>e!=null&&Bk.has(e)&&yl(t),"isColorTheme"),Fk=/^[\w-]+$/,GL=u(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return Fk.test(t)?t:"classic"},"safeLook"),rp=u(e=>yl(e)?e.length:0,"paletteSlotCount"),VL=u((e,t)=>yl(t)?rp(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=Lk?e:vk,"colorSlotCount"),Ue=u((e,t,r,i)=>{if(t===void 0||!Ak(r,i))return;const s=t%rp(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");const Ek=Object.freeze({left:0,top:0,width:16,height:16}),go=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ip=Object.freeze({...Ek,...go}),Mk=Object.freeze({...ip,body:"",hidden:!1}),Ok=Object.freeze({width:null,height:null}),$k=Object.freeze({...Ok,...go}),Ik=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return qa(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return qa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return qa(n,r)?n:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Dk(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function mc(e,t){const r=Dk(e,t);for(const i in Mk)i in go?i in e&&!(i in r)&&(r[i]=go[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Pk(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function yc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=mc(i[n]||s[n],o)}return a(t),r.forEach(a),mc(e,o)}function Rk(e,t){if(e.icons[t])return yc(e,t,[]);const r=Pk(e,[t])[t];return r?yc(e,t,r):null}const Nk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function xc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Nk);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=qk.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function Wk(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function zk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Hk(e,t,r){const i=Wk(e);return zk(i.defs,t+i.content+r)}const Yk=e=>e==="unset"||e==="undefined"||e==="none";function Uk(e,t){const r={...ip,...e},i={...$k,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,b=y.vFlip;let S=y.rotate;C?b?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):b&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let _;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:_=s.height/2+s.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:_=s.width/2+s.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")")}S%2===1&&(s.left!==s.top&&(_=s.left,s.left=s.top,s.top=_),s.width!==s.height&&(_=s.width,s.width=s.height,s.height=_)),x.length&&(o=Hk(o,'<g transform="'+x.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=xc(d,l/c)):(h=a==="auto"?l:a,d=n===null?xc(h,c/l):n==="auto"?c:n);const p={},f=(y,x)=>{Yk(x)||(p[y]=x.toString())};f("width",h),f("height",d);const m=[s.left,s.top,l,c];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:o}}const jk=/\sid="(\S+)"/g,Cc=new Map;function Gk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Cc.get(e)||0;return Cc.set(e,t+1),t?`${e}${t}`:e}function Vk(e){const t=[];let r;for(;r=jk.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=Gk(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Xk(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Zk={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},mo=new Map,xl=new Map,sp=u(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(tt.debug("Registering icon pack:",t.name),"loader"in t)xl.set(t.name,t.loader);else if("icons"in t)mo.set(t.name,t.icons);else throw tt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Kk=u(e=>mo.has(e)||xl.has(e),"isIconPackRegistered"),op=u(async(e,t)=>{const r=Ik(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=mo.get(i);if(!s){const a=xl.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},mo.set(i,s)}catch(n){throw tt.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Rk(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),ap=u(async e=>{try{return await op(e),!0}catch{return!1}},"isIconAvailable"),oi=u(async(e,t,r)=>{let i;try{i=await op(e,t?.fallbackPrefix)}catch(a){tt.error(a),i=Zk}const s=Uk(i,t),o=Xk(Vk(s.body),{...s.attributes,...r});return ze(o,Gt())},"getIconSVG"),Ps={},oe={},bc;function Qk(){return bc||(bc=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.BLANK_URL=oe.relativeFirstCharacters=oe.whitespaceEscapeCharsRegex=oe.urlSchemeRegex=oe.ctrlCharactersRegex=oe.htmlCtrlEntityRegex=oe.htmlEntitiesRegex=oe.invalidProtocolRegex=void 0,oe.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,oe.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,oe.htmlCtrlEntityRegex=/&(newline|tab);/gi,oe.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,oe.urlSchemeRegex=/^.+(:|:)/gim,oe.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,oe.relativeFirstCharacters=[".","/"],oe.BLANK_URL="about:blank"),oe}var kc;function Jk(){if(kc)return Ps;kc=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.sanitizeUrl=o;var e=Qk();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return f;if(p==="http:"||p==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Ps}var t1=Jk();function Wa(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){var t;const i=e[Symbol.toStringTag];return i==null||!(!((t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))===null||t===void 0)&&t.writable)?!1:e.toString()===`[object ${i}]`}let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function e1(e){return Number.isSafeInteger(e)&&e>=0}function np(e){return e!=null&&typeof e!="function"&&e1(e.length)}function r1(e){return e==="__proto__"}const i1=Object.prototype.hasOwnProperty;function Sc(e,t){return i1.call(e,t)}function Cl(e){return e==null||typeof e!="object"&&typeof e!="function"}function lp(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const s1="[object RegExp]",hp="[object String]",cp="[object Number]",dp="[object Boolean]",up="[object Arguments]",o1="[object Symbol]",a1="[object Date]",n1="[object Map]",l1="[object Set]",h1="[object Array]",c1="[object ArrayBuffer]",d1="[object Object]",u1="[object DataView]",p1="[object Uint8Array]",f1="[object Uint8ClampedArray]",g1="[object Uint16Array]",m1="[object Uint32Array]",y1="[object Int8Array]",x1="[object Int16Array]",C1="[object Int32Array]",b1="[object Float32Array]",k1="[object Float64Array]",wc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function bl(e){return typeof wc.Buffer<"u"&&wc.Buffer.isBuffer(e)}function S1(e){return bl(e)}function pp(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ds(e){return pp(e)}function fp(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function w1(e,t){return Ti(e,void 0,e,new Map)}function Ti(e,t,r,i,s){if(Cl(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ti(e[n],n,r,i);return Sc(e,"index")&&(a.index=e.index),Sc(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;return i.set(e,a),e.forEach((n,l)=>{a.set(l,Ti(n,l,r,i))}),a}if(e instanceof Set){const a=new Set;return i.set(e,a),e.forEach(n=>{a.add(Ti(n,void 0,r,i))}),a}if(S1(e))return e.subarray();if(ds(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ti(e[n],n,r,i);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),ui(a,e,r,i),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),ui(a,e,r,i),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),ui(a,e,r,i),a}const o=lp(e);if(o==="[object Error]")return e===r?{}:e;switch(o){case cp:case hp:case dp:{const a=new e.constructor(e.valueOf());return i.set(e,a),ui(a,e,r,i),a}case up:{const a={};return i.set(e,a),ui(a,e,r,i),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}}if(typeof e=="object"&&T1(o)){const a=o==="[object Object]"&&typeof e.constructor!="function"?{}:Object.create(Object.getPrototypeOf(e));return i.set(e,a),ui(a,e,r,i),a}return e}function ui(e,t,r,i,s){const o=[...Object.keys(t),...fp(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Ti(t[n],n,r,i))}}function T1(e){switch(e){case up:case h1:case c1:case u1:case dp:case a1:case b1:case k1:case y1:case x1:case C1:case n1:case cp:case d1:case s1:case l1:case hp:case o1:case p1:case f1:case g1:case m1:return!0;default:return!1}}function Tc(e){return w1(e)}function mn(e){return e!==null&&typeof e=="object"&&lp(e)==="[object Arguments]"}function yn(e){return typeof e=="object"&&e!==null}function _1(e){return yn(e)&&np(e)}function B1(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ks(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ks.Cache||Map),r}ks.Cache=Map;function v1(e){if(Cl(e))return e;if(Array.isArray(e)||pp(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return typeof AggregateError<"u"&&e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function L1(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=Js(s,a,i,new Map)}return s}function Js(e,t,r,i){if(Cl(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return v1(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)o in t||(t[o]=void 0)}const s=[...Object.keys(t),...fp(t)];for(let o=0;o<s.length;o++){const a=s[o];if(r1(a))continue;let n=t[a],l=e[a];if(mn(n)&&(n=Object.assign({},n)),mn(l)&&(l=Object.assign({},l)),bl(n)&&(n=Tc(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let p=0;p<d.length;p++){const f=d[p];h[f]=l[f]}l=h}else if(_1(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||yn(l)&&yn(n)&&(Wa(l)||Wa(n)||ds(l)||ds(n))?e[a]=Js(l,n,r,i):l==null&&Wa(n)?e[a]=Js({},n,r,i):l==null&&ds(n)?e[a]=Tc(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function A1(){}function F1(e,...t){return L1(e,...t,A1)}function _c(e){if(e==null)return!0;if(np(e))return typeof e.splice!="function"&&typeof e!="string"&&!bl(e)&&!ds(e)&&!mn(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return B1(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var E1="",M1={curveBasis:gn,curveBasisClosed:lk,curveBasisOpen:hk,curveBumpX:Fu,curveBumpY:Eu,curveBundle:ck,curveCardinalClosed:dk,curveCardinalOpen:uk,curveCardinal:Iu,curveCatmullRomClosed:pk,curveCatmullRomOpen:fk,curveCatmullRom:Pu,curveLinear:cs,curveLinearClosed:gk,curveMonotoneX:Hu,curveMonotoneY:Yu,curveNatural:ju,curveStep:Gu,curveStepAfter:Xu,curveStepBefore:Vu},O1=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,$1=u(function(e,t){const r=gp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);eu(a),i=re(i,[...a])}else i=r.args;if(!i)return;let s=Mo(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),gp=u(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${O1.source})(?=[}][%]{2}).*
|
|
162
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),tt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=ns.exec(e))!==null;)if(i.index===ns.lastIndex&&ns.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return tt.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),I1=u(function(e){return e.replace(ns,"")},"removeDirectives"),D1=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function kl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return M1[r]??t}u(kl,"interpolateToCurve");function mp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?t1.sanitizeUrl(r):r}u(mp,"formatUrl");var P1=u((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){tt.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Sl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}u(Sl,"distance");function yp(e){let t,r=0;e.forEach(s=>{r+=Sl(s,t),t=s});const i=r/2;return wl(e,i)}u(yp,"traverseEdge");function xp(e){return e.length===1?e[0]:yp(e)}u(xp,"calcLabelPosition");var Bc=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),wl=u((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Sl(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Bc((1-a)*r.x+a*s.x,5),y:Bc((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),R1=u((e,t,r)=>{tt.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=wl(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Cp(e,t,r){const i=structuredClone(r);tt.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=wl(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}u(Cp,"calcTerminalLabelPosition");function bp(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}u(bp,"getStylesFromArray");var vc=0,N1=u(()=>(vc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+vc),"generateId");function kp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}u(kp,"makeRandomHex");var q1=u(e=>kp(e.length),"random"),W1=u(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"),z1=u(function(e,t){const r=t.text.replace(bs.lineBreakRegex," "),[,i]=Do(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),H1=ks((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),bs.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Br(`${a} `,r),c=Br(o,r);if(l>t){const{hyphenatedStrings:p,remainingWord:f}=Y1(a,t,"-",r);s.push(o,...p),o=f}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Y1=ks((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(Br(c,i)>=t){const d=l+1,p=s.length===d,f=`${c}${r}`;o.push(p?c:f),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Sp(e,t){return Tl(e,t).height}u(Sp,"calculateTextHeight");function Br(e,t){return Tl(e,t).width}u(Br,"calculateTextWidth");var Tl=ks((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Do(r),a=["sans-serif",i],n=e.split(bs.lineBreakRegex),l=[],c=Ot("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=W1();x.text=y||E1;const C=z1(h,x).style("font-size",o).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),f=Math.round(b.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}l.push(m)}h.remove();const d=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;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),U1=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{u(this,"InitIDGenerator")}},Rs,j1=u(function(e){return Rs=Rs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Rs.innerHTML=e,unescape(Rs.textContent)},"entityDecode");function _l(e){return"str"in e}u(_l,"isDetailedError");function wp(e){return e instanceof Error?e.message:String(e)}u(wp,"getErrorMessage");var G1=u((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Do=u(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Bl(e,t){return F1({},e,t)}u(Bl,"cleanAndMerge");var Ie={assignWithDepth:re,wrapLabel:H1,calculateTextHeight:Sp,calculateTextWidth:Br,calculateTextDimensions:Tl,cleanAndMerge:Bl,detectInit:$1,detectDirective:gp,isSubstringInArray:D1,interpolateToCurve:kl,calcLabelPosition:xp,calcCardinalityPosition:R1,calcTerminalLabelPosition:Cp,formatUrl:mp,getStylesFromArray:bp,generateId:N1,random:q1,runFunc:P1,entityDecode:j1,insertTitle:G1,isLabelCoordinateInPath:Tp,parseFontSize:Do,InitIDGenerator:U1},V1=u(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),zr=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XL=u((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ie(e){return e??null}u(ie,"handleUndefinedAttr");function Tp(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}u(Tp,"isLabelCoordinateInPath");function vl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ai=vl();function _p(e){ai=e}var us={exec:()=>null};function Wt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(we.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var X1=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),we={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Z1=/^(?:[ \t]*(?:\n|$))+/,K1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Q1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,J1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ll=/(?:[*+-]|\d{1,9}[.)])/,Bp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,vp=Wt(Bp).replace(/bull/g,Ll).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(),t2=Wt(Bp).replace(/bull/g,Ll).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(),Al=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,e2=/^[^\n]+/,Fl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,r2=Wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),i2=Wt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ll).getRegex(),Po="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",El=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,s2=Wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",El).replace("tag",Po).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Lp=Wt(Al).replace("hr",Ss).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",Po).getRegex(),o2=Wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Lp).getRegex(),Ml={blockquote:o2,code:K1,def:r2,fences:Q1,heading:J1,hr:Ss,html:s2,lheading:vp,list:i2,newline:Z1,paragraph:Lp,table:us,text:e2},Lc=Wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Po).getRegex(),a2={...Ml,lheading:t2,table:Lc,paragraph:Wt(Al).replace("hr",Ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lc).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",Po).getRegex()},n2={...Ml,html:Wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",El).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:us,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wt(Al).replace("hr",Ss).replace("heading",` *#{1,6} *[^
|
|
163
|
+
]`).replace("lheading",vp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},l2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,h2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ap=/^( {2,}|\\)\n(?!\s*$)/,c2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ro=/[\p{P}\p{S}]/u,Ol=/[\s\p{P}\p{S}]/u,Fp=/[^\s\p{P}\p{S}]/u,d2=Wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ol).getRegex(),Ep=/(?!~)[\p{P}\p{S}]/u,u2=/(?!~)[\s\p{P}\p{S}]/u,p2=/(?:[^\s\p{P}\p{S}]|~)/u,f2=Wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",X1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,g2=Wt(Mp,"u").replace(/punct/g,Ro).getRegex(),m2=Wt(Mp,"u").replace(/punct/g,Ep).getRegex(),Op="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",y2=Wt(Op,"gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Ol).replace(/punct/g,Ro).getRegex(),x2=Wt(Op,"gu").replace(/notPunctSpace/g,p2).replace(/punctSpace/g,u2).replace(/punct/g,Ep).getRegex(),C2=Wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fp).replace(/punctSpace/g,Ol).replace(/punct/g,Ro).getRegex(),b2=Wt(/\\(punct)/,"gu").replace(/punct/g,Ro).getRegex(),k2=Wt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),S2=Wt(El).replace("(?:-->|$)","-->").getRegex(),w2=Wt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",S2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,T2=Wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",yo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$p=Wt(/^!?\[(label)\]\[(ref)\]/).replace("label",yo).replace("ref",Fl).getRegex(),Ip=Wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fl).getRegex(),_2=Wt("reflink|nolink(?!\\()","g").replace("reflink",$p).replace("nolink",Ip).getRegex(),Ac=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$l={_backpedal:us,anyPunctuation:b2,autolink:k2,blockSkip:f2,br:Ap,code:h2,del:us,emStrongLDelim:g2,emStrongRDelimAst:y2,emStrongRDelimUnd:C2,escape:l2,link:T2,nolink:Ip,punctuation:d2,reflink:$p,reflinkSearch:_2,tag:w2,text:c2,url:us},B2={...$l,link:Wt(/^!?\[(label)\]\((.*?)\)/).replace("label",yo).getRegex(),reflink:Wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yo).getRegex()},xn={...$l,emStrongRDelimAst:x2,emStrongLDelim:m2,url:Wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ac).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Wt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ac).getRegex()},v2={...xn,br:Wt(Ap).replace("{2,}","*").getRegex(),text:Wt(xn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ns={normal:Ml,gfm:a2,pedantic:n2},Ui={normal:$l,gfm:xn,breaks:v2,pedantic:B2},L2={"&":"&","<":"<",">":">",'"':""","'":"'"},Fc=e=>L2[e];function or(e,t){if(t){if(we.escapeTest.test(e))return e.replace(we.escapeReplace,Fc)}else if(we.escapeTestNoEncode.test(e))return e.replace(we.escapeReplaceNoEncode,Fc);return e}function Ec(e){try{e=encodeURI(e).replace(we.percentDecode,"%")}catch{return null}return e}function Mc(e,t){let r=e.replace(we.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(we.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(we.slashPipe,"|");return i}function ji(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function A2(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Oc(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function F2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
164
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
|
|
165
|
+
`)}var xo=class{options;rules;lexer;constructor(t){this.options=t||ai}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ji(i,`
|
|
166
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=F2(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=ji(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:ji(r[0],`
|
|
167
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ji(r[0],`
|
|
168
|
+
`).split(`
|
|
169
|
+
`),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
170
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
171
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
172
|
+
${h}`:h,o=o?`${o}
|
|
173
|
+
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=p,i.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
|
|
174
|
+
`+i.join(`
|
|
175
|
+
`),x=this.blockquote(y);a[a.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,o=o.substring(0,o.length-m.text.length)+x.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
|
|
176
|
+
`+i.join(`
|
|
177
|
+
`),x=this.list(y);a[a.length-1]=x,s=s.substring(0,s.length-f.raw.length)+x.raw,o=o.substring(0,o.length-m.raw.length)+x.raw,i=y.substring(a.at(-1).raw.length).split(`
|
|
178
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
|
|
179
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
180
|
+
`,1)[0],m=!p.trim(),y=0;if(this.options.pedantic?(y=2,d=p.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=p.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
181
|
+
`,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let F=t.split(`
|
|
182
|
+
`,1)[0],A;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),A=f):A=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||B.test(f)||L.test(f)||b.test(f)||S.test(f))break;if(A.search(this.rules.other.nonSpaceChar)>=y||!f.trim())d+=`
|
|
183
|
+
`+A.slice(y);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||B.test(p)||S.test(p))break;d+=`
|
|
184
|
+
`+f}!m&&!f.trim()&&(m=!0),h+=F+`
|
|
185
|
+
`,t=t.substring(F.length+1),p=A.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(C=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!x,checked:C,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(p=>p.type==="space"),d=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Mc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
186
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(Mc(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
187
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ji(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=A2(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Oc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return Oc(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,p=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ve=class Cn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ai,this.options.tokenizer=this.options.tokenizer||new xo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:we,block:Ns.normal,inline:Ui.normal};this.options.pedantic?(r.block=Ns.pedantic,r.inline=Ui.pedantic):this.options.gfm&&(r.block=Ns.gfm,this.options.breaks?r.inline=Ui.breaks:r.inline=Ui.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ns,inline:Ui}}static lex(t,r){return new Cn(r).lex(t)}static lexInline(t,r){return new Cn(r).inlineTokens(t)}lex(t){t=t.replace(we.carriageReturn,`
|
|
188
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(we.tabCharGlobal," ").replace(we.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
|
|
189
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+s.raw,a.text+=`
|
|
192
|
+
`+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+s.raw,a.text+=`
|
|
195
|
+
`+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+s.raw,a.text+=`
|
|
198
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+s.raw,a.text+=`
|
|
201
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Co=class{options;parser;constructor(t){this.options=t||ai}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(we.notSpaceStart)?.[0],o=t.replace(we.endingNewline,"")+`
|
|
202
|
+
`;return s?'<pre><code class="language-'+or(s)+'">'+(i?o:or(o,!0))+`</code></pre>
|
|
203
|
+
`:"<pre><code>"+(i?o:or(o,!0))+`</code></pre>
|
|
204
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
205
|
+
${this.parser.parse(t)}</blockquote>
|
|
206
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
207
|
+
`}hr(t){return`<hr>
|
|
208
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
209
|
+
`+s+"</"+o+`>
|
|
210
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+or(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
211
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
212
|
+
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
213
|
+
<thead>
|
|
214
|
+
`+r+`</thead>
|
|
215
|
+
`+s+`</table>
|
|
216
|
+
`}tablerow({text:t}){return`<tr>
|
|
217
|
+
${t}</tr>
|
|
218
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
219
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${or(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=Ec(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+or(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Ec(t);if(o===null)return or(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${or(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:or(t.text)}},Il=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Xe=class bn{options;renderer;textRenderer;constructor(t){this.options=t||ai,this.options.renderer=this.options.renderer||new Co,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Il}static parse(t,r){return new bn(r).parse(t)}static parseInline(t,r){return new bn(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
|
|
220
|
+
`+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},es=class{options;block;constructor(t){this.options=t||ai}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?Ve.lex:Ve.lexInline}provideParser(){return this.block?Xe.parse:Xe.parseInline}},E2=class{defaults=vl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Xe;Renderer=Co;TextRenderer=Il;Lexer=Ve;Tokenizer=xo;Hooks=es;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Co(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new xo(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new es;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];es.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&es.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await l.call(o,h);return c.call(o,p)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(o,h);return p===!1&&(p=await c.apply(o,h)),p})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ve.lex(t,r??this.defaults)}parser(t,r){return Xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)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 r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?Ve.lex:Ve.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?Xe.parse:Xe.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?Ve.lex:Ve.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?Xe.parse:Xe.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
221
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+or(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ri=new E2;function Yt(e,t){return ri.parse(e,t)}Yt.options=Yt.setOptions=function(e){return ri.setOptions(e),Yt.defaults=ri.defaults,_p(Yt.defaults),Yt};Yt.getDefaults=vl;Yt.defaults=ai;Yt.use=function(...e){return ri.use(...e),Yt.defaults=ri.defaults,_p(Yt.defaults),Yt};Yt.walkTokens=function(e,t){return ri.walkTokens(e,t)};Yt.parseInline=ri.parseInline;Yt.Parser=Xe;Yt.parser=Xe.parse;Yt.Renderer=Co;Yt.TextRenderer=Il;Yt.Lexer=Ve;Yt.lexer=Ve.lex;Yt.Tokenizer=xo;Yt.Hooks=es;Yt.parse=Yt;Yt.options;Yt.setOptions;Yt.use;Yt.walkTokens;Yt.parseInline;Xe.parse;Ve.lex;function Dp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var o=new RegExp(`
|
|
222
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
|
|
223
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
224
|
+
`)&&(d=String(n).split(`
|
|
225
|
+
`).map(function(p,f){return f===0?p:"".concat(h).concat(p)}).join(`
|
|
226
|
+
`)),a+=d+i[l+1]}),a}var kn=typeof performance<"u"&&typeof performance.now=="function",pi=u(()=>kn?performance.now():0,"now"),za="🧜 ",M2="Mermaid render",O2="Mermaid",$2={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{u(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();const r=pi();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(pi()-r)}}async tick(e,t){if(!this.enabled)return t();const r=pi();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(pi()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;const t={name:e,start:pi(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(t):this.roots.push(t),this.stack.push(t),kn&&typeof performance.mark=="function")try{performance.mark(`${za}${e} ▶`)}catch{}}end(){if(!this.enabled)return;const e=this.stack.pop();if(!e)return;const t=pi();if(e.duration=t-e.start,kn&&typeof performance.measure=="function")try{performance.measure(`${za}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:"track-entry",track:M2,trackGroup:O2,color:$2[e.name]??"primary",tooltipText:`${e.name} — ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}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(e=this.report(),t){if(!e)return;const r=e.duration,i=t&&t!==e.name?`${e.name} [${t}]`:e.name,s=["ms % phase"],o=u((n,l)=>{const c=" ".repeat(l),h=n.duration.toFixed(1).padStart(8),d=r>0?`${(n.duration/r*100).toFixed(0).padStart(3)}%`:" -";s.push(`${h} ${d} ${c}${n.name}`);for(const p of n.children)o(p,l+1);if(n.children.length>0){const p=n.children.reduce((m,y)=>m+y.duration,0),f=n.duration-p;if(f>.5){const m=f.toFixed(1).padStart(8);s.push(`${m} ${c} (self)`)}}},"walk");o(e,0);const a=Object.keys(this.buckets);if(a.length>0){s.push("—— buckets (summed) ——");for(const n of a)s.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${za}mermaid render profile · ${i}
|
|
227
|
+
${s.join(`
|
|
228
|
+
`)}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Pp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
229
|
+
`).replace(/\n{2,}/g,`
|
|
230
|
+
`);return Dp(i)}u(Pp,"preprocessMarkdown");function Rp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}u(Rp,"nonMarkdownToLines");function Np(e,t={}){const r=Pp(e,t),i=Yt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
231
|
+
`).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&s[o].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return u(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}u(Np,"markdownToLines");function qp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}u(qp,"nonMarkdownToHTML");function Wp(e,{markdownAutoWrap:t}={}){const r=Yt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(tt.warn(`Unsupported markdown: ${s.type}`),s.raw)}return u(i,"output"),r.map(i).join("")}u(Wp,"markdownToHTML");var I2=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(c){return setTimeout(c,16)};function i(){var c=this;c.reads=[],c.writes=[],c.raf=r.bind(e)}u(i,"FastDom"),i.prototype={constructor:i,runTasks:u(function(c){for(var h;h=c.shift();)h()},"runTasks"),measure:u(function(c,h){var d=h?c.bind(h):c;return this.reads.push(d),s(this),d},"measure"),mutate:u(function(c,h){var d=h?c.bind(h):c;return this.writes.push(d),s(this),d},"mutate"),clear:u(function(c){return a(this.reads,c)||a(this.writes,c)},"clear"),extend:u(function(c){if(typeof c!="object")throw new Error("expected object");var h=Object.create(this);return n(h,c),h.fastdom=this,h.initialize&&h.initialize(),h},"extend"),catch:null};function s(c){c.scheduled||(c.scheduled=!0,c.raf(o.bind(null,c)))}u(s,"scheduleFlush");function o(c){var h=c.writes,d=c.reads,p;try{t("flushing reads",d.length),c.runTasks(d),t("flushing writes",h.length),c.runTasks(h)}catch(f){p=f}if(c.scheduled=!1,(d.length||h.length)&&s(c),p)if(t("task errored",p.message),c.catch)c.catch(p);else throw p}u(o,"flush");function a(c,h){var d=c.indexOf(h);return!!~d&&!!c.splice(d,1)}u(a,"remove");function n(c,h){for(var d in h)h.hasOwnProperty(d)&&(c[d]=h[d])}u(n,"mixin");var l=e.fastdom=e.fastdom||new i;return l})(typeof window<"u"?window:globalThis),zp={initialize:u(function(){this._tasks=new Map},"initialize"),mutate:u(function(e,t){return Sn(this,"mutate",e,t)},"mutate"),measure:u(function(e,t){return Sn(this,"measure",e,t)},"measure"),clear:u(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function Sn(e,t,r,i){var s=e._tasks,o=e.fastdom,a,n=new Promise(function(l,c){a=o[t](function(){s.delete(n);try{l(i?r.call(i):r())}catch(h){c(h)}},i)});return s.set(n,a),n}u(Sn,"create");var{initialize:eA,mutate:rA,measure:iA,clear:sA}=zp,D2=zp,P2=I2.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(D2),ii=P2;function Hp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}u(Hp,"splitTextToChars");function Yp(e,t){const r=Hp(t.content);return Dl(e,[],r,t.type)}u(Yp,"splitWordToFitWidth");function Dl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Dl(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}u(Dl,"splitWordToFitWidthRecursion");function Up(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return bo(e,t)}u(Up,"splitLineToFitWidth");function bo(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return bo(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=Yp(t,o);r.push([n]),l.content&&e.unshift(l)}return bo(e,t,r)}u(bo,"splitLineToFitWidthRecursion");function wn(e,t){t&&e.attr("style",t)}u(wn,"applyStyle");var $c=16384;async function jp(e,t,r,i,s=!1,o=Gt(),a=0){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,$c)}px`),n.attr("height",`${Math.min(10*r,$c)}px`);const l=n.append("xhtml:div"),c=gs(t.label)?await cu(t.label.replace(bs.lineBreakRegex,`
|
|
233
|
+
`),o):ze(t.label,o),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(c),wn(d,t.labelStyle),d.attr("class",`${h} ${i}`),wn(l,t.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"),s&&l.attr("class","labelBkg");const p=await ii.measure(()=>l.node().getBoundingClientRect());return p.width===r?(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")):p.width<a&&(l.style("display","table"),l.style("width",a+"px"),l.style("text-align","center")),n.node()}u(jp,"addHtmlSpan");function No(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}u(No,"createTspan");function Gp(e,t,r){const i=e.append("text"),s=No(i,1,t);qo(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}u(Gp,"computeWidthOfText");function R2(e,t,r){const i=e.append("text"),s=No(i,1,t);qo(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}u(R2,"computeDimensionOfText");function Vp(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=u(f=>Gp(a,1.1,f)<=e,"checkWidth"),p=d(h)?[h]:Up(h,d);for(const f of p){const m=No(l,c,1.1,s);qo(m,f),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}u(Vp,"createFormattedText");function Tn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}u(Tn,"decodeHTMLEntities");function qo(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(Tn(r.content)):s.text(" "+Tn(r.content))})}u(qo,"updateTextContentAndStyles");async function Xp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await ap(n)?await oi(n,void 0,{class:"label-icon"}):`<i class='${ze(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}u(Xp,"replaceIconSubstring");var De=u(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,minWidth:c=0,addSvgBackground:h=!1}={},d)=>{if(tt.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",h),o){const p=a?Wp(t,d):qp(t),f=await Xp(zr(p),d),m=t.replace(/\\\\/g,"\\"),y={isNode:n,label:gs(t)?m:f,labelStyle:r.replace("fill:","color:")};return await jp(e,y,l,s,h,d,c)}else{const p=zr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?Np(p.replace("<br>","<br/>"),d):Rp(p),m=Vp(l,e,f,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ot(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ot(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ot(m).select("text").attr("style",x)}return i?Ot(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ot(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText");function Ha(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function N2(e,t){return e[0]===t[0]&&e[1]===t[1]}function q2(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Ha(c,n,s);const l=(function(c,h,d){const p=[];for(const b of c){const S=[...b];N2(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&p.push(S)}const f=[];h=Math.max(h,.1);const m=[];for(const b of p)for(let S=0;S<b.length-1;S++){const _=b[S],B=b[S+1];if(_[1]!==B[1]){const L=Math.min(_[1],B[1]);m.push({ymin:L,ymax:Math.max(_[1],B[1]),x:L===_[1]?_[0]:B[0],islope:(B[0]-_[0])/(B[1]-_[1])})}}if(m.sort(((b,S)=>b.ymin<S.ymin?-1:b.ymin>S.ymin?1:b.x<S.x?-1:b.x>S.x?1:b.ymax===S.ymax?0:(b.ymax-S.ymax)/Math.abs(b.ymax-S.ymax))),!m.length)return f;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let S=0;S<m.length&&!(m[S].ymin>x);S++)b=S;m.splice(0,b+1).forEach((S=>{y.push({s:x,edge:S})}))}if(y=y.filter((b=>!(b.edge.ymax<=x))),y.sort(((b,S)=>b.edge.x===S.edge.x?0:(b.edge.x-S.edge.x)/Math.abs(b.edge.x-S.edge.x))),(d!==1||C%h==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const S=b+1;if(S>=y.length)break;const _=y[b].edge,B=y[S].edge;f.push([[Math.round(_.x),x],[Math.round(B.x),x]])}x+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return f})(a,o,i);if(s){for(const c of a)Ha(c,n,-s);(function(c,h,d){const p=[];c.forEach((f=>p.push(...f))),Ha(p,h,d)})(l,n,-s)}return l}function ws(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),q2(e,s,i,o||1)}class Pl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ws(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Wo(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class W2 extends Pl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ws(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)Wo([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class z2 extends Pl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class H2{constructor(t){this.helper=t}fillPolygons(t,r){const i=ws(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=Wo(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,p=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=f+d+m*s,x=p-a+2*Math.random()*a,C=y-a+2*Math.random()*a,b=this.helper.ellipse(x,C,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Y2{constructor(t){this.helper=t}fillPolygons(t,r){const i=ws(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=Wo(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const p=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let f=0;f<l;f++){const m=f*(i+s),y=m+i,x=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)],C=[h[0]+y*Math.cos(p)+c*Math.cos(p),h[1]+y*Math.sin(p)+c*Math.sin(p)];o.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),o}}class U2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=ws(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=Wo(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,f=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],C=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const ve={};class j2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const G2=0,Ya=1,Ic=2,qs={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 Ua(e,t){return e.type===t}function Rl(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:G2,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ya,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Ic,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!Ua(o,Ic);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Rl("M0,0"+e);s++,a=qs[o.text],i=o.text}else Ua(o,Ya)?a=qs[i]:(s++,a=qs[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!Ua(c,Ya))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof qs[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Zp(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Kp(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=s+(s-l)):(d=i,p=s),t.push({key:"C",data:[d,p,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,p]=h;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=s+(s-l)):(f=i,m=s);const y=i+2*(f-i)/3,x=s+2*(m-s)/3,C=d+2*(f-d)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[y,x,C,b,d,p]}),n=f,l=m,i=d,s=p;break}case"Q":{const[d,p,f,m]=h,y=i+2*(d-i)/3,x=s+2*(p-s)/3,C=f+2*(d-f)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[y,x,C,b,f,m]}),n=d,l=p,i=f,s=m;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),f=h[2],m=h[3],y=h[4],x=h[5],C=h[6];d===0||p===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(Qp(i,s,x,C,d,p,f,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function Gi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Qp(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let p=[],f=0,m=0,y=0,x=0;if(c)[f,m,y,x]=c;else{[e,t]=Gi(e,t,-h),[r,i]=Gi(r,i,-h);const O=(e-r)/2,E=(t-i)/2;let M=O*O/(s*s)+E*E/(o*o);M>1&&(M=Math.sqrt(M),s*=M,o*=M);const v=s*s,q=o*o,z=v*q-v*E*E-q*O*O,I=v*E*E+q*O*O,X=(n===l?-1:1)*Math.sqrt(Math.abs(z/I));y=X*s*E/o+(e+r)/2,x=X*-o*O/s+(t+i)/2,f=Math.asin(parseFloat(((t-x)/o).toFixed(9))),m=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),l&&f>m&&(f-=2*Math.PI),!l&&m>f&&(m-=2*Math.PI)}let C=m-f;if(Math.abs(C)>120*Math.PI/180){const O=m,E=r,M=i;m=l&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=Qp(r=y+s*Math.cos(m),i=x+o*Math.sin(m),E,M,s,o,a,0,l,[m,O,y,x])}C=m-f;const b=Math.cos(f),S=Math.sin(f),_=Math.cos(m),B=Math.sin(m),L=Math.tan(C/4),F=4/3*s*L,A=4/3*o*L,H=[e,t],R=[e+F*S,t-A*b],$=[r+F*B,i-A*_],G=[r,i];if(R[0]=2*H[0]-R[0],R[1]=2*H[1]-R[1],c)return[R,$,G].concat(p);{p=[R,$,G].concat(p);const O=[];for(let E=0;E<p.length;E+=3){const M=Gi(p[E][0],p[E][1],h),v=Gi(p[E+1][0],p[E+1][1],h),q=Gi(p[E+2][0],p[E+2][1],h);O.push([M[0],M[1],v[0],v[1],q[0],q[1]])}return O}}const V2={randOffset:function(e,t){return At(e,t)},randOffsetWithRange:function(e,t,r){return ko(e,t,r)},ellipse:function(e,t,r,i,s){const o=tf(r,i,s);return _n(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Hr(e,t,r,i,s,!0)}};function Jp(e,t,r,i,s){return{type:"path",ops:Hr(e,t,r,i,s)}}function to(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Hr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Hr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Jp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function X2(e,t,r,i,s){return(function(o,a){return to(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Dc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ws(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ws(r[0],1.5*(1+.22*t.roughness),Nc(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ws(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ws(a,1.5*(1+.22*t.roughness),Nc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function tf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=At(a*l,r),n+=At(n*l,r),{increment:o,rx:a,ry:n}}function _n(e,t,r,i){const[s,o]=qc(i.increment,e,t,i.rx,i.ry,1,i.increment*ko(.1,ko(.4,1,r),r),r);let a=So(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=qc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=So(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Pc(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=At(.01*d,l),p+=At(.01*p,l);let f=s,m=o;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(m-f)/2),C=Wc(x,c,h,d,p,f,m,1,l);if(!l.disableMultiStroke){const b=Wc(x,c,h,d,p,f,m,1.5,l);C.push(...b)}return a&&(n?C.push(...Hr(c,h,c+d*Math.cos(f),h+p*Math.sin(f),l),...Hr(c,h,c+d*Math.cos(m),h+p*Math.sin(m),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(f),h+p*Math.sin(f)]})),{type:"path",ops:C}}function Rc(e,t){const r=Kp(Zp(Rl(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Hr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,p,f]=n;i.push(...Z2(l,c,h,d,p,f,o,t)),o=[p,f];break}case"Z":i.push(...Hr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function ja(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+At(s,t),i[0][1]+At(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+At(s,t),i[a][1]+At(s,t)]})}}return{type:"fillPath",ops:r}}function fi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ve[s])switch(s){case"zigzag":ve[s]||(ve[s]=new W2(i));break;case"cross-hatch":ve[s]||(ve[s]=new z2(i));break;case"dots":ve[s]||(ve[s]=new H2(i));break;case"dashed":ve[s]||(ve[s]=new Y2(i));break;case"zigzag-line":ve[s]||(ve[s]=new U2(i));break;default:s="hachure",ve[s]||(ve[s]=new Pl(i))}return ve[s]})(t,V2).fillPolygons(e,t)}function Nc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ef(e){return e.randomizer||(e.randomizer=new j2(e.seed||0)),e.randomizer.next()}function ko(e,t,r,i=1){return r.roughness*i*(ef(r)*(t-e)+e)}function At(e,t,r=1){return ko(-e,e,t,r)}function Hr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Bn(e,t,r,i,s,!0,!1);if(a)return n;const l=Bn(e,t,r,i,s,!0,!0);return n.concat(l)}function Bn(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,p=.2+.2*ef(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=At(f,s,c),m=At(m,s,c);const y=[],x=()=>At(d,s,c),C=()=>At(h,s,c),b=s.preserveVertices;return a?y.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):y.push({op:"move",data:[e+(b?0:At(h,s,c)),t+(b?0:At(h,s,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*p+x(),m+t+(i-t)*p+x(),f+e+2*(r-e)*p+x(),m+t+2*(i-t)*p+x(),r+(b?0:x()),i+(b?0:x())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*p+C(),m+t+(i-t)*p+C(),f+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),y}function Ws(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+At(t,r),e[0][1]+At(t,r)]),i.push([e[0][0]+At(t,r),e[0][1]+At(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+At(t,r),e[s][1]+At(t,r)]),s===e.length-1&&i.push([e[s][0]+At(t,r),e[s][1]+At(t,r)]);return So(i,null,r)}function So(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Bn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function qc(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=At(.5,n)-Math.PI/2;c.push([At(o,n)+t+.9*i*Math.cos(h-e),At(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const f=[At(o,n)+t+i*Math.cos(p),At(o,n)+r+s*Math.sin(p)];l.push(f),c.push(f)}c.push([At(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),At(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([At(o,n)+t+.98*i*Math.cos(h+a),At(o,n)+r+.98*s*Math.sin(h+a)]),c.push([At(o,n)+t+.9*i*Math.cos(h+.5*a),At(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function Wc(e,t,r,i,s,o,a,n,l){const c=o+At(.1,l),h=[];h.push([At(n,l)+t+.9*i*Math.cos(c-e),At(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([At(n,l)+t+i*Math.cos(d),At(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),So(h,null,l)}function Z2(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let f=0;f<d;f++)f===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(p?0:At(c[0],n)),a[1]+(p?0:At(c[0],n))]}),h=p?[s,o]:[s+At(c[f],n),o+At(c[f],n)],l.push({op:"bcurveTo",data:[e+At(c[f],n),t+At(c[f],n),r+At(c[f],n),i+At(c[f],n),h[0],h[1]]});return l}function Vi(e){return[...e]}function zc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Vi(e[0]),Vi(e[1]),Vi(e[2]),Vi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Vi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function eo(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function K2(e,t,r){const i=eo(t,r);if(i===0)return eo(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),eo(e,Qr(t,r,s))}function Qr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function vn(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],p=n[l+3];let f=3*h[0]-2*c[0]-p[0];f*=f;let m=3*h[1]-2*c[1]-p[1];m*=m;let y=3*d[0]-2*p[0]-c[0];y*=y;let x=3*d[1]-2*p[1]-c[1];return x*=x,f<y&&(f=y),m<x&&(m=x),f+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(eo(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],p=Qr(l,c,.5),f=Qr(c,h,.5),m=Qr(h,d,.5),y=Qr(p,f,.5),x=Qr(f,m,.5),C=Qr(y,x,.5);vn([l,p,y,C],0,r,s),vn([C,x,m,d],0,r,s)}var o,a;return s}function Q2(e,t){return wo(e,0,e.length,t)}function wo(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=K2(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(wo(e,t,c+1,i,o),wo(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Ga(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)vn(e,3*o,t,i);return r&&r>0?wo(i,0,i.length,r):i}const Me="none";class To{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[Jp(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=X2(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(ja([c],a)):n.push(fi([c],a))}return a.stroke!==Me&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=tf(i,s,a),c=_n(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=_n(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(fi([c.estimatedPoints],a));return a.stroke!==Me&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[to(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=Pc(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const f=Pc(t,r,i,s,o,a,!0,!1,p);f.type="fillPath",h.push(f)}else h.push((function(p,f,m,y,x,C,b){const S=p,_=f;let B=Math.abs(m/2),L=Math.abs(y/2);B+=At(.01*B,b),L+=At(.01*L,b);let F=x,A=C;for(;F<0;)F+=2*Math.PI,A+=2*Math.PI;A-F>2*Math.PI&&(F=0,A=2*Math.PI);const H=(A-F)/b.curveStepCount,R=[];for(let $=F;$<=A;$+=H)R.push([S+B*Math.cos($),_+L*Math.sin($)]);return R.push([S+B*Math.cos(A),_+L*Math.sin(A)]),R.push([S,_]),fi([R],b)})(t,r,i,s,o,a,c));return c.stroke!==Me&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=Dc(t,i);if(i.fill&&i.fill!==Me)if(i.fillStyle==="solid"){const a=Dc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Ga(zc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Ga(zc(c),10,(1+i.roughness)/2))}a.length&&s.push(fi([a],i))}return i.stroke!==Me&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=to(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ja([t],i)):s.push(fi([t],i))),i.stroke!==Me&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Me,a=i.stroke!==Me,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,p){const f=Kp(Zp(Rl(h))),m=[];let y=[],x=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Ga(C,d)),C=[]},S=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of f)switch(B){case"M":S(),x=[L[0],L[1]],y.push(x);break;case"L":b(),y.push([L[0],L[1]]);break;case"C":if(!C.length){const F=y.length?y[y.length-1]:x;C.push([F[0],F[1]])}C.push([L[0],L[1]]),C.push([L[2],L[3]]),C.push([L[4],L[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(S(),!p)return m;const _=[];for(const B of m){const L=Q2(B,p);L.length&&_.push(L)}return _})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Rc(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Rc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(ja(l,i));else s.push(fi(l,i));return a&&(n?l.forEach((h=>{s.push(to(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Me};break;case"fillPath":a={d:this.opsToPath(o),stroke:Me,strokeWidth:0,fill:i.fill||Me};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Me,strokeWidth:i,fill:Me}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class J2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new To(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const zs="http://www.w3.org/2000/svg";class tS{constructor(t,r){this.svg=t,this.gen=new To(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(zs,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(zs,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(zs,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(zs,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var pt={canvas:(e,t)=>new J2(e,t),svg:(e,t)=>new tS(e,t),generator:e=>new To(e),newSeed:()=>To.newSeed()},eS=1,rS=3;async function Nl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ql(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=$t().fontSize?$t().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=zn.fontSize]=Do(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}u(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}u(Nl,"configureLabelImages");function ql(e){return e.nodeType===rS?e.textContent?.trim()!=="":e.nodeType!==eS||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ql)}u(ql,"hasTextBesidesImages");var Hc=3,iS=32,sS=u(async(e,t,r)=>{const i=$t(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",ie(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(C=>({text:C,cssClass:"c4-descr"}))].filter(C=>C.text),l=t.width?Math.max(t.width-2*(t.padding??0),iS):$t().flowchart?.wrappingWidth??200,h=i.c4?.wrap??!0?l:Number.POSITIVE_INFINITY,d=await Promise.all(n.map(async C=>{const b=o.append("g").attr("class",C.cssClass),S=await De(b,ze(zr(C.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Ot(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Ot(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:b,box:b.node().getBBox()}})),p=Math.max(...d.map(({box:C})=>C.width),0);let f=0;for(const{el:C,box:b}of d)C.attr("transform",`translate(${p/2-b.x-b.width/2}, ${f-b.y})`),f+=b.height+Hc;const m=d.length>0?f-Hc:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-p/2}, ${-m/2})`);const y=o.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:o}},"c4LabelHelper"),Yc=u((e,t)=>{const{x:r,y:i,width:s,height:o}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:o,top:i,left:r,bottom:i+o,right:r+t,toJSON:u(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:o}},"withMinWidth"),bt=u(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{if(t.stereotype!==void 0)return sS(e,t,r);let s;const o=t.useHtmlLabels||dr($t()?.htmlLabels);r?s=r:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",ie(t.labelStyle));let l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,h=t.labelType==="markdown",d=l&&!t.width&&!i?t.minWidth??0:0,p=await De(n,ze(zr(l),$t()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||$t().flowchart?.wrappingWidth,minWidth:d,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:h},$t()),f=(t?.padding??0)/2;let m;if(o){const y=p.children[0],x=Ot(p);await Nl(y),m=await ii.measure(()=>y.getBoundingClientRect()),m=Yc(m,d),x.attr("width",m.width),x.attr("height",m.height)}else m=await ii.measure(()=>p.getBBox()),m=Yc(m,d);return o?n.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):n.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:m,halfPadding:f,label:n}},"labelHelper"),ti=u(async(e,t,r)=>{const i=r.useHtmlLabels??le($t()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await De(s,ze(zr(t),$t()),{useHtmlLabels:i,width:r.width||$t()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(le($t())){const l=o.children[0],c=Ot(o);n=await ii.measure(()=>l.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await ii.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),gt=u((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Nt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}u(Nt,"createPathFromPoints");function Yr(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,p=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*l,x=p+s*Math.sin(d*(y-e));a.push({x:y,y:x})}return a}u(Yr,"generateFullSineWavePoints");function lr(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,f=e+r*Math.cos(p),m=t+r*Math.sin(p);a.push({x:-f,y:-m})}return a}u(lr,"generateCirclePoints");function Ln(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=u((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}u(Ln,"mergePaths");var rf=Symbol("lineIntersectionOrigin"),oS=u((e,t)=>({...e,[rf]:t}),"withLineIntersectionOrigin"),Wl=u((e,t)=>e?.[rf]??t,"getLineIntersectionOrigin");function sf(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&An(n,l))return;const h=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,f=h*e.x+d*e.y+p,m=h*t.x+d*t.y+p;if(Math.abs(f)<c&&Math.abs(m)<c&&An(f,m))return;const y=s*d-h*o;if(y===0)return;const x=(o*p-d*a)/y,C=(h*a-s*p)/y;return{x,y:C}}}u(sf,"intersectLine");function An(e,t){return e*t>0}u(An,"sameSign");var aS=sf;function of(e,t,r){let i=e.x,s=e.y;const o=Wl(r,e);let a=[],n=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){n=Math.min(n,d.x),l=Math.min(l,d.y)}):(n=Math.min(n,t.x),l=Math.min(l,t.y));let c=i-e.width/2-n,h=s-e.height/2-l;for(let d=0;d<t.length;d++){let p=t[d],f=t[d<t.length-1?d+1:0],m=aS(o,r,{x:c+p.x,y:h+p.y},{x:c+f.x,y:h+f.y});m&&a.push(m)}return a.length?(a.length>1&&a.sort(function(d,p){let f=d.x-r.x,m=d.y-r.y,y=Math.sqrt(f*f+m*m),x=p.x-r.x,C=p.y-r.y,b=Math.sqrt(x*x+C*C);return y<b?-1:y===b?0:1}),a[0]):e}u(of,"intersectPolygon");var af=of,nS=u((e,t)=>{if(Wl(t,e)!==e)return af(e,[{x:0,y:0},{x:e.width,y:0},{x:e.width,y:e.height},{x:0,y:e.height}],t);var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Lr=nS;function nf(e,t){return e.intersect(t)}u(nf,"intersectNode");var lS=nf;function lf(e,t,r,i){var s=e.x,o=e.y;const a=Wl(i,e);if(a!==e){const p=a.x-s,f=a.y-o,m=i.x-a.x,y=i.y-a.y,x=t*t,C=r*r,b=m*m/x+y*y/C,S=2*p*m/x+2*f*y/C,_=p*p/x+f*f/C-1,B=S*S-4*b*_;if(b>0&&B>=0){const L=Math.sqrt(B),F=[(-S-L)/(2*b),(-S+L)/(2*b)].filter(A=>A>=0&&A<=1).sort((A,H)=>H-A);if(F.length){const A=F[0];return{x:a.x+A*m,y:a.y+A*y}}}}var n=s-i.x,l=o-i.y,c=Math.sqrt(t*t*l*l+r*r*n*n),h=Math.abs(t*r*n/c);i.x<s&&(h=-h);var d=Math.abs(t*r*l/c);return i.y<o&&(d=-d),{x:s+h,y:o+d}}u(lf,"intersectEllipse");var hf=lf;function cf(e,t,r){return hf(e,t,t,r)}u(cf,"intersectCircle");var hS=cf,ct={node:lS,circle:hS,ellipse:hf,polygon:af,rect:Lr},Pe=u((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),cS=u(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=$t(),n=le(a);return await De(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),kr=cS;function df(e,t){const{labelStyles:r}=ut(t);t.labelStyle=r;const i=xt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=pt.svg(o),c=dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",ie(n)),gt(t,d),t.intersect=function(p){return tt.info("Circle intersect",t,a,p),ct.circle(t,a,p)},o}u(df,"anchor");function Fn(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,f=d/s,m=p/o,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*o*Math.sin(h)*(a?-1:1),b=c-x*s*Math.cos(h)*(a?-1:1),S=Math.atan2((t-b)/o,(e-C)/s);let B=Math.atan2((i-b)/o,(r-C)/s)-S;a&&B<0&&(B+=2*Math.PI),!a&&B>0&&(B-=2*Math.PI);const L=[];for(let F=0;F<20;F++){const A=F/19,H=S+A*B,R=C+s*Math.cos(H),$=b+o*Math.sin(H);L.push({x:R,y:$})}return L}u(Fn,"generateArcPoints");function uf(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}u(uf,"calculateArcSagitta");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=u(H=>H+a,"calcTotalHeight"),l=u(H=>{const R=H/2;return[R/(2.5+H/50),R]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await bt(e,t,xt(t)),d=n(t?.height?t?.height:h.height),[p,f]=l(d),m=uf(d,p,f),x=(t?.width?t?.width:h.width)+o*2+m-m,C=d,{cssStyles:b}=t,S=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...Fn(-x/2,-C/2,-x/2,C/2,p,f,!1),{x:x/2,y:C/2},...Fn(x/2,C/2,x/2,-C/2,p,f,!0)],_=pt.svg(c),B=dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=Nt(S),F=_.path(L,B),A=c.insert(()=>F,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${p/2}, 0)`),gt(t,A),t.intersect=function(H){return ct.polygon(t,S,H)},c}u(pf,"bowTieRect");async function ff(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await bt(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),p=Math.max(a.height+c*2+d,t.height??0),f=-p/2+d,m=p/2,y=h*.72,x=[`M${-h/2},${f}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${h/2},${f}`,`A${h/2},${d} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:C}=t,b=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const A=pt.svg(o).path(x,dt(t,{}));b.node()?.appendChild(A),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),gt(t,b);const S=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const _=12,B=u((F,A,H)=>Array.from({length:_+1},(R,$)=>{const G=Math.PI-$*Math.PI/_;return{x:F*Math.cos(G),y:A+H*d*Math.sin(G)}}),"arc"),L=[...B(h/2,f,-1),...B(y/2,m,1).reverse()];return t.intersect=function(F){return ct.polygon(t,L,F)},o}u(ff,"bucket");var Uc=20,jc=8,dS=80,uS=8;function gf(e){const{themeVariables:t}=$t(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:uS,fill:r,stroke:i,cssClass:"collapsed-group"}}}u(gf,"getCollapsedStyle");async function mf(e,t){const r=gf(t.metadata?.containerType),{fill:i,stroke:s}=r,{nodeStyles:o}=ut(t),{shapeSvg:a,bbox:n}=await bt(e,t,xt(t)),{theme:l,themeVariables:c}=$t();Ue(a,t.colorIndex,l,c.borderColorArray);const h=t.padding??8,d=n.height,p=Math.max(n.width+h*2,dS,t?.width??0),f=Math.max(d+jc+Uc+h*2,t?.height??0),m=-p/2,y=-f/2,x=-28/2,C=a.select(".label");C&&(t.useHtmlLabels??le($t())?C.attr("transform",`translate(${-n.width/2}, ${-n.height/2+x})`):C.attr("transform",`translate(0, ${-n.height/2+x})`));let b;if(t.look==="handDrawn"){const F=pt.svg(a),A=dt(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),H=F.path(Pe(m,y,p,f,r.rx),A);b=a.insert(()=>H,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ie(t.cssStyles))}else b=a.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",o).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",p).attr("height",f).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const S=y+h+d+jc;a.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",S).attr("x2",m+p-8).attr("y2",S).attr("stroke",s).attr("stroke-dasharray","3, 3");const _=S+Uc/2,B=2.5,L=10;for(let F=-1;F<=1;F++)a.append("circle").attr("class","collapsed-indicator").attr("cx",F*L).attr("cy",_).attr("r",B).attr("fill",s);return gt(t,b),t.calcIntersect=function(F,A){return ct.rect(F,A)},t.intersect=function(F){return ct.rect(t,F)},a}u(mf,"collapsedGroup");function ur(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}u(ur,"insertPolygonShape");var pS=["right","left","up","down"],zl="point",fS=u(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),gS=u(e=>pS.filter(t=>e.has(t)).join("|")||zl,"getDirectionKey"),Gc={"right|left|up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":u(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":u(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":u(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":u(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":u(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:u(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[zl]:()=>[{x:0,y:0}]},mS=u((e,t,r,i)=>{const s=fS(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=gS(s);return(Gc[c]??Gc[zl])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function yf(e,t){const r=t,{shapeSvg:i,bbox:s}=await bt(e,r,xt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,p=mS(r.directions??[],s,r,d),f=ur(i,d,a,p);return f.attr("style",r.style??null),gt(r,f),r.intersect=function(m){return ct.polygon(r,p,m)},i}u(yf,"block_arrow");async function xf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await bt(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=18,d=12,p=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=pt.svg(o).path(Pe(-p/2,m,p,f,d),dt(t,{}));x.node()?.appendChild(S),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);x.append("line").attr("x1",-p/2).attr("y1",m+h).attr("x2",p/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let b=0;b<3;b++)x.append("circle").attr("cx",-p/2+12+b*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",m+4).attr("width",Math.max(p-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),gt(t,x);const C=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return ct.rect(t,b)},o}u(xf,"browser");var Hs=12;async function Cf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Hs),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,p=c,f=-h,m=0,y=[{x:d+Hs,y:f},{x:p,y:f},{x:p,y:m},{x:d,y:m},{x:d,y:f+Hs},{x:d+Hs,y:f}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=pt.svg(n),S=dt(t,{}),_=Nt(y),B=b.path(_,S);x=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=ur(n,c,h,y);return i&&x.attr("style",i),gt(t,x),t.intersect=function(b){return ct.polygon(t,y,b)},n}u(Cf,"card");function bf(e,t){const{nodeStyles:r}=ut(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=pt.svg(i),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Nt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return ct.polygon(t,a,p)},i}u(bf,"choice");async function Hl(e,t,r){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await bt(e,t,xt(t),{ignoreMinWidth:!0}),l=16,c=r?.padding??n,h=Math.sqrt(a.width**2+a.height**2)/2,d=t.look==="neo"?h+l:h+c;let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=dt(t,{}),x=m.circle(0,0,d*2,y);p=o.insert(()=>x,":first-child"),p.attr("class","basic label-container").attr("style",ie(f))}else p=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",d).attr("cx",0).attr("cy",0);return gt(t,p),t.calcIntersect=function(m,y){const x=m.width/2;return ct.circle(m,x,y)},t.intersect=function(m){return tt.info("Circle intersect",t,d,m),ct.circle(t,d,m)},o}u(Hl,"circle");async function kf(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await bt(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,d=r.positioned?-c/2:-o.width/2-a,p=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",p).attr("width",c).attr("height",h),gt(r,n),r.intersect=function(f){return ct.rect(r,f)},s}u(kf,"composite");async function Sf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await bt(e,t,xt(t)),l=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,h=20,d=12,p=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+h,t.height??0),m=-f/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const S=pt.svg(o).path(Pe(-p/2,m,p,f,d),dt(t,{}));x.node()?.appendChild(S),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",f).attr("rx",d).attr("ry",d).attr("style",s);x.append("text").attr("x",-p/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),gt(t,x);const C=m+h+(f-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return ct.rect(t,b)},o}u(Sf,"consoleWindow");function wf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
|
|
234
|
+
M ${s.x},${s.y} L ${a.x},${a.y}`}u(wf,"createLine");function Tf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=pt.svg(s),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=wf(o),d=n.path(h,l),p=s.insert(()=>c,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),gt(t,p),t.intersect=function(f){return tt.info("crossedCircle intersect",t,{radius:o,point:f}),ct.circle(t,o,f)},s}u(Tf,"crossedCircle");function xr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,f=e+r*Math.cos(p),m=t+r*Math.sin(p);a.push({x:-f,y:-m})}return a}u(xr,"generateCirclePoints");async function _f(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:p}=t,f=[...xr(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...xr(c/2+d*2,-d,d,20,-180,-270),...xr(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...xr(c/2,h/2,d,20,0,90)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...xr(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...xr(c/2+c*.1,-d,d,20,-180,-270),...xr(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...xr(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],y=pt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Nt(f).replace("Z",""),S=y.path(b,x),_=Nt(m),B=y.path(_,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-o.height/2-(o.y-(o.top??0))})`),gt(t,L),t.intersect=function(F){return ct.polygon(t,m,F)},s}u(_f,"curlyBraceLeft");function Cr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,f=e+r*Math.cos(p),m=t+r*Math.sin(p);a.push({x:f,y:m})}return a}u(Cr,"generateCirclePoints");async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,f=[...Cr(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Cr(c/2+d*2,-d,d,20,-180,-270),...Cr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Cr(c/2,h/2,d,20,0,90)],m=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Cr(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Cr(c/2+d*2,-d,d,20,-180,-270),...Cr(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Cr(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],y=pt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Nt(f).replace("Z",""),S=y.path(b,x),_=Nt(m),B=y.path(_,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${-o.height/2-(o.y-(o.top??0))})`),gt(t,L),t.intersect=function(F){return ct.polygon(t,m,F)},s}u(Bf,"curlyBraceRight");function de(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*h,f=e+r*Math.cos(p),m=t+r*Math.sin(p);a.push({x:-f,y:-m})}return a}u(de,"generateCirclePoints");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:p}=t,f=[...de(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...de(c/2+d*2,-d,d,20,-180,-270),...de(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...de(c/2,h/2,d,20,0,90)],m=[...de(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...de(-c/2-d/2,-d,d,20,0,90),...de(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...de(-c/2+d+d/2,h/2,d,30,-180,-270)],y=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...de(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...de(c/2+d*2,-d,d,20,-180,-270),...de(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...de(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...de(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...de(-c/2-d/2,-d,d,20,0,90),...de(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...de(-c/2+d+d/2,h/2,d,30,-180,-270)],x=pt.svg(s),C=dt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=Nt(f).replace("Z",""),_=x.path(S,C),L=Nt(m).replace("Z",""),F=x.path(L,C),A=Nt(y),H=x.path(A,{...C}),R=s.insert("g",":first-child");return R.insert(()=>H,":first-child").attr("stroke-opacity",0),R.insert(()=>_,":first-child"),R.insert(()=>F,":first-child"),R.attr("class","text"),p&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${-o.height/2-(o.y-(o.top??0))})`),gt(t,R),t.intersect=function($){return ct.polygon(t,y,$)},s}u(vf,"curlyBraces");async function Lf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await bt(e,t,xt(t)),d=Math.max(l,h.height+a*2,t?.height??0),p=d/2,f=p-Math.sqrt(Math.max(0,p**2-(h.height/2)**2)),m=Math.max(d/4,f),y=Math.max(n,h.width+o*2+m*2,(h.width+o*2)*1.25,t?.width??0),{cssStyles:x}=t,C=pt.svg(c),b=dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=y,_=d,B=S-p,L=_/4,F=[{x:B,y:0},{x:L,y:0},{x:0,y:_/2},{x:L,y:_},{x:B,y:_},...lr(-B,-_/2,p,50,270,90)],A=Nt(F),H=C.path(A,b),R=c.insert(()=>H,":first-child");return R.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",i),R.attr("transform",`translate(${-y/2}, ${-d/2})`),gt(t,R),t.intersect=function($){return ct.polygon(t,F,$)},c}u(Lf,"curvedTrapezoid");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),p=Math.min(l*.177,d*.45),f=d+2*c-h,m=-f/2,y=m+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const A=pt.svg(s),H=dt(t,{}),R=A.path(Pe(-l/2,y,l,d,p),H),$=A.circle(0,m+c,c*2,H);x.insert(()=>$,":first-child"),x.insert(()=>R,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",d).attr("rx",p).attr("ry",p).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);gt(t,x);const b=y+d/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`);const S=m+c,_=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,F=[...lr(0,-S,c,24,180+_,-_),...lr(-(-l/2+p),-(y+p),p,12,90,0),...lr(-(-l/2+p),-(f/2-p),p,12,360,270),...lr(-(l/2-p),-(f/2-p),p,12,270,180),...lr(-(l/2-p),-(y+p),p,12,180,90)];return t.intersect=function(A){return ct.polygon(t,F,A)},s}u(Af,"person");var yS=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),xS=u((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),CS=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Vc=8,Xc=8;async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<Xc&&(t.width=Xc)),t.height){const b=n/2/(2.5+n/50);t.height=t.height-o-b*3,t.height<Vc&&(t.height=Vc)}const{shapeSvg:l,bbox:c,label:h}=await bt(e,t,xt(t)),d=Math.max(t.width??0,c.width)+a,p=d/2,f=p/(2.5+d/50),m=Math.max(t.height??0,c.height)+o+f;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(l),b=xS(0,0,d,m,p,f),S=CS(0,f,d,m,p,f),_=dt(t,{}),B=C.path(b,_),L=C.path(S,dt(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=yS(0,0,d,m,p,f);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ie(x)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-d/2}, ${-(m/2+f)})`),gt(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(C){const b=ct.rect(t,C),S=b.x-(t.x??0);if(p!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let _=f*f*(1-S*S/(p*p));_>0&&(_=Math.sqrt(_)),_=f-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},l}u(Ff,"cylinder");async function Di(e,t,r){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await bt(e,t,xt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:p,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(p=r.rx,f=r.ry),t.look==="handDrawn"){const y=pt.svg(o),x=dt(t,{}),C=p||f?y.path(Pe(c,h,n,l,p||0),x):y.rectangle(c,h,n,l,x);d=o.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",ie(m))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",ie(p)).attr("ry",ie(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return gt(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,x){return ct.rect(y,x)},t.intersect=function(y){return ct.rect(t,y)},o}u(Di,"drawRect");async function Ef(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Di(e,t,l);if(t.look==="handDrawn"){const f=pt.svg(c),m=dt(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>f.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>f.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,p=(Number(h.attr("height"))||n)??0;return d>0&&p>0&&h.attr("stroke-dasharray",`${d} ${p}`),c}u(Ef,"datastore");async function Mf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=n.width+s,h=n.height+o,d=h*.2,p=-c/2,f=-h/2-d/2,{cssStyles:m}=t,y=pt.svg(a),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:p,y:f+d},{x:-p,y:f+d},{x:-p,y:-f},{x:p,y:-f},{x:p,y:f},{x:-p,y:f},{x:-p,y:f+d}],b=y.polygon(C.map(_=>[_.x,_.y]),x),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+d+(t.padding??0)/2-(n.y-(n.top??0))})`),gt(t,S),t.intersect=function(_){return ct.rect(t,_)},a}u(Mf,"dividedRectangle");async function Of(e,t){const{labelStyles:r,nodeStyles:i}=ut(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t),{ignoreMinWidth:!0}),c=Math.sqrt(l.width**2+l.height**2)/2,h=(t?.width?t?.width/2:c)+(a??0),d=h+s;let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{roughness:.2,strokeWidth:2.5}),x=dt(t,{roughness:.2,strokeWidth:1.5}),C=m.circle(0,0,d*2,y),b=m.circle(0,0,h*2,x);p=n.insert("g",":first-child"),p.attr("class",ie(t.cssClasses)).attr("style",ie(f)),p.node()?.appendChild(C),p.node()?.appendChild(b)}else{p=n.insert("g",":first-child");const m=p.insert("circle",":first-child"),y=p.insert("circle");p.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return gt(t,p),t.intersect=function(m){return tt.info("DoubleCircle intersect",t,d,m),ct.circle(t,d,m)},n}u(Of,"doublecircle");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a}=await bt(e,t,xt(t)),{theme:n,themeVariables:l}=$t();Ue(s,t.colorIndex,n,l.borderColorArray);const c=a??10,h=o.width/2+c*2,d=o.height/2+c*2;let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(s),y=dt(t,{}),x=m.ellipse(0,0,h*2,d*2,y);p=s.insert(()=>x,":first-child"),p.attr("class","basic label-container"),f&&p.attr("style",f)}else p=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",h).attr("ry",d).attr("cx",0).attr("cy",0);return t.width=h*2,t.height=d*2,gt(t,p),t.calcIntersect=function(m,y){const x=m.width/2,C=m.height/2;return ct.ellipse(m,x,C,y)},t.intersect=function(m){return ct.ellipse(t,h,d,m)},s}u($f,"usecaseEllipse");function If(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=pt.svg(o),{nodeBorder:c}=r,h=dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),p=o.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),gt(t,p),t.intersect=function(f){return tt.info("filledCircle intersect",t,{radius:a,point:f}),ct.circle(t,a,f)},o}u(If,"filledCircle");var Zc=10,Kc=10;async function Df(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<Zc&&(t.height=Zc),t.width=(t?.width??0)-o-o/2,t.width<Kc&&(t.width=Kc));const{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,p=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:f}=t,m=pt.svg(a),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Nt(p),C=m.path(x,y),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,gt(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return tt.info("Triangle intersect",t,p,S),ct.polygon(t,p,S)},a}u(Df,"flippedTriangle");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),p=d-h,f=Math.max(l*.38,28),m=-d/2,y=[{x:-l/2,y:m},{x:-l/2+f,y:m},{x:-l/2+f,y:m+h},{x:l/2,y:m+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(_=>`L${_.x},${_.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const B=pt.svg(s).path(x,dt(t,{}));b=s.insert(()=>B,":first-child").attr("class","basic label-container"),C&&b.attr("style",C)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?gt(t,b):gt(t,b,{width:l,height:d});const S=m+h+p/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(_){return ct.polygon(t,y,_)},s}u(Pf,"folder");function Rf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=ut(t);t.label="";const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);(r==="LR"||r==="RL")&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,p=pt.svg(a),f=dt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=p.rectangle(h,d,l,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),gt(t,y);const x=i?.padding??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return ct.rect(t,C)},a}u(Rf,"forkJoin");async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await bt(e,t,xt(t)),h=(t?.height?t?.height:Math.max(o,c.height))+n*2,d=h/2,p=d-Math.sqrt(Math.max(0,d**2-(c.height/2)**2)),f=(t?.width?t?.width:Math.max(s,c.width)+p*2)+a*2,{cssStyles:m}=t,y=pt.svg(l),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-f/2,y:-h/2},{x:f/2-d,y:-h/2},...lr(-f/2+d,0,d,50,90,270),{x:f/2-d,y:h/2},{x:-f/2,y:h/2}],b=Nt(C),S=y.path(b,x),_=l.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),gt(t,_),t.intersect=function(B){return tt.info("Pill intersect",t,{radius:d,point:B}),ct.polygon(t,C,B)},l}u(Nf,"halfRoundedRectangle");var bS=u((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function qf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=(t?.width??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await bt(e,t,xt(t)),p=(t?.height?t?.height:d.height)+l,f=p/s,m=(t?.width?t?.width:d.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-p/2},{x:m-f,y:-p},{x:f,y:-p},{x:0,y:-p/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=pt.svg(h),S=dt(t,{}),_=bS(0,0,m,p,f),B=b.path(_,S);x=h.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&x.attr("style",C)}else x=ur(h,m,p,y);return i&&x.attr("style",i),t.width=m,t.height=p,gt(t,x),t.intersect=function(b){return ct.polygon(t,y,b)},h}u(qf,"hexagon");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await bt(e,t,xt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=pt.svg(s),c=dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=Nt(h),p=l.path(d,c),f=s.insert(()=>p,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-a/2})`),gt(t,f),t.intersect=function(m){return tt.info("Pill intersect",t,{points:h}),ct.polygon(t,h,m)},s}u(Wf,"hourglass");async function zf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ut(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await bt(e,t,"icon-shape default"),p=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=jr(t),C=-m/2,b=-f/2,S=t.label?8:0,_=pt.svg(c),B=dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=_.rectangle(C,b,m,f,B),F=Math.max(m,h.width),A=f+h.height+S,H=_.rectangle(-F/2,-A/2,F,A,{...B,fill:"transparent",stroke:"none"}),R=c.insert(()=>L,":first-child"),$=c.insert(()=>H);if(t.icon){const G=c.append("g");G.html(`<g>${await oi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const O=G.node().getBBox(),E=O.width,M=O.height,v=O.x,q=O.y;G.attr("transform",`translate(${-E/2-v},${p?h.height/2+S/2-M/2-q:-h.height/2-S/2-M/2-q})`),G.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-A/2:A/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),gt(t,$),t.intersect=function(G){if(tt.info("iconSquare intersect",t,G),!t.label)return ct.rect(t,G);const O=t.x??0,E=t.y??0,M=t.height??0;let v=[];return p?v=[{x:O-h.width/2,y:E-M/2},{x:O+h.width/2,y:E-M/2},{x:O+h.width/2,y:E-M/2+h.height+S},{x:O+m/2,y:E-M/2+h.height+S},{x:O+m/2,y:E+M/2},{x:O-m/2,y:E+M/2},{x:O-m/2,y:E-M/2+h.height+S},{x:O-h.width/2,y:E-M/2+h.height+S}]:v=[{x:O-m/2,y:E-M/2},{x:O+m/2,y:E-M/2},{x:O+m/2,y:E-M/2+f},{x:O+h.width/2,y:E-M/2+f},{x:O+h.width/2/2,y:E+M/2},{x:O-h.width/2,y:E+M/2},{x:O-h.width/2,y:E-M/2+f},{x:O-m/2,y:E-M/2+f}],ct.polygon(t,v,G)},c}u(zf,"icon");async function Hf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ut(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await bt(e,t,"icon-shape default"),p=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=jr(t),b=pt.svg(c),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=C.get("fill");S.stroke=_??x;const B=c.append("g");t.icon&&B.html(`<g>${await oi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),F=L.width,A=L.height,H=L.x,R=L.y,$=Math.max(F,A)*Math.SQRT2+p*2,G=b.circle(0,0,$,S),O=Math.max($,h.width),E=$+h.height+f,M=b.rectangle(-O/2,-E/2,O,E,{...S,fill:"transparent",stroke:"none"}),v=c.insert(()=>G,":first-child"),q=c.insert(()=>M);return B.attr("transform",`translate(${-F/2-H},${m?h.height/2+f/2-A/2-R:-h.height/2-f/2-A/2-R})`),B.attr("style",`color: ${C.get("stroke")??y};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-E/2:E/2-h.height})`),v.attr("transform",`translate(0,${m?h.height/2+f/2:-h.height/2-f/2})`),gt(t,q),t.intersect=function(z){return tt.info("iconSquare intersect",t,z),ct.rect(t,z)},c}u(Hf,"iconCircle");async function Yf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ut(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await bt(e,t,"icon-shape default"),f=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=jr(t),S=-y/2,_=-m/2,B=t.label?8:0,L=pt.svg(c),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const A=b.get("fill");F.stroke=A??C;const H=L.path(Pe(S,_,y,m,5),F),R=Math.max(y,h.width),$=m+h.height+B,G=L.rectangle(-R/2,-$/2,R,$,{...F,fill:"transparent",stroke:"none"}),O=c.insert(()=>H,":first-child").attr("class","icon-shape2"),E=c.insert(()=>G);if(t.icon){const M=c.append("g");M.html(`<g>${await oi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),q=v.width,z=v.height,I=v.x,X=v.y;M.attr("transform",`translate(${-q/2-I},${f?h.height/2+B/2-z/2-X:-h.height/2-B/2-z/2-X})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+B/2:-h.height/2-B/2})`),gt(t,E),t.intersect=function(M){if(tt.info("iconSquare intersect",t,M),!t.label)return ct.rect(t,M);const v=t.x??0,q=t.y??0,z=t.height??0;let I=[];return f?I=[{x:v-h.width/2,y:q-z/2},{x:v+h.width/2,y:q-z/2},{x:v+h.width/2,y:q-z/2+h.height+B},{x:v+y/2,y:q-z/2+h.height+B},{x:v+y/2,y:q+z/2},{x:v-y/2,y:q+z/2},{x:v-y/2,y:q-z/2+h.height+B},{x:v-h.width/2,y:q-z/2+h.height+B}]:I=[{x:v-y/2,y:q-z/2},{x:v+y/2,y:q-z/2},{x:v+y/2,y:q-z/2+m},{x:v+h.width/2,y:q-z/2+m},{x:v+h.width/2/2,y:q+z/2},{x:v-h.width/2,y:q+z/2},{x:v-h.width/2,y:q-z/2+m},{x:v-y/2,y:q-z/2+m}],ct.polygon(t,I,M)},c}u(Yf,"iconRounded");async function Uf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ut(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:p}=await bt(e,t,"icon-shape default"),f=t.pos==="t",m=n+d*2,y=n+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=jr(t),S=-y/2,_=-m/2,B=t.label?8:0,L=pt.svg(c),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const A=b.get("fill");F.stroke=A??C;const H=L.path(Pe(S,_,y,m,.1),F),R=Math.max(y,h.width),$=m+h.height+B,G=L.rectangle(-R/2,-$/2,R,$,{...F,fill:"transparent",stroke:"none"}),O=c.insert(()=>H,":first-child"),E=c.insert(()=>G);if(t.icon){const M=c.append("g");M.html(`<g>${await oi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),q=v.width,z=v.height,I=v.x,X=v.y;M.attr("transform",`translate(${-q/2-I},${f?h.height/2+B/2-z/2-X:-h.height/2-B/2-z/2-X})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-$/2:$/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+B/2:-h.height/2-B/2})`),gt(t,E),t.intersect=function(M){if(tt.info("iconSquare intersect",t,M),!t.label)return ct.rect(t,M);const v=t.x??0,q=t.y??0,z=t.height??0;let I=[];return f?I=[{x:v-h.width/2,y:q-z/2},{x:v+h.width/2,y:q-z/2},{x:v+h.width/2,y:q-z/2+h.height+B},{x:v+y/2,y:q-z/2+h.height+B},{x:v+y/2,y:q+z/2},{x:v-y/2,y:q+z/2},{x:v-y/2,y:q-z/2+h.height+B},{x:v-h.width/2,y:q-z/2+h.height+B}]:I=[{x:v-y/2,y:q-z/2},{x:v+y/2,y:q-z/2},{x:v+y/2,y:q-z/2+m},{x:v+h.width/2,y:q-z/2+m},{x:v+h.width/2/2,y:q+z/2},{x:v-h.width/2,y:q+z/2},{x:v-h.width/2,y:q-z/2+m},{x:v-y/2,y:q-z/2+m}],ct.polygon(t,I,M)},c}u(Uf,"iconSquare");async function jf(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=ut(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:p,label:f}=await bt(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-h/2,C=t.label?8:0,b=pt.svg(d),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=b.rectangle(y,x,c,h,S),B=Math.max(c,p.width),L=h+p.height+C,F=b.rectangle(-B/2,-L/2,B,L,{...S,fill:"none",stroke:"none"}),A=d.insert(()=>_,":first-child"),H=d.insert(()=>F);if(t.img){const R=d.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${m?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-h/2-p.height/2-C/2:h/2-p.height/2+C/2})`),A.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),gt(t,H),t.intersect=function(R){if(tt.info("iconSquare intersect",t,R),!t.label)return ct.rect(t,R);const $=t.x??0,G=t.y??0,O=t.height??0;let E=[];return m?E=[{x:$-p.width/2,y:G-O/2},{x:$+p.width/2,y:G-O/2},{x:$+p.width/2,y:G-O/2+p.height+C},{x:$+c/2,y:G-O/2+p.height+C},{x:$+c/2,y:G+O/2},{x:$-c/2,y:G+O/2},{x:$-c/2,y:G-O/2+p.height+C},{x:$-p.width/2,y:G-O/2+p.height+C}]:E=[{x:$-c/2,y:G-O/2},{x:$+c/2,y:G-O/2},{x:$+c/2,y:G-O/2+h},{x:$+p.width/2,y:G-O/2+h},{x:$+p.width/2/2,y:G+O/2},{x:$-p.width/2,y:G+O/2},{x:$-p.width/2,y:G-O/2+h},{x:$-c/2,y:G-O/2+h}],ct.polygon(t,E,R)},d}u(jf,"imageSquare");async function Gf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=Nt(d),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&p.attr("style",f)}else p=ur(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,gt(t,p),t.intersect=function(m){return ct.polygon(t,d,m)},n}u(Gf,"inv_trapezoid");async function Vf(e,t){const{shapeSvg:r,bbox:i,label:s}=await bt(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),gt(t,o),t.intersect=function(l){return ct.rect(t,l)},r}u(Vf,"labelRect");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=Nt(d),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&p.attr("style",f)}else p=ur(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,gt(t,p),t.intersect=function(m){return ct.polygon(t,d,m)},n}u(Xf,"lean_left");async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=Nt(d),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&p.attr("style",f)}else p=ur(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,gt(t,p),t.intersect=function(m){return ct.polygon(t,d,m)},n}u(Zf,"lean_right");function Kf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=pt.svg(s),d=dt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=Nt(c),f=h.path(p,d),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),gt(t,m),t.intersect=function(y){return tt.info("lightningBolt intersect",t,y),ct.polygon(t,c,y)},s}u(Kf,"lightningBolt");var kS=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),SS=u((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),wS=u((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Qc=10,Jc=10;async function Qf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<Jc&&(t.width=Jc);const S=C/2/(2.5+C/50);t.height=(t.height??0)-a-S*3,t.height<Qc&&(t.height=Qc)}const{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,p=d/(2.5+h/50),f=(t?.height?t?.height:l.height)+p+a*2,m=f*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(n),b=SS(0,0,h,f,d,p,m),S=wS(0,p,h,f,d,p),_=dt(t,{}),B=C.path(b,_),L=C.path(S,_);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=kS(0,0,h,f,d,p,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ie(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-h/2}, ${-(f/2+p)})`),gt(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=ct.rect(t,C),S=b.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-S*S/(d*d));_>0&&(_=Math.sqrt(_)),_=p-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},n}u(Qf,"linedCylinder");async function Jf(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,p=t.look==="neo"?d/4:d/8,f=d+p,{cssStyles:m}=t,y=pt.svg(n),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...Yr(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,p,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],b=y.polygon(C.map(_=>[_.x,_.y]),x),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p-(l.y-(l.top??0))})`),gt(t,S),t.intersect=function(_){return ct.polygon(t,C,_)},n}u(Jf,"linedWaveEdgedRect");var TS=56,Va=72,td=8,ed=2,_S=8,BS={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},rd=Math.PI/3,id=.6,Xa=u((e,t)=>{const r=t*id,i=t*Math.sqrt(1-id**2),s=Math.cos(rd),o=-Math.sin(rd),a=r*-o,n=e+r*s,l=i*s,c=i*o;return`M ${a-l} ${n-c} L ${a+l} ${n+c}`},"businessMarkerPathForCircle"),vS={normal:Xa(-24,12),hollow:Xa(-23,9),awesome:Xa(-21,13),icon:"M 12 -8 L 26 -26"},sd=u((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),Yl=u((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const n=pt.svg(e).path(r,dt(t,s?{fill:"none"}:{}));return e.insert(()=>n,":first-child").attr("class",i)}const o=e.append("path").attr("class",i).attr("d",r);return s&&o.attr("fill","none"),o},"appendActorPath"),LS=u((e,t,r,i,s,o,a=!1)=>{if(t.look==="handDrawn"){const c=pt.svg(e).circle(r,i,s*2,dt(t,a?{fill:"none"}:{}));return e.insert(()=>c,":first-child").attr("class",o)}const n=e.append("circle").attr("class",o).attr("cx",r).attr("cy",i).attr("r",s);return a&&n.attr("fill","none"),n},"appendActorCircle"),AS=u((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",vS[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Ts(e,t,r,i){const{labelStyles:s,nodeStyles:o}=ut(t);t.labelStyle=s;const a=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:n,bbox:l,label:c}=await bt(e,a,xt(t,`usecase-actor-variant usecase-actor-${r}`)),h=t.accessibleName??t.label;h&&n.attr("role","img").attr("aria-label",h),c.attr("class","label actor-label usecase-actor-label");const{theme:d,themeVariables:p}=$t();Ue(n,t.colorIndex,d,p.borderColorArray);let f,m;if(t.stereotype){const A=await ti(n,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=A.label.attr("class","label usecase-stereotype"),m=A.bbox}const y=n.append("g").attr("class",`usecase-actor-glyph ${BS[r]}`).attr("style",o||null);await i(y,t),AS(y,t,r);const x=t.padding??_S,C=m?.height??0,b=Va+td+l.height+(m?C+ed:0),S=Math.max(TS,l.width,m?.width??0)+x*2,_=b+x*2,B=-b/2;y.attr("transform",`translate(0,${B+Va/2})`);let L=B+Va+td;f&&m&&(L+=C/2,sd(f,m,L),L+=C/2+ed),sd(c,l,L+l.height/2);const F=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-S/2).attr("y",-_/2).attr("width",S).attr("height",_).attr("opacity",0).attr("aria-hidden","true");return gt(t,F),t.intersect=A=>ct.rect(t,A),n}u(Ts,"renderUsecaseActor");var FS=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function tg(e,t){return Ts(e,t,"normal",(r,i)=>{Yl(r,i,FS,"usecase-actor-stick")})}u(tg,"usecaseActor");var ES=["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 eg(e,t){return Ts(e,t,"awesome",(r,i)=>{Yl(r,i,ES,"usecase-actor-awesome-silhouette")})}u(eg,"usecaseActorAwesome");var MS=["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 rg(e,t){return Ts(e,t,"hollow",(r,i)=>{LS(r,i,0,-23,9,"usecase-actor-hollow-head",!0),Yl(r,i,MS,"usecase-actor-hollow-body",!0)})}u(rg,"usecaseActorHollow");var gi=52,od=42,ad=-2,OS=u(async(e,t)=>{const r=-gi/2,i=ad-gi/2;if(t.look==="handDrawn"){const h=pt.svg(e).rectangle(r,i,gi,gi,dt(t,{}));e.insert(()=>h,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",gi).attr("height",gi).attr("rx",4).attr("ry",4);const s=t.icon??"",o=await ap(s.includes(":")?s:`fa:${s}`),a=await oi(s,{height:od,width:od,fallbackPrefix:"fa"}),n=e.append("g").attr("class",`usecase-actor-icon-symbol${o?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${a}</g>`),l=n.node()?.getBBox();l&&n.attr("transform",`translate(${-l.width/2-l.x},${ad-l.height/2-l.y})`)},"drawIconActor");async function ig(e,t){return Ts(e,t,"icon",OS)}u(ig,"usecaseActorIcon");var nd=u((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function sg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const o=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:a,bbox:n,halfPadding:l,label:c}=await bt(e,o,xt(t,"usecase-business-shape"));c.attr("class","label usecase-label");const{theme:h,themeVariables:d}=$t();Ue(a,t.colorIndex,h,d.borderColorArray);let p,f;if(r.stereotype){const O=await ti(a,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});p=O.label.attr("class","label usecase-stereotype"),f=O.bbox}const m=f?2:0,y=n.height+(f?.height??0)+m,x=Math.max(n.width,f?.width??0),C=l??10,b=x/2+C*2,S=y/2+C*2,_=Math.min(Math.max(C/5,1),C/2),B=x/2+_,L=b-_,F=B/b,A=L/b,H=S*Math.sqrt(Math.max(0,1-F*F)),R=-S*Math.sqrt(Math.max(0,1-A*A));p&&f&&nd(p,f,-y/2+f.height/2),nd(c,n,y/2-n.height/2);let $;if(t.look==="handDrawn"){const E=pt.svg(a).ellipse(0,0,b*2,S*2,dt(t,{}));$=a.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else $=a.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",S).attr("cx",0).attr("cy",0);a.append("path").attr("class","usecase-business-marker").attr("d",`M ${B} ${H} L ${L} ${R}`).attr("fill","none").attr("style",s||null);const G=r.accessibleName??r.label;return G&&a.attr("role","img").attr("aria-label",G),gt(t,$),t.calcIntersect=(O,E)=>ct.ellipse(O,O.width/2,O.height/2,E),t.intersect=O=>ct.ellipse(t,b,S,O),a}u(sg,"usecaseBusiness");var Za=8,ld=4,$S=1,Ka=u((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),o=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-o})`)},"positionLabel"),IS=u(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:$S},"numericStrokeWidth");async function og(e,t){const r=t,{labelStyles:i,nodeStyles:s}=ut(t),{stylesMap:o}=jr(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t,"usecase-json-table"));a.attr("role","img"),r.accessibleName&&a.attr("aria-label",r.accessibleName),l.attr("class","label usecase-json-title");const c=a.append("g").attr("class","usecase-json-table-grid"),h=[];for(const O of r.jsonRows??[]){const E=await ti(c,O.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),M=await ti(c,O.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});h.push({key:{label:E.label.attr("class","label usecase-json-key"),bbox:E.bbox},value:{label:M.label.attr("class","label usecase-json-value"),bbox:M.bbox}})}const d=Math.max(0,...h.map(({key:O})=>O.bbox.width))+Za*2,p=Math.max(0,...h.map(({value:O})=>O.bbox.width))+Za*2,f=n.width+Za*2,m=Math.max(f,d+p),y=p+Math.max(0,m-d-p),x=n.height+ld*2,C=h.map(({key:O,value:E})=>Math.max(O.bbox.height,E.bbox.height)+ld*2),b=x+C.reduce((O,E)=>O+E,0),S=IS(o.get("stroke-width")),_=m+S*2,B=b+S*2,L=-m/2,F=-b/2,A=t.look==="handDrawn"?pt.svg(a):void 0,H=A?dt(t,{}):void 0,R=u((O,E,M,v,q,z)=>{if(A&&H){const I=A.rectangle(M,v,q,z,H);return O.insert(()=>I,":first-child").attr("class",E)}return O.insert("rect",":first-child").attr("class",E).attr("x",M).attr("y",v).attr("width",q).attr("height",z).attr("style",s)},"insertCell"),$=R(a,"label-container usecase-json-border",-_/2,-B/2,_,B);R(c,"usecase-json-cell usecase-json-title-cell",L,F,m,x),c.node()?.append(l.node()),Ka(l,n,0,F+x/2);let G=F+x;return h.forEach(({key:O,value:E},M)=>{const v=C[M],q=c.append("g").attr("class","usecase-json-row").attr("data-row-index",M).attr("transform",`translate(0,${G})`);R(q,"usecase-json-cell usecase-json-key-cell",L,0,d,v),R(q,"usecase-json-cell usecase-json-value-cell",L+d,0,y,v),q.node()?.append(O.label.node(),E.label.node()),Ka(O.label,O.bbox,L+d/2,v/2),Ka(E.label,E.bbox,L+d+y/2,v/2),G+=v}),gt(t,$),t.intersect=O=>ct.rect(t,O),a}u(og,"usecaseJsonTable");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await bt(e,t,xt(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,p=(t?.height?t?.height:c.height)+a*2+2*n,f=d-2*n,m=p-2*n,y=-f/2,x=-m/2,{cssStyles:C}=t,b=pt.svg(l),S=dt(t,{}),_=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+f-n,y:x+m+n},{x:y+f-n,y:x+m},{x:y+f,y:x+m},{x:y+f,y:x+m-n},{x:y+f+n,y:x+m-n},{x:y+f+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],B=[{x:y,y:x+n},{x:y+f-n,y:x+n},{x:y+f-n,y:x+m},{x:y+f,y:x+m},{x:y+f,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Nt(_);let F=b.path(L,S);const A=Nt(B);let H=b.path(A,S);t.look!=="handDrawn"&&(F=Ln(F),H=Ln(H));const R=l.insert("g",":first-child");return R.insert(()=>F),R.insert(()=>H),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),gt(t,R),t.intersect=function($){return ct.polygon(t,_,$)},l}u(ag,"multiRect");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,p=Math.max(o.height,t?.height??0)+c*3,f=t.look==="neo"?p/4:p/8,m=p+(h?f/2:-f/2),y=-d/2,x=-m/2,C=10,{cssStyles:b}=t,S=Yr(y-C,x+m+C,y+d-C,x+m+C,f,.8),_=S?.[S.length-1],B=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...S,{x:y+d-C,y:_.y-C},{x:y+d,y:_.y-C},{x:y+d,y:_.y-2*C},{x:y+d+C,y:_.y-2*C},{x:y+d+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],L=[{x:y,y:x+C},{x:y+d-C,y:x+C},{x:y+d-C,y:_.y-C},{x:y+d,y:_.y-C},{x:y+d,y:x},{x:y,y:x}],F=pt.svg(s),A=dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const H=Nt(B),R=F.path(H,A),$=Nt(L),G=F.path($,A),O=s.insert(()=>R,":first-child");return O.insert(()=>G),O.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-f/2})`),a.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-f-(o.y-(o.top??0))})`),gt(t,O),t.intersect=function(E){return ct.polygon(t,B,E)},s}u(ng,"multiWaveEdgedRectangle");async function lg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i,t.useHtmlLabels||le(Gt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,p=-h/2,{cssStyles:f}=t,m=pt.svg(a),y=dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(d,p,c,h,y),C=a.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),gt(t,C),t.intersect=function(b){return ct.rect(t,b)},a}u(lg,"note");var DS=u((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await bt(e,t,xt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const f=pt.svg(s),m=dt(t,{}),y=DS(0,0,l),x=f.path(y,m);d=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&d.attr("style",p)}else d=ur(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),gt(t,d),t.calcIntersect=function(f,m){const y=f.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return ct.polygon(f,x,m)},t.intersect=function(f){return this.calcIntersect(t,f)},s}u(hg,"question");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=l.width+(t.look==="neo"?o*2:o),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),p=d/4,m=-Math.max(h,(t.width??0)-p)/2,y=-d/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,S=pt.svg(n),_=dt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=Nt(C),L=S.path(B,_),F=n.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),gt(t,F),t.intersect=function(A){return ct.polygon(t,C,A)},n}u(cg,"rect_left_inv_arrow");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await kr(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(le($t())){const A=h.children[0],H=Ot(h);d=A.getBoundingClientRect(),H.attr("width",d.width),H.attr("height",d.height)}tt.info("Text 2",l);const p=l||[],f=h.getBBox(),m=await kr(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=m.children[0],x=Ot(m);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const C=(t.padding||0)/2;Ot(m).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+C+5)+")"),Ot(h).attr("transform","translate( "+(d.width<f.width?0:-(f.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),S=d.height+(t.padding||0),_=-d.width/2-C,B=-d.height/2-C;let L,F;if(t.look==="handDrawn"){const A=pt.svg(o),H=dt(t,{}),R=A.path(Pe(_,B,b,S,t.rx||0),H),$=A.line(-d.width/2-C,-d.height/2-C+f.height+C,d.width/2+C,-d.height/2-C+f.height+C,H);F=o.insert(()=>(tt.debug("Rough node insert CXC",R),$),":first-child"),L=o.insert(()=>(tt.debug("Rough node insert CXC",R),R),":first-child")}else L=a.insert("rect",":first-child"),F=a.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),F.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+f.height+C).attr("y2",-d.height/2-C+f.height+C);return gt(t,L),t.intersect=function(A){return ct.rect(t,A)},o}u(dg,"rectWithTitle");async function ug(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Di(e,t,s)}u(ug,"roundedRect");var Vr=8;async function pg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?Vr:Vr*2),h=(t?.height??n.height)+o*2,d=c-Vr,p=h,f=Vr-c/2,m=-h/2,{cssStyles:y}=t,x=pt.svg(a),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:f,y:m},{x:f+d,y:m},{x:f+d,y:m+p},{x:f-Vr,y:m+p},{x:f-Vr,y:m},{x:f,y:m},{x:f,y:m+p}],S=x.polygon(b.map(B=>[B.x,B.y]),C),_=a.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path").attr("style",ie(y)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${Vr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),gt(t,_),t.intersect=function(B){return ct.rect(t,B)},a}u(pg,"shadedProcess");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,p=h,f=d/1.5,m=-p/2,y=-f/2,{cssStyles:x}=t,C=pt.svg(n),b=dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+f},{x:m+p,y:y+f},{x:m+p,y:y-f/2}],_=Nt(S),B=C.path(_,b),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),gt(t,L),t.intersect=function(F){return ct.polygon(t,S,F)},n}u(fg,"slopedRect");async function gg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},a=await Di(e,t,o);if(t.colorIndex!==void 0){const{theme:n,themeVariables:l}=$t();Ue(a,t.colorIndex,n,l.borderColorArray)}return a}u(gg,"squareRect");var En=50,PS=u((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(En-1))),o=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-o),h:i}},"stadiumDimensions");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?40:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),{w:c,h}=PS(l,o,a),d=h/2,{cssStyles:p}=t,f=pt.svg(n),m=dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...lr(-c/2+d,0,d,En,90,270),{x:c/2-d,y:h/2},...lr(c/2-d,0,d,En,270,450)],x=Nt(y),C=f.path(x,m),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),gt(t,b),t.intersect=function(S){return ct.polygon(t,y,S)},n}u(mg,"stadium");async function yg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Di(e,t,r)}u(yg,"state");function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=pt.svg(h),p=dt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const f=d.circle(0,0,t.width,{...p,stroke:a,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,x=d.circle(0,0,y,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>f,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",S=b?`${b}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return gt(t,C),t.intersect=function(b){return ct.circle(t,(t.width??0)/2,b)},h}u(xg,"stateEnd");function Cg(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=pt.svg(o).circle(0,0,t.width,Sk(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return gt(t,a),t.intersect=function(n){return ct.circle(t,(t.width??7)/2,n)},o}u(Cg,"stateStart");var mi=8;async function bg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=Math.max(l.width+2*mi+o,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*mi,p=h,f=-c/2,m=-h/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const x=pt.svg(n),C=dt(t,{}),b=x.rectangle(f,m,d+16,p,C),S=x.line(f+mi,m,f+mi,m+p,C),_=x.line(f+mi+d,m,f+mi+d,m+p,C);n.insert(()=>S,":first-child"),n.insert(()=>_,":first-child");const B=n.insert(()=>b,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",ie(L)),gt(t,B)}else{const x=ur(n,d,p,y);i&&x.attr("style",i),gt(t,x)}return t.intersect=function(x){return ct.polygon(t,y,x)},n}u(bg,"subroutine");var Qa=.2;async function kg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Qa*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=(t?.height?t?.height:l.height)+a*2,h=Qa*c,d=Qa*c,f=(t?.width?t?.width:l.width)+o*2+h-h,m=c,y=-f/2,x=-m/2,{cssStyles:C}=t,b=pt.svg(n),S=dt(t,{}),_=[{x:y-h/2,y:x},{x:y+f+h/2,y:x},{x:y+f+h/2,y:x+m},{x:y-h/2,y:x+m}],B=[{x:y+f-h/2,y:x+m},{x:y+f+h/2,y:x+m},{x:y+f+h/2,y:x+m-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=Nt(_),F=b.path(L,S),A=Nt(B),H=b.path(A,{...S,fillStyle:"solid"}),R=n.insert(()=>H,":first-child");return R.insert(()=>F,":first-child"),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),gt(t,R),t.intersect=function($){return ct.polygon(t,_,$)},n}u(kg,"taggedRect");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,p=l+c,{cssStyles:f}=t,m=pt.svg(s),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:p/2},...Yr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,S=[{x:C+n-h,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...Yr(C+n,(b+l)*1.25,C+n-h,(b+l)*1.3,-l*.02,.5)],_=Nt(x),B=m.path(_,y),L=Nt(S),F=m.path(L,{...y,fillStyle:"solid"}),A=s.insert(()=>F,":first-child");return A.insert(()=>B,":first-child"),A.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),gt(t,A),t.intersect=function(H){return ct.polygon(t,x,H)},s}u(Sg,"taggedWaveEdgedRectangle");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await bt(e,t,xt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),gt(t,h),t.intersect=function(d){return ct.rect(t,d)},s}u(wg,"text");var RS=u((e,t,r,i,s,o)=>`M${e},${t}
|
|
235
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
236
|
+
l${r},0
|
|
237
|
+
a${s},${o} 0,0,1 0,${i}
|
|
238
|
+
M${r},${-i}
|
|
239
|
+
a${s},${o} 0,0,0 0,${i}
|
|
240
|
+
l${-r},0`,"createCylinderPathD"),NS=u((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),qS=u((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),hd=5,cd=10;async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<hd&&(t.height=hd)),t.width){const C=a/2/(2.5+a/50);t.width=t.width-o-C*3,t.width<cd&&(t.width=cd)}const{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=Math.max(t.height??0,l.height)+o,d=h/2,p=d/(2.5+h/50),f=Math.max(t.width??0,l.width)+p+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=pt.svg(n),C=NS(0,0,f,h,p,d),b=qS(0,0,f,h,p,d),S=x.path(C,dt(t,{})),_=x.path(b,dt(t,{fill:"none"}));y=n.insert(()=>_,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=RS(0,0,f,h,p,d);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",ie(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",p),y.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),gt(t,y),t.intersect=function(x){const C=ct.rect(t,x),b=C.y-(t.y??0);if(d!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-p)){let S=p*p*(1-b*b/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=p-S,x.x-(t.x??0)>0&&(S=-S),C.x+=S}return C},n}u(Tg,"tiltedCylinder");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=Nt(d),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&p.attr("style",f)}else p=ur(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,gt(t,p),t.intersect=function(m){return ct.polygon(t,d,m)},n}u(_g,"trapezoid");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await bt(e,t,xt(t)),d=(t?.width?t?.width:h.width)+o*2,p=(t?.height?t?.height:h.height)+a*2,{cssStyles:f}=t,m=pt.svg(c),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-d/2*.8,y:-p/2},{x:d/2*.8,y:-p/2},{x:d/2,y:-p/2*.6},{x:d/2,y:p/2},{x:-d/2,y:p/2},{x:-d/2,y:-p/2*.6}],C=Nt(x),b=m.path(C,y),S=c.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),gt(t,S),t.intersect=function(_){return ct.polygon(t,x,_)},c}u(Bg,"trapezoidalPentagon");var dd=10,ud=10;async function vg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<ud&&(t.width=ud),t.height=t?.height??0,t.height<dd&&(t.height=dd));const{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=dr($t().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,p=d,f=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:m}=t,y=pt.svg(a),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Nt(f),b=y.path(C,x),S=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,gt(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return tt.info("Triangle intersect",t,f,_),ct.polygon(t,f,_)},a}u(vg,"triangle");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await bt(e,t,xt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,p=(t?.height?t?.height:c.height)+(a??0)*2,f=t.look==="neo"?p/4:p/8,m=p+(n?f:-f),{cssStyles:y}=t,C=14-d,b=C>0?C/2:0,S=pt.svg(l),_=dt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const B=[{x:-d/2-b,y:m/2},...Yr(-d/2-b,m/2,d/2+b,m/2,f,.8),{x:d/2+b,y:-m/2},{x:-d/2-b,y:-m/2}],L=Nt(B),F=S.path(L,_),A=l.insert(()=>F,":first-child");return A.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-f-(c.y-(c.top??0))})`),gt(t,A),t.intersect=function(H){return ct.polygon(t,B,H)},l}u(Lg,"waveEdgedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-_*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await bt(e,t,xt(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,p=h+d*2,{cssStyles:f}=t,m=pt.svg(n),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2,y:p/2},...Yr(-c/2,p/2,c/2,p/2,d,1),{x:c/2,y:-p/2},...Yr(c/2,-p/2,-c/2,-p/2,d,-1)],C=Nt(x),b=m.path(C,y),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),gt(t,S),t.intersect=function(_){return ct.polygon(t,x,_)},n}u(Ag,"waveRectangle");var Xt=10;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Xt,10),t.height=Math.max((t?.height??0)-o*2-Xt,10));const{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t)),c=(t?.width?t?.width:n.width)+s*2+Xt,h=(t?.height?t?.height:n.height)+o*2+Xt,d=c-Xt,p=h-Xt,f=-d/2,m=-p/2,{cssStyles:y}=t,x=pt.svg(a),C=dt(t,{}),b=[{x:f-Xt,y:m-Xt},{x:f-Xt,y:m+p},{x:f+d,y:m+p},{x:f+d,y:m-Xt}],S=`M${f-Xt},${m-Xt} L${f+d},${m-Xt} L${f+d},${m+p} L${f-Xt},${m+p} L${f-Xt},${m-Xt}
|
|
241
|
+
M${f-Xt},${m} L${f+d},${m}
|
|
242
|
+
M${f},${m-Xt} L${f},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=x.path(S,C),B=a.insert(()=>_,":first-child");return B.attr("transform",`translate(${Xt/2}, ${Xt/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Xt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Xt/2-(n.y-(n.top??0))})`),gt(t,B),t.intersect=function(L){return ct.polygon(t,b,L)},a}u(Fg,"windowPane");var pd=new Set(["redux-color","redux-dark-color"]),WS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ul(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Gt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:it}=Gt(),{background:yt}=it,St={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${yt}`]};await Ul(e,St)}const c=Gt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:p}=t,{labelStyles:f,nodeStyles:m}=ut(t);if(r.attributes.length===0&&t.label){const it={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Br(t.label,c)+it.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const yt=await Di(e,t,it);if(i!=null&&pd.has(i)){const St=r.colorIndex??0;yt.attr("data-color-id",`color-${St%l.length}`)}if(!dr(c.htmlLabels)){const St=yt.select("text"),vt=St.node()?.getBBox();St.attr("transform",`translate(${-vt.width/2}, 0)`)}return yt}c.htmlLabels||(h*=1.25,d*=1.25);let y=xt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await bi(x,t.label??"",c,0,0,["name"],f);C.height+=d;let b=0;const S=[],_=[];let B=0,L=0,F=0,A=0,H=!0,R=!0;for(const it of r.attributes){const yt=await bi(x,it.type,c,0,b,["attribute-type"],f);B=Math.max(B,yt.width+h);const St=await bi(x,it.name,c,0,b,["attribute-name"],f);L=Math.max(L,St.width+h);const vt=await bi(x,it.keys.join(),c,0,b,["attribute-keys"],f);F=Math.max(F,vt.width+h);const wt=await bi(x,it.comment,c,0,b,["attribute-comment"],f);A=Math.max(A,wt.width+h);const Dt=Math.max(yt.height,St.height,vt.height,wt.height)+d;_.push({yOffset:b,rowHeight:Dt}),b+=Dt}let $=4;F<=h&&(H=!1,F=0,$--),A<=h&&(R=!1,A=0,$--);const G=x.node().getBBox();if(C.width+h*2-(B+L+F+A)>0){const it=C.width+h*2-(B+L+F+A);B+=it/$,L+=it/$,F>0&&(F+=it/$),A>0&&(A+=it/$)}const O=B+L+F+A,E=pt.svg(x),M=dt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let v=0;_.length>0&&(v=_.reduce((it,yt)=>it+(yt?.rowHeight??0),0));const q=Math.max(G.width+h*2,t?.width||0,O),z=Math.max((v??0)+C.height,t?.height||0),I=-q/2,X=-z/2;if(x.selectAll("g:not(:first-child)").each((it,yt,St)=>{const vt=Ot(St[yt]),wt=vt.attr("transform");let Dt=0,Ut=0;if(wt){const Re=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(wt);Re&&(Dt=parseFloat(Re[1]),Ut=parseFloat(Re[2]),vt.attr("class").includes("attribute-name")?Dt+=B:vt.attr("class").includes("attribute-keys")?Dt+=B+L:vt.attr("class").includes("attribute-comment")&&(Dt+=B+L+F))}vt.attr("transform",`translate(${I+h/2+Dt}, ${Ut+X+C.height+d/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(X+d/2)+")"),i!=null&&pd.has(i)){const it=r.colorIndex??0;x.attr("data-color-id",`color-${it%l.length}`)}const K=E.rectangle(I,X,q,z,M),lt=x.insert(()=>K,":first-child").attr("class","outer-path").attr("style",p.join(""));S.push(0);for(const[it,yt]of _.entries()){const vt=(it+1)%2===0&&yt.yOffset!==0,wt=E.rectangle(I,C.height+X+yt?.yOffset,q,yt?.rowHeight,{...M,fill:vt?o:a,stroke:n});x.insert(()=>wt,"g.label").attr("style",p.join("")).attr("class",`row-rect-${vt?"even":"odd"}`)}const mt=1e-4;let kt=ki(I,C.height+X,q+I,C.height+X,mt),ft=E.polygon(kt.map(it=>[it.x,it.y]),M);if(x.insert(()=>ft).attr("class","divider"),kt=ki(B+I,C.height+X,B+I,z+X,mt),ft=E.polygon(kt.map(it=>[it.x,it.y]),M),x.insert(()=>ft).attr("class","divider"),H){const it=B+L+I;kt=ki(it,C.height+X,it,z+X,mt),ft=E.polygon(kt.map(yt=>[yt.x,yt.y]),M),x.insert(()=>ft).attr("class","divider")}if(R){const it=B+L+F+I;kt=ki(it,C.height+X,it,z+X,mt),ft=E.polygon(kt.map(yt=>[yt.x,yt.y]),M),x.insert(()=>ft).attr("class","divider")}for(const it of S){const yt=C.height+X+it;kt=ki(I,yt,q+I,yt,mt),ft=E.polygon(kt.map(St=>[St.x,St.y]),M),x.insert(()=>ft).attr("class","divider")}if(gt(t,lt),m&&t.look!=="handDrawn")if(i!=null&&WS.has(i))x.selectAll("path").attr("style",m);else{const yt=m.split(";")?.filter(St=>St.includes("stroke"))?.map(St=>`${St}`).join("; ");x.selectAll("path").attr("style",yt??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(it){return ct.rect(t,it)},x}u(Ul,"erBox");async function bi(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==$h(t)&&(t=$h(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await De(n,t,{width:Br(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(dr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=Ot(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}u(bi,"addText");function ki(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}u(ki,"lineToPolygon");async function Eg(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,p=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await rs(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await rs(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const S=await rs(c,b,y,[b.parseClassifier()]);y+=S+o}f=c.node().getBBox().height,f<=0&&(f=s/2),h=a.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const S=await rs(h,b,x,[b.parseClassifier()]);x+=S+o}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${d+p+s*2})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(f?f+s*4:s*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}u(Eg,"textHelper");async function rs(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Gt();let a="useHtmlLabels"in t?t.useHtmlLabels:dr(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),gs(n)&&(a=!0);const l=await De(s,Vn(zr(n)),{width:Br(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],p=Ot(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await Nl(d),c=d.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Ot(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}u(rs,"addText");async function Mg(e,t){const r=$t(),{theme:i,themeVariables:s}=r,{useGradient:o,borderColorArray:a}=s,n=r.class.padding??12,l=n,c=t.useHtmlLabels??dr(r.htmlLabels)??!0,h=t;h.annotations=h.annotations??[],h.members=h.members??[],h.methods=h.methods??[];const{shapeSvg:d,bbox:p}=await Eg(e,t,r,c,l);Ue(d,t.colorIndex,i,a);const{labelStyles:f,nodeStyles:m}=ut(t);t.labelStyle=f,t.cssStyles=h.styles||"";const y=h.styles?.join(";")||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const x=h.members.length===0&&h.methods.length===0&&!r.class?.hideEmptyMembersBox,C=pt.svg(d),b=dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=Math.max(t.width??0,p.width);let _=Math.max(t.height??0,p.height);const B=(t.height??0)>p.height;h.members.length===0&&h.methods.length===0?_+=l:h.members.length>0&&h.methods.length===0&&(_+=l*2);const L=-S/2,F=-_/2;let A=x?n*2:h.members.length===0&&h.methods.length===0?-n:0;B&&(A=n*2);const H=C.rectangle(L-n,F-n-(x?n:h.members.length===0&&h.methods.length===0?-n/2:0),S+2*n,_+2*n+A,b),R=d.insert(()=>H,":first-child");R.attr("class","basic label-container outer-path");const $=R.node().getBBox(),G=d.select(".annotation-group").node().getBBox().height-(x?n/2:0)||0,O=d.select(".label-group").node().getBBox().height-(x?n/2:0)||0,E=d.select(".members-group").node().getBBox().height-(x?n/2:0)||0,M=(G+O+F+n-(F-n-(x?n:h.members.length===0&&h.methods.length===0?-n/2:0)))/2;if(d.selectAll(".text").each((v,q,z)=>{const I=Ot(z[q]),X=I.attr("transform");let K=0;if(X){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);ft&&(K=parseFloat(ft[2]))}let lt=K+F+n-(x?n:h.members.length===0&&h.methods.length===0?-n/2:0);if(I.attr("class").includes("methods-group")){const kt=Math.max(E,l/2);B?lt=Math.max(M,G+O+kt+F+l*2+n)+l*2:lt=G+O+kt+F+l*4+n}h.members.length===0&&h.methods.length===0&&r.class?.hideEmptyMembersBox&&(h.annotations.length>0?lt=K-l:lt=K),c||(lt-=4);let mt=L;(I.attr("class").includes("label-group")||I.attr("class").includes("annotation-group"))&&(mt=-I.node()?.getBBox().width/2||0,d.selectAll("text").each(function(kt,ft,it){window.getComputedStyle(it[ft]).textAnchor==="middle"&&(mt=0)})),I.attr("transform",`translate(${mt}, ${lt})`)}),h.members.length>0||h.methods.length>0||x){const v=G+O+F+n,q=C.line($.x,v,$.x+$.width,v+.001,b);d.insert(()=>q).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(x||h.members.length>0||h.methods.length>0){const v=G+O+E+F+l*2+n,q=C.line($.x,B?Math.max(M,v):v,$.x+$.width,(B?Math.max(M,v):v)+.001,b);d.insert(()=>q).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(h.look!=="handDrawn"&&d.selectAll("path").attr("style",y),R.select(":nth-child(2)").attr("style",y),d.selectAll(".divider").select("path").attr("style",y),t.labelStyle?d.selectAll("span").attr("style",t.labelStyle):d.selectAll("span").attr("style",y),!c){const v=RegExp(/color\s*:\s*([^;]*)/),q=v.exec(y);if(q){const z=q[0].replace("color","fill");d.selectAll("tspan").attr("style",z)}else if(f){const z=v.exec(f);if(z){const I=z[0].replace("color","fill");d.selectAll("tspan").attr("style",I)}}}return gt(t,R),t.intersect=function(v){return ct.rect(t,v)},d}u(Mg,"classBox");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=xt(t),h=$t(),{themeVariables:d}=h,{borderColorArray:p,requirementEdgeLabelBackground:f}=d,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await ar(y,`<<${s.type}>>`,0,t.labelStyle):x=await ar(y,"<<Element>>",0,t.labelStyle);let C=x;const b=await ar(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+n,l){const $=await ar(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=$;const G=await ar(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=G;const O=await ar(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=O,await ar(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const $=await ar(y,`${o.type?`Type: ${o.type}`:""}`,C,t.labelStyle,m);C+=$,await ar(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,t.labelStyle,m)}const S=(y.node()?.getBBox().width??200)+a,_=(y.node()?.getBBox().height??200)+a,B=-S/2,L=-_/2,F=pt.svg(y),A=dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const H=F.rectangle(B,L,S,_,A),R=y.insert(()=>H,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",i),p?.length){const $=t.colorIndex??0;y.attr("data-color-id",`color-${$%p.length}`)}if(y.selectAll(".label").each(($,G,O)=>{const E=Ot(O[G]),M=E.attr("transform");let v=0,q=0;if(M){const K=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);K&&(v=parseFloat(K[1]),q=parseFloat(K[2]))}const z=q-_/2;let I=B+a/2;(G===0||G===1)&&(I=v),E.attr("transform",`translate(${I}, ${z+a})`)}),C>x+b+n){const $=L+x+b+n;let G;if(t.look==="neo"){const M=[[B,$],[B+S,$],[B+S,$+.001],[B,$+.001]];G=F.polygon(M,A)}else G=F.line(B,$,B+S,$,A);y.insert(()=>G).attr("class","divider")}return gt(t,R),t.intersect=function($){return ct.rect(t,$)},i&&t.look!=="handDrawn"&&(f||p?.length)&&y.selectAll("path").attr("style",i),y}u(Og,"requirementBox");async function ar(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=$t(),n=a.htmlLabels??!0,l=await De(o,Vn(zr(t)),{width:Br(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=Ot(l);s==="start"&&Ot(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(ar,"addText");var zS=u(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function $g(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await bt(e,t,xt(t)),h=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;p?{label:m,bbox:y}=await ti(p,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await ti(n,"ticket"in t&&t.ticket||"",f);const{label:x,bbox:C}=await ti(n,"assigned"in t&&t.assigned||"",f);t.width=a;const b=10,S=t?.width||0,_=Math.max(y.height,C.height)/2,B=Math.max(l.height+b*2,t?.height||0)+_,L=-S/2,F=-B/2;c.attr("transform","translate("+(h-S/2)+", "+(-_-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-_+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-C.width-2*o)+", "+(-_+l.height/2)+")");let A;const{rx:H,ry:R}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const G=pt.svg(n),O=dt(t,{}),E=H||R?G.path(Pe(L,F,S,B,H||0),O):G.rectangle(L,F,S,B,O);A=n.insert(()=>E,":first-child"),A.attr("class","basic label-container").attr("style",$||null)}else{A=n.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",s).attr("rx",H??5).attr("ry",R??5).attr("x",L).attr("y",F).attr("width",S).attr("height",B);const G="priority"in t&&t.priority;if(G){const O=n.append("line"),E=L+2,M=F+Math.floor((H??0)/2),v=F+B-Math.floor((H??0)/2);O.attr("x1",E).attr("y1",M).attr("x2",E).attr("y2",v).attr("stroke-width","4").attr("stroke",zS(G))}}return gt(t,A),t.height=B,t.intersect=function(G){return ct.rect(t,G)},n}u($g,"kanbanItem");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await bt(e,t,xt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,p=o.width+20,f=o.height+20,m=Math.max(l,p),y=Math.max(c,f);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let x;const C=`M0 0
|
|
243
|
+
a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
|
|
244
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
245
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
246
|
+
a${h},${h} 1 0,0 ${m*.25},${y*.1}
|
|
247
|
+
|
|
248
|
+
a${h},${h} 1 0,0 ${m*.15},${y*.33}
|
|
249
|
+
a${h*.8},${h*.8} 1 0,0 0,${y*.34}
|
|
250
|
+
a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
|
|
251
|
+
|
|
252
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
|
|
253
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
254
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
255
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
256
|
+
|
|
257
|
+
a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
258
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
|
|
259
|
+
a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
|
|
260
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=pt.svg(s),S=dt(t,{}),_=b.path(C,S);x=s.insert(()=>_,":first-child"),x.attr("class","basic label-container").attr("style",ie(d))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),gt(t,x),t.calcIntersect=function(b,S){return ct.rect(b,S)},t.intersect=function(b){return tt.info("Bang intersect",t,b),ct.rect(t,b)},s}u(Ig,"bang");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await bt(e,t,xt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,p=.35*l,f=.2*l,{cssStyles:m}=t;let y;const x=`M0 0
|
|
261
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
262
|
+
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
263
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
264
|
+
|
|
265
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
266
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
|
|
267
|
+
|
|
268
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
269
|
+
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
270
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
271
|
+
|
|
272
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
273
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
|
|
274
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=pt.svg(s),b=dt(t,{}),S=C.path(x,b);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",ie(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),gt(t,y),t.calcIntersect=function(C,b){return ct.rect(C,b)},t.intersect=function(C){return tt.info("Cloud intersect",t,C),ct.rect(t,C)},s}u(Dg,"cloud");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await bt(e,t,xt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
|
|
275
|
+
M${-l/2} ${c/2-h}
|
|
276
|
+
v${-c+2*h}
|
|
277
|
+
q0,-${h} ${h},-${h}
|
|
278
|
+
h${l-2*h}
|
|
279
|
+
q${h},0 ${h},${h}
|
|
280
|
+
v${c-h}
|
|
281
|
+
H${-l/2}
|
|
282
|
+
Z
|
|
283
|
+
`:`
|
|
284
|
+
M${-l/2} ${c/2-h}
|
|
285
|
+
v${-c+2*h}
|
|
286
|
+
q0,-${h} ${h},-${h}
|
|
287
|
+
h${l-2*h}
|
|
288
|
+
q${h},0 ${h},${h}
|
|
289
|
+
v${c-2*h}
|
|
290
|
+
q0,${h} ${-h},${h}
|
|
291
|
+
h${-(l-2*h)}
|
|
292
|
+
q${-h},0 ${-h},${-h}
|
|
293
|
+
Z
|
|
294
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),gt(t,p),t.calcIntersect=function(f,m){return ct.rect(f,m)},t.intersect=function(f){return ct.rect(t,f)},s}u(Pg,"defaultMindmapNode");async function Rg(e,t){const r={padding:t.padding??0};return Hl(e,t,r)}u(Rg,"mindmapCircle");var yi=36,Xr=50,HS=100,YS=80,Ur=6,_i=16,US="bpmn",jS={start:{rings:1,strokeWidth:1.6},intermediate:{rings:2,strokeWidth:1.4},boundary:{rings:2,strokeWidth:1.4},end:{rings:1,strokeWidth:3.4}},fd;async function Ng(){return fd??=It(async()=>{const{bpmnIcons:e}=await import("./bpmnIcons-APHXDYXF-ByGoYv9M.js");return{bpmnIcons:e}},[],import.meta.url).then(({bpmnIcons:e})=>{Kk(e.prefix)||sp([{name:e.prefix,icons:e}])}),fd}u(Ng,"ensureBpmnIcons");function qg(e){const t=e.metadata?.dataDirection;return t==="input"||t==="output"?t:void 0}u(qg,"dataDirectionOf");function Wg(e){return e.metadata?.isCollection===!0}u(Wg,"isCollectionData");async function _o(e,t){return await Ng(),oi(e,{height:t,width:t,fallbackPrefix:US})}u(_o,"glyphSvg");var _s=u((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabelBelow"),zg=u(async(e,t,r)=>{if(!t)return;const i=e.append("g").attr("class","bpmn-glyph");i.html(`<g>${await _o(t,r)}</g>`),i.attr("transform",`translate(${-r/2}, ${-r/2})`)},"appendGlyph"),Bs=u((e,t,r,i,s)=>{s&&(t.metadata={...t.metadata??{},drawnExtent:s});const o=e.insert("rect",":first-child").attr("class","bpmn-bounds").attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i).attr("opacity",0).attr("aria-hidden","true");return gt(t,o),o},"reserveBounds"),GS=8,Bo=u((e,t,r)=>Math.min(Math.max(e,t),r),"clamp"),zo=u((e,t,r,i,s)=>{const o=e.x??0,a=e.y??0,n=t/2,l=r/2,c=i.x-o,h=i.y-a,d=s??(Math.abs(c)*l>Math.abs(h)*n?c>=0?"right":"left":h>=0?"bottom":"top"),p=u(f=>Math.max(0,f-Math.min(GS,f/2)),"reach");return d==="left"||d==="right"?{x:o+(d==="right"?n:-n),y:Bo(i.y,a-p(l),a+p(l))}:{x:Bo(i.x,o-p(n),o+p(n)),y:a+(d==="bottom"?l:-l)}},"faceProjectIntersect"),VS=u((e,t,r)=>{const i=e.x??0,s=e.y??0,o=t/2,a=r.x-i,n=r.y-s,l=o*.85;if(Math.abs(n)>=Math.abs(a)){const h=Bo(a,-l,l);return{x:i+h,y:s+Math.sign(n||1)*Math.sqrt(o*o-h*h)}}const c=Bo(n,-l,l);return{x:i+Math.sign(a||1)*Math.sqrt(o*o-c*c),y:s+c}},"ringIntersect"),XS=u((e,t,r,i)=>{const s=e.x??0,o=e.y??0,a=t/2,n=r/2,l=i.x-s,c=i.y-o;return Math.abs(l)*n>Math.abs(c)*a?{x:s+Math.sign(l)*a,y:o}:{x:s,y:o+Math.sign(c||1)*n}},"faceCentreIntersect");async function vs(e,t,r){const i=t,{labelStyles:s,nodeStyles:o}=ut(t);t.labelStyle=s;const{rings:a,strokeWidth:n}=jS[r],l=yi/2,{shapeSvg:c,bbox:h,label:d}=await bt(e,t,xt(t,`bpmn-event bpmn-event-${r}`)),p=c.insert("g",":first-child").attr("class","bpmn-event-body");p.attr("style",o);for(let C=0;C<a;C++)p.append("circle").attr("class",C===0?"bpmn-event-ring":"bpmn-event-ring bpmn-event-ring-inner").attr("r",l-C*3).style("stroke-width",`${n}px`);await zg(p,i.icon,_i);const f=h.height>0&&!!t.label,m=f?Ur+h.height:0,y=yi+2*m,x=Math.max(yi,f?h.width:0);return f&&_s(d,h,l+Ur+h.height/2),Bs(c,t,x,y,{width:yi,height:yi}),t.intersect=function(C){return VS(t,yi,C)},c}u(vs,"renderBpmnEvent");async function Hg(e,t){return vs(e,t,"start")}u(Hg,"bpmnStart");async function Yg(e,t){return vs(e,t,"intermediate")}u(Yg,"bpmnIntermediate");async function Ug(e,t){return vs(e,t,"boundary")}u(Ug,"bpmnBoundary");async function jg(e,t){return vs(e,t,"end")}u(jg,"bpmnEnd");async function Gg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const o=Xr/2,{shapeSvg:a,bbox:n,label:l}=await bt(e,t,xt(t,"bpmn-gateway")),c=a.insert("g",":first-child").attr("class","bpmn-gateway-body");c.append("polygon").attr("class","bpmn-gateway-diamond").attr("points",`0,${-o} ${o},0 0,${o} ${-o},0`).attr("style",s),await zg(c,r.icon,_i+2);const h=n.height>0&&!!t.label,d=h?Ur+n.height:0,p=Xr+2*d,f=Math.max(Xr,h?n.width:0);return h&&_s(l,n,o+Ur+n.height/2),Bs(a,t,f,p,{width:Xr,height:Xr}),t.intersect=function(m){return XS(t,Xr,Xr,m)},a}u(Gg,"bpmnGateway");async function Vg(e,t){const r=t,{labelStyles:i,nodeStyles:s}=ut(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await bt(e,t,xt(t,"bpmn-activity")),l=r.markers??[],c=r.icon,h=c?_i+6:10,d=l.length>0?_i+4:10,p=Math.max(HS,a.width+16),f=Math.max(YS,a.height+h+d),m=o.insert("g",":first-child").attr("class","bpmn-activity-body");if(m.append("rect").attr("class","bpmn-activity-rect").attr("x",-p/2).attr("y",-f/2).attr("width",p).attr("height",f).attr("rx",10).attr("ry",10).attr("style",s),c){const y=m.append("g").attr("class","bpmn-activity-icon");y.html(`<g>${await _o(c,_i)}</g>`),y.attr("transform",`translate(${-p/2+6}, ${-f/2+6})`)}if(l.length>0){const y=m.append("g").attr("class","bpmn-activity-markers"),x=_i-2,C=l.length*x;for(const[b,S]of l.entries()){const _=y.append("g");_.html(`<g>${await _o(S,x)}</g>`),_.attr("transform",`translate(${-C/2+b*x}, 0)`)}y.attr("transform",`translate(0, ${f/2-x-3})`)}if(a.height>0){const y=-f/2+h,x=f/2-d;_s(n,a,(y+x)/2)}return gt(t,m),t.intersect=function(y){return zo(t,p,f,y)},o}u(Vg,"bpmnActivity");var Xi=36,xi=50,Ys=10;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t,"bpmn-data-object")),n=s.insert("g",":first-child").attr("class","bpmn-data-body"),l=-Xi/2,c=-xi/2,h=Xi/2,d=xi/2;n.append("path").attr("class","bpmn-data-page").attr("d",`M${l},${c} H${h-Ys} L${h},${c+Ys} V${d} H${l} Z`).attr("style",i),n.append("path").attr("class","bpmn-data-fold").attr("d",`M${h-Ys},${c} V${c+Ys} H${h}`);const p=qg(t);p&&n.append("path").attr("class",`bpmn-data-arrow bpmn-data-arrow-${p}`).attr("d",`M${l+4},${c+9} h7 v-3 l5,4.5 -5,4.5 v-3 h-7 Z`),Wg(t)&&n.append("path").attr("class","bpmn-data-collection").attr("d",`M-4,${d-11} v9 M0,${d-11} v9 M4,${d-11} v9`);const f=o.height>0&&!!t.label,m=f?Ur+o.height:0,y=xi+2*m,x=Math.max(Xi,f?o.width:0);return f&&_s(a,o,xi/2+Ur+o.height/2),Bs(s,t,x,y,{width:Xi,height:xi}),t.intersect=function(C){return zo(t,Xi,xi,C)},s}u(Xg,"bpmnDataObject");var sr=50;async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=ut(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await bt(e,t,xt(t,"bpmn-data-store")),n=s.insert("g",":first-child").attr("class","bpmn-data-body"),l=sr/2,c=6;n.append("path").attr("class","bpmn-store-body").attr("d",`M${-l},${-l+c} a${l},${c} 0 0 1 ${sr},0 V${l-c} a${l},${c} 0 0 1 ${-sr},0 Z`).attr("style",i);for(const m of[0,5,10])n.append("path").attr("class","bpmn-store-rings").attr("d",`M${-l},${-l+c+m} a${l},${c} 0 0 0 ${sr},0`);const h=o.height>0&&!!t.label,d=h?Ur+o.height:0,p=sr+2*d,f=Math.max(sr,h?o.width:0);return h&&_s(a,o,l+Ur+o.height/2),Bs(s,t,f,p,{width:sr,height:sr}),t.intersect=function(m){return zo(t,sr,sr,m)},s}u(Zg,"bpmnDataStore");async function Kg(e,t){const{labelStyles:r}=ut(t);t.labelStyle=r,t.wrappingWidth=160;const{shapeSvg:i,bbox:s,label:o}=await bt(e,t,xt(t,"bpmn-annotation")),a=8,n=Math.max(28,s.height+a*2),l=s.width+a*2+6,c=t.metadata?.attachFace==="right"?"right":"left";i.insert("g",":first-child").attr("class","bpmn-annotation-body").append("path").attr("class","bpmn-annotation-bracket").attr("d",c==="right"?`M${l/2-6},${-n/2} h6 V${n/2} h-6`:`M${-l/2+6},${-n/2} h-6 V${n/2} h6`);const d=c==="right"?-l/2+a:-l/2+a+6;return o.attr("transform",`translate(${d-(s.x??0)+(s.left??0)},${-s.height/2-((s.y??0)-(s.top??0))})`),Bs(i,t,l,n),t.intersect=function(p){return zo(t,l,n,p,c)},i}u(Kg,"bpmnAnnotation");var ZS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:gg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ug},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:mg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:bg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ff},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Ef},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Pf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ff},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Sf},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:xf},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Af},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Hl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ig},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Dg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:hg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:qf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Zf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Xf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:_g},{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:Gf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Of},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:wg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Cf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:pg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Cg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:xg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Rf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Wf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:_f},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Bf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:vf},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Kf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Lg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Nf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Tg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Qf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Lf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Mf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:vg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Fg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:If},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Bg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Df},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:fg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ng},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ag},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:pf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Tf},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Sg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:kg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ag},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:cg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Jf}],KS=u(()=>{const t=[...Object.entries({state:yg,choice:bf,note:lg,composite:kf,rectWithTitle:dg,labelRect:Vf,block_arrow:yf,collapsedGroup:mf,iconSquare:Uf,iconCircle:Hf,icon:zf,iconRounded:Yf,imageSquare:jf,anchor:df,kanbanItem:$g,mindmapCircle:Rg,defaultMindmapNode:Pg,classBox:Mg,erBox:Ul,requirementBox:Og,usecaseActor:tg,usecaseActorHollow:rg,usecaseActorAwesome:eg,usecaseActorIcon:ig,usecaseBusiness:sg,usecaseEllipse:$f,usecaseJsonTable:og,"bpmn-start":Hg,"bpmn-intermediate":Yg,"bpmn-boundary":Ug,"bpmn-end":jg,"bpmn-gateway":Gg,"bpmn-activity":Vg,"bpmn-data":Xg,"bpmn-data-store":Zg,"bpmn-annotation":Kg}),...ZS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Qg=KS();function QS(e){return e in Qg}u(QS,"isValidShape");var Ls=u(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Ho=new Map;async function Jg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Qg[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",ie(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ho.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}u(Jg,"insertNode");var oA=u((e,t)=>{Ho.set(t.id,e)},"setNodeElem"),aA=u(()=>{Ho.clear()},"clear"),nA=u(e=>{const t=Ho.get(e.id);tt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),tm=u(async(e,t,{variant:r="swimlane"}={})=>{const i=r==="pool",s=i?"pool swimlane":"swimlane",o=i?"pool-label swimlane-label":"swimlane-label",a=i?"pool-title swimlane-title":"swimlane-title",n=i?"pool-body swimlane-body":"swimlane-body",l=$t(),{theme:c,themeVariables:h,handDrawnSeed:d}=l,{clusterBkg:p,clusterBorder:f,borderColorArray:m}=h,y=f,{labelStyles:x,nodeStyles:C,borderStyles:b,backgroundStyles:S}=ut(t),_=e.insert("g").attr("class","cluster "+s+" "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);Ue(_,t.colorIndex,c,m);const B=dr(l.flowchart.htmlLabels),L=t.direction==="LR",F=_.insert("g").attr("class","cluster-label "+o),A=await De(F,t.label,{style:t.labelStyle,useHtmlLabels:B,isNode:!0,width:t.width});let H=A.getBBox();if(B){const K=A.children[0],lt=Ot(A);H=K.getBoundingClientRect(),lt.attr("width",H.width),lt.attr("height",H.height)}const R=t.padding??0,$=t.width<=H.width+R?H.width+R:t.width;t.width<=H.width+R?t.diff=($-t.width)/2-R:t.diff=-R;const G=t.height,O=t.y-G/2,E=t.y+G/2,M=t.x-$/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:O+G/3,q=L?4:0,z=H.height+2*q;let I,X;if(L){const K=Math.max(z,H.height+2*q),lt=M+K,mt=Math.max(0,$-K);if(t.look==="handDrawn"){const it=pt.svg(_),yt=dt(t,{roughness:.7,fill:p,stroke:y,seed:d}),St=dt(t,{roughness:.7,fill:"none",stroke:y,seed:d}),vt=it.rectangle(M,O,K,G,yt);I=_.insert(()=>vt,":first-child").attr("class",a);const wt=it.rectangle(lt,O,mt,G,St);X=_.insert(()=>wt,":first-child").attr("class",n),I.select("path:nth-child(2)").attr("style",b.join(";")),I.select("path").attr("style",S.join(";").replace("fill","stroke"))}else I=_.insert("rect",":first-child"),X=_.insert("rect",":first-child"),I.attr("class",a).attr("style",C).attr("x",M).attr("y",O).attr("width",K).attr("height",G).attr("fill",p).attr("stroke",y),X.attr("class",n).attr("style",C).attr("x",lt).attr("y",O).attr("width",mt).attr("height",G).attr("fill","none").attr("stroke",y);const kt=M+K/2,ft=t.y;F.attr("transform",`translate(${kt}, ${ft}) rotate(-90) translate(${-H.width/2}, ${-H.height/2})`)}else{const K=Math.max(0,v-O),lt=Math.min(z,K),mt=O+lt,kt=Math.max(0,E-mt),ft=t.x-$/2;if(t.look==="handDrawn"){const St=pt.svg(_),vt=dt(t,{roughness:.7,fill:p,stroke:y,fillWeight:3,seed:d}),wt=dt(t,{roughness:.7,fill:"none",stroke:y,seed:d}),Dt=St.rectangle(ft,O,$,lt,vt);I=_.insert(()=>Dt,":first-child").attr("class",a);const Ut=St.rectangle(ft,mt,$,kt,wt);X=_.insert(()=>Ut,":first-child").attr("class",n),I.select("path:nth-child(2)").attr("style",b.join(";")),I.select("path").attr("style",S.join(";").replace("fill","stroke"))}else I=_.insert("rect",":first-child"),X=_.insert("rect",":first-child"),I.attr("class",a).attr("style",C).attr("x",ft).attr("y",O).attr("width",$).attr("height",lt).attr("fill",p).attr("stroke",y),X.attr("class",n).attr("style",C).attr("x",ft).attr("y",mt).attr("width",$).attr("height",kt).attr("fill","none").attr("stroke",y);const it=t.x-H.width/2,yt=O+(lt-H.height)/2;F.attr("transform",`translate(${it}, ${yt})`)}if(tt.trace("Swimlane data ",t,JSON.stringify(t)),x){const K=F.select("span");K&&K.attr("style",x)}return t.offsetX=0,t.width=$,t.height=G,t.offsetY=H.height-R/2,t.intersect=function(K){return Lr(t,K)},{cluster:_,labelBBox:H}},"swimlane"),em=u(async(e,t)=>{tt.info("Creating subgraph rect for ",t.id,t);const r=$t(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n,borderColorArray:l}=s,{labelStyles:c,nodeStyles:h,borderStyles:d,backgroundStyles:p}=ut(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ue(f,t.colorIndex,i,l);const m=le(r),y=f.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await De(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):x=await kr(y,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(le(r)){const H=x.children[0],R=Ot(x);C=H.getBoundingClientRect(),R.attr("width",C.width),R.attr("height",C.height)}const b=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const S=t.height,_=t.x-b/2,B=t.y-S/2;tt.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){const H=pt.svg(f),R=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:o}),$=H.path(Pe(_,B,b,S,0),R);L=f.insert(()=>(tt.debug("Rough node insert CXC",$),$),":first-child"),L.select("path:nth-child(2)").attr("style",d.join(";")),L.select("path").attr("style",p.join(";").replace("fill","stroke"))}else L=f.insert("rect",":first-child"),L.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",B).attr("width",b).attr("height",S);const{subGraphTitleTopMargin:F}=Ls(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+F})`),c){const H=y.select("span");H&&H.attr("style",c)}const A=L.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=C.height-t.padding/2,t.intersect=function(H){return Lr(t,H)},{cluster:f,labelBBox:C}},"rect"),JS=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Lr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),tw=u(async(e,t)=>{const r=$t(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:a,borderColorArray:n,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=s,d=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);Ue(d,t.colorIndex,i,n);const p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let m=d.append("rect");const y=await kr(f,t.label,t.labelStyle,void 0,!0);let x=y.getBBox();if(le(r)){const $=y.children[0],G=Ot(y);x=$.getBoundingClientRect(),G.attr("width",x.width),G.attr("height",x.height)}const C=0*t.padding,b=C/2,S=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(S-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+C,B=t.height+C-x.height-6,L=t.x-S/2,F=t.y-_/2;t.width=S;const A=t.y-t.height/2-b+x.height+2;let H;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),G=pt.svg(d),O=t.rx||t.ry?G.path(Pe(L,F,S,_,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:o}):G.rectangle(L,F,S,_,{seed:o});H=d.insert(()=>O,":first-child");const E=G.rectangle(L,A,S,B,{fill:$?a:l,fillStyle:$?"hachure":"solid",stroke:h,seed:o});H=d.insert(()=>O,":first-child"),m=d.insert(()=>E),H.attr("class","outer"),m.attr("class","inner")}else H=p.insert("rect",":first-child"),H.attr("class","outer").attr("x",L).attr("y",F).attr("width",S).attr("height",_).attr("data-look",t.look),m.attr("class","inner").attr("x",L).attr("y",A).attr("width",S).attr("height",B);f.attr("transform",`translate(${t.x-x.width/2}, ${F+1-(le(r)?0:3)})`);const R=H.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function($){return Lr(t,$)},{cluster:d,labelBBox:x}},"roundedWithTitle"),ew=u(async(e,t)=>{tt.info("Creating subgraph rect for ",t.id,t);const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ut(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=le(r),f=d.insert("g").attr("class","cluster-label "),m=await De(f,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=m.getBBox();if(le(r)){const F=m.children[0],A=Ot(m);y=F.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,S=t.y-C/2;tt.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const F=pt.svg(d),A=dt(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),H=F.path(Pe(b,S,x,C,t.rx),A);_=d.insert(()=>(tt.debug("Rough node insert CXC",H),H),":first-child"),_.select("path:nth-child(2)").attr("style",c.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=Ls(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const F=f.select("span");F&&F.attr("style",n)}const L=_.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return Lr(t,F)},{cluster:d,labelBBox:y}},"kanbanSection"),rw=u((e,t)=>{const r=$t(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:a,nodeBorder:n,borderColorArray:l}=s,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);Ue(c,t.colorIndex,i,l);const h=c.insert("g",":first-child"),d=0*t.padding,p=t.width+d;t.diff=-t.padding;const f=t.height+d,m=t.x-p/2,y=t.y-f/2;t.width=p;let x;if(t.look==="handDrawn"){const S=pt.svg(c).rectangle(m,y,p,f,{fill:a??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:n,seed:o});x=c.insert(()=>S,":first-child").attr("class","divider")}else{x=h.insert("rect",":first-child");let b="outer";t.look,b="divider",x.attr("class",b).attr("x",m).attr("y",y).attr("width",p).attr("height",f).attr("data-look",t.look)}const C=x.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return Lr(t,b)},{cluster:c,labelBBox:{}}},"divider"),iw=u(async(e,t,r)=>{tt.info(`Creating ${r.cssClass} for `,t.id,t);const i=$t(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{borderColorArray:n}=o,{labelStyles:l,borderStyles:c}=ut(t),h=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);Ue(h,t.colorIndex,s,n);const d=le(i),p=h.insert("g").attr("class","cluster-label");let f={width:0,height:0};const m=t.label?.trim();if(m){let B;if(t.labelType==="markdown"?B=await De(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):B=await kr(p,t.label,t.labelStyle||"",!1,!0),f=B.getBBox(),d){const L=B.children[0],F=Ot(B);f=L.getBoundingClientRect(),F.attr("width",f.width),F.attr("height",f.height)}}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,b=t.y-x/2;let S;if(t.look==="handDrawn"){const B=pt.svg(h),L=dt(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:a,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=B.path(Pe(C,b,y,x,r.rx),L);S=h.insert(()=>F,":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";"))}else S=h.insert("rect",":first-child"),S.attr("rx",r.rx).attr("ry",r.rx).attr("x",C).attr("y",b).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&S.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:B}=Ls(i);if(p.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+B})`),l){const L=p.select("span");L&&L.attr("style",l)}}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=f.height-t.padding/2,t.intersect=function(B){return Lr(t,B)},{cluster:h,labelBBox:f}},"createContainerGroup"),sw=u(async(e,t)=>{const{themeVariables:r}=$t(),i=r.flowContainerStroke||r.secondaryBorderColor;return iw(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),ow=u((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,o=Math.max(e.width,t.width+i),a=r==="package"?Math.max(e.height,s+e.padding*2):e.height,n=e.x-o/2,l=e.y-a/2;return{boundaryType:r,width:o,height:a,x:n,y:l,bodyY:l+s,bodyHeight:a-s,tabHeight:s,tabWidth:r==="package"?Math.min(o,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),aw=u(async(e,t)=>{tt.info("Creating usecase system boundary for ",t.id,t);const r=$t(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n,borderColorArray:l}=s,{labelStyles:c,nodeStyles:h}=ut(t),{stylesMap:d}=jr(t),p=t.boundaryType||"rect",f=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${p} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",p).attr("data-look",t.look);Ue(f,t.colorIndex,i,l);const m=le(r),y=f.insert("g").attr("class","cluster-label system-boundary-title"),x=await De(y,t.label,{style:c,useHtmlLabels:m,isNode:!0});let C=x.getBBox();if(m){const O=x.children[0],E=Ot(x);C=O.getBoundingClientRect(),E.attr("width",C.width),E.attr("height",C.height)}const b=ow(t,C),{width:S,height:_,x:B,y:L,bodyY:F,bodyHeight:A,tabHeight:H,tabWidth:R}=b;t.diff=t.width<=C.width+t.padding?(S-t.width)/2-t.padding:-t.padding;const $=dt(t,{fill:d.get("fill")||a,stroke:d.get("stroke")||n,strokeWidth:d.get("stroke-width")?.replace("px","")||1,seed:o});if(t.look==="handDrawn"){const O=pt.svg(f),E=O.rectangle(B,F,S,A,$);if(f.insert(()=>E,":first-child").attr("class","boundary-body label-container"),p==="package"){const M=O.rectangle(B,L,R,H,$);f.insert(()=>M,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else f.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",h).attr("x",B).attr("y",F).attr("width",S).attr("height",A),p==="package"&&f.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",h).attr("x",B).attr("y",L).attr("width",R).attr("height",H);const{subGraphTitleTopMargin:G}=Ls(r);return p==="package"?y.attr("transform",`translate(${B+(R-C.width)/2}, ${L+(H-C.height)/2})`):y.attr("transform",`translate(${t.x-C.width/2}, ${L+G})`),c&&(y.attr("style",c),y.select("span").attr("style",c)),t.offsetX=0,t.width=S,t.height=_,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(O){return Lr(t,O)},{cluster:f,labelBBox:C}},"usecaseSystemBoundary"),nw=em,lw=u((e,t)=>tm(e,t,{variant:"pool"}),"pool"),hw={rect:em,squareRect:nw,roundedWithTitle:tw,noteGroup:JS,divider:rw,kanbanSection:ew,flowGroup:sw,usecaseSystemBoundary:aw,swimlane:tm,pool:lw},cw=new Set(["noteGroup","divider"]),lA=u(e=>!cw.has(e??"rect"),"clusterPaintsTitle"),rm=new Map,dw=u(async(e,t)=>{const r=t.shape||"rect",i=await hw[r](e,t);return rm.set(t.id,i),i},"insertCluster"),hA=u(()=>{rm=new Map},"clear"),Zi=u((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),ae={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},gd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5,arrow_open_head:4,arrow_hollow_circle:8};function is(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=jt(e),t=jt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}u(is,"calculateDeltaAndAngle");var jt=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),uw=u(e=>({x:u(function(t,r,i){let s=0;const o=jt(i[0]).x<jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ae,e.arrowTypeStart)){const{angle:f,deltaX:m}=is(i[0],i[1]);s=ae[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ae,e.arrowTypeEnd)){const{angle:f,deltaX:m}=is(i[i.length-1],i[i.length-2]);s=ae[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(jt(t).x-jt(i[i.length-1]).x),n=Math.abs(jt(t).y-jt(i[i.length-1]).y),l=Math.abs(jt(t).x-jt(i[0]).x),c=Math.abs(jt(t).y-jt(i[0]).y),h=ae[e.arrowTypeStart],d=ae[e.arrowTypeEnd],p=1;if(a<d&&a>0&&n<d){let f=d+p-a;f*=o==="right"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+p-l;f*=o==="right"?-1:1,s+=f}return jt(t).x+s},"x"),y:u(function(t,r,i){let s=0;const o=jt(i[0]).y<jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ae,e.arrowTypeStart)){const{angle:f,deltaY:m}=is(i[0],i[1]);s=ae[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ae,e.arrowTypeEnd)){const{angle:f,deltaY:m}=is(i[i.length-1],i[i.length-2]);s=ae[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(jt(t).y-jt(i[i.length-1]).y),n=Math.abs(jt(t).x-jt(i[i.length-1]).x),l=Math.abs(jt(t).y-jt(i[0]).y),c=Math.abs(jt(t).x-jt(i[0]).x),h=ae[e.arrowTypeStart],d=ae[e.arrowTypeEnd],p=1;if(a<d&&a>0&&n<d){let f=d+p-a;f*=o==="up"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+p-l;f*=o==="up"?-1:1,s+=f}return jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),im=1,pw=u(e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:im,"getStepDuration"),jl=u(e=>typeof e.step=="number"&&Number.isInteger(e.step)&&e.step>0,"isStepEdge"),md=[.25,.35,.15,.65,.75,.5,.85,.1,.9],Mn=9,fw=11,gw=2,mw="#333333",yd=12,xd=6,Cd=14,bd=.01,yw=4.5,sm=/translate\(\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i,xw=4,Cw=.6,bw=4,kw=u((e,t,r=im)=>{const i=Math.max(t,e);return{begin:(e-1)*r,dur:r,gap:(i-1)*r}},"getEdgeStepTiming"),Sw=u(e=>`step_${Array.from(e,t=>/[\dA-Za-z]/.test(t)?t:`_${(t.codePointAt(0)??0).toString(16)}_`).join("")}`,"toAnimationId"),ww=u(e=>{const t=/^m\s*(-?[\d.e]+)[\s,]+(-?[\d.e]+)/i.exec(e.trim());return t?`translate(${t[1]},${t[2]}) `:""},"pathStartTranslate"),Tw=u(e=>Array.from(e,(t,r)=>{const i=t.codePointAt(0)??0;if(i===0)return"�";const s=i<=31||i===127,o=/\d/.test(t)&&(r===0||r===1&&e.startsWith("-"));return s||o?`\\${i.toString(16)} `:e==="-"?"\\-":i>=128||/[\w-]/.test(t)?t:`\\${t}`}).join(""),"escapeCssIdentifierFallback"),om=u(e=>typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):Tw(e),"escapeCssIdentifier"),_w=u((e,t)=>{const r=e.node(),i=r?.ownerSVGElement??r?.closest?.("svg")??r,s=t||i?.getAttribute("id");if(!i||!s||i.querySelector("style.edge-step-style"))return;const o=`#${om(s)} `,a=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","style");a.setAttribute("class","edge-step-style"),a.textContent=`@media (prefers-reduced-motion: reduce) { ${o}.edge-step-dot, ${o}.edge-step-highlight { display: none; } }`,i.appendChild(a)},"ensureReducedMotionStyle"),Bw=u((e,t)=>{const r=e.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y));if(r.length===0)return;const i=r.slice(1).map((o,a)=>Math.hypot(o.x-r[a].x,o.y-r[a].y));let s=i.reduce((o,a)=>o+a,0)*t;for(const[o,a]of i.entries()){if(s<=a&&a>0){const n=s/a,l=r[o],c=r[o+1];return{x:l.x+(c.x-l.x)*n,y:l.y+(c.y-l.y)*n}}s-=a}return r[r.length-1]},"pointAlongPolyline"),vw=u((e,t)=>{const r=typeof t?.getTotalLength=="function"?t.getTotalLength():0,i=t?.getPointAtLength?.bind(t);return r>0&&i?s=>{const{x:o,y:a}=i(r*s);return{x:o,y:a}}:s=>Bw(e,s)},"createPathSampler"),Lw=u((e,t)=>Math.min(Number.POSITIVE_INFINITY,...t.map(r=>{const i=Math.max(Math.abs(e.x-r.x)-r.halfWidth,0),s=Math.max(Math.abs(e.y-r.y)-r.halfHeight,0);return Math.hypot(i,s)-Mn})),"roomAround"),Aw=u((e,t)=>{const r=e(t),i=e(Math.max(t-bd,0)),s=e(Math.min(t+bd,1));if(!r||!i||!s)return[];const o=Math.hypot(s.x-i.x,s.y-i.y);if(o===0)return[];const a={x:-(s.y-i.y)/o,y:(s.x-i.x)/o};return[1,-1].map(n=>({x:r.x+a.x*Cd*n,y:r.y+a.y*Cd*n}))},"besideThePath"),Fw=u((e,t)=>{const r=[...md.map(e),...md.flatMap(o=>Aw(e,o))];let i,s=Number.NEGATIVE_INFINITY;for(const o of r){if(!o||!Number.isFinite(o.x)||!Number.isFinite(o.y))continue;const a=Lw(o,t);if(a>=gw)return o;a>s&&(i=o,s=a)}return i},"chooseBadgePosition"),am=u((e,t)=>({...e,halfWidth:t,halfHeight:t}),"square"),Ew=u(e=>{const t=sm.exec(e.getAttribute("transform")??"");return t?{x:Number(t[1]),y:Number(t[2])}:{x:0,y:0}},"translationOf"),Gl=u(e=>{const t={x:0,y:0};for(let r=e;r&&r.localName!=="svg";r=r.parentElement){const{x:i,y:s}=Ew(r);t.x+=i,t.y+=s}return t},"offsetInSvg"),Mw=u((e,t)=>{if(!sm.test(e.getAttribute("transform")??""))return;const r=Gl(e),i=r.x-t.x,s=r.y-t.y,o=e.getBBox?.();if(o)return{x:i+o.x+o.width/2,y:s+o.y+o.height/2,halfWidth:o.width/2,halfHeight:o.height/2}},"boxedObstacle"),Ow=u(e=>{try{const t=JSON.parse(atob(e.getAttribute("data-points")??""));return Array.isArray(t)?t:[]}catch{return[]}},"readPoints"),kd=u((e,t)=>{const r=Math.hypot(e.x-t.x,e.y-t.y);if(r===0)return am(e,yd);const i={x:(e.x-t.x)/r,y:(e.y-t.y)/r},s=yd/2;return{x:e.x-i.x*s,y:e.y-i.y*s,halfWidth:Math.abs(i.x)*s+Math.abs(i.y)*xd,halfHeight:Math.abs(i.y)*s+Math.abs(i.x)*xd}},"arrowheadObstacle"),Sd=u((e,t)=>{const r=e.getAttribute(t);return!!r&&r!=="none"},"hasMarker"),$w=u((e,t)=>{const r=Ow(e).filter(n=>Number.isFinite(n?.x)&&Number.isFinite(n?.y));if(r.length===0)return[];const i=Gl(e),s=u(n=>({x:n.x+i.x-t.x,y:n.y+i.y-t.y}),"toSvg"),o=r.length-1,a=[];return Sd(e,"marker-start")&&a.push(kd(s(r[0]),s(r[Math.min(1,o)]))),Sd(e,"marker-end")&&a.push(kd(s(r[o]),s(r[Math.max(o-1,0)]))),a},"arrowheadObstacles"),nm=u(e=>{const t={x:0,y:0},r=[...e?.querySelectorAll(".edgeLabel, .node")??[]].map(s=>Mw(s,t)).filter(s=>s!==void 0),i=[...e?.querySelectorAll('path[data-edge="true"]')??[]].flatMap(s=>$w(s,t));return[...r,...i]},"collectBadgeObstacles"),Iw=u((e,t)=>{if(!e.label||t.length===0)return[];const{x:r,y:i}=Ie.calcLabelPosition(t);return[{x:r,y:i,halfWidth:(e.width??0)/2,halfHeight:(e.height??0)/2}]},"edgeLabelObstacles"),Dw=u(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},"linearChannel"),wd=u(e=>{try{const[t,r,i]=["r","g","b"].map(s=>Dw(n0(e,s)));return .2126*t+.7152*r+.0722*i}catch{return}},"relativeLuminance"),Pw=u((e,t)=>{const r=wd(e),i=wd(t);return r===void 0||i===void 0?0:(Math.max(r,i)+.05)/(Math.min(r,i)+.05)},"contrastRatio"),Rw=u((e,t)=>{const i=[...t.filter(o=>!!o),"#ffffff","#000000"].map(o=>({color:o,ratio:Pw(e,o)}));return(i.find(({ratio:o})=>o>=yw)??i.reduce((o,a)=>a.ratio>o.ratio?a:o)).color},"pickBadgeTextColor"),Nw=u(e=>{const t=e?.replace(/^stroke:\s*/,"").trim();return t===""?void 0:t},"bareColor"),qw=u((e,t,r,i=nm(e.node()?.closest("svg")))=>{if(!jl(t)||!t.showStepNumber)return;const s=Gl(e.node()),o=i.map(c=>({...c,x:c.x-s.x,y:c.y-s.y})),a=Fw(vw(r.points,r.pathNode),[...o,...Iw(t,r.points)]);if(!a)return;const n=Nw(r.color)??mw,l=e.append("g").attr("class","edge-step-badge").attr("transform",`translate(${a.x},${a.y})`).attr("pointer-events","none").attr("data-step",t.step);return l.append("circle").attr("r",Mn).attr("fill",n),l.append("text").attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",fw).attr("fill",Rw(n,r.textColors??[])).text(String(t.step)),am({x:a.x+s.x,y:a.y+s.y},Mn)},"insertEdgeStepBadge"),Td=u((e,t,r)=>{e.append("animateTransform").attr("attributeName","transform").attr("type","scale").attr("values","1;1").attr("dur",`${r}s`).attr("begin",`${t}.begin`).attr("fill","remove")},"showWhileStepPlays"),Ww=u((e,t,r,i,s)=>{if(!jl(t)||!r)return;const{begin:o,dur:a,gap:n}=kw(t.step,t.stepCount??t.step,pw(t.stepDuration)),l=Sw(`${i}-${t.id}-step`),c=`${ww(r)}scale(0)`,h=s?.replace(/^stroke:\s*/,""),d=e.append("path").attr("class","edge-step-highlight").attr("aria-hidden","true").attr("d",r).attr("fill","none").attr("stroke",h??"currentColor").attr("stroke-width",xw).attr("stroke-linecap","round").attr("stroke-opacity",Cw).attr("pointer-events","none").attr("transform",c).attr("data-step",t.step);Td(d,l,a);const p=e.append("circle").attr("class","edge-step-dot").attr("r",bw).attr("aria-hidden","true").attr("transform",c).attr("data-step",t.step);h&&p.attr("fill",h).attr("stroke","none"),p.append("animateMotion").attr("id",l).attr("path",r).attr("dur",`${a}s`).attr("begin",`${o}s;${l}.end+${n}s`).attr("fill","remove"),Td(p,l,a),_w(e,i)},"insertEdgeStepDot"),vo=new WeakMap,zw=u(e=>{const t=e.querySelector(":scope > g.edge-step-badges");if(t)return t;const r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","g");return r.setAttribute("class","edge-step-badges"),e.appendChild(r)},"badgeLayer"),Hw=u(e=>{const t=e?vo.get(e):void 0;if(!e||!t)return;vo.delete(e);const r=nm(e);for(const{elem:i,edge:s,options:o}of t){const a=i.node()?.parentElement;if(!a)continue;const n=Ot(zw(a)),l=qw(n,s,o,r);l&&r.push(l)}},"placeQueuedStepBadges"),Yw=u((e,t,r,i,s)=>{Ww(e,t,r,i,s.color);const o=e.node(),a=o?.ownerSVGElement??o;!a||!jl(t)||!t.showStepNumber||vo.set(a,[...vo.get(a)??[],{elem:e,edge:t,options:s}])},"insertEdgeStepMarks"),Uw=5;function lm(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:Uw}u(lm,"resolveEdgeCornerRadius");var hm=u(({cssCompiledStyles:e})=>Object.entries(e??{}).filter(([t])=>!ep(t)).map(([,t])=>t),"edgeClassStyles"),cm=u(e=>e.animate===!0||!!e.animation||hm(e).join(";").includes("animation"),"isAnimatedEdge"),jw=u(e=>e.look==="neo"&&!cm(e),"drawsMarginMarkers"),Gw=u((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&_d(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&_d(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),Vw={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_open_head:{type:"openArrow",fill:!1},arrow_hollow_circle:{type:"hollowCircle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Xw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_d=u((e,t,r,i,s,o,a=!1,n)=>{if(!r||r==="none")return;const l=Vw[r],c=l&&Xw.includes(l.type);if(!l){tt.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const x=document.getElementById(f);if(x){const C=x.cloneNode(!0);C.id=y,C.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),x.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),br=1e-6,Zw=u(e=>e&&Number.isFinite(e.x)&&Number.isFinite(e.y),"isFinitePoint"),dm=u((e,t)=>Math.abs(e.x-t.x)<=br&&Math.abs(e.y-t.y)<=br,"samePoint"),Oe=u((e,t)=>{(!e.length||!dm(e.at(-1),t))&&e.push(t)},"appendDistinctPoint"),Bd=u((e,t,r)=>{if(!e?.intersect)return;const i=Math.abs(t.x-r.x)<=br,s=Math.abs(t.y-r.y)<=br;if(!i&&!s)return;const o=Math.sign(i?t.y-r.y:t.x-r.x);if(!o)return;const a=i?e.height:e.width,n=Math.abs(i?t.y-r.y:t.x-r.x),l=Number.isFinite(e.width)&&e.width>0&&Number.isFinite(e.height)&&e.height>0&&Number.isFinite(a)&&Number.isFinite(n),c=i?{x:t.x,y:t.y+o*(a+n+1)}:{x:t.x+o*(a+n+1),y:t.y},h=e.intersect(l?oS(r,c):r);if(!(!Zw(h)||Number.isFinite(e.x)&&Number.isFinite(e.y)&&dm(h,{x:e.x,y:e.y})||i&&Math.abs(h.x-t.x)>br||s&&Math.abs(h.y-t.y)>br||(i?(h.y-t.y)*o:(h.x-t.x)*o)<=br))return{outline:h,elbow:i?{x:h.x,y:r.y}:{x:r.x,y:h.y}}},"outlineEndpoint"),Kw=u((e,t,r)=>{if(!Array.isArray(e)||e.length<2)return e;const i=e[0],s=e[1],o=e[e.length-2],a=e[e.length-1],n=Bd(t,i,s),l=Bd(r,a,o);if(!n&&!l)return e;const c=[];if(e.length===2){const h=n?.outline??i,d=l?.outline??a,p=Math.abs(i.x-a.x)<=br,f=Math.abs(i.y-a.y)<=br;if(!p&&!f)return e;if(Oe(c,h),p){const m=(h.y+d.y)/2;Oe(c,{x:h.x,y:m}),Oe(c,{x:d.x,y:m})}else{const m=(h.x+d.x)/2;Oe(c,{x:m,y:h.y}),Oe(c,{x:m,y:d.y})}return Oe(c,d),c}n?(Oe(c,n.outline),Oe(c,n.elbow)):Oe(c,i);for(const h of e.slice(1,-1))Oe(c,h);return l?(Oe(c,l.elbow),Oe(c,l.outline)):Oe(c,a),c},"clipOrthogonalEndpointsToNodeOutlines");function um(e){return Array.isArray(e)&&e.length>=2&&e.every(t=>t!==null&&typeof t=="object"&&(t.axis==="v"||t.axis==="h"))}u(um,"isAxisTaggedRoute");function pm(e,t){return Math.max(.25,Math.min(.5,4*Math.abs(t)/(Math.abs(e)||1)))}u(pm,"ease");var Qw=6,Jw=12,tT=5,Us=.62;function fm(e){return e==="linear"||e==="step"||e==="stepBefore"||e==="stepAfter"||e==="rounded"?e:"curved"}u(fm,"curveKind");function On(e){return e?ae[e]??0:0}u(On,"markerTrim");function te(e){if(!Number.isFinite(e))throw new RangeError(`Cannot write the number ${e} into SVG`);const t=Math.round(e*100)/100;return t===0?"0":String(t)}u(te,"num");var eT=class{constructor(){this.d=""}static{u(this,"PathBuilder")}moveTo(e,t){return this.d+="M"+te(e)+","+te(t),this}lineTo(e,t){return this.d+="L"+te(e)+","+te(t),this}curveTo(e,t,r,i,s,o){return this.d+="C"+te(e)+","+te(t)+" "+te(r)+","+te(i)+" "+te(s)+","+te(o),this}quadTo(e,t,r,i){return this.d+="Q"+te(e)+","+te(t)+" "+te(r)+","+te(i),this}arcTo(e,t,r,i,s,o,a){return this.d+="A"+te(e)+","+te(t)+" "+te(r)+" "+(i?"1":"0")+","+(s?"1":"0")+" "+te(o)+","+te(a),this}done(){return this.d}};function $n(e,t,r){return e==="stepBefore"?t:e==="stepAfter"?r:(t+r)/2}u($n,"stepCorner");function gm(e,t,r,i){const s=t==="linear",o=t==="step"||t==="stepBefore"||t==="stepAfter",a=o||t==="rounded",n=[],l=[],c=[],h=u((I,X,K,lt)=>Math.abs(I-K)<.01&&Math.abs(X-lt)<.01,"near");for(const I of e){const X=I.axis==="h"?1:0,K=n.length-1;if(o&&K>=0&&Math.abs(I.x-n[K])>=.01&&Math.abs(I.y-l[K])>=.01){const lt=n[K],mt=l[K],kt=$n(t,mt,I.y),ft=$n(t,lt,I.x),it=X===0?[lt,kt,I.x,kt]:[ft,mt,ft,I.y];for(let yt=0;yt<4;yt+=2)h(it[yt],it[yt+1],lt,mt)||h(it[yt],it[yt+1],I.x,I.y)||(n.push(it[yt]),l.push(it[yt+1]),c.push(X))}n.push(I.x),l.push(I.y),c.push(X)}let d=n.length-1;const p=u(I=>n[I],"X"),f=u(I=>l[I],"Y"),m=u(I=>Math.abs(p(I)-p(I-1))<.01||Math.abs(f(I)-f(I-1))<.01,"aligned"),y=u(I=>s||t==="rounded"||m(I),"straight"),x=u((I,X,K)=>{if(!y(Math.max(I,X)))return K===0?[0,Math.sign(f(X)-f(I))||1]:[Math.sign(p(X)-p(I))||1,0];const lt=p(X)-p(I),mt=f(X)-f(I),kt=Math.hypot(lt,mt)||1;return[lt/kt,mt/kt]},"unit"),[C,b]=x(0,1,c[1]??0),[S,_]=x(d-1,d,c[d]??0),B=p(0),L=f(0),F=p(d),A=f(d);n[0]=B+C*r,l[0]=L+b*r,n[d]=F-S*i,l[d]=A-_*i;const H=u(I=>Math.abs(p(I)-p(I-1))+Math.abs(f(I)-f(I-1)),"length"),R=u(I=>!s&&I>0&&I<d&&m(I)&&m(I+1)&&H(I)>=.01&&H(I+1)>=.01&&Math.abs(p(I)-p(I-1))<.01!=Math.abs(p(I+1)-p(I))<.01,"turns"),$=u((I,X,K)=>Math.abs(p(I)-p(I-1))*Math.abs(X)+Math.abs(f(I)-f(I-1))*Math.abs(K),"along"),G=u(I=>Math.min(Qw,I/4),"lead"),O=i>0&&(!y(d)||R(d-1))?G($(d,S,_)):0,E=r>0&&(!y(1)||R(1))?G($(1,C,b)):0;O>=1&&(n.splice(d,0,p(d)-S*O),l.splice(d,0,f(d)-_*O),c.splice(d,0,c[d]),d++),E>=1&&(n.splice(1,0,p(0)+C*E),l.splice(1,0,f(0)+b*E),c.splice(1,0,c[1]),d++);const M=new eT().moveTo(p(0),f(0));let v=p(0),q=f(0);const z=u((I,X)=>{h(I,X,v,q)||(M.lineTo(I,X),v=I,q=X)},"lineTo");for(let I=1;I<=d;I++){const X=p(I),K=f(I);if(!y(I)){const St=c[I]===0,vt=St?K-q:X-v,wt=Math.abs(vt)*pm(St?X-v:K-q,vt),Dt=St?0:Math.sign(vt)*wt,Ut=St?Math.sign(vt)*wt:0;M.curveTo(v+Dt,q+Ut,X-Dt,K-Ut,X,K),v=X,q=K;continue}if(!R(I)){if(I<d&&m(I)&&m(I+1)&&(X-p(I-1))*(p(I+1)-X)+(K-f(I-1))*(f(I+1)-K)>0)continue;z(X,K);continue}let lt=R(I-1)?H(I)/2:H(I),mt=R(I+1)?H(I+1)/2:H(I+1);a&&(lt=mt=Math.min(t==="rounded"?tT:Jw,lt,mt));const[kt,ft]=x(I-1,I,c[I]),[it,yt]=x(I,I+1,c[I+1]);z(X-kt*lt,K-ft*lt),v=X+it*mt,q=K+yt*mt,t==="rounded"?M.arcTo(lt,lt,0,!1,kt*yt-ft*it>0,v,q):a?M.quadTo(X,K,v,q):M.curveTo(X-kt*lt*(1-Us),K-ft*lt*(1-Us),X+it*mt*(1-Us),K+yt*mt*(1-Us),v,q)}return{d:M.done(),sx:B,sy:L,sdx:-C,sdy:-b,ex:F,ey:A,edx:S,edy:_}}u(gm,"routePath");var rT=u(e=>typeof e=="string"?e:$t()?.flowchart?.curve,"resolveEdgeCurveType"),Lo=new Map,ue=new Map,cA=u(()=>{Lo.clear(),ue.clear()},"clear"),dA=u(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Ki=u(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),iT=u(async(e,t)=>{const r=$t();let i=le(r);const{labelStyles:s}=ut(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await De(e,t.label,{style:Ki(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),tt.info("abc82",t,t.labelType);let h,d;if(i){const f=c.children[0],m=Ot(c);h=await ii.measure(()=>f.getBoundingClientRect()),d=h,m.attr("width",h.width),m.attr("height",h.height)}else{const f=Ot(c).select("text").node();await ii.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?d=f.getBBox():d=h})}a.attr("transform",Zi(d,i)),Lo.set(t.id,o),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.startLabelLeft,Ki(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],b=Ot(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Zi(x,i)),ue.get(t.id)||ue.set(t.id,{}),ue.get(t.id).startLeft=f,os(p,t.startLabelLeft,x),ss(t,"startLeft",x)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.startLabelRight,Ki(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],b=Ot(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Zi(x,i)),ue.get(t.id)||ue.set(t.id,{}),ue.get(t.id).startRight=f,os(p,t.startLabelRight,x),ss(t,"startRight",x)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.endLabelLeft,Ki(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],b=Ot(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Zi(x,i)),ue.get(t.id)||ue.set(t.id,{}),ue.get(t.id).endLeft=f,os(p,t.endLabelLeft,x),ss(t,"endLeft",x)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await kr(m,t.endLabelRight,Ki(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],b=Ot(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Zi(x,i)),ue.get(t.id)||ue.set(t.id,{}),ue.get(t.id).endRight=f,os(p,t.endLabelRight,x),ss(t,"endRight",x)}return c},"insertEdgeLabel");function ss(e,t,r){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:r.width,height:r.height}}u(ss,"recordTerminalLabelSize");function os(e,t,r){le($t())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}u(os,"setTerminalWidth");var sT=u((e,t)=>{let r=e.x,i=e.y;if(t?.updatedPath){const s=Ie.calcLabelPosition(t.updatedPath);if(t.originalPath){const o=Ie.calcLabelPosition(t.originalPath);r=e.x+(s.x-o.x),i=e.y+(s.y-o.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),oT=u((e,t)=>{tt.debug("Moving label abc88 ",e.id,e.label,Lo.get(e.id),t);const r=$t(),{subGraphTitleTotalMargin:i}=Ls(r);if(e.label){const o=Lo.get(e.id),{x:a,y:n}=sT(e,t);tt.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",a,",",n,") abc88"),o.attr("transform",`translate(${a}, ${n+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const o=ue.get(e.id).startLeft;let a=e.x,n=e.y;if(s){const l=Ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=ue.get(e.id).startRight;let a=e.x,n=e.y;if(s){const l=Ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=ue.get(e.id).endLeft;let a=e.x,n=e.y;if(s){const l=Ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=ue.get(e.id).endRight;let a=e.x,n=e.y;if(s){const l=Ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),Fi=.5,Sr=u((e,t)=>Math.abs(e.x-t.x)<Fi,"sharesColumn"),wr=u((e,t)=>Math.abs(e.y-t.y)<Fi,"sharesRow"),mm=u((e,t)=>Sr(e,t)&&wr(e,t),"coincides");function ym(e,t,r){return Sr(e,t)&&!wr(e,t)?Sr(r,t):wr(e,t)&&!Sr(e,t)?wr(r,t):Sr(r,t)||wr(r,t)}u(ym,"keepsArrivalAxis");function xm(e,t,r){return mm(e,t)?{heading:t,from:r}:{heading:e,from:t}}u(xm,"arrivalSegment");function Cm({heading:e,from:t},r,i){return(e.x-t.x)*(i.x-r.x)+(e.y-t.y)*(i.y-r.y)<0}u(Cm,"runsAgainstHeading");function bm({heading:e,from:t},r,i){return wr(e,t)&&!Sr(e,t)?{x:i.x,y:r.y}:Sr(e,t)&&!wr(e,t)?{x:r.x,y:i.y}:i}u(bm,"snapToArrivalAxis");function km(e,t,r,i){if((Sr(e,t)||wr(e,t))&&!ym(e,t,i))return e;const o=xm(e,t,r);return Cm(o,t,i)?t:bm(o,t,i)}u(km,"dockFinalPoint");function Sm(e){const t=Object.hasOwn(ae,e)?ae[e]:0;return Number.isFinite(t)?t:0}u(Sm,"markerPullBack");function wm({originalLast:e,lastInner:t,newLast:r,minLength:i}){const s=!mm(e,t),o=Math.hypot(r.x-t.x,r.y-t.y);return o>=Math.max(Fi,i)?r:s&&o>=Fi?e:void 0}u(wm,"finalDockPoint");var aT=u((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),nT=u((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),lT=u((e,t,r)=>{tt.debug(`intersection calc abc89:
|
|
295
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
296
|
+
insidePoint : ${JSON.stringify(r)}
|
|
297
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),tt.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+d:r.y-d;return tt.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:f}),n===0&&(p=t.x,f=t.y),h===0&&(p=t.x),c===0&&(f=t.y),{x:p,y:f}}},"intersection"),vd=u((e,t)=>{tt.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(tt.info("abc88 checking point",o,t),!nT(t,o)&&!s){const a=lT(t,i,o);tt.debug("abc88 inside",o,i,a),tt.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?tt.warn("abc88 no intersect",a,r):r.push(a),s=!0}else tt.warn("abc88 outside",o,i),i=o,s||r.push(o)}),tt.debug("returning points",r),r},"cutPathAtIntersect");function Tm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(Tm,"extractCornerPoints");var Ld=u(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),hT=u(function(e){const{cornerPointPositions:t}=Tm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Ld(s,a,5),l=Ld(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){tt.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const f=5;a.x===n.x?p={x:c<0?n.x-f+d:n.x+f-d,y:h<0?n.y-d:n.y+d}:p={x:c<0?n.x-d:n.x+d,y:h<0?n.y-f+d:n.y+f-d}}else tt.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),cT=u((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),dT=u(function(e,t,r,i,s,o,a,n=!1,l=void 0){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:h}=$t(),d=l??h;let p=t.points,f=!1;const m=s;var y=o;const x=hm(t),C=um(p);if(!C&&t.portClipping==="outline-orthogonal"&&!n)p=Kw(p,m,y);else if(!C&&d==="swimlane"){if(!n&&y.intersect&&m.intersect&&Array.isArray(p)&&p.length>=2)if(p.length===2){const[K,lt]=p;p=Sr(K,lt)||wr(K,lt)?[m.intersect(K),y.intersect(lt)]:[m.intersect(lt),y.intersect(K)]}else{const K=p.slice(1,-1),lt=K[0],mt=K[K.length-1],kt=m.intersect(lt),ft=p[p.length-1],it=y.intersect(mt),yt=K.at(-2)??p[0],St=km(ft,mt,yt,it),vt=wm({originalLast:ft,lastInner:mt,newLast:St,minLength:Sm(t.arrowTypeEnd)}),Dt=Math.abs(kt.x-lt.x)<Fi&&Math.abs(kt.y-lt.y)<Fi?[]:[kt],Ut=vt?[vt]:[];p=[...Dt,...K,...Ut]}p=aT(t,p)}else!C&&y.intersect&&m.intersect&&!n&&(p=p.slice(1,t.points.length-1),p.unshift(m.intersect(p[0])),p.push(y.intersect(p[p.length-1])));const b=btoa(JSON.stringify(p));t.toCluster&&!C&&(tt.info("to cluster abc88",r.get(t.toCluster)),p=vd(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&!C&&(tt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(p,null,2)),p=vd(p.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let S=p.filter(K=>!Number.isNaN(K.y));const _=rT(t.curve);_!=="rounded"&&!C&&!t.skipCornerFix&&(S=hT(S));let B=cs;switch(_){case"linear":B=cs;break;case"basis":B=gn;break;case"cardinal":B=Iu;break;case"bumpX":B=Fu;break;case"bumpY":B=Eu;break;case"catmullRom":B=Pu;break;case"monotoneX":B=Hu;break;case"monotoneY":B=Yu;break;case"natural":B=ju;break;case"step":B=Gu;break;case"stepAfter":B=Xu;break;case"stepBefore":B=Vu;break;case"rounded":B=cs;break;default:B=gn}const{x:L,y:F}=uw(t),A=ok().x(L).y(F).curve(B);let H;switch(t.thickness){case"normal":H="edge-thickness-normal";break;case"thick":H="edge-thickness-thick";break;case"invisible":H="edge-thickness-invisible";break;default:H="edge-thickness-normal"}switch(t.pattern){case"solid":H+=" edge-pattern-solid";break;case"dotted":H+=" edge-pattern-dotted";break;case"dashed":H+=" edge-pattern-dashed";break;default:H+=" edge-pattern-solid"}let R,$=C?gm(S,fm(_),On(t.arrowTypeStart),On(t.arrowTypeEnd)).d:_==="rounded"?_m(Bm(S,t),lm(t.cornerRadius)):A(S);const G=Array.isArray(t.style)?t.style:[t.style];let O=G.find(K=>K?.startsWith("stroke:")),E="";t.animate&&(E="edge-animation-fast"),t.animation&&(E="edge-animation-"+t.animation);let M=!1;if(t.look==="handDrawn"){const K=pt.svg(e);Object.assign([],S);const lt=K.path($,{roughness:.3,seed:c});H+=" transition",R=Ot(lt).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+H+(t.classes?" "+t.classes:"")+(E?" "+E:"")).attr("style",G?G.reduce((kt,ft)=>kt+";"+ft,""):"");let mt=R.attr("d");R.attr("d",mt),e.node().appendChild(R.node())}else{const K=x.join(";"),lt=G?G.reduce((St,vt)=>St+vt+";",""):"",mt=(K?K+";"+lt+";":lt)+";"+(G?G.reduce((St,vt)=>St+";"+vt,""):"");R=e.append("path").attr("d",$).attr("id",`${a}-${t.id}`).attr("class"," "+H+(t.classes?" "+t.classes:"")+(E?" "+E:"")).attr("style",mt),O=mt.match(/stroke:([^;]+)/)?.[1],M=cm(t);const kt=R.node(),ft=typeof kt.getTotalLength=="function"?kt.getTotalLength():0,it=gd[t.arrowTypeStart]||0,yt=gd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!M){const vt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?cT(ft,it,yt):`0 ${it} ${ft-it-yt} ${yt}`}; stroke-dashoffset: 0;`;R.attr("style",vt+R.attr("style"))}}if(R.attr("data-edge",!0),R.attr("data-et","edge"),R.attr("data-id",t.id),R.attr("data-points",b),R.attr("data-look",ie(t.look)),t.step!==void 0){const{themeVariables:K}=$t(),lt=O??K?.lineColor;Yw(e,t,$,a,{points:S,pathNode:R.node(),color:lt,textColors:[K?.background,K?.primaryTextColor]})}t.showPoints&&S.forEach(K=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",K.x).attr("cy",K.y)});let v="";($t().flowchart.arrowMarkerAbsolute||$t().state.arrowMarkerAbsolute)&&(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,v=v.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),tt.info("arrowTypeStart",t.arrowTypeStart),tt.info("arrowTypeEnd",t.arrowTypeEnd);const q=jw(t);Gw(R,t,v,a,i,q,O);const z=Math.floor(p.length/2),I=p[z];Ie.isLabelCoordinateInPath(I,R.attr("d"))||(f=!0);let X={};return f&&(X.updatedPath=p),X.originalPath=t.points,X},"insertEdge");function _m(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,p=l.y-a.y,f=Math.hypot(c,h),m=Math.hypot(d,p);if(f<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/f,x=h/f,C=d/m,b=p/m,S=y*C+x*b,_=Math.max(-1,Math.min(1,S)),B=Math.acos(_);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${a.x},${a.y}`;continue}const L=Math.min(t/Math.sin(B/2),f/2,m/2),F=a.x-y*L,A=a.y-x*L,H=a.x+C*L,R=a.y+b*L;r+=`L${F},${A}`,r+=`Q${a.x},${a.y} ${H},${R}`}}return r}u(_m,"generateRoundedPath");function In(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}u(In,"calculateDeltaAndAngle");function Bm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&ae[t.arrowTypeStart]){const s=ae[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=In(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&ae[t.arrowTypeEnd]){const s=ae[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=In(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}u(Bm,"applyMarkerOffsetsToPoints");var uT=u((e,t,r,i)=>{t.forEach(s=>{RT[s](e,r,i)})},"insertMarkers"),pT=u((e,t,r)=>{tt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),fT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),gT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),mT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),yT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),xT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),CT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),bT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),kT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),ST=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),wT=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),TT=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),_T=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),BT=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),vT=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),LT=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),AT=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),FT=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),ET=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
298
|
+
L20,10
|
|
299
|
+
M20,10
|
|
300
|
+
L0,20`)},"requirement_arrow"),MT=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
301
|
+
L20,10
|
|
302
|
+
M20,10
|
|
303
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),OT=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),$T=u((e,t,r)=>{const i=Gt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),IT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),DT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-openArrowEnd").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",11).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1 1 L 11 6 L 1 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-openArrowStart").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",1).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 11 1 L 1 6 L 11 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none")},"openArrow"),PT=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hollowCircleStart").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hollowCircleEnd").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none")},"hollowCircle"),RT={extension:pT,composition:fT,aggregation:gT,dependency:mT,lollipop:yT,point:xT,circle:CT,cross:bT,barb:kT,barbNeo:ST,hierarchy:IT,only_one:wT,zero_or_one:TT,one_or_more:_T,zero_or_more:BT,only_one_neo:vT,zero_or_one_neo:LT,one_or_more_neo:AT,zero_or_more_neo:FT,requirement_arrow:ET,requirement_contains:OT,requirement_arrow_neo:MT,requirement_contains_neo:$T,openArrow:DT,hollowCircle:PT},NT=uT,qT={common:bs,getConfig:Gt,insertCluster:dw,insertEdge:dT,insertEdgeLabel:iT,insertMarkers:NT,insertNode:Jg,interpolateToCurve:kl,labelHelper:bt,log:tt,positionEdgeLabel:oT},WT=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],ys=Object.create(null),vm=u(e=>{for(const t of e)ys[t.name]=t},"registerLayoutLoaders"),zT=u(()=>{const e=u(async()=>await It(()=>import("./elk-O5DQBFGD-CWTz5SZP.js"),__vite__mapDeps([2,3,4,5,0,1,6,7]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...WT.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),HT=u(()=>{vm([{name:"dagre",loader:u(async()=>await It(()=>import("./dagre-KIHZ2IZ3-B7ENIjLG.js"),__vite__mapDeps([8,4,5,0,1,6,7]),import.meta.url),"loader")},{name:"swimlane",loader:u(async()=>await It(()=>import("./swimlanes-YQL5WMAO-Chqt7pxD.js"),__vite__mapDeps([9,3,4,5,0,1,6,7]),import.meta.url),"loader")},{name:"grid",loader:u(async()=>await It(()=>import("./grid-E2QIVN74-CegebiIw.js"),__vite__mapDeps([10,3,4,5,0,1,6,7]),import.meta.url),"loader")},{name:"layered",loader:u(async()=>await It(()=>import("./render-VIF2ZAQL-CSsGw-0I.js"),__vite__mapDeps([11,5,0,1,6,3,4,7]),import.meta.url),"loader")},{name:"cose-bilkent",loader:u(async()=>await It(()=>import("./cose-bilkent-JH36ORCC-UyCAqNvj.js"),__vite__mapDeps([12,13,5,0,1,6]),import.meta.url),"loader")},...zT()])},"registerDefaultLayoutLoaders");HT();var uA=u(async(e,t)=>{if(!Object.hasOwn(ys,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const o of e.nodes){const a=o.domId||o.id;o.domId=`${e.diagramId}-${a}`}const r=ys[e.layoutAlgorithm],i=await r.loader();kk(t,e.config);const s=await i.render(e,t,qT,{algorithm:r.algorithm});return Hw(t.node()),s},"render"),Ja="dagre",pA=u((e="",{fallback:t=Ja}={})=>{if(Object.hasOwn(ys,e))return e;for(const r of[t,Ja])if(Object.hasOwn(ys,r))return tt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${Ja} is registered.`)},"getRegisteredLayoutAlgorithm"),Vl="comm",Lm="rule",Am="decl",YT="@media",UT="@import",jT="@supports",GT="@namespace",Dn="@keyframes",Fm="@layer",VT="@scope",XT=Math.abs,ps=String.fromCharCode;function Em(e){return e.trim()}function Pn(e,t,r){return e.replace(t,r)}function Li(e,t){return e.charCodeAt(t)|0}function Ei(e,t,r){return e.slice(t,r)}function nr(e){return e.length}function Mm(e){return e.length}function js(e,t){return t.push(e),e}var Yo=1,Mi=1,Om=0,Ye=0,ee=0,Pi="";function Xl(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:Yo,column:Mi,length:a,return:"",siblings:n}}function ZT(){return ee}function KT(){return ee=Ye>0?Li(Pi,--Ye):0,Mi--,ee===10&&(Mi=1,Yo--),ee}function Ze(){return ee=Ye<Om?Li(Pi,Ye++):0,Mi++,ee===10&&(Mi=1,Yo++),ee}function Rr(){return Li(Pi,Ye)}function ro(){return Ye}function Uo(e,t){return Ei(Pi,e,t)}function xs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function QT(e){return Yo=Mi=1,Om=nr(Pi=e),Ye=0,[]}function JT(e){return Pi="",e}function tn(e){return Em(Uo(Ye-1,Rn(e===91?e+2:e===40?e+1:e)))}function t_(e){for(;(ee=Rr())&&ee<33;)Ze();return xs(e)>2||xs(ee)>3?"":" "}function e_(e,t){for(;--t&&Ze()&&!(ee<48||ee>102||ee>57&&ee<65||ee>70&&ee<97););return Uo(e,ro()+(t<6&&Rr()==32&&Ze()==32))}function Rn(e){for(;Ze();)switch(ee){case e:return Ye;case 34:case 39:e!==34&&e!==39&&Rn(ee);break;case 40:e===41&&Rn(e);break;case 92:Ze();break}return Ye}function r_(e,t){for(;Ze()&&e+ee!==57;)if(e+ee===84&&Rr()===47)break;return"/*"+Uo(t,Ye-1)+"*"+ps(e===47?e:Ze())}function i_(e){for(;!xs(Rr());)Ze();return Uo(e,Ye)}function s_(e){return JT(io("",null,null,null,[""],e=QT(e),0,[0],e))}function io(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,p=0,f=0,m=0,y=1,x=1,C=1,b=0,S=0,_="",B=s,L=o,F=i,A=_;x;)switch(m=S,S=Ze()){case 40:m!=108&&Li(A,d-1)==58?(b++,A+="("):A+=tn(S);break;case 41:b--,A+=")";break;case 34:case 39:case 91:A+=tn(S);break;case 9:case 10:case 13:case 32:if(b>0){A+=ps(S);break}A+=t_(m);break;case 92:A+=e_(ro()-1,7);continue;case 47:switch(Rr()){case 42:case 47:js(o_(r_(Ze(),ro()),t,r,l),l),(xs(m||1)==5||xs(Rr()||1)==5)&&nr(A)&&Ei(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*y:n[c++]=nr(A)*C;case 125*y:case 59:case 0:if(b>0&&S){A+=ps(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(A=Pn(A,/\f/g,"")),f>0&&(nr(A)-d||y===0)&&js(f>32?Fd(A+";",i,r,d-1,l):Fd(Pn(A," ","")+";",i,r,d-2,l),l);break;case 59:A+=";";default:if(js(F=Ad(A,t,r,c,h,s,n,_,B=[],L=[],d,o),o),S===123)if(h===0)io(A,t,F,F,B,o,d,n,L);else{switch(p){case 99:if(Li(A,3)===110)break;case 108:if(Li(A,2)===97)break;default:h=0;case 100:case 109:case 115:}h?io(e,F,F,i&&js(Ad(e,F,F,0,0,s,n,_,s,B=[],d,L),L),s,L,d,n,i?B:L):io(A,F,F,F,[""],L,0,n,L)}}c=h=f=0,y=C=1,_=A="",d=a;break;case 58:d=1+nr(A),f=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&KT()==125)continue}switch(A+=ps(S),S*y){case 38:C=h>0?1:(A+="\f",-1);break;case 44:if(b>0)break;n[c++]=(nr(A)-1)*C,C=1;break;case 64:Rr()===45&&(A+=tn(Ze())),p=Rr(),h=d=nr(_=A+=i_(ro())),S++;break;case 45:m===45&&nr(A)==2&&(y=0)}}return o}function Ad(e,t,r,i,s,o,a,n,l,c,h,d){for(var p=s-1,f=s===0?o:[""],m=Mm(f),y=0,x=0,C=0;y<i;++y)for(var b=0,S=Ei(e,p+1,p=XT(x=a[y])),_=e;b<m;++b)(_=Em(x>0?f[b]+" "+S:Pn(S,/&\f/g,f[b])))&&(l[C++]=_);return Xl(e,t,r,s===0?Lm:n,l,c,h,d)}function o_(e,t,r,i){return Xl(e,t,r,Vl,ps(ZT()),Ei(e,2,-2),0,i)}function Fd(e,t,r,i,s){return Xl(e,t,r,Am,Ei(e,0,i),Ei(e,i+1,-1),i,s)}function Nn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function a_(e,t,r,i){switch(e.type){case Fm:if(e.children.length)break;case UT:case GT:case Am:return e.return=e.return||e.value;case Vl:return"";case Dn:return e.return=e.value+"{"+Nn(e.children,i)+"}";case Lm:if(!nr(e.value=e.props.join(",")))return""}return nr(r=Nn(e.children,i))?e.return=e.value+"{"+r+"}":""}function n_(e){var t=Mm(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var $m="c4",l_=u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),h_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./c4Diagram-M2UUVUY5-DA6Owfyu.js");return{diagram:t}},__vite__mapDeps([14,15,5,0,1,6]),import.meta.url);return{id:$m,diagram:e}},"loader"),c_={id:$m,detector:l_,loader:h_},d_=c_,Im="flowchart-v2",u_=u(e=>/^\s*(graph|flowchart)/.test(e),"detector"),p_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./flowDiagram-Z6JWZHQI-NYs8bi5t.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([16,17,18,19,20,15]),import.meta.url);return{id:Im,diagram:e}},"loader"),f_={id:Im,detector:u_,loader:p_},g_=f_,Dm="agentflow",m_=u(e=>/^\s*agentflow(?:-beta)?(?=\s|;|$)/.test(e),"detector"),y_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-QBROCOUO-qo7sxm4K.js");return{diagram:t}},__vite__mapDeps([21,17,18,19,20,15,5,0,1,6]),import.meta.url);return{id:Dm,diagram:e}},"loader"),x_={id:Dm,detector:m_,loader:y_},C_=x_,Pm="swimlane",b_=u(e=>/^\s*swimlane-beta\b/.test(e),"detector"),k_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./swimlanesDiagram-UCCPES4V-BfREktNP.js");return{diagram:t}},__vite__mapDeps([22,16,17,18,19,20,15,5,0,1,6]),import.meta.url);return{id:Pm,diagram:e}},"loader"),S_={id:Pm,detector:b_,loader:k_},w_=S_,Rm="er",T_=u(e=>/^\s*erDiagram/.test(e),"detector"),__=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./erDiagram-K3K3BIDK-DE3w4BEY.js");return{diagram:t}},__vite__mapDeps([23,19,20,5,0,1,6]),import.meta.url);return{id:Rm,diagram:e}},"loader"),B_={id:Rm,detector:T_,loader:__},v_=B_,Nm="gitGraph",L_=u(e=>/^\s*gitGraph/.test(e),"detector"),A_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./gitGraphDiagram-VXDFKS5L-ByGW1uvv.js");return{diagram:t}},__vite__mapDeps([24,25,26,27,5,0,1,6]),import.meta.url);return{id:Nm,diagram:e}},"loader"),F_={id:Nm,detector:L_,loader:A_},E_=F_,qm="gantt",M_=u(e=>/^\s*gantt/.test(e),"detector"),O_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./ganttDiagram-3PRQTZWP-Bspp9btW.js");return{diagram:t}},__vite__mapDeps([28,5,0,1,6,29]),import.meta.url);return{id:qm,diagram:e}},"loader"),$_={id:qm,detector:M_,loader:O_},I_=$_,Wm="info",D_=u(e=>/^\s*info/.test(e),"detector"),P_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./infoDiagram-EZ3ZOAHP-CexmsdZx.js");return{diagram:t}},__vite__mapDeps([30,27,5,0,1,6]),import.meta.url);return{id:Wm,diagram:e}},"loader"),R_={id:Wm,detector:D_,loader:P_},zm="pie",N_=u(e=>/^\s*pie/.test(e),"detector"),q_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./pieDiagram-36ENHN4W-DdQsQX9I.js");return{diagram:t}},__vite__mapDeps([31,25,27,5,0,1,6,29]),import.meta.url);return{id:zm,diagram:e}},"loader"),W_={id:zm,detector:N_,loader:q_},Hm="quadrantChart",z_=u(e=>/^\s*quadrantChart/.test(e),"detector"),H_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./quadrantDiagram-ZQUDMS73-D1jOKqx_.js");return{diagram:t}},__vite__mapDeps([32,29,5,0,1,6]),import.meta.url);return{id:Hm,diagram:e}},"loader"),Y_={id:Hm,detector:z_,loader:H_},U_=Y_,Ym="xychart",j_=u(e=>/^\s*xychart(-beta)?/.test(e),"detector"),G_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./xychartDiagram-GDYJKCDI-p1LpQ9MH.js");return{diagram:t}},__vite__mapDeps([33,29,5,0,1,6]),import.meta.url);return{id:Ym,diagram:e}},"loader"),V_={id:Ym,detector:j_,loader:G_},X_=V_,Um="requirement",Z_=u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),K_=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./requirementDiagram-AXW2TVFA-CT66GXLN.js");return{diagram:t}},__vite__mapDeps([34,19,20,5,0,1,6]),import.meta.url);return{id:Um,diagram:e}},"loader"),Q_={id:Um,detector:Z_,loader:K_},J_=Q_,jm="sequence",tB=u(e=>/^\s*sequenceDiagram/.test(e),"detector"),eB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./sequenceDiagram-3LA2ROMG-DVl5y64e.js");return{diagram:t}},__vite__mapDeps([35,26,15,5,0,1,6]),import.meta.url);return{id:jm,diagram:e}},"loader"),rB={id:jm,detector:tB,loader:eB},iB=rB,Gm="classDiagram",sB=u(e=>/^\s*classDiagram/.test(e),"detector"),oB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./classDiagram-v2-KXABOMEV-BFvB4kwX.js");return{diagram:t}},__vite__mapDeps([36,18,19,20,15,5,0,1,6]),import.meta.url);return{id:Gm,diagram:e}},"loader"),aB={id:Gm,detector:sB,loader:oB},nB=aB,Vm="stateDiagram",lB=u(e=>/^\s*stateDiagram/.test(e),"detector"),hB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./stateDiagram-v2-ATKHQDJO-DYQnfMsS.js");return{diagram:t}},__vite__mapDeps([37,19,20,15,5,0,1,6]),import.meta.url);return{id:Vm,diagram:e}},"loader"),cB={id:Vm,detector:lB,loader:hB},dB=cB,Xm="journey",uB=u(e=>/^\s*journey/.test(e),"detector"),pB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./journeyDiagram-POQNLL5X-27YlCe-1.js");return{diagram:t}},__vite__mapDeps([38,18,15,5,0,1,6]),import.meta.url);return{id:Xm,diagram:e}},"loader"),fB={id:Xm,detector:uB,loader:pB},gB=fB,Gs=4,Qi=75,mB=u(e=>{const t=[];for(const s of e.split(/\s+/)){let o=[...s];for(;o.length>Qi;)t.push(o.slice(0,Qi).join("")),o=o.slice(Qi);o.length>0&&t.push(o.join(""))}const r=[];let i="";for(const s of t){const o=i?`${i} ${s}`:s;[...o].length>Qi?(r.push(i),i=s):i=o}if(i&&r.push(i),r.length>Gs){r.length=Gs;const s=r[Gs-1]??"";r[Gs-1]=`${[...s].slice(0,Qi-3).join("")}...`}return r},"wrapErrorMessage"),yB=u((e,t,r,i)=>{tt.debug(`rendering svg for syntax error
|
|
304
|
+
`);const s=mk(t),o=s.append("g"),a=mB(i?.db.getErrorMessage?.()??""),n=a.length>0?500+a.length*56:512;s.attr("viewBox",`0 0 2412 ${n}`),du(s,100,n,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),a.forEach((l,c)=>{o.append("text").attr("class","error-text").attr("x",1440).attr("y",510+c*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),Zm={draw:yB},xB=Zm,en,CB={clear(){en=void 0},setErrorMessage(e){en=e},getErrorMessage(){return en}},bB={db:CB,renderer:Zm,parser:{parse:u(()=>{},"parse")}},kB=bB,Km="flowchart-elk",SB=u((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),wB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./flowDiagram-Z6JWZHQI-NYs8bi5t.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([16,17,18,19,20,15]),import.meta.url);return{id:Km,diagram:e}},"loader"),TB={id:Km,detector:SB,loader:wB},_B=TB,Qm="timeline",BB=u(e=>/^\s*timeline/.test(e),"detector"),vB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./timeline-definition-7Z437IG3-aHFxjIT6.js");return{diagram:t}},__vite__mapDeps([39,5,0,1,6]),import.meta.url);return{id:Qm,diagram:e}},"loader"),LB={id:Qm,detector:BB,loader:vB},AB=LB,Jm="mindmap",FB=u(e=>/^\s*mindmap/.test(e),"detector"),EB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./mindmap-definition-WVAN44T4-CsMIX0Lj.js");return{diagram:t}},__vite__mapDeps([40,19,20,5,0,1,6]),import.meta.url);return{id:Jm,diagram:e}},"loader"),MB={id:Jm,detector:FB,loader:EB},OB=MB,ty="kanban",$B=u(e=>/^\s*kanban/.test(e),"detector"),IB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./kanban-definition-BH5XI6FM-BAhOdeck.js");return{diagram:t}},__vite__mapDeps([41,18,5,0,1,6]),import.meta.url);return{id:ty,diagram:e}},"loader"),DB={id:ty,detector:$B,loader:IB},PB=DB,ey="sankey",RB=u(e=>/^\s*sankey(-beta)?/.test(e),"detector"),NB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./sankeyDiagram-FBCJTAIF-CNRKebNY.js");return{diagram:t}},__vite__mapDeps([42,29,5,0,1,6]),import.meta.url);return{id:ey,diagram:e}},"loader"),qB={id:ey,detector:RB,loader:NB},WB=qB,ry="packet",zB=u(e=>/^\s*packet(-beta)?/.test(e),"detector"),HB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-WERXNKYE-D0Jps1As.js");return{diagram:t}},__vite__mapDeps([43,25,27,5,0,1,6]),import.meta.url);return{id:ry,diagram:e}},"loader"),YB={id:ry,detector:zB,loader:HB},iy="radar",UB=u(e=>/^\s*radar-beta/.test(e),"detector"),jB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-7YQZDPLS-CxRMU8xq.js");return{diagram:t}},__vite__mapDeps([44,25,27,5,0,1,6]),import.meta.url);return{id:iy,diagram:e}},"loader"),GB={id:iy,detector:UB,loader:jB},sy="block",VB=u(e=>/^\s*block(-beta)?/.test(e),"detector"),XB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./blockDiagram-BEDRHYPZ-B4ENdwtZ.js");return{diagram:t}},__vite__mapDeps([45,18,7,5,0,1,6]),import.meta.url);return{id:sy,diagram:e}},"loader"),ZB={id:sy,detector:VB,loader:XB},KB=ZB,oy="treeView",QB=u(e=>/^\s*treeView-beta/.test(e),"detector"),JB=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-RJJCUUZO-CQiGMCMe.js");return{diagram:t}},__vite__mapDeps([46,25,26,27,5,0,1,6]),import.meta.url);return{id:oy,diagram:e}},"loader"),tv={id:oy,detector:QB,loader:JB},ev=tv,ay="architecture",rv=u(e=>/^\s*architecture/.test(e),"detector"),iv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./architectureDiagram-CSQXQB3N-DgPBbtvP.js");return{diagram:t}},__vite__mapDeps([47,25,27,5,0,1,6,13]),import.meta.url);return{id:ay,diagram:e}},"loader"),sv={id:ay,detector:rv,loader:iv},ov=sv,ny="eventmodeling",av=u(e=>/^\s*eventmodeling/.test(e),"detector"),nv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-YHHI257C-p4AB8cqK.js");return{diagram:t}},__vite__mapDeps([48,25,27,5,0,1,6]),import.meta.url);return{id:ny,diagram:e}},"loader"),lv={id:ny,detector:av,loader:nv},hv=lv,ly="ishikawa",cv=u(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./ishikawaDiagram-S3EKX5GW-BbWqKhg6.js");return{diagram:t}},__vite__mapDeps([49,5,0,1,6]),import.meta.url);return{id:ly,diagram:e}},"loader"),uv={id:ly,detector:cv,loader:dv},hy="venn",pv=u(e=>/^\s*venn-beta/.test(e),"detector"),fv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./vennDiagram-SHRQU5PJ-C65oZxFn.js");return{diagram:t}},__vite__mapDeps([50,5,0,1,6]),import.meta.url);return{id:hy,diagram:e}},"loader"),gv={id:hy,detector:pv,loader:fv},mv=gv,cy="treemap",yv=u(e=>/^\s*treemap/.test(e),"detector"),xv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./diagram-YR4HJLHV-Bh6JKT04.js");return{diagram:t}},__vite__mapDeps([51,20,25,27,5,0,1,6,29]),import.meta.url);return{id:cy,diagram:e}},"loader"),Cv={id:cy,detector:yv,loader:xv},dy="usecase",bv=u(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),kv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./usecaseDiagram-RDK6N6HP-DsC5tFe4.js");return{diagram:t}},__vite__mapDeps([52,19,20,5,0,1,6]),import.meta.url);return{id:dy,diagram:e}},"loader"),Sv={id:dy,detector:bv,loader:kv},uy="wardley",wv=u(e=>/^\s*wardley-beta/i.test(e),"detector"),Tv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./wardleyDiagram-F3OXNVQS-HTkq7DT0.js");return{diagram:t}},__vite__mapDeps([53,25,27,5,0,1,6]),import.meta.url);return{id:uy,diagram:e}},"loader"),_v={id:uy,detector:wv,loader:Tv},Bv=_v,py="cynefin",vv=u(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Lv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./cynefinDiagram-NJNITYFG-BaWEIQJ0.js");return{diagram:t}},__vite__mapDeps([54,25,27,5,0,1,6]),import.meta.url);return{id:py,diagram:e}},"loader"),Av={id:py,detector:vv,loader:Lv},fy="railroad",Fv=u(e=>/^\s*railroad-beta/i.test(e),"detector"),Ev=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./railroadDiagram-JIZHGYPL-XulrgX5n.js");return{diagram:t}},__vite__mapDeps([55,56,25,27,5,0,1,6]),import.meta.url);return{id:fy,diagram:e}},"loader"),Mv={id:fy,detector:Fv,loader:Ev},gy="railroadEbnf",Ov=u(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),$v=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./ebnfDiagram-N527522P-DRac0k4W.js");return{diagram:t}},__vite__mapDeps([57,56,25,27,5,0,1,6]),import.meta.url);return{id:gy,diagram:e}},"loader"),Iv={id:gy,detector:Ov,loader:$v},my="railroadAbnf",Dv=u(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Pv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./abnfDiagram-XWFEHMT6-BdinLox4.js");return{diagram:t}},__vite__mapDeps([58,56,25,27,5,0,1,6]),import.meta.url);return{id:my,diagram:e}},"loader"),Rv={id:my,detector:Dv,loader:Pv},yy="railroadPeg",Nv=u(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),qv=u(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./pegDiagram-D4NLKWP3-Cs3LXqn_.js");return{diagram:t}},__vite__mapDeps([59,56,25,27,5,0,1,6]),import.meta.url);return{id:yy,diagram:e}},"loader"),Wv={id:yy,detector:Nv,loader:qv},Ed=!1,jo=u(()=>{Ed||(Ed=!0,lo("error",kB,e=>e.toLowerCase().trim()==="error"),lo("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{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:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),an(_B,OB,ov),an(C_,d_,PB,nB,v_,I_,R_,W_,J_,iB,w_,g_,AB,E_,dB,gB,U_,WB,YB,X_,KB,hv,ev,GB,uv,Cv,Mv,Iv,Rv,Wv,mv,Bv,Av,Sv))},"addDiagrams"),zv=u(async()=>{tt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ei).map(async([r,{detector:i,loader:s}])=>{if(s)try{un(r)}catch{try{const{diagram:o,id:a}=await s();lo(a,o,i)}catch(o){throw tt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ei[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){tt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)tt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Hv="graphics-document document";function xy(e,t){e.attr("role",Hv),t!==""&&e.attr("aria-roledescription",t)}u(xy,"setA11yDiagramInfo");function Cy(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}u(Cy,"addSVGa11yTitleDescription");var Ao=class by{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{u(this,"Diagram")}static async fromText(t,r={}){const i=typeof t=="string"?{cleaned:t}:t,s=Gt(),o=Mo(i.cleaned,s);try{un(o)}catch{const p=Y0(o);if(!p)throw new Ud(`Diagram ${o} not found.`);const{id:f,diagram:m}=await p();lo(f,m)}const{db:a,parser:n,renderer:l,init:c}=un(o);n.parser&&(n.parser.yy=a),a.clear?.(),c?.(s),r.title&&a.setDiagramTitle?.(r.title);let h=i.cleaned;if(a.preserveCommentsWhenParsing&&i.withComments){const p=s.maxTextSize??zn.maxTextSize;i.withComments.length>p?tt.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${p}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):h=i.withComments}const d=V1(h)+`
|
|
305
|
+
`;return i.frontmatterLineOffset&&a.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await n.parse(d),s.layout==="grid"&&Qd(s.grid?.placements,[]),a.validate?.(),new by(o,d,a,n,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},Md=[],Yv=u(()=>{Md.forEach(e=>{e()}),Md=[]},"attachFunctions"),Uv=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ky(e){const t=Yd(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
|
|
306
|
+
`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
|
|
307
|
+
`):t.body;let s=bk(i,{schema:Ck})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t.length),metadata:o}}u(ky,"extractFrontMatter");var jv=u(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Gv=u(e=>{const{text:t,metadata:r}=ky(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),Vv=u(e=>{const t=Ie.detectInit(e)??{},r=Ie.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:I1(e),directive:t}},"processDirectives");function Zl(e){const t=e,r=jv(e),i=Gv(r),s=Vv(i.text),o=Bl(i.config,s.directive),a=s.text,n=Uv(a),l=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:n,withComments:a,frontmatterLineOffset:l},title:i.title,config:o}}u(Zl,"preprocessDiagram");function Sy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(Sy,"toBase64");var Xv=5e4,Zv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Kv="sandbox",Qv="loose",Jv="http://www.w3.org/2000/svg",tL="http://www.w3.org/1999/xlink",eL="http://www.w3.org/1999/xhtml",rL="100%",iL="100%",sL="border:0;margin:0;",oL="margin:0",aL="allow-top-navigation-by-user-activation allow-popups",nL='The "iframe" tag is not supported by your browser.',lL=["foreignobject"],hL=["dominant-baseline"];function Kl(e){const t=Zl(e);fs();let r;try{r=Mo(t.code.cleaned,Gt())}catch{r=void 0}return Hn(r),Ax(t.config??{}),t}u(Kl,"processAndSetConfigs");async function wy(e,t){jo();try{const{code:r,config:i}=Kl(e);return{diagramType:(await Ao.fromText(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}finally{Hn(void 0)}}u(wy,"parse");var Od=u((e,t,r=[])=>{const i=ru(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),cL=u((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=le(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{_c(l.styles)||n.forEach(c=>{r.insertRule(Od(l.id,c,l.styles),r.cssRules.length)}),_c(l.textStyles)||r.insertRule(Od(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=dn(s)+`
|
|
309
|
+
`}else i+=`${e.themeCSS}
|
|
310
|
+
`;return i+dn(r)},"createCssStyles"),dL=u((e,t)=>Nn(s_(`${e}{${t}}`),n_([u(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Dn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[YT,jT,Fm,VT,"@container","@starting-style"],Dn].includes(i.type)||(tt.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Vl))},"addNamespace"),a_])),"compileCSS"),uL=u((e,t,r,i)=>{const s=cL(e,r),o=Zx(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return dL(i,o)},"createUserStyles"),pL=u((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=zr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),fL=u((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":iL,i=Sy(`<body style="${oL}">${e}</body>`);return`<iframe style="width:${rL};height:${r};${sL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${aL}">
|
|
311
|
+
${nL}
|
|
312
|
+
</iframe>`},"putIntoIFrame"),$d=u((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Jv);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function qn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(qn,"sandboxedIframe");var gL=u((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),mL=u(async function(e,t,r){jo();let i,s;try{i=Kl(t)}catch(M){s=M,fs()}let o=i?.code;t=o?.cleaned??t;const a=Gt();tt.debug(a),t.length>(a?.maxTextSize??Xv)&&(t=Zv,o={raw:t,cleaned:t});const n=`#${om(e)}`,l="i"+e,c="#"+l,h="d"+e,d="#"+h,p=u(()=>{const v=Ot(m?c:d).node();v&&"remove"in v&&v.remove()},"removeTempElements");let f=Ot(document.body);const m=a.securityLevel===Kv,y=a.securityLevel===Qv,x=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){const M=qn(Ot(r),l);f=Ot(M.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Ot(r);$d(f,e,h,`font-family: ${x}`,tL)}else{if(gL(document,e,h,l),m){const M=qn(Ot(document.body),l);f=Ot(M.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Ot("body");$d(f,e,h)}let C,b;try{if(!i||!o)throw s;C=await Ao.fromText(o,{title:i.title})}catch(M){if(a.suppressErrorRendering)throw p(),M;C=await Ao.fromText("error"),b=M,C.db.setErrorMessage?.(wp(M))}const S=f.select(d).node(),_=C.type,B=S.firstChild,L=B.firstChild,F=C.renderer.getClasses?.(t,C),A=uL(a,_,F,n),H=document.createElement("style");H.innerHTML=A,B.insertBefore(H,L);try{await C.renderer.draw(t,e,"12.4.0",C)}catch(M){throw a.suppressErrorRendering?p():xB.draw(t,e,"12.4.0"),M}const R=f.select(`${d} svg`),$=C.db.getAccTitle?.(),G=C.db.getAccDescription?.();_y(_,R,$,G);const E=u(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",eL);let M=f.select(d).node().innerHTML;if(tt.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),M=pL(M,m,dr(a.arrowMarkerAbsolute)),m){const v=f.select(d+" svg").node();M=fL(M,v)}else y||(M=Ai.sanitize(M,{ADD_TAGS:lL,ADD_ATTR:hL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Yv(),M},"serializeSvg")();if(b)throw b;return p(),{diagramType:_,svg:E,bindFunctions:C.db.bindFunctions}},"renderDiagram"),yL=u(async function(e,t,r){try{return await mL(e,t,r)}finally{Hn(void 0)}},"render");function Ty(e={}){const t=re({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),vx(t);const r=qr.theme;t?.theme&&Object.hasOwn(Tr,t.theme)?t.themeVariables=Tr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=Tr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?Bx(t):iu();Wn(i.logLevel),jo()}u(Ty,"initialize");var xL=u((e,t={})=>{const{code:r}=Zl(e);return Ao.fromText(r,t)},"getDiagramFromText");function _y(e,t,r,i){xy(t,e),Cy(t,r,i,t.attr("id"))}u(_y,"addA11yInfo");var si=Object.freeze({render:yL,parse:wy,getDiagramFromText:xL,initialize:Ty,getConfig:Gt,setConfig:su,getSiteConfig:iu,updateSiteConfig:Lx,reset:u(()=>{fs()},"reset"),globalReset:u(()=>{fs(qr)},"globalReset"),defaultConfig:qr});Wn(Gt().logLevel);fs(Gt());var CL=u((e,t,r)=>{tt.warn(e),_l(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),By=u(async function(e={querySelector:".mermaid"}){try{await bL(e)}catch(t){if(_l(t)&&tt.error(t.str),vr.parseError&&vr.parseError(t),!e.suppressErrors)throw tt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),bL=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=si.getConfig();tt.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");tt.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(tt.debug("Start On Load: "+i?.startOnLoad),si.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Ie.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(tt.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=Dp(Ie.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Ie.detectInit(a);h&&tt.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await Fy(c,a,l);l.innerHTML=d,e&&await e(c),p&&p(l)}catch(d){CL(d,n,vr.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),vy=u(function(e){si.initialize(e)},"initialize"),kL=u(async function(e,t,r){tt.warn("mermaid.init is deprecated. Please use run instead."),e&&vy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await By(i)},"init"),SL=u(async(e,{lazyLoad:t=!0}={})=>{jo(),an(...e),t===!1&&await zv()},"registerExternalDiagrams"),Ly=u(function(){if(vr.startOnLoad){const{startOnLoad:e}=si.getConfig();e&&vr.run().catch(t=>tt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Ly,!1);var wL=u(function(e){vr.parseError=e},"setParseErrorHandler"),Fo=[],rn=!1,Ay=u(async()=>{if(!rn){for(rn=!0;Fo.length>0;){const e=Fo.shift();if(e)try{await e()}catch(t){tt.error("Error executing queue",t)}}rn=!1}},"executeQueue"),TL=u(async(e,t)=>new Promise((r,i)=>{const s=u(()=>new Promise((o,a)=>{si.parse(e,t).then(n=>{o(n),r(n)},n=>{tt.error("Error parsing",n),vr.parseError?.(n),a(n),i(n)})}),"performCall");Fo.push(s),Ay().catch(i)}),"parse"),Fy=u((e,t,r)=>new Promise((i,s)=>{const o=u(()=>new Promise((a,n)=>{si.render(e,t,r).then(l=>{a(l),i(l)},l=>{tt.error("Error parsing",l),vr.parseError?.(l),n(l),s(l)})}),"performCall");Fo.push(o),Ay().catch(s)}),"render"),_L=u(()=>Object.keys(ei).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),vr={startOnLoad:!0,mermaidAPI:si,parse:TL,render:Fy,init:kL,run:By,registerExternalDiagrams:SL,registerLayoutLoaders:vm,initialize:vy,parseError:void 0,contentLoaded:Ly,setParseErrorHandler:wL,detectType:Mo,registerIconPacks:sp,getRegisteredDiagramsMetadata:_L},BL=vr;/*! Check if previously processed *//*!
|
|
313
|
+
* Wait for document loaded before starting the execution
|
|
314
|
+
*/const fA=Object.freeze(Object.defineProperty({__proto__:null,default:BL},Symbol.toStringTag,{value:"Module"}));export{ok as $,XL as A,Ai as B,Kx as C,Qd as D,ML as E,Ak as F,GL as G,yl as H,VL as I,Ck as J,Nr as K,n0 as L,Bk as M,rp as N,Qy as O,Gt as P,oC as Q,Bl as R,zn as S,q1 as T,mk as U,Do as V,OL as W,$L as X,Z0 as Y,R2 as Z,u as _,Jx as a,dp as a$,gs as a0,FL as a1,E1 as a2,Nx as a3,cu as a4,$h as a5,N1 as a6,Ae as a7,Y as a8,U as a9,Si as aA,um as aB,oS as aC,pm as aD,ut as aE,ep as aF,Cl as aG,lp as aH,Sc as aI,ds as aJ,m1 as aK,g1 as aL,f1 as aM,p1 as aN,o1 as aO,hp as aP,l1 as aQ,s1 as aR,d1 as aS,cp as aT,n1 as aU,C1 as aV,x1 as aW,y1 as aX,k1 as aY,b1 as aZ,a1 as a_,Gx as aa,uu as ab,AL as ac,dw as ad,Jg as ae,nA as af,oi as ag,sp as ah,Tl as ai,pt as aj,lm as ak,ae as al,NT as am,aA as an,cA as ao,hA as ap,dT as aq,dA as ar,Lo as as,iT as at,Ls as au,sT as av,ue as aw,bt as ax,Kd as ay,Zd as az,Qx as b,u1 as b0,c1 as b1,h1 as b2,up as b3,kk as b4,oT as b5,bp as b6,Ue as b7,Pd as b8,cs as b9,lA as ba,gd as bb,jw as bc,De as bd,Zk as be,r0 as bf,Np as bg,gt as bh,oA as bi,jl as bj,pw as bk,fA as bl,$t as c,du as d,re as e,Br as f,eC as g,Qg as h,ct as i,ze as j,Ot as k,tt as l,bs as m,Sp as n,Cs as o,t1 as p,EL as q,pA as r,tC as s,uA as t,Ie as u,rC as v,H1 as w,iC as x,bk as y,QS as z};
|