@launchsecure/launch-kit 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-client/assets/index-Dd6IotOZ.css +1 -0
- package/dist/chart-client/index.html +2 -2
- package/dist/client/assets/index-DE0uje6k.css +32 -0
- package/dist/client/index.html +2 -2
- package/dist/council-client/assets/index-CGYusOCK.css +1 -0
- package/dist/council-client/assets/{index-B1v46vTE.js → index-DkTFX53U.js} +1 -1
- package/dist/council-client/index.html +2 -2
- package/dist/deck-client/assets/_baseUniq-BrhDuG3C.js +1 -0
- package/dist/deck-client/assets/arc-DXtPHMhw.js +1 -0
- package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-Cs9IdLQQ.js +36 -0
- package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-CUdblaWk.js → blockDiagram-DXYQGD6D--wpvoBAt.js} +2 -2
- package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-MfAO5lak.js → c4Diagram-AHTNJAMY-BNIKE8-Z.js} +2 -2
- package/dist/deck-client/assets/channel-Bb5wIjTD.js +1 -0
- package/dist/deck-client/assets/chunk-4BX2VUAB-Bz3EWmUo.js +1 -0
- package/dist/deck-client/assets/{chunk-4TB4RGXK-BUJtZ7jO.js → chunk-4TB4RGXK-D55BBvVZ.js} +1 -1
- package/dist/deck-client/assets/chunk-55IACEB6-BzjEcoTi.js +1 -0
- package/dist/deck-client/assets/chunk-EDXVE4YY-CH1vs4Lu.js +1 -0
- package/dist/deck-client/assets/{chunk-FMBD7UC4-PnZ9v6ey.js → chunk-FMBD7UC4-CVRnaGM0.js} +1 -1
- package/dist/deck-client/assets/{chunk-OYMX7WX6-DXrWNOsV.js → chunk-OYMX7WX6-BCTV_aEZ.js} +1 -1
- package/dist/deck-client/assets/chunk-QZHKN3VN-BqM8r4ee.js +1 -0
- package/dist/deck-client/assets/chunk-YZCP3GAM-Rhbb691A.js +1 -0
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CN-ZYMbT.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CN-ZYMbT.js +1 -0
- package/dist/deck-client/assets/clone-D6e7poKG.js +1 -0
- package/dist/deck-client/assets/cose-bilkent-S5V4N54A-fWyBR9Nn.js +1 -0
- package/dist/deck-client/assets/dagre-KV5264BT-Ds0Sqext.js +4 -0
- package/dist/deck-client/assets/diagram-5BDNPKRD-BGz_X007.js +10 -0
- package/dist/deck-client/assets/diagram-G4DWMVQ6-C78jeb-r.js +24 -0
- package/dist/deck-client/assets/diagram-MMDJMWI5-BdoHW8mF.js +43 -0
- package/dist/deck-client/assets/diagram-TYMM5635-C8i9zc-U.js +24 -0
- package/dist/deck-client/assets/{erDiagram-SMLLAGMA-56pn_93p.js → erDiagram-SMLLAGMA-DplAZ-yG.js} +2 -2
- package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-BtV3M5xJ.js → flowDiagram-DWJPFMVM-F3N9yTAB.js} +2 -2
- package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DebdM4S5.js +292 -0
- package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-htCk0oPz.js +106 -0
- package/dist/deck-client/assets/graph-Dtxc2PT4.js +1 -0
- package/dist/deck-client/assets/index-CwAiam97.js +892 -0
- package/dist/deck-client/assets/index-evAPhGvM.css +1 -0
- package/dist/deck-client/assets/infoDiagram-42DDH7IO-gTxegviJ.js +2 -0
- package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DXYkdO3T.js → ishikawaDiagram-UXIWVN3A-DYSEsfUK.js} +5 -5
- package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-C2zBr-J5.js → journeyDiagram-VCZTEJTY-DgVc1q4D.js} +2 -2
- package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-CdoYLS4Z.js → kanban-definition-6JOO6SKY-DcOf3i9N.js} +2 -2
- package/dist/deck-client/assets/layout-CHP9HIw4.js +1 -0
- package/dist/deck-client/assets/linear-XjVb7x4Q.js +1 -0
- package/dist/deck-client/assets/mermaid.core-bouKOnsR.js +309 -0
- package/dist/deck-client/assets/min-Jl4GV9DB.js +1 -0
- package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-oAybLedr.js → mindmap-definition-QFDTVHPH-FXXf4cJx.js} +2 -2
- package/dist/deck-client/assets/pieDiagram-DEJITSTG-Dl4plCTi.js +30 -0
- package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-dtluDZXs.js → quadrantDiagram-34T5L4WZ-BeOEeelg.js} +2 -2
- package/dist/deck-client/assets/{requirementDiagram-MS252O5E-Cq8l7bOl.js → requirementDiagram-MS252O5E-CBh1jchM.js} +2 -2
- package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-BK6gG-ub.js +10 -0
- package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-CYkd7oQK.js → sequenceDiagram-FGHM5R23-BtQwzsF5.js} +2 -2
- package/dist/deck-client/assets/stateDiagram-FHFEXIEX--kLQOi8R.js +1 -0
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CHEPjgB0.js +1 -0
- package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-DZIxSyd1.js → timeline-definition-GMOUNBTQ-CQ_-CLh7.js} +2 -2
- package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-Ct4JVRDM.js → vennDiagram-DHZGUBPP-DBhKYAFT.js} +2 -2
- package/dist/deck-client/assets/{wardley-RL74JXVD-V29ycxOW.js → wardley-RL74JXVD-DLKe29q9.js} +3 -3
- package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-D-Ua6Cmi.js → wardleyDiagram-NUSXRM2D-Brb8ezsV.js} +2 -2
- package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-BPCOuRVl.js → xychartDiagram-5P7HB3ND-LogZ0Az9.js} +2 -2
- package/dist/deck-client/index.html +2 -2
- package/dist/server/cli.js +488 -215
- package/dist/server/council-entry.js +7 -1
- package/dist/server/council-serve.js +7 -1
- package/dist/server/deck-mcp-entry.js +423 -50
- package/dist/server/deck-serve.js +350 -48
- package/dist/server/graph-mcp-entry.js +331 -37
- package/dist/server/init-entry.js +17 -7
- package/dist/server/rover-entry.js +1 -1
- package/package.json +1 -1
- package/scaffolds/ls-marketplace/plugins/kit/skills/comms/SKILL.md +34 -1
- package/scaffolds/ls-marketplace/plugins/kit/skills/gen-test/SKILL.md +126 -0
- package/dist/chart-client/assets/index-CWJFFDPu.css +0 -1
- package/dist/client/assets/index-CTzFcfGV.css +0 -32
- package/dist/council-client/assets/index-ArgRc5mN.css +0 -1
- package/dist/deck-client/assets/_baseUniq-BZP7n41F.js +0 -1
- package/dist/deck-client/assets/arc-31biU3Az.js +0 -1
- package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-DHg6Ss--.js +0 -36
- package/dist/deck-client/assets/channel-BBkRLdnC.js +0 -1
- package/dist/deck-client/assets/chunk-4BX2VUAB-DQ1MrGgN.js +0 -1
- package/dist/deck-client/assets/chunk-55IACEB6-BdSnXB6g.js +0 -1
- package/dist/deck-client/assets/chunk-EDXVE4YY-94yZIUI8.js +0 -1
- package/dist/deck-client/assets/chunk-QZHKN3VN-CsIGIDKX.js +0 -1
- package/dist/deck-client/assets/chunk-YZCP3GAM-DVkBO9tn.js +0 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-DFCaeF-7.js +0 -1
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-DFCaeF-7.js +0 -1
- package/dist/deck-client/assets/clone-GCEVRScB.js +0 -1
- package/dist/deck-client/assets/cose-bilkent-S5V4N54A-m126Oh3b.js +0 -1
- package/dist/deck-client/assets/dagre-KV5264BT-C2aig8U5.js +0 -4
- package/dist/deck-client/assets/diagram-5BDNPKRD-CKpoRfGn.js +0 -10
- package/dist/deck-client/assets/diagram-G4DWMVQ6-Cjh115Ep.js +0 -24
- package/dist/deck-client/assets/diagram-MMDJMWI5-DKlBv_2L.js +0 -43
- package/dist/deck-client/assets/diagram-TYMM5635-CdBh4cEn.js +0 -24
- package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DTIsC6Zg.js +0 -292
- package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-CJYeyCLe.js +0 -106
- package/dist/deck-client/assets/graph-BDvMu1Ss.js +0 -1
- package/dist/deck-client/assets/index-D4eSxcBn.css +0 -1
- package/dist/deck-client/assets/index-QnGVE9PZ.js +0 -1196
- package/dist/deck-client/assets/infoDiagram-42DDH7IO-BWyKJnpW.js +0 -2
- package/dist/deck-client/assets/layout-vOnxnCQU.js +0 -1
- package/dist/deck-client/assets/linear-B0J0WCGz.js +0 -1
- package/dist/deck-client/assets/min-B0AXlT9L.js +0 -1
- package/dist/deck-client/assets/pieDiagram-DEJITSTG-BjHyHxGk.js +0 -30
- package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-C1Vih91z.js +0 -10
- package/dist/deck-client/assets/stateDiagram-FHFEXIEX-CtyG8wBK.js +0 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-BLyKWfcN.js +0 -1
- /package/dist/chart-client/assets/{index-Dzlj-oCj.js → index-CrYM1-ac.js} +0 -0
- /package/dist/client/assets/{index-tTg_ezUF.js → index-BoIjawzY.js} +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-KV5264BT-Ds0Sqext.js","assets/graph-Dtxc2PT4.js","assets/_baseUniq-BrhDuG3C.js","assets/layout-CHP9HIw4.js","assets/min-Jl4GV9DB.js","assets/clone-D6e7poKG.js","assets/index-CwAiam97.js","assets/index-evAPhGvM.css","assets/cose-bilkent-S5V4N54A-fWyBR9Nn.js","assets/cytoscape.esm-BQk4lpUV.js","assets/c4Diagram-AHTNJAMY-BNIKE8-Z.js","assets/chunk-YZCP3GAM-Rhbb691A.js","assets/flowDiagram-DWJPFMVM-F3N9yTAB.js","assets/chunk-FMBD7UC4-CVRnaGM0.js","assets/chunk-55IACEB6-BzjEcoTi.js","assets/chunk-EDXVE4YY-CH1vs4Lu.js","assets/channel-Bb5wIjTD.js","assets/erDiagram-SMLLAGMA-DplAZ-yG.js","assets/gitGraphDiagram-UUTBAWPF-htCk0oPz.js","assets/chunk-4BX2VUAB-Bz3EWmUo.js","assets/chunk-QZHKN3VN-BqM8r4ee.js","assets/wardley-RL74JXVD-DLKe29q9.js","assets/ganttDiagram-T4ZO3ILL-DebdM4S5.js","assets/linear-XjVb7x4Q.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-42DDH7IO-gTxegviJ.js","assets/pieDiagram-DEJITSTG-Dl4plCTi.js","assets/arc-DXtPHMhw.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-34T5L4WZ-BeOEeelg.js","assets/xychartDiagram-5P7HB3ND-LogZ0Az9.js","assets/requirementDiagram-MS252O5E-CBh1jchM.js","assets/sequenceDiagram-FGHM5R23-BtQwzsF5.js","assets/classDiagram-6PBFFD2Q-CN-ZYMbT.js","assets/chunk-4TB4RGXK-D55BBvVZ.js","assets/classDiagram-v2-HSJHXN6E-CN-ZYMbT.js","assets/stateDiagram-FHFEXIEX--kLQOi8R.js","assets/chunk-OYMX7WX6-BCTV_aEZ.js","assets/stateDiagram-v2-QKLJ7IA2-CHEPjgB0.js","assets/journeyDiagram-VCZTEJTY-DgVc1q4D.js","assets/timeline-definition-GMOUNBTQ-CQ_-CLh7.js","assets/mindmap-definition-QFDTVHPH-FXXf4cJx.js","assets/kanban-definition-6JOO6SKY-DcOf3i9N.js","assets/sankeyDiagram-XADWPNL6-BK6gG-ub.js","assets/diagram-TYMM5635-C8i9zc-U.js","assets/diagram-MMDJMWI5-BdoHW8mF.js","assets/blockDiagram-DXYQGD6D--wpvoBAt.js","assets/diagram-5BDNPKRD-BGz_X007.js","assets/architectureDiagram-Q4EWVU46-Cs9IdLQQ.js","assets/ishikawaDiagram-UXIWVN3A-DYSEsfUK.js","assets/vennDiagram-DHZGUBPP-DBhKYAFT.js","assets/diagram-G4DWMVQ6-C78jeb-r.js","assets/wardleyDiagram-NUSXRM2D-Brb8ezsV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ry=Object.defineProperty;var Ny=(e,t,r)=>t in e?Ry(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xt=(e,t,r)=>Ny(e,typeof t!="symbol"?t+"":t,r);import{g as qy,c as zy,_ as ft}from"./index-CwAiam97.js";var iu={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(zy,function(){var r=1e3,i=6e4,a=36e5,s="millisecond",n="second",o="minute",l="hour",h="day",c="week",u="month",p="quarter",d="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|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(D){var E=["th","st","nd","rd"],F=D%100;return"["+D+(E[(F-20)%10]||E[F]||E[0])+"]"}},k=function(D,E,F){var I=String(D);return!I||I.length>=E?D:""+Array(E+1-I.length).join(F)+D},_={s:k,z:function(D){var E=-D.utcOffset(),F=Math.abs(E),I=Math.floor(F/60),A=F%60;return(E<=0?"+":"-")+k(I,2,"0")+":"+k(A,2,"0")},m:function D(E,F){if(E.date()<F.date())return-D(F,E);var I=12*(F.year()-E.year())+(F.month()-E.month()),A=E.clone().add(I,u),W=F-A<0,H=E.clone().add(I+(W?-1:1),u);return+(-(I+(F-A)/(W?A-H:H-A))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:u,y:d,w:c,d:h,D:m,h:l,m:o,s:n,ms:s,Q:p}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",B={};B[w]=b;var T="$isDayjsObject",v=function(D){return D instanceof Y||!(!D||!D[T])},q=function D(E,F,I){var A;if(!E)return w;if(typeof E=="string"){var W=E.toLowerCase();B[W]&&(A=W),F&&(B[W]=F,A=W);var H=E.split("-");if(!A&&H.length>1)return D(H[0])}else{var Z=E.name;B[Z]=E,A=Z}return!I&&A&&(w=A),A||!I&&w},P=function(D,E){if(v(D))return D.clone();var F=typeof E=="object"?E:{};return F.date=D,F.args=arguments,new Y(F)},M=_;M.l=q,M.i=v,M.w=function(D,E){return P(D,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=function(){function D(F){this.$L=q(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[T]=!0}var E=D.prototype;return E.parse=function(F){this.$d=function(I){var A=I.date,W=I.utc;if(A===null)return new Date(NaN);if(M.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var H=A.match(y);if(H){var Z=H[2]-1||0,ut=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],Z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ut)):new Date(H[1],Z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ut)}}return new Date(A)}(F),this.init()},E.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},E.$utils=function(){return M},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(F,I){var A=P(F);return this.startOf(I)<=A&&A<=this.endOf(I)},E.isAfter=function(F,I){return P(F)<this.startOf(I)},E.isBefore=function(F,I){return this.endOf(I)<P(F)},E.$g=function(F,I,A){return M.u(F)?this[I]:this.set(A,F)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(F,I){var A=this,W=!!M.u(I)||I,H=M.p(F),Z=function(ne,Q){var lt=M.w(A.$u?Date.UTC(A.$y,Q,ne):new Date(A.$y,Q,ne),A);return W?lt:lt.endOf(h)},ut=function(ne,Q){return M.w(A.toDate()[ne].apply(A.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(Q)),A)},it=this.$W,dt=this.$M,tt=this.$D,bt="set"+(this.$u?"UTC":"");switch(H){case d:return W?Z(1,0):Z(31,11);case u:return W?Z(1,dt):Z(0,dt+1);case c:var Ft=this.$locale().weekStart||0,$t=(it<Ft?it+7:it)-Ft;return Z(W?tt-$t:tt+(6-$t),dt);case h:case m:return ut(bt+"Hours",0);case l:return ut(bt+"Minutes",1);case o:return ut(bt+"Seconds",2);case n:return ut(bt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(F){return this.startOf(F,!1)},E.$set=function(F,I){var A,W=M.p(F),H="set"+(this.$u?"UTC":""),Z=(A={},A[h]=H+"Date",A[m]=H+"Date",A[u]=H+"Month",A[d]=H+"FullYear",A[l]=H+"Hours",A[o]=H+"Minutes",A[n]=H+"Seconds",A[s]=H+"Milliseconds",A)[W],ut=W===h?this.$D+(I-this.$W):I;if(W===u||W===d){var it=this.clone().set(m,1);it.$d[Z](ut),it.init(),this.$d=it.set(m,Math.min(this.$D,it.daysInMonth())).$d}else Z&&this.$d[Z](ut);return this.init(),this},E.set=function(F,I){return this.clone().$set(F,I)},E.get=function(F){return this[M.p(F)]()},E.add=function(F,I){var A,W=this;F=Number(F);var H=M.p(I),Z=function(dt){var tt=P(W);return M.w(tt.date(tt.date()+Math.round(dt*F)),W)};if(H===u)return this.set(u,this.$M+F);if(H===d)return this.set(d,this.$y+F);if(H===h)return Z(1);if(H===c)return Z(7);var ut=(A={},A[o]=i,A[l]=a,A[n]=r,A)[H]||1,it=this.$d.getTime()+F*ut;return M.w(it,this)},E.subtract=function(F,I){return this.add(-1*F,I)},E.format=function(F){var I=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var W=F||"YYYY-MM-DDTHH:mm:ssZ",H=M.z(this),Z=this.$H,ut=this.$m,it=this.$M,dt=A.weekdays,tt=A.months,bt=A.meridiem,Ft=function(Q,lt,Ct,kt){return Q&&(Q[lt]||Q(I,W))||Ct[lt].slice(0,kt)},$t=function(Q){return M.s(Z%12||12,Q,"0")},ne=bt||function(Q,lt,Ct){var kt=Q<12?"AM":"PM";return Ct?kt.toLowerCase():kt};return W.replace(C,function(Q,lt){return lt||function(Ct){switch(Ct){case"YY":return String(I.$y).slice(-2);case"YYYY":return M.s(I.$y,4,"0");case"M":return it+1;case"MM":return M.s(it+1,2,"0");case"MMM":return Ft(A.monthsShort,it,tt,3);case"MMMM":return Ft(tt,it);case"D":return I.$D;case"DD":return M.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Ft(A.weekdaysMin,I.$W,dt,2);case"ddd":return Ft(A.weekdaysShort,I.$W,dt,3);case"dddd":return dt[I.$W];case"H":return String(Z);case"HH":return M.s(Z,2,"0");case"h":return $t(1);case"hh":return $t(2);case"a":return ne(Z,ut,!0);case"A":return ne(Z,ut,!1);case"m":return String(ut);case"mm":return M.s(ut,2,"0");case"s":return String(I.$s);case"ss":return M.s(I.$s,2,"0");case"SSS":return M.s(I.$ms,3,"0");case"Z":return H}return null}(Q)||H.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(F,I,A){var W,H=this,Z=M.p(I),ut=P(F),it=(ut.utcOffset()-this.utcOffset())*i,dt=this-ut,tt=function(){return M.m(H,ut)};switch(Z){case d:W=tt()/12;break;case u:W=tt();break;case p:W=tt()/3;break;case c:W=(dt-it)/6048e5;break;case h:W=(dt-it)/864e5;break;case l:W=dt/a;break;case o:W=dt/i;break;case n:W=dt/r;break;default:W=dt}return A?W:M.a(W)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(F,I){if(!F)return this.$L;var A=this.clone(),W=q(F,I,!0);return W&&(A.$L=W),A},E.clone=function(){return M.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},D}(),z=Y.prototype;return P.prototype=z,[["$ms",s],["$s",n],["$m",o],["$H",l],["$W",h],["$M",u],["$y",d],["$D",m]].forEach(function(D){z[D[1]]=function(E){return this.$g(E,D[0],D[1])}}),P.extend=function(D,E){return D.$i||(D(E,Y,P),D.$i=!0),P},P.locale=q,P.isDayjs=v,P.unix=function(D){return P(1e3*D)},P.en=B[w],P.Ls=B,P.p={},P})})(iu);var Wy=iu.exports;const Hy=qy(Wy);var au=Object.defineProperty,f=(e,t)=>au(e,"name",{value:t,configurable:!0}),Yy=(e,t)=>{for(var r in t)au(e,r,{get:t[r],enumerable:!0})},We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Hn=f(function(e="fatal"){let t=We.fatal;typeof e=="string"?e.toLowerCase()in We&&(t=We[e]):typeof e=="number"&&(t=e),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},t<=We.fatal&&(R.fatal=console.error?console.error.bind(console,fe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",fe("FATAL"))),t<=We.error&&(R.error=console.error?console.error.bind(console,fe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",fe("ERROR"))),t<=We.warn&&(R.warn=console.warn?console.warn.bind(console,fe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",fe("WARN"))),t<=We.info&&(R.info=console.info?console.info.bind(console,fe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",fe("INFO"))),t<=We.debug&&(R.debug=console.debug?console.debug.bind(console,fe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("DEBUG"))),t<=We.trace&&(R.trace=console.debug?console.debug.bind(console,fe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("TRACE")))},"setLogLevel"),fe=f(e=>`%c${Hy().format("ss.SSS")} : ${e} : `,"format");const ja={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 a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return ja.hue2rgb(s,a,e+1/3)*255;case"g":return ja.hue2rgb(s,a,e)*255;case"b":return ja.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),n=(a+s)/2;if(i==="l")return n*100;if(a===s)return 0;const o=a-s,l=n>.5?o/(2-a-s):o/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},jy={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},Uy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:ja,lang:jy,unit:Uy},tr={};for(let e=0;e<=255;e++)tr[e]=nt.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class Gy{constructor(){this.type=jt.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=jt.ALL}is(t){return this.type===t}}class Xy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ps=new Xy({r:0,g:0,b:0,a:0},"transparent"),Zr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Zr.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,n=a>4,o=n?1:17,l=n?8:4,h=s?0:-1,c=n?255:15;return Ps.set({r:(i>>l*(h+3)&c)*o,g:(i>>l*(h+2)&c)*o,b:(i>>l*(h+1)&c)*o,a:s?(i&c)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}${tr[Math.round(a*255)]}`:`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}`}},Cr={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(Cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Cr.re);if(!r)return;const[,i,a,s,n,o]=r;return Ps.set({h:Cr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(a)),l:nt.channel.clamp.l(parseFloat(s)),a:n?nt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${a})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Vi={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=Vi.colors[e];if(t)return Zr.parse(t)},stringify:e=>{const t=Zr.stringify(e);for(const r in Vi.colors)if(Vi.colors[r]===t)return r}},qi={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(qi.re);if(!r)return;const[,i,a,s,n,o,l,h,c]=r;return Ps.set({r:nt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(n?parseFloat(s)*2.55:parseFloat(s)),b:nt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?nt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(a)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Ie={format:{keyword:Vi,hex:Zr,rgb:qi,rgba:qi,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Zr.parse(e)||qi.parse(e)||Cr.parse(e)||Vi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?qi.stringify(e):Zr.stringify(e)},su=(e,t)=>{const r=Ie.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Ie.stringify(r)},ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return su(e,{a:t});const a=Ps.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Ie.stringify(a)},Vy=e=>{const{r:t,g:r,b:i}=Ie.parse(e),a=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(a)},Zy=e=>Vy(e)>=.5,ve=e=>!Zy(e),ou=(e,t,r)=>{const i=Ie.parse(e),a=i[t],s=nt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ie.stringify(i)},O=(e,t)=>ou(e,"l",t),$=(e,t)=>ou(e,"l",-t),x=(e,t)=>{const r=Ie.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return su(e,i)},Ky=(e,t,r=50)=>{const{r:i,g:a,b:s,a:n}=Ie.parse(e),{r:o,g:l,b:h,a:c}=Ie.parse(t),u=r/100,p=u*2-1,d=n-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,y=1-g,C=i*g+o*y,b=a*g+l*y,k=s*g+h*y,_=n*u+c*(1-u);return ar(C,b,k,_)},L=(e,t=100)=>{const r=Ie.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ky(r,e,t)};/*! @license DOMPurify 3.4.2 | (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.2/LICENSE */const{entries:nu,setPrototypeOf:lh,isFrozen:Qy,getPrototypeOf:Jy,getOwnPropertyDescriptor:t0}=Object;let{freeze:Jt,seal:ge,create:Yr}=Object,{apply:qo,construct:zo}=typeof Reflect<"u"&&Reflect;Jt||(Jt=function(t){return t});ge||(ge=function(t){return t});qo||(qo=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});zo||(zo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const Li=Mt(Array.prototype.forEach),e0=Mt(Array.prototype.lastIndexOf),hh=Mt(Array.prototype.pop),Fi=Mt(Array.prototype.push),r0=Mt(Array.prototype.splice),Zt=Array.isArray,zi=Mt(String.prototype.toLowerCase),xo=Mt(String.prototype.toString),ch=Mt(String.prototype.match),qr=Mt(String.prototype.replace),uh=Mt(String.prototype.indexOf),i0=Mt(String.prototype.trim),a0=Mt(Number.prototype.toString),s0=Mt(Boolean.prototype.toString),dh=typeof BigInt>"u"?null:Mt(BigInt.prototype.toString),ph=typeof Symbol>"u"?null:Mt(Symbol.prototype.toString),Bt=Mt(Object.prototype.hasOwnProperty),Ai=Mt(Object.prototype.toString),qt=Mt(RegExp.prototype.test),Ma=o0(TypeError);function Mt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return qo(e,t,i)}}function o0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return zo(e,r)}}function ht(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zi;if(lh&&lh(e,null),!Zt(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(Qy(t)||(t[i]=s),a=s)}e[a]=!0}return e}function n0(e){for(let t=0;t<e.length;t++)Bt(e,t)||(e[t]=null);return e}function ie(e){const t=Yr(null);for(const[r,i]of nu(e))Bt(e,r)&&(Zt(i)?t[r]=n0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ie(i):t[r]=i);return t}function l0(e){switch(typeof e){case"string":return e;case"number":return a0(e);case"boolean":return s0(e);case"bigint":return dh?dh(e):"0";case"symbol":return ph?ph(e):"Symbol()";case"undefined":return Ai(e);case"function":case"object":{if(e===null)return Ai(e);const t=e,r=jr(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Ai(i)}return Ai(e)}default:return Ai(e)}}function jr(e,t){for(;e!==null;){const i=t0(e,t);if(i){if(i.get)return Mt(i.get);if(typeof i.value=="function")return Mt(i.value)}e=Jy(e)}function r(){return null}return r}function h0(e){try{return qt(e,""),!0}catch{return!1}}const fh=Jt(["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"]),bo=Jt(["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"]),ko=Jt(["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"]),c0=Jt(["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"]),To=Jt(["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"]),u0=Jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gh=Jt(["#text"]),mh=Jt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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"]),_o=Jt(["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","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","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-rendering","textlength","type","u1","u2","unicode","values","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"]),yh=Jt(["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"]),$a=Jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),d0=ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm),p0=ge(/<%[\w\W]*|[\w\W]*%>/gm),f0=ge(/\$\{[\w\W]*/gm),g0=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),m0=ge(/^aria-[\-\w]+$/),lu=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),y0=ge(/^(?:\w+script|data):/i),C0=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hu=ge(/^html$/i),x0=ge(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ch=Object.freeze({__proto__:null,ARIA_ATTR:m0,ATTR_WHITESPACE:C0,CUSTOM_ELEMENT:x0,DATA_ATTR:g0,DOCTYPE_NAME:hu,ERB_EXPR:p0,IS_ALLOWED_URI:lu,IS_SCRIPT_OR_DATA:y0,MUSTACHE_EXPR:d0,TMPLIT_EXPR:f0});const Ei={element:1,text:3,progressingInstruction:7,comment:8,document:9},b0=function(){return typeof window>"u"?null:window},k0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},xh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b0();const t=et=>cu(et);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==Ei.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:n,Node:o,Element:l,NodeFilter:h,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:d}=e,m=l.prototype,g=jr(m,"cloneNode"),y=jr(m,"remove"),C=jr(m,"nextSibling"),b=jr(m,"childNodes"),k=jr(m,"parentNode");if(typeof n=="function"){const et=r.createElement("template");et.content&&et.content.ownerDocument&&(r=et.content.ownerDocument)}let _,w="";const{implementation:B,createNodeIterator:T,createDocumentFragment:v,getElementsByTagName:q}=r,{importNode:P}=i;let M=xh();t.isSupported=typeof nu=="function"&&typeof k=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Y,ERB_EXPR:z,TMPLIT_EXPR:D,DATA_ATTR:E,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:W}=Ch;let{IS_ALLOWED_URI:H}=Ch,Z=null;const ut=ht({},[...fh,...bo,...ko,...To,...gh]);let it=null;const dt=ht({},[...mh,..._o,...yh,...$a]);let tt=Object.seal(Yr(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}})),bt=null,Ft=null;const $t=Object.seal(Yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,Q=!0,lt=!1,Ct=!0,kt=!1,le=!0,Ht=!1,Dr=!1,Ba=!1,Le=!1,La=!1,Fa=!1,Yl=!0,jl=!1;const Ul="user-content-";let no=!0,vi=!1,Pr={},Fe=null;const lo=ht({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gl=null;const Xl=ht({},["audio","video","img","source","image","track"]);let ho=null;const Vl=ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Aa="http://www.w3.org/1998/Math/MathML",Ea="http://www.w3.org/2000/svg",Ae="http://www.w3.org/1999/xhtml";let Rr=Ae,co=!1,uo=null;const Ey=ht({},[Aa,Ea,Ae],xo);let po=ht({},["mi","mo","mn","ms","mtext"]),fo=ht({},["annotation-xml"]);const My=ht({},["title","style","font","a","script"]);let Bi=null;const $y=["application/xhtml+xml","text/html"],Oy="text/html";let Ot=null,Nr=null;const Iy=r.createElement("form"),Zl=function(S){return S instanceof RegExp||S instanceof Function},go=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Nr&&Nr===S)return;(!S||typeof S!="object")&&(S={}),S=ie(S),Bi=$y.indexOf(S.PARSER_MEDIA_TYPE)===-1?Oy:S.PARSER_MEDIA_TYPE,Ot=Bi==="application/xhtml+xml"?xo:zi,Z=Bt(S,"ALLOWED_TAGS")&&Zt(S.ALLOWED_TAGS)?ht({},S.ALLOWED_TAGS,Ot):ut,it=Bt(S,"ALLOWED_ATTR")&&Zt(S.ALLOWED_ATTR)?ht({},S.ALLOWED_ATTR,Ot):dt,uo=Bt(S,"ALLOWED_NAMESPACES")&&Zt(S.ALLOWED_NAMESPACES)?ht({},S.ALLOWED_NAMESPACES,xo):Ey,ho=Bt(S,"ADD_URI_SAFE_ATTR")&&Zt(S.ADD_URI_SAFE_ATTR)?ht(ie(Vl),S.ADD_URI_SAFE_ATTR,Ot):Vl,Gl=Bt(S,"ADD_DATA_URI_TAGS")&&Zt(S.ADD_DATA_URI_TAGS)?ht(ie(Xl),S.ADD_DATA_URI_TAGS,Ot):Xl,Fe=Bt(S,"FORBID_CONTENTS")&&Zt(S.FORBID_CONTENTS)?ht({},S.FORBID_CONTENTS,Ot):lo,bt=Bt(S,"FORBID_TAGS")&&Zt(S.FORBID_TAGS)?ht({},S.FORBID_TAGS,Ot):ie({}),Ft=Bt(S,"FORBID_ATTR")&&Zt(S.FORBID_ATTR)?ht({},S.FORBID_ATTR,Ot):ie({}),Pr=Bt(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?ie(S.USE_PROFILES):S.USE_PROFILES:!1,ne=S.ALLOW_ARIA_ATTR!==!1,Q=S.ALLOW_DATA_ATTR!==!1,lt=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,kt=S.SAFE_FOR_TEMPLATES||!1,le=S.SAFE_FOR_XML!==!1,Ht=S.WHOLE_DOCUMENT||!1,Le=S.RETURN_DOM||!1,La=S.RETURN_DOM_FRAGMENT||!1,Fa=S.RETURN_TRUSTED_TYPE||!1,Ba=S.FORCE_BODY||!1,Yl=S.SANITIZE_DOM!==!1,jl=S.SANITIZE_NAMED_PROPS||!1,no=S.KEEP_CONTENT!==!1,vi=S.IN_PLACE||!1,H=h0(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:lu,Rr=typeof S.NAMESPACE=="string"?S.NAMESPACE:Ae,po=Bt(S,"MATHML_TEXT_INTEGRATION_POINTS")&&S.MATHML_TEXT_INTEGRATION_POINTS&&typeof S.MATHML_TEXT_INTEGRATION_POINTS=="object"?ie(S.MATHML_TEXT_INTEGRATION_POINTS):ht({},["mi","mo","mn","ms","mtext"]),fo=Bt(S,"HTML_INTEGRATION_POINTS")&&S.HTML_INTEGRATION_POINTS&&typeof S.HTML_INTEGRATION_POINTS=="object"?ie(S.HTML_INTEGRATION_POINTS):ht({},["annotation-xml"]);const N=Bt(S,"CUSTOM_ELEMENT_HANDLING")&&S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING=="object"?ie(S.CUSTOM_ELEMENT_HANDLING):Yr(null);if(tt=Yr(null),Bt(N,"tagNameCheck")&&Zl(N.tagNameCheck)&&(tt.tagNameCheck=N.tagNameCheck),Bt(N,"attributeNameCheck")&&Zl(N.attributeNameCheck)&&(tt.attributeNameCheck=N.attributeNameCheck),Bt(N,"allowCustomizedBuiltInElements")&&typeof N.allowCustomizedBuiltInElements=="boolean"&&(tt.allowCustomizedBuiltInElements=N.allowCustomizedBuiltInElements),kt&&(Q=!1),La&&(Le=!0),Pr&&(Z=ht({},gh),it=Yr(null),Pr.html===!0&&(ht(Z,fh),ht(it,mh)),Pr.svg===!0&&(ht(Z,bo),ht(it,_o),ht(it,$a)),Pr.svgFilters===!0&&(ht(Z,ko),ht(it,_o),ht(it,$a)),Pr.mathMl===!0&&(ht(Z,To),ht(it,yh),ht(it,$a))),$t.tagCheck=null,$t.attributeCheck=null,Bt(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?$t.tagCheck=S.ADD_TAGS:Zt(S.ADD_TAGS)&&(Z===ut&&(Z=ie(Z)),ht(Z,S.ADD_TAGS,Ot))),Bt(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?$t.attributeCheck=S.ADD_ATTR:Zt(S.ADD_ATTR)&&(it===dt&&(it=ie(it)),ht(it,S.ADD_ATTR,Ot))),Bt(S,"ADD_URI_SAFE_ATTR")&&Zt(S.ADD_URI_SAFE_ATTR)&&ht(ho,S.ADD_URI_SAFE_ATTR,Ot),Bt(S,"FORBID_CONTENTS")&&Zt(S.FORBID_CONTENTS)&&(Fe===lo&&(Fe=ie(Fe)),ht(Fe,S.FORBID_CONTENTS,Ot)),Bt(S,"ADD_FORBID_CONTENTS")&&Zt(S.ADD_FORBID_CONTENTS)&&(Fe===lo&&(Fe=ie(Fe)),ht(Fe,S.ADD_FORBID_CONTENTS,Ot)),no&&(Z["#text"]=!0),Ht&&ht(Z,["html","head","body"]),Z.table&&(ht(Z,["tbody"]),delete bt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ma('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ma('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=S.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=k0(d,a)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));Jt&&Jt(S),Nr=S},Kl=ht({},[...bo,...ko,...c0]),Ql=ht({},[...To,...u0]),Dy=function(S){let N=k(S);(!N||!N.tagName)&&(N={namespaceURI:Rr,tagName:"template"});const G=zi(S.tagName),Tt=zi(N.tagName);return uo[S.namespaceURI]?S.namespaceURI===Ea?N.namespaceURI===Ae?G==="svg":N.namespaceURI===Aa?G==="svg"&&(Tt==="annotation-xml"||po[Tt]):!!Kl[G]:S.namespaceURI===Aa?N.namespaceURI===Ae?G==="math":N.namespaceURI===Ea?G==="math"&&fo[Tt]:!!Ql[G]:S.namespaceURI===Ae?N.namespaceURI===Ea&&!fo[Tt]||N.namespaceURI===Aa&&!po[Tt]?!1:!Ql[G]&&(My[G]||!Kl[G]):!!(Bi==="application/xhtml+xml"&&uo[S.namespaceURI]):!1},ye=function(S){Fi(t.removed,{element:S});try{k(S).removeChild(S)}catch{y(S)}},dr=function(S,N){try{Fi(t.removed,{attribute:N.getAttributeNode(S),from:N})}catch{Fi(t.removed,{attribute:null,from:N})}if(N.removeAttribute(S),S==="is")if(Le||La)try{ye(N)}catch{}else try{N.setAttribute(S,"")}catch{}},Jl=function(S){let N=null,G=null;if(Ba)S="<remove></remove>"+S;else{const At=ch(S,/^[\r\n\t ]+/);G=At&&At[0]}Bi==="application/xhtml+xml"&&Rr===Ae&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Tt=_?_.createHTML(S):S;if(Rr===Ae)try{N=new p().parseFromString(Tt,Bi)}catch{}if(!N||!N.documentElement){N=B.createDocument(Rr,"template",null);try{N.documentElement.innerHTML=co?w:Tt}catch{}}const Yt=N.body||N.documentElement;return S&&G&&Yt.insertBefore(r.createTextNode(G),Yt.childNodes[0]||null),Rr===Ae?q.call(N,Ht?"html":"body")[0]:Ht?N.documentElement:Yt},th=function(S){return T.call(S.ownerDocument||S,S,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},mo=function(S){return S instanceof u&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof c)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},yo=function(S){return typeof o=="function"&&S instanceof o};function ze(et,S,N){Li(et,G=>{G.call(t,S,N,Nr)})}const eh=function(S){let N=null;if(ze(M.beforeSanitizeElements,S,null),mo(S))return ye(S),!0;const G=Ot(S.nodeName);if(ze(M.uponSanitizeElement,S,{tagName:G,allowedTags:Z}),le&&S.hasChildNodes()&&!yo(S.firstElementChild)&&qt(/<[/\w!]/g,S.innerHTML)&&qt(/<[/\w!]/g,S.textContent)||le&&S.namespaceURI===Ae&&G==="style"&&yo(S.firstElementChild)||S.nodeType===Ei.progressingInstruction||le&&S.nodeType===Ei.comment&&qt(/<[/\w]/g,S.data))return ye(S),!0;if(bt[G]||!($t.tagCheck instanceof Function&&$t.tagCheck(G))&&!Z[G]){if(!bt[G]&&ih(G)&&(tt.tagNameCheck instanceof RegExp&&qt(tt.tagNameCheck,G)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(G)))return!1;if(no&&!Fe[G]){const Tt=k(S)||S.parentNode,Yt=b(S)||S.childNodes;if(Yt&&Tt){const At=Yt.length;for(let ee=At-1;ee>=0;--ee){const pe=g(Yt[ee],!0);Tt.insertBefore(pe,C(S))}}}return ye(S),!0}return S instanceof l&&!Dy(S)||(G==="noscript"||G==="noembed"||G==="noframes")&&qt(/<\/no(script|embed|frames)/i,S.innerHTML)?(ye(S),!0):(kt&&S.nodeType===Ei.text&&(N=S.textContent,Li([Y,z,D],Tt=>{N=qr(N,Tt," ")}),S.textContent!==N&&(Fi(t.removed,{element:S.cloneNode()}),S.textContent=N)),ze(M.afterSanitizeElements,S,null),!1)},rh=function(S,N,G){if(Ft[N]||Yl&&(N==="id"||N==="name")&&(G in r||G in Iy))return!1;const Tt=it[N]||$t.attributeCheck instanceof Function&&$t.attributeCheck(N,S);if(!(Q&&!Ft[N]&&qt(E,N))){if(!(ne&&qt(F,N))){if(!Tt||Ft[N]){if(!(ih(S)&&(tt.tagNameCheck instanceof RegExp&&qt(tt.tagNameCheck,S)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(S))&&(tt.attributeNameCheck instanceof RegExp&&qt(tt.attributeNameCheck,N)||tt.attributeNameCheck instanceof Function&&tt.attributeNameCheck(N,S))||N==="is"&&tt.allowCustomizedBuiltInElements&&(tt.tagNameCheck instanceof RegExp&&qt(tt.tagNameCheck,G)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(G))))return!1}else if(!ho[N]){if(!qt(H,qr(G,A,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&S!=="script"&&uh(G,"data:")===0&&Gl[S])){if(!(lt&&!qt(I,qr(G,A,"")))){if(G)return!1}}}}}}return!0},Py=ht({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ih=function(S){return!Py[zi(S)]&&qt(W,S)},ah=function(S){ze(M.beforeSanitizeAttributes,S,null);const{attributes:N}=S;if(!N||mo(S))return;const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:it,forceKeepAttr:void 0};let Tt=N.length;for(;Tt--;){const Yt=N[Tt],{name:At,namespaceURI:ee,value:pe}=Yt,Ce=Ot(At),Co=pe;let Pt=At==="value"?Co:i0(Co);if(G.attrName=Ce,G.attrValue=Pt,G.keepAttr=!0,G.forceKeepAttr=void 0,ze(M.uponSanitizeAttribute,S,G),Pt=G.attrValue,jl&&(Ce==="id"||Ce==="name")&&uh(Pt,Ul)!==0&&(dr(At,S),Pt=Ul+Pt),le&&qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Pt)){dr(At,S);continue}if(Ce==="attributename"&&ch(Pt,"href")){dr(At,S);continue}if(G.forceKeepAttr)continue;if(!G.keepAttr){dr(At,S);continue}if(!Ct&&qt(/\/>/i,Pt)){dr(At,S);continue}kt&&Li([Y,z,D],nh=>{Pt=qr(Pt,nh," ")});const oh=Ot(S.nodeName);if(!rh(oh,Ce,Pt)){dr(At,S);continue}if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!ee)switch(d.getAttributeType(oh,Ce)){case"TrustedHTML":{Pt=_.createHTML(Pt);break}case"TrustedScriptURL":{Pt=_.createScriptURL(Pt);break}}if(Pt!==Co)try{ee?S.setAttributeNS(ee,At,Pt):S.setAttribute(At,Pt),mo(S)?ye(S):hh(t.removed)}catch{dr(At,S)}}ze(M.afterSanitizeAttributes,S,null)},sh=function(S){let N=null;const G=th(S);for(ze(M.beforeSanitizeShadowDOM,S,null);N=G.nextNode();)ze(M.uponSanitizeShadowNode,N,null),eh(N),ah(N),N.content instanceof s&&sh(N.content);ze(M.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(et){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,G=null,Tt=null,Yt=null;if(co=!et,co&&(et="<!-->"),typeof et!="string"&&!yo(et)&&(et=l0(et),typeof et!="string"))throw Ma("dirty is not a string, aborting");if(!t.isSupported)return et;if(Dr||go(S),t.removed=[],typeof et=="string"&&(vi=!1),vi){const pe=et.nodeName;if(typeof pe=="string"){const Ce=Ot(pe);if(!Z[Ce]||bt[Ce])throw Ma("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof o)N=Jl("<!---->"),G=N.ownerDocument.importNode(et,!0),G.nodeType===Ei.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?N=G:N.appendChild(G);else{if(!Le&&!kt&&!Ht&&et.indexOf("<")===-1)return _&&Fa?_.createHTML(et):et;if(N=Jl(et),!N)return Le?null:Fa?w:""}N&&Ba&&ye(N.firstChild);const At=th(vi?et:N);for(;Tt=At.nextNode();)eh(Tt),ah(Tt),Tt.content instanceof s&&sh(Tt.content);if(vi)return et;if(Le){if(kt){N.normalize();let pe=N.innerHTML;Li([Y,z,D],Ce=>{pe=qr(pe,Ce," ")}),N.innerHTML=pe}if(La)for(Yt=v.call(N.ownerDocument);N.firstChild;)Yt.appendChild(N.firstChild);else Yt=N;return(it.shadowroot||it.shadowrootmode)&&(Yt=P.call(i,Yt,!0)),Yt}let ee=Ht?N.outerHTML:N.innerHTML;return Ht&&Z["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&qt(hu,N.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
|
|
3
|
+
`+ee),kt&&Li([Y,z,D],pe=>{ee=qr(ee,pe," ")}),_&&Fa?_.createHTML(ee):ee},t.setConfig=function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};go(et),Dr=!0},t.clearConfig=function(){Nr=null,Dr=!1},t.isValidAttribute=function(et,S,N){Nr||go({});const G=Ot(et),Tt=Ot(S);return rh(G,Tt,N)},t.addHook=function(et,S){typeof S=="function"&&Fi(M[et],S)},t.removeHook=function(et,S){if(S!==void 0){const N=e0(M[et],S);return N===-1?void 0:r0(M[et],N,1)[0]}return hh(M[et])},t.removeHooks=function(et){M[et]=[]},t.removeAllHooks=function(){M=xh()},t}var pi=cu(),uu=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Zi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,T0=/\s*%%.*\n/gm,Jr,du=(Jr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Jr,"UnknownDiagramError"),Jr),wr={},Yn=f(function(e,t){e=e.replace(uu,"").replace(Zi,"").replace(T0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(wr))if(i(e,t))return r;throw new du(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Wo=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)pu(t,r,i)},"registerLazyLoadedDiagrams"),pu=f((e,t,r)=>{wr[e]&&R.warn(`Detector with key ${e} already exists. Overwriting.`),wr[e]={detector:t,loader:r},R.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),_0=f(e=>wr[e].loader,"getDiagramLoader"),Ho=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Ho(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=Ho(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),It=Ho,Pe="#ffffff",Re="#f2f2f2",ot=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),ti,w0=(ti=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,a,s,n,o,l,h,c,u,p,d,m,g,y,C,b,k,_,w,B,T;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?$(this.secondaryColor,30):this.secondaryColor),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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),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||O(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||$(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=$(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=$(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||L(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||O(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||$(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||x(this.mainBkg,{h:180,s:-15,l:t*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||x(this.mainBkg,{h:180,s:-15,l:t*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((n=this.radar)==null?void 0:n.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,dataLabelColor:((m=this.xyChart)==null?void 0:m.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((y=this.xyChart)==null?void 0:y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((C=this.xyChart)==null?void 0:C.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((k=this.xyChart)==null?void 0:k.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((B=this.xyChart)==null?void 0:B.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((T=this.xyChart)==null?void 0:T.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?$(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ti,"Theme"),ti),S0=f(e=>{const t=new w0;return t.calculate(e),t},"getThemeVariables"),ei,v0=(ei=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ar(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=$("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=$(this.sectionBkgColor,10),this.taskBorderColor=ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ar(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||$(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,a,s,n,o,l,h,c,u,p,d,m,g,y,C,b,k,_,w,B;this.secondBkg=O(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=O(this.labelBackground,25),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.altSectionBkgColor=this.background,this.taskBkgColor=O(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=L(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||L(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScalePeer"+T]=this["cScalePeer"+T]||O(this["cScale"+T],10);for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-10+T*4)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(-7+T*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??O(this["cScale"+T],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},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?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ei,"Theme"),ei),B0=f(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),ri,L0=(ri=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,a,s,n,o,l,h,c,u,p,d,m,g,y,C,b,k,_,w,B;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=$(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||$(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,l:-(7+T*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||$(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ri,"Theme"),ri),F0=f(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),ii,A0=(ii=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=O("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,a,s,n,o,l,h,c,u,p,d,m,g,y,C,b,k,_,w,B;this.actorBorder=$(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||$(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||$(this.tertiaryColor,40);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScale"+T]=$(this["cScale"+T],10),this["cScalePeer"+T]=this["cScalePeer"+T]||$(this["cScale"+T],25);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||x(this["cScale"+T],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{h:30,s:-30,l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{h:30,s:-30,l:-(8+T*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(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??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.xyChart={backgroundColor:((u=this.xyChart)==null?void 0:u.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,dataLabelColor:((d=this.xyChart)==null?void 0:d.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((m=this.xyChart)==null?void 0:m.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((g=this.xyChart)==null?void 0:g.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((C=this.xyChart)==null?void 0:C.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((k=this.xyChart)==null?void 0:k.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((w=this.xyChart)==null?void 0:w.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ii,"Theme"),ii),E0=f(e=>{const t=new A0;return t.calculate(e),t},"getThemeVariables"),ai,M0=(ai=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,a,s,n,o,l,h,c,u,p,d,m,g,y,C,b,k,_,w,B;this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleInv"+T]=this["cScaleInv"+T]||L(this["cScale"+T]);for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this.darkMode?this["cScalePeer"+T]=this["cScalePeer"+T]||O(this["cScale"+T],10):this["cScalePeer"+T]=this["cScalePeer"+T]||$(this["cScale"+T],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["cScaleLabel"+T]=this["cScaleLabel"+T]||this.scaleLabelColor;for(let T=0;T<5;T++)this["surface"+T]=this["surface"+T]||x(this.mainBkg,{l:-(5+T*5)}),this["surfacePeer"+T]=this["surfacePeer"+T]||x(this.mainBkg,{l:-(8+T*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=$(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=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=$(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let T=0;T<this.THEME_COLOR_LIMIT;T++)this["pie"+T]=this["cScale"+T];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let T=0;T<8;T++)this["venn"+(T+1)]=this["venn"+(T+1)]??this["cScale"+T];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((y=this.radar)==null?void 0:y.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},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.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ai,"Theme"),ai),$0=f(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),si,O0=(si=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var s,n,o,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?$(this.secondaryColor,30):this.secondaryColor),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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=$(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=$(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||$(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(si,"Theme"),si),I0=f(e=>{const t=new O0;return t.calculate(e),t},"getThemeVariables"),oi,D0=(oi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,a,s,n,o,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.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?$(this.secondaryColor,30):this.secondaryColor),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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),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||O(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||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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=$(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=$(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||O(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?$(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=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(oi,"Theme"),oi),P0=f(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),ni,R0=(ni=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var s,n,o,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?$(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=$(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=$(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||$(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ni,"Theme"),ni),N0=f(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),li,q0=(li=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,a,s,n,o,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.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?$(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),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||O(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.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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=$(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=$(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||O(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?$(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(li,"Theme"),li),z0=f(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),hi,W0=(hi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,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.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.filterColor="#000000"}updateColors(){var s,n,o,l,h,c,u,p,d,m,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?$(this.secondaryColor,30):this.secondaryColor),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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.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||"#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";for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||L(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||O(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||$(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||x(this.mainBkg,{h:180,s:-15,l:a*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(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:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?$(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(hi,"Theme"),hi),H0=f(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),ci,Y0=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=L(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.filterColor="#FFFFFF"}updateColors(){var r,i,a,s,n,o,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.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?$(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,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||$(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rootLabelColor="#FFFFFF",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||O(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.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.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||"#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";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||L(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||O(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||$(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=$(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(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||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(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||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ve(this.quadrant1Fill)?O(this.quadrant1Fill):$(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((o=this.xyChart)==null?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.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?$(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||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=$(this.git0,25),this.git1=$(this.git1,25),this.git2=$(this.git2,25),this.git3=$(this.git3,25),this.git4=$(this.git4,25),this.git5=$(this.git5,25),this.git6=$(this.git6,25),this.git7=$(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ci,"Theme"),ci),j0=f(e=>{const t=new Y0;return t.calculate(e),t},"getThemeVariables"),Ue={base:{getThemeVariables:S0},dark:{getThemeVariables:B0},default:{getThemeVariables:F0},forest:{getThemeVariables:E0},neutral:{getThemeVariables:$0},neo:{getThemeVariables:I0},"neo-dark":{getThemeVariables:P0},redux:{getThemeVariables:N0},"redux-dark":{getThemeVariables:z0},"redux-color":{getThemeVariables:H0},"redux-dark-color":{getThemeVariables:j0}},he={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,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,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,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},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,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},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},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},fu={...he,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ue.default.getThemeVariables(),sequence:{...he.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...he.gantt,tickInterval:void 0,useWidth:void 0},c4:{...he.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...he.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...he.pie,useWidth:984},xyChart:{...he.xyChart,useWidth:void 0},requirement:{...he.requirement,useWidth:void 0},packet:{...he.packet},treeView:{...he.treeView,useWidth:void 0},radar:{...he.radar},ishikawa:{...he.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...he.venn}},gu=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...gu(e[i],"")]:[...r,t+i],[]),"keyify"),U0=new Set(gu(fu,"")),mu=fu,rs=f(e=>{if(R.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>rs(t));return}for(const t of Object.keys(e)){if(R.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!U0.has(t)||e[t]==null){R.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){R.debug("sanitizing object",t),rs(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(R.debug("sanitizing css option",t),e[t]=G0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}R.debug("After sanitization",e)}},"sanitizeDirective"),G0=f(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"),fi=Object.freeze(mu),Ze=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ae=It({},fi),is,Sr=[],Ki=It({},fi),Rs=f((e,t)=>{let r=It({},e),i={};for(const a of t)xu(a),i=It(i,a);if(r=It(r,i),i.theme&&i.theme in Ue){const a=It({},is),s=It(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ue&&(r.themeVariables=Ue[r.theme].getThemeVariables(s))}return Ki=r,ku(Ki),Ki},"updateCurrentConfig"),X0=f(e=>(ae=It({},fi),ae=It(ae,e),e.theme&&Ue[e.theme]&&(ae.themeVariables=Ue[e.theme].getThemeVariables(e.themeVariables)),Rs(ae,Sr),ae),"setSiteConfig"),V0=f(e=>{is=It({},e)},"saveConfigFromInitialize"),Z0=f(e=>(ae=It(ae,e),Rs(ae,Sr),ae),"updateSiteConfig"),yu=f(()=>It({},ae),"getSiteConfig"),Cu=f(e=>(ku(e),It(Ki,e),St()),"setConfig"),St=f(()=>It({},Ki),"getConfig"),xu=f(e=>{e&&(["secure",...ae.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.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"&&xu(e[t])}))},"sanitize"),K0=f(e=>{var t;rs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Sr.push(e),Rs(ae,Sr)},"addDirective"),as=f((e=ae)=>{Sr=[],Rs(e,Sr)},"reset"),Q0={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."},bh={},bu=f(e=>{bh[e]||(R.warn(Q0[e]),bh[e]=!0)},"issueWarning"),ku=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bu("LAZY_LOAD_DEPRECATED")},"checkConfig"),_A=f(()=>{let e={};is&&(e=It(e,is));for(const t of Sr)e=It(e,t);return e},"getUserDefinedConfig"),te=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&bu("FLOWCHART_HTML_LABELS_DEPRECATED"),Ze(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ma=/<br\s*\/?>/gi,J0=f(e=>e?wu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),tC=(()=>{let e=!1;return()=>{e||(Tu(),e=!0)}})();function Tu(){const e="data-temp-href-target";pi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),pi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Tu,"setupDompurifyHooks");var _u=f(e=>(tC(),pi.sanitize(e)),"removeScript"),kh=f((e,t)=>{if(te(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=_u(e):r!=="loose"&&(e=wu(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=aC(e))}return e},"sanitizeMore"),Se=f((e,t)=>e&&(t.dompurifyConfig?e=pi.sanitize(kh(e,t),t.dompurifyConfig).toString():e=pi.sanitize(kh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),eC=f((e,t)=>typeof e=="string"?Se(e,t):e.flat().map(r=>Se(r,t)),"sanitizeTextOrArray"),rC=f(e=>ma.test(e),"hasBreaks"),iC=f(e=>e.split(ma),"splitBreaks"),aC=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),wu=f(e=>e.replace(ma,"#br#"),"breakToPlaceholder"),sC=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),oC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),nC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],n=t[i+1];lC(s,n)&&(a=s+","+n,i++,r.pop())}r.push(hC(a))}return r.join("")},"parseGenericTypes"),Yo=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),lC=f((e,t)=>{const r=Yo(e,"~"),i=Yo(t,"~");return r===1&&i===1},"shouldCombineSets"),hC=f(e=>{const t=Yo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),_h=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),jo=/\$\$(.*)\$\$/g,ra=f(e=>{var t;return(((t=e.match(jo))==null?void 0:t.length)??0)>0},"hasKatex"),wA=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Su(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),cC=f(async(e,t)=>{if(!ra(e))return e;if(!(_h()||t.legacyMathML||t.forceLegacyMathML))return e.replace(jo,"MathML is unsupported in this environment.");{const{default:r}=await ft(async()=>{const{default:a}=await import("./katex-DkKDou_j.js");return{default:a}},[]),i=t.forceLegacyMathML||!_h()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ma).map(a=>ra(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(jo,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Su=f(async(e,t)=>Se(await cC(e,t),t),"renderKatexSanitized"),ya={getRows:J0,sanitizeText:Se,sanitizeTextOrArray:eC,hasBreaks:rC,splitBreaks:iC,lineBreakRegex:ma,removeScript:_u,getUrl:sC,evaluate:Ze,getMax:oC,getMin:nC},uC=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),dC=f(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"),vu=f(function(e,t,r,i){const a=dC(t,r,i);uC(e,a)},"configureSvgSize"),pC=f(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,n=a.height;R.info(`SVG bounds: ${s}x${n}`,a);let o=0,l=0;R.info(`Graph bounds: ${o}x${l}`,e),o=s+r*2,l=n+r*2,R.info(`Calculated bounds: ${o}x${l}`),vu(t,l,o,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Ua={},fC=f((e,t,r,i)=>{let a="";return e in Ua&&Ua[e]?a=Ua[e]({...r,svgId:i}):R.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${a}
|
|
78
|
+
.node .neo-node {
|
|
79
|
+
stroke: ${r.nodeBorder};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
83
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
84
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
[data-look="neo"].node path {
|
|
89
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
90
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-look="neo"].node .outer-path {
|
|
94
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-look="neo"].node .neo-line path {
|
|
98
|
+
stroke: ${r.nodeBorder};
|
|
99
|
+
filter: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-look="neo"].node circle{
|
|
103
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
104
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-look="neo"].node circle .state-start{
|
|
108
|
+
fill: #000000;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-look="neo"].icon-shape .icon {
|
|
112
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
113
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
117
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
118
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
${t}
|
|
122
|
+
`},"getStyles"),gC=f((e,t)=>{t!==void 0&&(Ua[e]=t)},"addStylesForDiagram"),mC=fC,Bu={};Yy(Bu,{clear:()=>yC,getAccDescription:()=>kC,getAccTitle:()=>xC,getDiagramTitle:()=>_C,setAccDescription:()=>bC,setAccTitle:()=>CC,setDiagramTitle:()=>TC});var jn="",Un="",Gn="",Xn=f(e=>Se(e,St()),"sanitizeText"),yC=f(()=>{jn="",Gn="",Un=""},"clear"),CC=f(e=>{jn=Xn(e).replace(/^\s+/g,"")},"setAccTitle"),xC=f(()=>jn,"getAccTitle"),bC=f(e=>{Gn=Xn(e).replace(/\n\s+/g,`
|
|
123
|
+
`)},"setAccDescription"),kC=f(()=>Gn,"getAccDescription"),TC=f(e=>{Un=Xn(e)},"setDiagramTitle"),_C=f(()=>Un,"getDiagramTitle"),wh=R,wC=Hn,gt=St,SA=Cu,vA=fi,Vn=f(e=>Se(e,gt()),"sanitizeText"),SC=pC,vC=f(()=>Bu,"getCommonDb"),ss={},os=f((e,t,r)=>{var i;ss[e]&&wh.warn(`Diagram with id ${e} already registered. Overwriting.`),ss[e]=t,r&&pu(e,r),gC(e,t.styles),(i=t.injectUtils)==null||i.call(t,wh,wC,gt,Vn,SC,vC(),()=>{})},"registerDiagram"),Uo=f(e=>{if(e in ss)return ss[e];throw new BC(e)},"getDiagram"),ui,BC=(ui=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(ui,"DiagramNotFoundError"),ui),LC={value:()=>{}};function Lu(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ga(r)}function Ga(e){this._=e}function FC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ga.prototype=Lu.prototype={constructor:Ga,on:function(e,t){var r=this._,i=FC(e+"",r),a,s=-1,n=i.length;if(arguments.length<2){for(;++s<n;)if((a=(e=i[s]).type)&&(a=AC(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<n;)if(a=(e=i[s]).type)r[a]=Sh(r[a],e.name,t);else if(t==null)for(a in r)r[a]=Sh(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ga(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(t,r)}};function AC(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function Sh(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=LC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Go="http://www.w3.org/1999/xhtml";const vh={svg:"http://www.w3.org/2000/svg",xhtml:Go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ns(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),vh.hasOwnProperty(t)?{space:vh[t],local:e}:e}function EC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Go&&t.documentElement.namespaceURI===Go?t.createElement(e):t.createElementNS(r,e)}}function MC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fu(e){var t=Ns(e);return(t.local?MC:EC)(t)}function $C(){}function Zn(e){return e==null?$C:function(){return this.querySelector(e)}}function OC(e){typeof e!="function"&&(e=Zn(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=new Array(n),l,h,c=0;c<n;++c)(l=s[c])&&(h=e.call(l,l.__data__,c,s))&&("__data__"in l&&(h.__data__=l.__data__),o[c]=h);return new de(i,this._parents)}function IC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function DC(){return[]}function Au(e){return e==null?DC:function(){return this.querySelectorAll(e)}}function PC(e){return function(){return IC(e.apply(this,arguments))}}function RC(e){typeof e=="function"?e=PC(e):e=Au(e);for(var t=this._groups,r=t.length,i=[],a=[],s=0;s<r;++s)for(var n=t[s],o=n.length,l,h=0;h<o;++h)(l=n[h])&&(i.push(e.call(l,l.__data__,h,n)),a.push(l));return new de(i,a)}function Eu(e){return function(){return this.matches(e)}}function Mu(e){return function(t){return t.matches(e)}}var NC=Array.prototype.find;function qC(e){return function(){return NC.call(this.children,e)}}function zC(){return this.firstElementChild}function WC(e){return this.select(e==null?zC:qC(typeof e=="function"?e:Mu(e)))}var HC=Array.prototype.filter;function YC(){return Array.from(this.children)}function jC(e){return function(){return HC.call(this.children,e)}}function UC(e){return this.selectAll(e==null?YC:jC(typeof e=="function"?e:Mu(e)))}function GC(e){typeof e!="function"&&(e=Eu(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=[],l,h=0;h<n;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&o.push(l);return new de(i,this._parents)}function $u(e){return new Array(e.length)}function XC(){return new de(this._enter||this._groups.map($u),this._parents)}function ns(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ns.prototype={constructor:ns,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 VC(e){return function(){return e}}function ZC(e,t,r,i,a,s){for(var n=0,o,l=t.length,h=s.length;n<h;++n)(o=t[n])?(o.__data__=s[n],i[n]=o):r[n]=new ns(e,s[n]);for(;n<l;++n)(o=t[n])&&(a[n]=o)}function KC(e,t,r,i,a,s,n){var o,l,h=new Map,c=t.length,u=s.length,p=new Array(c),d;for(o=0;o<c;++o)(l=t[o])&&(p[o]=d=n.call(l,l.__data__,o,t)+"",h.has(d)?a[o]=l:h.set(d,l));for(o=0;o<u;++o)d=n.call(e,s[o],o,s)+"",(l=h.get(d))?(i[o]=l,l.__data__=s[o],h.delete(d)):r[o]=new ns(e,s[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(p[o])===l&&(a[o]=l)}function QC(e){return e.__data__}function JC(e,t){if(!arguments.length)return Array.from(this,QC);var r=t?KC:ZC,i=this._parents,a=this._groups;typeof e!="function"&&(e=VC(e));for(var s=a.length,n=new Array(s),o=new Array(s),l=new Array(s),h=0;h<s;++h){var c=i[h],u=a[h],p=u.length,d=tx(e.call(c,c&&c.__data__,h,i)),m=d.length,g=o[h]=new Array(m),y=n[h]=new Array(m),C=l[h]=new Array(p);r(c,u,g,y,C,d,t);for(var b=0,k=0,_,w;b<m;++b)if(_=g[b]){for(b>=k&&(k=b+1);!(w=y[k])&&++k<m;);_._next=w||null}}return n=new de(n,i),n._enter=o,n._exit=l,n}function tx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ex(){return new de(this._exit||this._groups.map($u),this._parents)}function rx(e,t,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function ix(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,s=i.length,n=Math.min(a,s),o=new Array(a),l=0;l<n;++l)for(var h=r[l],c=i[l],u=h.length,p=o[l]=new Array(u),d,m=0;m<u;++m)(d=h[m]||c[m])&&(p[m]=d);for(;l<a;++l)o[l]=r[l];return new de(o,this._parents)}function ax(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,s=i[a],n;--a>=0;)(n=i[a])&&(s&&n.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(n,s),s=n);return this}function sx(e){e||(e=ox);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var n=r[s],o=n.length,l=a[s]=new Array(o),h,c=0;c<o;++c)(h=n[c])&&(l[c]=h);l.sort(t)}return new de(a,this._parents).order()}function ox(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function nx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lx(){return Array.from(this)}function hx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length;a<s;++a){var n=i[a];if(n)return n}return null}function cx(){let e=0;for(const t of this)++e;return e}function ux(){return!this.node()}function dx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],s=0,n=a.length,o;s<n;++s)(o=a[s])&&e.call(o,o.__data__,s,a);return this}function px(e){return function(){this.removeAttribute(e)}}function fx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gx(e,t){return function(){this.setAttribute(e,t)}}function mx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Cx(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 xx(e,t){var r=Ns(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?fx:px:typeof t=="function"?r.local?Cx:yx:r.local?mx:gx)(r,t))}function Ou(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bx(e){return function(){this.style.removeProperty(e)}}function kx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Tx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function _x(e,t,r){return arguments.length>1?this.each((t==null?bx:typeof t=="function"?Tx:kx)(e,t,r??"")):gi(this.node(),e)}function gi(e,t){return e.style.getPropertyValue(t)||Ou(e).getComputedStyle(e,null).getPropertyValue(t)}function wx(e){return function(){delete this[e]}}function Sx(e,t){return function(){this[e]=t}}function vx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bx(e,t){return arguments.length>1?this.each((t==null?wx:typeof t=="function"?vx:Sx)(e,t)):this.node()[e]}function Iu(e){return e.trim().split(/^|\s+/)}function Kn(e){return e.classList||new Du(e)}function Du(e){this._node=e,this._names=Iu(e.getAttribute("class")||"")}Du.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 Pu(e,t){for(var r=Kn(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Ru(e,t){for(var r=Kn(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function Lx(e){return function(){Pu(this,e)}}function Fx(e){return function(){Ru(this,e)}}function Ax(e,t){return function(){(t.apply(this,arguments)?Pu:Ru)(this,e)}}function Ex(e,t){var r=Iu(e+"");if(arguments.length<2){for(var i=Kn(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Ax:t?Lx:Fx)(r,t))}function Mx(){this.textContent=""}function $x(e){return function(){this.textContent=e}}function Ox(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ix(e){return arguments.length?this.each(e==null?Mx:(typeof e=="function"?Ox:$x)(e)):this.node().textContent}function Dx(){this.innerHTML=""}function Px(e){return function(){this.innerHTML=e}}function Rx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Nx(e){return arguments.length?this.each(e==null?Dx:(typeof e=="function"?Rx:Px)(e)):this.node().innerHTML}function qx(){this.nextSibling&&this.parentNode.appendChild(this)}function zx(){return this.each(qx)}function Wx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hx(){return this.each(Wx)}function Yx(e){var t=typeof e=="function"?e:Fu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jx(){return null}function Ux(e,t){var r=typeof e=="function"?e:Fu(e),i=t==null?jx:typeof t=="function"?t:Zn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Gx(){var e=this.parentNode;e&&e.removeChild(this)}function Xx(){return this.each(Gx)}function Vx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Kx(e){return this.select(e?Zx:Vx)}function Qx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jx(e){return function(t){e.call(this,t,this.__data__)}}function tb(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 eb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,s;r<a;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function rb(e,t,r){return function(){var i=this.__on,a,s=Jx(t);if(i){for(var n=0,o=i.length;n<o;++n)if((a=i[n]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=t;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(a):this.__on=[a]}}function ib(e,t,r){var i=tb(e+""),a,s=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,h=o.length,c;l<h;++l)for(a=0,c=o[l];a<s;++a)if((n=i[a]).type===c.type&&n.name===c.name)return c.value}return}for(o=t?rb:eb,a=0;a<s;++a)this.each(o(i[a],t,r));return this}function Nu(e,t,r){var i=Ou(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function ab(e,t){return function(){return Nu(this,e,t)}}function sb(e,t){return function(){return Nu(this,e,t.apply(this,arguments))}}function ob(e,t){return this.each((typeof t=="function"?sb:ab)(e,t))}function*nb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length,n;a<s;++a)(n=i[a])&&(yield n)}var qu=[null];function de(e,t){this._groups=e,this._parents=t}function Ca(){return new de([[document.documentElement]],qu)}function lb(){return this}de.prototype=Ca.prototype={constructor:de,select:OC,selectAll:RC,selectChild:WC,selectChildren:UC,filter:GC,data:JC,enter:XC,exit:ex,join:rx,merge:ix,selection:lb,order:ax,sort:sx,call:nx,nodes:lx,node:hx,size:cx,empty:ux,each:dx,attr:xx,style:_x,property:Bx,classed:Ex,text:Ix,html:Nx,raise:zx,lower:Hx,append:Yx,insert:Ux,remove:Xx,clone:Kx,datum:Qx,on:ib,dispatch:ob,[Symbol.iterator]:nb};function ct(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],qu)}function Qn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function xa(){}var ia=.7,ls=1/ia,Kr="\\s*([+-]?\\d+)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hb=/^#([0-9a-f]{3,8})$/,cb=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),ub=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),db=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${aa}\\)$`),pb=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${aa}\\)$`),fb=new RegExp(`^hsl\\(${aa},${Oe},${Oe}\\)$`),gb=new RegExp(`^hsla\\(${aa},${Oe},${Oe},${aa}\\)$`),Bh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Qn(xa,sa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lh,formatHex:Lh,formatHex8:mb,formatHsl:yb,formatRgb:Fh,toString:Fh});function Lh(){return this.rgb().formatHex()}function mb(){return this.rgb().formatHex8()}function yb(){return Wu(this).formatHsl()}function Fh(){return this.rgb().formatRgb()}function sa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ah(t):r===3?new oe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Oa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Oa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=cb.exec(e))?new oe(t[1],t[2],t[3],1):(t=ub.exec(e))?new oe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=db.exec(e))?Oa(t[1],t[2],t[3],t[4]):(t=pb.exec(e))?Oa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fb.exec(e))?$h(t[1],t[2]/100,t[3]/100,1):(t=gb.exec(e))?$h(t[1],t[2]/100,t[3]/100,t[4]):Bh.hasOwnProperty(e)?Ah(Bh[e]):e==="transparent"?new oe(NaN,NaN,NaN,0):null}function Ah(e){return new oe(e>>16&255,e>>8&255,e&255,1)}function Oa(e,t,r,i){return i<=0&&(e=t=r=NaN),new oe(e,t,r,i)}function Cb(e){return e instanceof xa||(e=sa(e)),e?(e=e.rgb(),new oe(e.r,e.g,e.b,e.opacity)):new oe}function Xo(e,t,r,i){return arguments.length===1?Cb(e):new oe(e,t,r,i??1)}function oe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Qn(oe,Xo,zu(xa,{brighter(e){return e=e==null?ls:Math.pow(ls,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ia:Math.pow(ia,e),new oe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oe(Tr(this.r),Tr(this.g),Tr(this.b),hs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Eh,formatHex:Eh,formatHex8:xb,formatRgb:Mh,toString:Mh}));function Eh(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}`}function xb(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}${xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mh(){const e=hs(this.opacity);return`${e===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?")":`, ${e})`}`}function hs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xr(e){return e=Tr(e),(e<16?"0":"")+e.toString(16)}function $h(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,i)}function Wu(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof xa||(e=sa(e)),!e)return new ke;if(e instanceof ke)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),s=Math.max(t,r,i),n=NaN,o=s-a,l=(s+a)/2;return o?(t===s?n=(r-i)/o+(r<i)*6:r===s?n=(i-t)/o+2:n=(t-r)/o+4,o/=l<.5?s+a:2-s-a,n*=60):o=l>0&&l<1?0:n,new ke(n,o,l,e.opacity)}function bb(e,t,r,i){return arguments.length===1?Wu(e):new ke(e,t,r,i??1)}function ke(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Qn(ke,bb,zu(xa,{brighter(e){return e=e==null?ls:Math.pow(ls,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ia:Math.pow(ia,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,a=2*r-i;return new oe(wo(e>=240?e-240:e+120,a,i),wo(e,a,i),wo(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new ke(Oh(this.h),Ia(this.s),Ia(this.l),hs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=hs(this.opacity);return`${e===1?"hsl(":"hsla("}${Oh(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Oh(e){return e=(e||0)%360,e<0?e+360:e}function Ia(e){return Math.max(0,Math.min(1,e||0))}function wo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Jn=e=>()=>e;function Hu(e,t){return function(r){return e+r*t}}function kb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function BA(e,t){var r=t-e;return r?Hu(e,r>180||r<-180?r-360*Math.round(r/360):r):Jn(isNaN(e)?t:e)}function Tb(e){return(e=+e)==1?Yu:function(t,r){return r-t?kb(t,r,e):Jn(isNaN(t)?r:t)}}function Yu(e,t){var r=t-e;return r?Hu(e,r):Jn(isNaN(e)?t:e)}const Ih=function e(t){var r=Tb(t);function i(a,s){var n=r((a=Xo(a)).r,(s=Xo(s)).r),o=r(a.g,s.g),l=r(a.b,s.b),h=Yu(a.opacity,s.opacity);return function(c){return a.r=n(c),a.g=o(c),a.b=l(c),a.opacity=h(c),a+""}}return i.gamma=e,i}(1);function er(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Vo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,So=new RegExp(Vo.source,"g");function _b(e){return function(){return e}}function wb(e){return function(t){return e(t)+""}}function Sb(e,t){var r=Vo.lastIndex=So.lastIndex=0,i,a,s,n=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Vo.exec(e))&&(a=So.exec(t));)(s=a.index)>r&&(s=t.slice(r,s),o[n]?o[n]+=s:o[++n]=s),(i=i[0])===(a=a[0])?o[n]?o[n]+=a:o[++n]=a:(o[++n]=null,l.push({i:n,x:er(i,a)})),r=So.lastIndex;return r<t.length&&(s=t.slice(r),o[n]?o[n]+=s:o[++n]=s),o.length<2?l[0]?wb(l[0].x):_b(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)o[(u=l[c]).i]=u.x(h);return o.join("")})}var Dh=180/Math.PI,Zo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ju(e,t,r,i,a,s){var n,o,l;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,n=-n),{translateX:a,translateY:s,rotate:Math.atan2(t,e)*Dh,skewX:Math.atan(l)*Dh,scaleX:n,scaleY:o}}var Da;function vb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zo:ju(t.a,t.b,t.c,t.d,t.e,t.f)}function Bb(e){return e==null||(Da||(Da=document.createElementNS("http://www.w3.org/2000/svg","g")),Da.setAttribute("transform",e),!(e=Da.transform.baseVal.consolidate()))?Zo:(e=e.matrix,ju(e.a,e.b,e.c,e.d,e.e,e.f))}function Uu(e,t,r,i){function a(h){return h.length?h.pop()+" ":""}function s(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);m.push({i:g-4,x:er(h,u)},{i:g-2,x:er(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function n(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(a(u)+"rotate(",null,i)-2,x:er(h,c)})):c&&u.push(a(u)+"rotate("+c+i)}function o(h,c,u,p){h!==c?p.push({i:u.push(a(u)+"skewX(",null,i)-2,x:er(h,c)}):c&&u.push(a(u)+"skewX("+c+i)}function l(h,c,u,p,d,m){if(h!==u||c!==p){var g=d.push(a(d)+"scale(",null,",",null,")");m.push({i:g-4,x:er(h,u)},{i:g-2,x:er(c,p)})}else(u!==1||p!==1)&&d.push(a(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),s(h.translateX,h.translateY,c.translateX,c.translateY,u,p),n(h.rotate,c.rotate,u,p),o(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var m=-1,g=p.length,y;++m<g;)u[(y=p[m]).i]=y.x(d);return u.join("")}}}var Lb=Uu(vb,"px, ","px)","deg)"),Fb=Uu(Bb,", ",")",")"),mi=0,Wi=0,Mi=0,Gu=1e3,cs,Hi,us=0,vr=0,qs=0,oa=typeof performance=="object"&&performance.now?performance:Date,Xu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function tl(){return vr||(Xu(Ab),vr=oa.now()+qs)}function Ab(){vr=0}function ds(){this._call=this._time=this._next=null}ds.prototype=Vu.prototype={constructor:ds,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?tl():+r)+(t==null?0:+t),!this._next&&Hi!==this&&(Hi?Hi._next=this:cs=this,Hi=this),this._call=e,this._time=r,Ko()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ko())}};function Vu(e,t,r){var i=new ds;return i.restart(e,t,r),i}function Eb(){tl(),++mi;for(var e=cs,t;e;)(t=vr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--mi}function Ph(){vr=(us=oa.now())+qs,mi=Wi=0;try{Eb()}finally{mi=0,$b(),vr=0}}function Mb(){var e=oa.now(),t=e-us;t>Gu&&(qs-=t,us=e)}function $b(){for(var e,t=cs,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:cs=r);Hi=e,Ko(i)}function Ko(e){if(!mi){Wi&&(Wi=clearTimeout(Wi));var t=e-vr;t>24?(e<1/0&&(Wi=setTimeout(Ph,e-oa.now()-qs)),Mi&&(Mi=clearInterval(Mi))):(Mi||(us=oa.now(),Mi=setInterval(Mb,Gu)),mi=1,Xu(Ph))}}function Rh(e,t,r){var i=new ds;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Ob=Lu("start","end","cancel","interrupt"),Ib=[],Zu=0,Nh=1,Qo=2,Xa=3,qh=4,Jo=5,Va=6;function zs(e,t,r,i,a,s){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;Db(e,r,{name:t,index:i,group:a,on:Ob,tween:Ib,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Zu})}function el(e,t){var r=Be(e,t);if(r.state>Zu)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=Be(e,t);if(r.state>Xa)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Db(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Vu(s,0,r.time);function s(h){r.state=Nh,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var c,u,p,d;if(r.state!==Nh)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Xa)return Rh(n);d.state===qh?(d.state=Va,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Va,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Rh(function(){r.state===Xa&&(r.state=qh,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Qo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Qo){for(r.state=Xa,a=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function o(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Jo,1),u=-1,p=a.length;++u<p;)a[u].call(e,c);r.state===Jo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Va,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Pb(e,t){var r=e.__transition,i,a,s=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){s=!1;continue}a=i.state>Qo&&i.state<Jo,i.state=Va,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}s&&delete e.__transition}}function Rb(e){return this.each(function(){Pb(this,e)})}function Nb(e,t){var r,i;return function(){var a=Ne(this,e),s=a.tween;if(s!==r){i=r=s;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}a.tween=i}}function qb(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=Ne(this,e),n=s.tween;if(n!==i){a=(i=n).slice();for(var o={name:t,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===t){a[l]=o;break}l===h&&a.push(o)}s.tween=a}}function zb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(this.node(),r).tween,a=0,s=i.length,n;a<s;++a)if((n=i[a]).name===e)return n.value;return null}return this.each((t==null?Nb:qb)(r,e,t))}function rl(e,t,r){var i=e._id;return e.each(function(){var a=Ne(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return Be(a,i).value[t]}}function Ku(e,t){var r;return(typeof t=="number"?er:t instanceof sa?Ih:(r=sa(t))?(t=r,Ih):Sb)(e,t)}function Wb(e){return function(){this.removeAttribute(e)}}function Hb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yb(e,t,r){var i,a=r+"",s;return function(){var n=this.getAttribute(e);return n===a?null:n===i?s:s=t(i=n,r)}}function jb(e,t,r){var i,a=r+"",s;return function(){var n=this.getAttributeNS(e.space,e.local);return n===a?null:n===i?s:s=t(i=n,r)}}function Ub(e,t,r){var i,a,s;return function(){var n,o=r(this),l;return o==null?void this.removeAttribute(e):(n=this.getAttribute(e),l=o+"",n===l?null:n===i&&l===a?s:(a=l,s=t(i=n,o)))}}function Gb(e,t,r){var i,a,s;return function(){var n,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),l=o+"",n===l?null:n===i&&l===a?s:(a=l,s=t(i=n,o)))}}function Xb(e,t){var r=Ns(e),i=r==="transform"?Fb:Ku;return this.attrTween(e,typeof t=="function"?(r.local?Gb:Ub)(r,i,rl(this,"attr."+e,t)):t==null?(r.local?Hb:Wb)(r):(r.local?jb:Yb)(r,i,t))}function Vb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Zb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Kb(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Zb(e,s)),r}return a._value=t,a}function Qb(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Vb(e,s)),r}return a._value=t,a}function Jb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ns(e);return this.tween(r,(i.local?Kb:Qb)(i,t))}function t1(e,t){return function(){el(this,e).delay=+t.apply(this,arguments)}}function e1(e,t){return t=+t,function(){el(this,e).delay=t}}function r1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?t1:e1)(t,e)):Be(this.node(),t).delay}function i1(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function a1(e,t){return t=+t,function(){Ne(this,e).duration=t}}function s1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?i1:a1)(t,e)):Be(this.node(),t).duration}function o1(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function n1(e){var t=this._id;return arguments.length?this.each(o1(t,e)):Be(this.node(),t).ease}function l1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function h1(e){if(typeof e!="function")throw new Error;return this.each(l1(this._id,e))}function c1(e){typeof e!="function"&&(e=Eu(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],n=s.length,o=i[a]=[],l,h=0;h<n;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&o.push(l);return new Xe(i,this._parents,this._name,this._id)}function u1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,s=Math.min(i,a),n=new Array(i),o=0;o<s;++o)for(var l=t[o],h=r[o],c=l.length,u=n[o]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;o<i;++o)n[o]=t[o];return new Xe(n,this._parents,this._name,this._id)}function d1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function p1(e,t,r){var i,a,s=d1(t)?el:Ne;return function(){var n=s(this,e),o=n.on;o!==i&&(a=(i=o).copy()).on(t,r),n.on=a}}function f1(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(p1(r,e,t))}function g1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function m1(){return this.on("end.remove",g1(this._id))}function y1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Zn(e));for(var i=this._groups,a=i.length,s=new Array(a),n=0;n<a;++n)for(var o=i[n],l=o.length,h=s[n]=new Array(l),c,u,p=0;p<l;++p)(c=o[p])&&(u=e.call(c,c.__data__,p,o))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,zs(h[p],t,r,p,h,Be(c,r)));return new Xe(s,this._parents,t,r)}function C1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Au(e));for(var i=this._groups,a=i.length,s=[],n=[],o=0;o<a;++o)for(var l=i[o],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,m=Be(c,r),g=0,y=p.length;g<y;++g)(d=p[g])&&zs(d,t,r,g,p,m);s.push(p),n.push(c)}return new Xe(s,n,t,r)}var x1=Ca.prototype.constructor;function b1(){return new x1(this._groups,this._parents)}function k1(e,t){var r,i,a;return function(){var s=gi(this,e),n=(this.style.removeProperty(e),gi(this,e));return s===n?null:s===r&&n===i?a:a=t(r=s,i=n)}}function Qu(e){return function(){this.style.removeProperty(e)}}function T1(e,t,r){var i,a=r+"",s;return function(){var n=gi(this,e);return n===a?null:n===i?s:s=t(i=n,r)}}function _1(e,t,r){var i,a,s;return function(){var n=gi(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),gi(this,e))),n===l?null:n===i&&l===a?s:(a=l,s=t(i=n,o))}}function w1(e,t){var r,i,a,s="style."+t,n="end."+s,o;return function(){var l=Ne(this,e),h=l.on,c=l.value[s]==null?o||(o=Qu(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(n,a=c),l.on=i}}function S1(e,t,r){var i=(e+="")=="transform"?Lb:Ku;return t==null?this.styleTween(e,k1(e,i)).on("end.style."+e,Qu(e)):typeof t=="function"?this.styleTween(e,_1(e,i,rl(this,"style."+e,t))).each(w1(this._id,e)):this.styleTween(e,T1(e,i,t),r).on("end.style."+e,null)}function v1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function B1(e,t,r){var i,a;function s(){var n=t.apply(this,arguments);return n!==a&&(i=(a=n)&&v1(e,n,r)),i}return s._value=t,s}function L1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,B1(e,t,r??""))}function F1(e){return function(){this.textContent=e}}function A1(e){return function(){var t=e(this);this.textContent=t??""}}function E1(e){return this.tween("text",typeof e=="function"?A1(rl(this,"text",e)):F1(e==null?"":e+""))}function M1(e){return function(t){this.textContent=e.call(this,t)}}function $1(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&M1(a)),t}return i._value=e,i}function O1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,$1(e))}function I1(){for(var e=this._name,t=this._id,r=Ju(),i=this._groups,a=i.length,s=0;s<a;++s)for(var n=i[s],o=n.length,l,h=0;h<o;++h)if(l=n[h]){var c=Be(l,t);zs(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Xe(i,this._parents,e,r)}function D1(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(s,n){var o={value:n},l={value:function(){--a===0&&s()}};r.each(function(){var h=Ne(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),h.on=t}),a===0&&s()})}var P1=0;function Xe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Ju(){return++P1}var He=Ca.prototype;Xe.prototype={constructor:Xe,select:y1,selectAll:C1,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:c1,merge:u1,selection:b1,transition:I1,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:f1,attr:Xb,attrTween:Jb,style:S1,styleTween:L1,text:E1,textTween:O1,remove:m1,tween:zb,delay:r1,duration:s1,ease:n1,easeVarying:h1,end:D1,[Symbol.iterator]:He[Symbol.iterator]};function R1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var N1={time:null,delay:0,duration:250,ease:R1};function q1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function z1(e){var t,r;e instanceof Xe?(t=e._id,e=e._name):(t=Ju(),(r=N1).time=tl(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var n=i[s],o=n.length,l,h=0;h<o;++h)(l=n[h])&&zs(l,e,t,h,n,r||q1(l,t));return new Xe(i,this._parents,e,t)}Ca.prototype.interrupt=Rb;Ca.prototype.transition=z1;const tn=Math.PI,en=2*tn,gr=1e-6,W1=en-gr;function td(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function H1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return td;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class Y1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?td:H1(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,n){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+n}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let n=this._x1,o=this._y1,l=i-t,h=a-r,c=n-t,u=o-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>gr)if(!(Math.abs(u*l-h*c)>gr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-n,m=a-o,g=l*l+h*h,y=d*d+m*m,C=Math.sqrt(g),b=Math.sqrt(p),k=s*Math.tan((tn-Math.acos((g+p-y)/(2*C*b)))/2),_=k/b,w=k/C;Math.abs(_-1)>gr&&this._append`L${t+_*c},${r+_*u}`,this._append`A${s},${s},0,0,${+(u*d>c*m)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,a,s,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(a),l=i*Math.sin(a),h=t+o,c=r+l,u=1^n,p=n?a-s:s-a;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>gr||Math.abs(this._y1-c)>gr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%en+en),p>W1?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>gr&&this._append`A${i},${i},0,${+(p>=tn)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function zr(e){return function(){return e}}const LA=Math.abs,FA=Math.atan2,AA=Math.cos,EA=Math.max,MA=Math.min,$A=Math.sin,OA=Math.sqrt,zh=1e-12,il=Math.PI,Wh=il/2,IA=2*il;function DA(e){return e>1?0:e<-1?il:Math.acos(e)}function PA(e){return e>=1?Wh:e<=-1?-Wh:Math.asin(e)}function j1(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 Y1(t)}function U1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ed(e){this._context=e}ed.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 Qi(e){return new ed(e)}function G1(e){return e[0]}function X1(e){return e[1]}function V1(e,t){var r=zr(!0),i=null,a=Qi,s=null,n=j1(o);e=typeof e=="function"?e:e===void 0?G1:zr(e),t=typeof t=="function"?t:t===void 0?X1:zr(t);function o(l){var h,c=(l=U1(l)).length,u,p=!1,d;for(i==null&&(s=a(d=n())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(u,h,l),+t(u,h,l));if(d)return s=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:zr(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:zr(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:zr(!!l),o):r},o.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),o):a},o.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),o):i},o}class rd{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 id(e){return new rd(e,!0)}function ad(e){return new rd(e,!1)}function or(){}function ps(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 Ws(e){this._context=e}Ws.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:ps(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:ps(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rn(e){return new Ws(e)}function sd(e){this._context=e}sd.prototype={areaStart:or,areaEnd:or,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:ps(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Z1(e){return new sd(e)}function od(e){this._context=e}od.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:ps(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function K1(e){return new od(e)}function nd(e,t){this._basis=new Ws(e),this._beta=t}nd.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],a=t[0],s=e[r]-i,n=t[r]-a,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*s),this._beta*t[o]+(1-this._beta)*(a+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Q1=function e(t){function r(i){return t===1?new Ws(i):new nd(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function fs(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 al(e,t){this._context=e,this._k=(1-t)/6}al.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:fs(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:fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ld=function e(t){function r(i){return new al(i,t)}return r.tension=function(i){return e(+i)},r}(0);function sl(e,t){this._context=e,this._k=(1-t)/6}sl.prototype={areaStart:or,areaEnd:or,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:fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const J1=function e(t){function r(i){return new sl(i,t)}return r.tension=function(i){return e(+i)},r}(0);function ol(e,t){this._context=e,this._k=(1-t)/6}ol.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:fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tk=function e(t){function r(i){return new ol(i,t)}return r.tension=function(i){return e(+i)},r}(0);function nl(e,t,r){var i=e._x1,a=e._y1,s=e._x2,n=e._y2;if(e._l01_a>zh){var o=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*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>zh){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*h+e._x1*e._l23_2a-t*e._l12_2a)/c,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,a,s,n,e._x2,e._y2)}function hd(e,t){this._context=e,this._alpha=t}hd.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:nl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cd=function e(t){function r(i){return t?new hd(i,t):new al(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function ud(e,t){this._context=e,this._alpha=t}ud.prototype={areaStart:or,areaEnd:or,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:nl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ek=function e(t){function r(i){return t?new ud(i,t):new sl(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function dd(e,t){this._context=e,this._alpha=t}dd.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:nl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rk=function e(t){function r(i){return t?new dd(i,t):new ol(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function pd(e){this._context=e}pd.prototype={areaStart:or,areaEnd:or,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 ik(e){return new pd(e)}function Hh(e){return e<0?-1:1}function Yh(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),n=(r-e._y1)/(a||i<0&&-0),o=(s*a+n*i)/(i+a);return(Hh(s)+Hh(n))*Math.min(Math.abs(s),Math.abs(n),.5*Math.abs(o))||0}function jh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function vo(e,t,r){var i=e._x0,a=e._y0,s=e._x1,n=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,a+o*t,s-o,n-o*r,s,n)}function gs(e){this._context=e}gs.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:vo(this,this._t0,jh(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,vo(this,jh(this,r=Yh(this,e,t)),r);break;default:vo(this,this._t0,r=Yh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fd(e){this._context=new gd(e)}(fd.prototype=Object.create(gs.prototype)).point=function(e,t){gs.prototype.point.call(this,t,e)};function gd(e){this._context=e}gd.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,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function md(e){return new gs(e)}function yd(e){return new fd(e)}function Cd(e){this._context=e}Cd.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=Uh(e),a=Uh(t),s=0,n=1;n<r;++s,++n)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Uh(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),n=new Array(r);for(a[0]=0,s[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,n[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,n[t]-=i*n[t-1];for(a[r-1]=n[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(n[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function xd(e){return new Cd(e)}function Hs(e,t){this._context=e,this._t=t}Hs.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 bd(e){return new Hs(e,.5)}function kd(e){return new Hs(e,0)}function Td(e){return new Hs(e,1)}function Yi(e,t,r){this.k=e,this.x=t,this.y=r}Yi.prototype={constructor:Yi,scale:function(e){return e===1?this:new Yi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Yi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Yi.prototype;var ak=f(e=>{var a;const{securityLevel:t}=gt();let r=ct("body");if(t==="sandbox"){const n=((a=ct(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=ct(n.body)}return r.select(`#${e}`)},"selectSvgElement");function ll(e){return typeof e>"u"||e===null}f(ll,"isNothing");function _d(e){return typeof e=="object"&&e!==null}f(_d,"isObject");function wd(e){return Array.isArray(e)?e:ll(e)?[]:[e]}f(wd,"toArray");function Sd(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}f(Sd,"extend");function vd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(vd,"repeat");function Bd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Bd,"isNegativeZero");var sk=ll,ok=_d,nk=wd,lk=vd,hk=Bd,ck=Sd,Dt={isNothing:sk,isObject:ok,toArray:nk,repeat:lk,isNegativeZero:hk,extend:ck};function hl(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
124
|
+
|
|
125
|
+
`+e.mark.snippet),i+" "+r):i}f(hl,"formatError");function yi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=hl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(yi,"YAMLException$1");yi.prototype=Object.create(Error.prototype);yi.prototype.constructor=yi;yi.prototype.toString=f(function(t){return this.name+": "+hl(this,t)},"toString");var se=yi;function Za(e,t,r,i,a){var s="",n="",o=Math.floor(a/2)-1;return i-t>o&&(s=" ... ",t=i-o+s.length),r-i>o&&(n=" ...",r=i+o-n.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+n,pos:i-t+s.length}}f(Za,"getLine");function Ka(e,t){return Dt.repeat(" ",t-e.length)+e}f(Ka,"padStart");function Ld(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,n=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&n<0&&(n=i.length-2);n<0&&(n=i.length-1);var o="",l,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Za(e.buffer,i[n-l],a[n-l],e.position-(i[n]-i[n-l]),u),o=Dt.repeat(" ",t.indent)+Ka((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
126
|
+
`+o;for(h=Za(e.buffer,i[n],a[n],e.position,u),o+=Dt.repeat(" ",t.indent)+Ka((e.line+1).toString(),c)+" | "+h.str+`
|
|
127
|
+
`,o+=Dt.repeat("-",t.indent+c+3+h.pos)+`^
|
|
128
|
+
`,l=1;l<=t.linesAfter&&!(n+l>=a.length);l++)h=Za(e.buffer,i[n+l],a[n+l],e.position-(i[n]-i[n+l]),u),o+=Dt.repeat(" ",t.indent)+Ka((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
129
|
+
`;return o.replace(/\n$/,"")}f(Ld,"makeSnippet");var uk=Ld,dk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pk=["scalar","sequence","mapping"];function Fd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Fd,"compileStyleAliases");function Ad(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(dk.indexOf(r)===-1)throw new se('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Fd(t.styleAliases||null),pk.indexOf(this.kind)===-1)throw new se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(Ad,"Type$1");var Xt=Ad;function an(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,n){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=n)}),r[a]=i}),r}f(an,"compileList");function Ed(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(Ed,"compileMap");function ms(e){return this.extend(e)}f(ms,"Schema$1");ms.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new se("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new se("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(ms.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=an(a,"implicit"),a.compiledExplicit=an(a,"explicit"),a.compiledTypeMap=Ed(a.compiledImplicit,a.compiledExplicit),a},"extend");var fk=ms,gk=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),mk=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),yk=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),Ck=new fk({explicit:[gk,mk,yk]});function Md(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(Md,"resolveYamlNull");function $d(){return null}f($d,"constructYamlNull");function Od(e){return e===null}f(Od,"isNull");var xk=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Md,construct:$d,predicate:Od,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function Id(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}f(Id,"resolveYamlBoolean");function Dd(e){return e==="true"||e==="True"||e==="TRUE"}f(Dd,"constructYamlBoolean");function Pd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(Pd,"isBoolean");var bk=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Id,construct:Dd,predicate:Pd,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(Rd,"isHexCode");function Nd(e){return 48<=e&&e<=55}f(Nd,"isOctCode");function qd(e){return 48<=e&&e<=57}f(qd,"isDecCode");function zd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Rd(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Nd(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!qd(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}f(zd,"resolveYamlInteger");function Wd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}f(Wd,"constructYamlInteger");function Hd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}f(Hd,"isInteger");var kk=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:zd,construct:Wd,predicate:Hd,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Tk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Yd(e){return!(e===null||!Tk.test(e)||e[e.length-1]==="_")}f(Yd,"resolveYamlFloat");function jd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}f(jd,"constructYamlFloat");var _k=/^[-+]?[0-9]+e/;function Ud(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),_k.test(r)?r.replace("e",".e"):r}f(Ud,"representYamlFloat");function Gd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}f(Gd,"isFloat");var wk=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Yd,construct:jd,predicate:Gd,represent:Ud,defaultStyle:"lowercase"}),Xd=Ck.extend({implicit:[xk,bk,kk,wk]}),Sk=Xd,Vd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zd=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 Kd(e){return e===null?!1:Vd.exec(e)!==null||Zd.exec(e)!==null}f(Kd,"resolveYamlTimestamp");function Qd(e){var t,r,i,a,s,n,o,l=0,h=null,c,u,p;if(t=Vd.exec(e),t===null&&(t=Zd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],n=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,a,s,n,o,l)),h&&p.setTime(p.getTime()-h),p}f(Qd,"constructYamlTimestamp");function Jd(e){return e.toISOString()}f(Jd,"representYamlTimestamp");var vk=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Kd,construct:Qd,instanceOf:Date,represent:Jd});function tp(e){return e==="<<"||e===null}f(tp,"resolveYamlMerge");var Bk=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tp}),cl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
130
|
+
\r`;function ep(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=cl;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(ep,"resolveYamlBinary");function rp(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=cl,n=0,o=[];for(t=0;t<a;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):r===18?(o.push(n>>10&255),o.push(n>>2&255)):r===12&&o.push(n>>4&255),new Uint8Array(o)}f(rp,"constructYamlBinary");function ip(e){var t="",r=0,i,a,s=e.length,n=cl;for(i=0;i<s;i++)i%3===0&&i&&(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=n[r>>18&63],t+=n[r>>12&63],t+=n[r>>6&63],t+=n[r&63]):a===2?(t+=n[r>>10&63],t+=n[r>>4&63],t+=n[r<<2&63],t+=n[64]):a===1&&(t+=n[r>>2&63],t+=n[r<<4&63],t+=n[64],t+=n[64]),t}f(ip,"representYamlBinary");function ap(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(ap,"isBinary");var Lk=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ep,construct:rp,predicate:ap,represent:ip}),Fk=Object.prototype.hasOwnProperty,Ak=Object.prototype.toString;function sp(e){if(e===null)return!0;var t=[],r,i,a,s,n,o=e;for(r=0,i=o.length;r<i;r+=1){if(a=o[r],n=!1,Ak.call(a)!=="[object Object]")return!1;for(s in a)if(Fk.call(a,s))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}f(sp,"resolveYamlOmap");function op(e){return e!==null?e:[]}f(op,"constructYamlOmap");var Ek=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:sp,construct:op}),Mk=Object.prototype.toString;function np(e){if(e===null)return!0;var t,r,i,a,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1){if(i=n[t],Mk.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}f(np,"resolveYamlPairs");function lp(e){if(e===null)return[];var t,r,i,a,s,n=e;for(s=new Array(n.length),t=0,r=n.length;t<r;t+=1)i=n[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}f(lp,"constructYamlPairs");var $k=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:np,construct:lp}),Ok=Object.prototype.hasOwnProperty;function hp(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ok.call(r,t)&&r[t]!==null)return!1;return!0}f(hp,"resolveYamlSet");function cp(e){return e!==null?e:{}}f(cp,"constructYamlSet");var Ik=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:hp,construct:cp}),up=Sk.extend({implicit:[vk,Bk],explicit:[Lk,Ek,$k,Ik]}),nr=Object.prototype.hasOwnProperty,ys=1,dp=2,pp=3,Cs=4,Bo=1,Dk=2,Gh=3,Pk=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Rk=/[\x85\u2028\u2029]/,Nk=/[,\[\]\{\}]/,fp=/^(?:!|!!|![a-z\-]+!)$/i,gp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sn(e){return Object.prototype.toString.call(e)}f(sn,"_class");function _e(e){return e===10||e===13}f(_e,"is_EOL");function sr(e){return e===9||e===32}f(sr,"is_WHITE_SPACE");function Kt(e){return e===9||e===32||e===10||e===13}f(Kt,"is_WS_OR_EOL");function br(e){return e===44||e===91||e===93||e===123||e===125}f(br,"is_FLOW_INDICATOR");function mp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(mp,"fromHexCode");function yp(e){return e===120?2:e===117?4:e===85?8:0}f(yp,"escapedHexLen");function Cp(e){return 48<=e&&e<=57?e-48:-1}f(Cp,"fromDecimalCode");function on(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
131
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}f(on,"simpleEscapeSequence");function xp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(xp,"charFromCodepoint");function ul(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(ul,"setProperty");var bp=new Array(256),kp=new Array(256);for(pr=0;pr<256;pr++)bp[pr]=on(pr)?1:0,kp[pr]=on(pr);var pr;function Tp(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||up,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}f(Tp,"State$1");function dl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=uk(r),new se(t,r)}f(dl,"generateError");function J(e,t){throw dl(e,t)}f(J,"throwError");function na(e,t){e.onWarning&&e.onWarning.call(null,dl(e,t))}f(na,"throwWarning");var Xh={YAML:f(function(t,r,i){var a,s,n;t.version!==null&&J(t,"duplication of %YAML directive"),i.length!==1&&J(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&J(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),n=parseInt(a[2],10),s!==1&&J(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&na(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var a,s;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],fp.test(a)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(t.tagMap,a)&&J(t,'there is a previously declared suffix for "'+a+'" tag handle'),gp.test(s)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{J(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function Ge(e,t,r,i){var a,s,n,o;if(t<r){if(o=e.input.slice(t,r),i)for(a=0,s=o.length;a<s;a+=1)n=o.charCodeAt(a),n===9||32<=n&&n<=1114111||J(e,"expected valid JSON character");else Pk.test(o)&&J(e,"the stream contains non-printable characters");e.result+=o}}f(Ge,"captureSegment");function nn(e,t,r,i){var a,s,n,o;for(Dt.isObject(r)||J(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),n=0,o=a.length;n<o;n+=1)s=a[n],nr.call(t,s)||(ul(t,s,r[s]),i[s]=!0)}f(nn,"mergeMappings");function kr(e,t,r,i,a,s,n,o,l){var h,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,c=a.length;h<c;h+=1)Array.isArray(a[h])&&J(e,"nested arrays are not supported inside keys"),typeof a=="object"&&sn(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&sn(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,c=s.length;h<c;h+=1)nn(e,t,s[h],r);else nn(e,t,s,r);else!e.json&&!nr.call(r,a)&&nr.call(t,a)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),ul(t,a,s),delete r[a];return t}f(kr,"storeMappingPair");function Ys(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(Ys,"readLineBreak");function Lt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;sr(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(_e(a))for(Ys(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&na(e,"deficient indentation"),i}f(Lt,"skipSeparationSpace");function ba(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Kt(r)))}f(ba,"testDocumentSeparator");function js(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
|
|
132
|
+
`,t-1))}f(js,"writeFoldedLines");function _p(e,t,r){var i,a,s,n,o,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Kt(d)||br(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),Kt(a)||r&&br(a)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),Kt(a)||r&&br(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Kt(i))break}else{if(e.position===e.lineStart&&ba(e)||r&&br(d))break;if(_e(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Lt(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=h,e.lineIndent=c;break}}o&&(Ge(e,s,n,!1),js(e,e.line-l),s=n=e.position,o=!1),sr(d)||(n=e.position+1),d=e.input.charCodeAt(++e.position)}return Ge(e,s,n,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(_p,"readPlainScalar");function wp(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ge(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else _e(r)?(Ge(e,i,a,!0),js(e,Lt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&ba(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}f(wp,"readSingleQuotedScalar");function Sp(e,t){var r,i,a,s,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return Ge(e,r,e.position,!0),e.position++,!0;if(o===92){if(Ge(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),_e(o))Lt(e,!1,t);else if(o<256&&bp[o])e.result+=kp[o],e.position++;else if((n=yp(o))>0){for(a=n,s=0;a>0;a--)o=e.input.charCodeAt(++e.position),(n=mp(o))>=0?s=(s<<4)+n:J(e,"expected hexadecimal character");e.result+=xp(s),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else _e(o)?(Ge(e,r,i,!0),js(e,Lt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ba(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}f(Sp,"readDoubleQuotedScalar");function vp(e,t){var r=!0,i,a,s,n=e.tag,o,l=e.anchor,h,c,u,p,d,m=Object.create(null),g,y,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,o=[];else if(b===123)c=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(Lt(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=n,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Kt(h)&&(u=p=!0,e.position++,Lt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,Br(e,t,ys,!1,!0),y=e.tag,g=e.result,Lt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Lt(e,!0,t),Br(e,t,ys,!1,!0),C=e.result),d?kr(e,o,m,y,g,C,i,a,s):u?o.push(kr(e,null,m,y,g,C,i,a,s)):o.push(g),Lt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}f(vp,"readFlowCollection");function Bp(e,t){var r,i,a=Bo,s=!1,n=!1,o=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Bo===a?a=u===43?Gh:Dk:J(e,"repeat of a chomping mode identifier");else if((c=Cp(u))>=0)c===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?J(e,"repeat of an indentation width identifier"):(o=t+c-1,n=!0);else break;if(sr(u)){do u=e.input.charCodeAt(++e.position);while(sr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!_e(u)&&u!==0)}for(;u!==0;){for(Ys(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),_e(u)){l++;continue}if(e.lineIndent<o){a===Gh?e.result+=Dt.repeat(`
|
|
133
|
+
`,s?1+l:l):a===Bo&&s&&(e.result+=`
|
|
134
|
+
`);break}for(i?sr(u)?(h=!0,e.result+=Dt.repeat(`
|
|
135
|
+
`,s?1+l:l)):h?(h=!1,e.result+=Dt.repeat(`
|
|
136
|
+
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Dt.repeat(`
|
|
137
|
+
`,l):e.result+=Dt.repeat(`
|
|
138
|
+
`,s?1+l:l),s=!0,n=!0,l=0,r=e.position;!_e(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Ge(e,r,e.position,!1)}return!0}f(Bp,"readBlockScalar");function ln(e,t){var r,i=e.tag,a=e.anchor,s=[],n,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!Kt(n))));){if(o=!0,e.position++,Lt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Br(e,t,pp,!1,!0),s.push(e.result),Lt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}f(ln,"readBlockSequence");function Lp(e,t,r){var i,a,s,n,o,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,m=null,g=null,y=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Kt(i))b===63?(y&&(kr(e,u,p,d,m,null,n,o,l),d=m=g=null),C=!0,y=!0,a=!0):y?(y=!1,a=!0):J(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(n=e.line,o=e.lineStart,l=e.position,!Br(e,r,dp,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);sr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Kt(b)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(kr(e,u,p,d,m,null,n,o,l),d=m=g=null),C=!0,y=!1,a=!1,d=e.tag,m=e.result;else if(C)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(y&&(n=e.line,o=e.lineStart,l=e.position),Br(e,t,Cs,!0,a)&&(y?m=e.result:g=e.result),y||(kr(e,u,p,d,m,g,n,o,l),d=m=g=null),Lt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&kr(e,u,p,d,m,null,n,o,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Lp,"readBlockMapping");function Fp(e){var t,r=!1,i=!1,a,s,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&J(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(r=!0,n=e.input.charCodeAt(++e.position)):n===33?(i=!0,a="!!",n=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!Kt(n);)n===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),fp.test(a)||J(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Nk.test(s)&&J(e,"tag suffix cannot contain flow indicator characters")}s&&!gp.test(s)&&J(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{J(e,"tag name is malformed: "+s)}return r?e.tag=s:nr.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:J(e,'undeclared tag handle "'+a+'"'),!0}f(Fp,"readTagProperty");function Ap(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Kt(r)&&!br(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(Ap,"readAnchorProperty");function Ep(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Kt(i)&&!br(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),nr.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Lt(e,!0,-1),!0}f(Ep,"readAlias");function Br(e,t,r,i,a){var s,n,o,l=1,h=!1,c=!1,u,p,d,m,g,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=Cs===r||pp===r,i&&Lt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Fp(e)||Ap(e);)Lt(e,!0,-1)?(h=!0,o=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=h||a),(l===1||Cs===r)&&(ys===r||dp===r?g=t:g=t+1,y=e.position-e.lineStart,l===1?o&&(ln(e,y)||Lp(e,y,g))||vp(e,g)?c=!0:(n&&Bp(e,g)||wp(e,g)||Sp(e,g)?c=!0:Ep(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):_p(e,g,ys===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=o&&ln(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&J(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(m=e.implicitTypes[u],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(nr.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){m=d[u];break}m||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}f(Br,"composeNode");function Mp(e){var t=e.position,r,i,a,s=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(Lt(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(s=!0,n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!Kt(n);)n=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&J(e,"directive name must not be less than one character in length");n!==0;){for(;sr(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!_e(n));break}if(_e(n))break;for(r=e.position;n!==0&&!Kt(n);)n=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}n!==0&&Ys(e),nr.call(Xh,i)?Xh[i](e,i,a):na(e,'unknown document directive "'+i+'"')}if(Lt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Lt(e,!0,-1)):s&&J(e,"directives end mark is expected"),Br(e,e.lineIndent-1,Cs,!1,!0),Lt(e,!0,-1),e.checkLineBreaks&&Rk.test(e.input.slice(t,e.position))&&na(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ba(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Lt(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}f(Mp,"readDocument");function pl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
139
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Tp(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,J(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Mp(r);return r.documents}f(pl,"loadDocuments");function qk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=pl(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}f(qk,"loadAll$1");function $p(e,t){var r=pl(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new se("expected a single document in the stream, but found more")}}f($p,"load$1");var zk=$p,Wk={load:zk},Op=Object.prototype.toString,Ip=Object.prototype.hasOwnProperty,fl=65279,Hk=9,la=10,Yk=13,jk=32,Uk=33,Gk=34,hn=35,Xk=37,Vk=38,Zk=39,Kk=42,Dp=44,Qk=45,xs=58,Jk=61,t2=62,e2=63,r2=64,Pp=91,Rp=93,i2=96,Np=123,a2=124,qp=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var s2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],o2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zp(e,t){var r,i,a,s,n,o,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)n=i[a],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&Ip.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[n]=o;return r}f(zp,"compileStyleMap");function Wp(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}f(Wp,"encodeHex");var n2=1,ha=2;function Hp(e){this.schema=e.schema||up,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zp(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ha:n2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(Hp,"State");function cn(e,t){for(var r=Dt.repeat(" ",t),i=0,a=-1,s="",n,o=e.length;i<o;)a=e.indexOf(`
|
|
140
|
+
`,i),a===-1?(n=e.slice(i),i=o):(n=e.slice(i,a+1),i=a+1),n.length&&n!==`
|
|
141
|
+
`&&(s+=r),s+=n;return s}f(cn,"indentString");function bs(e,t){return`
|
|
142
|
+
`+Dt.repeat(" ",e.indent*t)}f(bs,"generateNextLine");function Yp(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}f(Yp,"testImplicitResolving");function ca(e){return e===jk||e===Hk}f(ca,"isWhitespace");function Ci(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fl||65536<=e&&e<=1114111}f(Ci,"isPrintable");function un(e){return Ci(e)&&e!==fl&&e!==Yk&&e!==la}f(un,"isNsCharOrWhitespace");function dn(e,t,r){var i=un(e),a=i&&!ca(e);return(r?i:i&&e!==Dp&&e!==Pp&&e!==Rp&&e!==Np&&e!==qp)&&e!==hn&&!(t===xs&&!a)||un(t)&&!ca(t)&&e===hn||t===xs&&a}f(dn,"isPlainSafe");function jp(e){return Ci(e)&&e!==fl&&!ca(e)&&e!==Qk&&e!==e2&&e!==xs&&e!==Dp&&e!==Pp&&e!==Rp&&e!==Np&&e!==qp&&e!==hn&&e!==Vk&&e!==Kk&&e!==Uk&&e!==a2&&e!==Jk&&e!==t2&&e!==Zk&&e!==Gk&&e!==Xk&&e!==r2&&e!==i2}f(jp,"isPlainSafeFirst");function Up(e){return!ca(e)&&e!==xs}f(Up,"isPlainSafeLast");function Vr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}f(Vr,"codePointAt");function gl(e){var t=/^\n* /;return t.test(e)}f(gl,"needIndentIndicator");var Gp=1,pn=2,Xp=3,Vp=4,Ur=5;function Zp(e,t,r,i,a,s,n,o){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,m=-1,g=jp(Vr(e,0))&&Up(Vr(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Vr(e,l),!Ci(h))return Ur;g=g&&dn(h,c,o),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Vr(e,l),h===la)u=!0,d&&(p=p||l-m-1>i&&e[m+1]!==" ",m=l);else if(!Ci(h))return Ur;g=g&&dn(h,c,o),c=h}p=p||d&&l-m-1>i&&e[m+1]!==" "}return!u&&!p?g&&!n&&!a(e)?Gp:s===ha?Ur:pn:r>9&&gl(e)?Ur:n?s===ha?Ur:pn:p?Vp:Xp}f(Zp,"chooseScalarStyle");function Kp(e,t,r,i,a){e.dump=function(){if(t.length===0)return e.quotingType===ha?'""':"''";if(!e.noCompatMode&&(s2.indexOf(t)!==-1||o2.test(t)))return e.quotingType===ha?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Yp(e,h)}switch(f(l,"testAmbiguity"),Zp(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,a)){case Gp:return t;case pn:return"'"+t.replace(/'/g,"''")+"'";case Xp:return"|"+fn(t,e.indent)+gn(cn(t,s));case Vp:return">"+fn(t,e.indent)+gn(cn(Qp(t,n),s));case Ur:return'"'+Jp(t)+'"';default:throw new se("impossible error: invalid scalar style")}}()}f(Kp,"writeScalar");function fn(e,t){var r=gl(e)?String(t):"",i=e[e.length-1]===`
|
|
143
|
+
`,a=i&&(e[e.length-2]===`
|
|
144
|
+
`||e===`
|
|
145
|
+
`),s=a?"+":i?"":"-";return r+s+`
|
|
146
|
+
`}f(fn,"blockHeader");function gn(e){return e[e.length-1]===`
|
|
147
|
+
`?e.slice(0,-1):e}f(gn,"dropEndingNewline");function Qp(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(`
|
|
148
|
+
`);return h=h!==-1?h:e.length,r.lastIndex=h,mn(e.slice(0,h),t)}(),a=e[0]===`
|
|
149
|
+
`||e[0]===" ",s,n;n=r.exec(e);){var o=n[1],l=n[2];s=l[0]===" ",i+=o+(!a&&!s&&l!==""?`
|
|
150
|
+
`:"")+mn(l,t),a=s}return i}f(Qp,"foldString");function mn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,n=0,o=0,l="";i=r.exec(e);)o=i.index,o-a>t&&(s=n>a?n:o,l+=`
|
|
151
|
+
`+e.slice(a,s),a=s+1),n=o;return l+=`
|
|
152
|
+
`,e.length-a>t&&n>a?l+=e.slice(a,n)+`
|
|
153
|
+
`+e.slice(n+1):l+=e.slice(a),l.slice(1)}f(mn,"foldLine");function Jp(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Vr(e,a),i=Vt[r],!i&&Ci(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Wp(r);return t}f(Jp,"escapeString");function tf(e,t,r){var i="",a=e.tag,s,n,o;for(s=0,n=r.length;s<n;s+=1)o=r[s],e.replacer&&(o=e.replacer.call(r,String(s),o)),(De(e,t,o,!1,!1)||typeof o>"u"&&De(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}f(tf,"writeFlowSequence");function yn(e,t,r,i){var a="",s=e.tag,n,o,l;for(n=0,o=r.length;n<o;n+=1)l=r[n],e.replacer&&(l=e.replacer.call(r,String(n),l)),(De(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&De(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=bs(e,t)),e.dump&&la===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}f(yn,"writeBlockSequence");function ef(e,t,r){var i="",a=e.tag,s=Object.keys(r),n,o,l,h,c;for(n=0,o=s.length;n<o;n+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[n],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),De(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),De(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}f(ef,"writeFlowMapping");function rf(e,t,r,i){var a="",s=e.tag,n=Object.keys(r),o,l,h,c,u,p;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new se("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)p="",(!i||a!=="")&&(p+=bs(e,t)),h=n[o],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),De(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&la===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=bs(e,t)),De(e,t+1,c,!0,u)&&(e.dump&&la===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,a+=p));e.tag=s,e.dump=a||"{}"}f(rf,"writeBlockMapping");function Cn(e,t,r){var i,a,s,n,o,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,n=a.length;s<n;s+=1)if(o=a[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,Op.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(Ip.call(o.represent,l))i=o.represent[l](t,l);else throw new se("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Cn,"detectType");function De(e,t,r,i,a,s,n){e.tag=null,e.dump=r,Cn(e,r,!1)||Cn(e,r,!0);var o=Op.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(a=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(rf(e,t,e.dump,a),p&&(e.dump="&ref_"+u+e.dump)):(ef(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?yn(e,t-1,e.dump,a):yn(e,t,e.dump,a),p&&(e.dump="&ref_"+u+e.dump)):(tf(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Kp(e,e.dump,t,s,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new se("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}f(De,"writeNode");function af(e,t){var r=[],i=[],a,s;for(ks(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}f(af,"getDuplicateReferences");function ks(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)ks(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)ks(e[i[a]],t,r)}f(ks,"inspectNode");function l2(e,t){t=t||{};var r=new Hp(t);r.noRefs||af(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),De(r,0,i,!0,!0)?r.dump+`
|
|
154
|
+
`:""}f(l2,"dump$1");function h2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}f(h2,"renamed");var c2=Xd,u2=Wk.load;/*! Bundled license information:
|
|
155
|
+
|
|
156
|
+
js-yaml/dist/js-yaml.mjs:
|
|
157
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
158
|
+
*/var $i=f((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"),Gt={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},Vh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ji(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=wt(e),t=wt(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],n=a-r,o=s-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}f(ji,"calculateDeltaAndAngle");var wt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),d2=f(e=>({x:f(function(t,r,i){let a=0;const s=wt(i[0]).x<wt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:d,deltaX:m}=ji(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:d,deltaX:m}=ji(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const n=Math.abs(wt(t).x-wt(i[i.length-1]).x),o=Math.abs(wt(t).y-wt(i[i.length-1]).y),l=Math.abs(wt(t).x-wt(i[0]).x),h=Math.abs(wt(t).y-wt(i[0]).y),c=Gt[e.arrowTypeStart],u=Gt[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=s==="right"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=s==="right"?-1:1,a+=d}return wt(t).x+a},"x"),y:f(function(t,r,i){let a=0;const s=wt(i[0]).y<wt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:d,deltaY:m}=ji(i[0],i[1]);a=Gt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:d,deltaY:m}=ji(i[i.length-1],i[i.length-2]);a=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const n=Math.abs(wt(t).y-wt(i[i.length-1]).y),o=Math.abs(wt(t).x-wt(i[i.length-1]).x),l=Math.abs(wt(t).y-wt(i[0]).y),h=Math.abs(wt(t).x-wt(i[0]).x),c=Gt[e.arrowTypeStart],u=Gt[e.arrowTypeEnd],p=1;if(n<u&&n>0&&o<u){let d=u+p-n;d*=s==="up"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=s==="up"?-1:1,a+=d}return wt(t).y+a},"y")}),"getLineFunctionsWithOffset"),sf={},Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.BLANK_URL=Rt.relativeFirstCharacters=Rt.whitespaceEscapeCharsRegex=Rt.urlSchemeRegex=Rt.ctrlCharactersRegex=Rt.htmlCtrlEntityRegex=Rt.htmlEntitiesRegex=Rt.invalidProtocolRegex=void 0;Rt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Rt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Rt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Rt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Rt.urlSchemeRegex=/^.+(:|:)/gim;Rt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Rt.relativeFirstCharacters=[".","/"];Rt.BLANK_URL="about:blank";Object.defineProperty(sf,"__esModule",{value:!0});var p2=sf.sanitizeUrl=y2,Ut=Rt;function f2(e){return Ut.relativeFirstCharacters.indexOf(e[0])>-1}function g2(e){var t=e.replace(Ut.ctrlCharactersRegex,"");return t.replace(Ut.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function m2(e){return URL.canParse(e)}function Zh(e){try{return decodeURIComponent(e)}catch{return e}}function y2(e){if(!e)return Ut.BLANK_URL;var t,r=Zh(e.trim());do r=g2(r).replace(Ut.htmlCtrlEntityRegex,"").replace(Ut.ctrlCharactersRegex,"").replace(Ut.whitespaceEscapeCharsRegex,"").trim(),r=Zh(r),t=r.match(Ut.ctrlCharactersRegex)||r.match(Ut.htmlEntitiesRegex)||r.match(Ut.htmlCtrlEntityRegex)||r.match(Ut.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Ut.BLANK_URL;if(f2(i))return i;var a=i.trimStart(),s=a.match(Ut.urlSchemeRegex);if(!s)return i;var n=s[0].toLowerCase().trim();if(Ut.invalidProtocolRegex.test(n))return Ut.BLANK_URL;var o=a.replace(/\\/g,"/");if(n==="mailto:"||n.includes("://"))return o;if(n==="http:"||n==="https:"){if(!m2(o))return Ut.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}var of=typeof global=="object"&&global&&global.Object===Object&&global,C2=typeof self=="object"&&self&&self.Object===Object&&self,qe=of||C2||Function("return this")(),Ts=qe.Symbol,nf=Object.prototype,x2=nf.hasOwnProperty,b2=nf.toString,Oi=Ts?Ts.toStringTag:void 0;function k2(e){var t=x2.call(e,Oi),r=e[Oi];try{e[Oi]=void 0;var i=!0}catch{}var a=b2.call(e);return i&&(t?e[Oi]=r:delete e[Oi]),a}var T2=Object.prototype,_2=T2.toString;function w2(e){return _2.call(e)}var S2="[object Null]",v2="[object Undefined]",Kh=Ts?Ts.toStringTag:void 0;function ki(e){return e==null?e===void 0?v2:S2:Kh&&Kh in Object(e)?k2(e):w2(e)}function Mr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var B2="[object AsyncFunction]",L2="[object Function]",F2="[object GeneratorFunction]",A2="[object Proxy]";function ml(e){if(!Mr(e))return!1;var t=ki(e);return t==L2||t==F2||t==B2||t==A2}var Lo=qe["__core-js_shared__"],Qh=function(){var e=/[^.]+$/.exec(Lo&&Lo.keys&&Lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function E2(e){return!!Qh&&Qh in e}var M2=Function.prototype,$2=M2.toString;function $r(e){if(e!=null){try{return $2.call(e)}catch{}try{return e+""}catch{}}return""}var O2=/[\\^$.*+?()[\]{}|]/g,I2=/^\[object .+?Constructor\]$/,D2=Function.prototype,P2=Object.prototype,R2=D2.toString,N2=P2.hasOwnProperty,q2=RegExp("^"+R2.call(N2).replace(O2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function z2(e){if(!Mr(e)||E2(e))return!1;var t=ml(e)?q2:I2;return t.test($r(e))}function W2(e,t){return e==null?void 0:e[t]}function Or(e,t){var r=W2(e,t);return z2(r)?r:void 0}var ua=Or(Object,"create");function H2(){this.__data__=ua?ua(null):{},this.size=0}function Y2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var j2="__lodash_hash_undefined__",U2=Object.prototype,G2=U2.hasOwnProperty;function X2(e){var t=this.__data__;if(ua){var r=t[e];return r===j2?void 0:r}return G2.call(t,e)?t[e]:void 0}var V2=Object.prototype,Z2=V2.hasOwnProperty;function K2(e){var t=this.__data__;return ua?t[e]!==void 0:Z2.call(t,e)}var Q2="__lodash_hash_undefined__";function J2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ua&&t===void 0?Q2:t,this}function Lr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Lr.prototype.clear=H2;Lr.prototype.delete=Y2;Lr.prototype.get=X2;Lr.prototype.has=K2;Lr.prototype.set=J2;function tT(){this.__data__=[],this.size=0}function Us(e,t){return e===t||e!==e&&t!==t}function Gs(e,t){for(var r=e.length;r--;)if(Us(e[r][0],t))return r;return-1}var eT=Array.prototype,rT=eT.splice;function iT(e){var t=this.__data__,r=Gs(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():rT.call(t,r,1),--this.size,!0}function aT(e){var t=this.__data__,r=Gs(t,e);return r<0?void 0:t[r][1]}function sT(e){return Gs(this.__data__,e)>-1}function oT(e,t){var r=this.__data__,i=Gs(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ke.prototype.clear=tT;Ke.prototype.delete=iT;Ke.prototype.get=aT;Ke.prototype.has=sT;Ke.prototype.set=oT;var da=Or(qe,"Map");function nT(){this.size=0,this.__data__={hash:new Lr,map:new(da||Ke),string:new Lr}}function lT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xs(e,t){var r=e.__data__;return lT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function hT(e){var t=Xs(this,e).delete(e);return this.size-=t?1:0,t}function cT(e){return Xs(this,e).get(e)}function uT(e){return Xs(this,e).has(e)}function dT(e,t){var r=Xs(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}cr.prototype.clear=nT;cr.prototype.delete=hT;cr.prototype.get=cT;cr.prototype.has=uT;cr.prototype.set=dT;var pT="Expected a function";function ka(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pT);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var n=e.apply(this,i);return r.cache=s.set(a,n)||s,n};return r.cache=new(ka.Cache||cr),r}ka.Cache=cr;function fT(){this.__data__=new Ke,this.size=0}function gT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function mT(e){return this.__data__.get(e)}function yT(e){return this.__data__.has(e)}var CT=200;function xT(e,t){var r=this.__data__;if(r instanceof Ke){var i=r.__data__;if(!da||i.length<CT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new cr(i)}return r.set(e,t),this.size=r.size,this}function Ti(e){var t=this.__data__=new Ke(e);this.size=t.size}Ti.prototype.clear=fT;Ti.prototype.delete=gT;Ti.prototype.get=mT;Ti.prototype.has=yT;Ti.prototype.set=xT;var _s=function(){try{var e=Or(Object,"defineProperty");return e({},"",{}),e}catch{}}();function yl(e,t,r){t=="__proto__"&&_s?_s(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function xn(e,t,r){(r!==void 0&&!Us(e[t],r)||r===void 0&&!(t in e))&&yl(e,t,r)}function bT(e){return function(t,r,i){for(var a=-1,s=Object(t),n=i(t),o=n.length;o--;){var l=n[++a];if(r(s[l],l,s)===!1)break}return t}}var kT=bT(),lf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jh=lf&&typeof module=="object"&&module&&!module.nodeType&&module,TT=Jh&&Jh.exports===lf,tc=TT?qe.Buffer:void 0,ec=tc?tc.allocUnsafe:void 0;function _T(e,t){if(t)return e.slice();var r=e.length,i=ec?ec(r):new e.constructor(r);return e.copy(i),i}var rc=qe.Uint8Array;function wT(e){var t=new e.constructor(e.byteLength);return new rc(t).set(new rc(e)),t}function ST(e,t){var r=t?wT(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function vT(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var ic=Object.create,BT=function(){function e(){}return function(t){if(!Mr(t))return{};if(ic)return ic(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function hf(e,t){return function(r){return e(t(r))}}var cf=hf(Object.getPrototypeOf,Object),LT=Object.prototype;function Vs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||LT;return e===r}function FT(e){return typeof e.constructor=="function"&&!Vs(e)?BT(cf(e)):{}}function Ta(e){return e!=null&&typeof e=="object"}var AT="[object Arguments]";function ac(e){return Ta(e)&&ki(e)==AT}var uf=Object.prototype,ET=uf.hasOwnProperty,MT=uf.propertyIsEnumerable,ws=ac(function(){return arguments}())?ac:function(e){return Ta(e)&&ET.call(e,"callee")&&!MT.call(e,"callee")},Ss=Array.isArray,$T=9007199254740991;function df(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$T}function Zs(e){return e!=null&&df(e.length)&&!ml(e)}function OT(e){return Ta(e)&&Zs(e)}function IT(){return!1}var pf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sc=pf&&typeof module=="object"&&module&&!module.nodeType&&module,DT=sc&&sc.exports===pf,oc=DT?qe.Buffer:void 0,PT=oc?oc.isBuffer:void 0,Cl=PT||IT,RT="[object Object]",NT=Function.prototype,qT=Object.prototype,ff=NT.toString,zT=qT.hasOwnProperty,WT=ff.call(Object);function HT(e){if(!Ta(e)||ki(e)!=RT)return!1;var t=cf(e);if(t===null)return!0;var r=zT.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ff.call(r)==WT}var YT="[object Arguments]",jT="[object Array]",UT="[object Boolean]",GT="[object Date]",XT="[object Error]",VT="[object Function]",ZT="[object Map]",KT="[object Number]",QT="[object Object]",JT="[object RegExp]",t_="[object Set]",e_="[object String]",r_="[object WeakMap]",i_="[object ArrayBuffer]",a_="[object DataView]",s_="[object Float32Array]",o_="[object Float64Array]",n_="[object Int8Array]",l_="[object Int16Array]",h_="[object Int32Array]",c_="[object Uint8Array]",u_="[object Uint8ClampedArray]",d_="[object Uint16Array]",p_="[object Uint32Array]",_t={};_t[s_]=_t[o_]=_t[n_]=_t[l_]=_t[h_]=_t[c_]=_t[u_]=_t[d_]=_t[p_]=!0;_t[YT]=_t[jT]=_t[i_]=_t[UT]=_t[a_]=_t[GT]=_t[XT]=_t[VT]=_t[ZT]=_t[KT]=_t[QT]=_t[JT]=_t[t_]=_t[e_]=_t[r_]=!1;function f_(e){return Ta(e)&&df(e.length)&&!!_t[ki(e)]}function g_(e){return function(t){return e(t)}}var gf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ji=gf&&typeof module=="object"&&module&&!module.nodeType&&module,m_=Ji&&Ji.exports===gf,Fo=m_&&of.process,nc=function(){try{var e=Ji&&Ji.require&&Ji.require("util").types;return e||Fo&&Fo.binding&&Fo.binding("util")}catch{}}(),lc=nc&&nc.isTypedArray,xl=lc?g_(lc):f_;function bn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var y_=Object.prototype,C_=y_.hasOwnProperty;function x_(e,t,r){var i=e[t];(!(C_.call(e,t)&&Us(i,r))||r===void 0&&!(t in e))&&yl(e,t,r)}function b_(e,t,r,i){var a=!r;r||(r={});for(var s=-1,n=t.length;++s<n;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),a?yl(r,o,l):x_(r,o,l)}return r}function k_(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var T_=9007199254740991,__=/^(?:0|[1-9]\d*)$/;function mf(e,t){var r=typeof e;return t=t??T_,!!t&&(r=="number"||r!="symbol"&&__.test(e))&&e>-1&&e%1==0&&e<t}var w_=Object.prototype,S_=w_.hasOwnProperty;function v_(e,t){var r=Ss(e),i=!r&&ws(e),a=!r&&!i&&Cl(e),s=!r&&!i&&!a&&xl(e),n=r||i||a||s,o=n?k_(e.length,String):[],l=o.length;for(var h in e)(t||S_.call(e,h))&&!(n&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||mf(h,l)))&&o.push(h);return o}function B_(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var L_=Object.prototype,F_=L_.hasOwnProperty;function A_(e){if(!Mr(e))return B_(e);var t=Vs(e),r=[];for(var i in e)i=="constructor"&&(t||!F_.call(e,i))||r.push(i);return r}function yf(e){return Zs(e)?v_(e,!0):A_(e)}function E_(e){return b_(e,yf(e))}function M_(e,t,r,i,a,s,n){var o=bn(e,r),l=bn(t,r),h=n.get(l);if(h){xn(e,r,h);return}var c=s?s(o,l,r+"",e,t,n):void 0,u=c===void 0;if(u){var p=Ss(l),d=!p&&Cl(l),m=!p&&!d&&xl(l);c=l,p||d||m?Ss(o)?c=o:OT(o)?c=vT(o):d?(u=!1,c=_T(l,!0)):m?(u=!1,c=ST(l,!0)):c=[]:HT(l)||ws(l)?(c=o,ws(o)?c=E_(o):(!Mr(o)||ml(o))&&(c=FT(l))):u=!1}u&&(n.set(l,c),a(c,l,i,s,n),n.delete(l)),xn(e,r,c)}function Cf(e,t,r,i,a){e!==t&&kT(t,function(s,n){if(a||(a=new Ti),Mr(s))M_(e,t,n,r,Cf,i,a);else{var o=i?i(bn(e,n),s,n+"",e,t,a):void 0;o===void 0&&(o=s),xn(e,n,o)}},yf)}function xf(e){return e}function $_(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var hc=Math.max;function O_(e,t,r){return t=hc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=hc(i.length-t,0),n=Array(s);++a<s;)n[a]=i[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=i[a];return o[t]=r(n),$_(e,this,o)}}function I_(e){return function(){return e}}var D_=_s?function(e,t){return _s(e,"toString",{configurable:!0,enumerable:!1,value:I_(t),writable:!0})}:xf,P_=800,R_=16,N_=Date.now;function q_(e){var t=0,r=0;return function(){var i=N_(),a=R_-(i-r);if(r=i,a>0){if(++t>=P_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var z_=q_(D_);function W_(e,t){return z_(O_(e,t,xf),e+"")}function H_(e,t,r){if(!Mr(r))return!1;var i=typeof t;return(i=="number"?Zs(r)&&mf(t,r.length):i=="string"&&t in r)?Us(r[t],e):!1}function Y_(e){return W_(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,n=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,n&&H_(r[0],r[1],n)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var o=r[i];o&&e(t,o,i,s)}return t})}var j_=Y_(function(e,t,r){Cf(e,t,r)}),U_="",G_={curveBasis:rn,curveBasisClosed:Z1,curveBasisOpen:K1,curveBumpX:id,curveBumpY:ad,curveBundle:Q1,curveCardinalClosed:J1,curveCardinalOpen:tk,curveCardinal:ld,curveCatmullRomClosed:ek,curveCatmullRomOpen:rk,curveCatmullRom:cd,curveLinear:Qi,curveLinearClosed:ik,curveMonotoneX:md,curveMonotoneY:yd,curveNatural:xd,curveStep:bd,curveStepAfter:Td,curveStepBefore:kd},X_=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,V_=f(function(e,t){const r=bf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);rs(n),i=It(i,[...n])}else i=r.args;if(!i)return;let a=Yn(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),bf=f(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${X_.source})(?=[}][%]{2}).*
|
|
159
|
+
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const n=[];for(;(s=Zi.exec(e))!==null;)if(s.index===Zi.lastIndex&&Zi.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const o=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(a){return R.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Z_=f(function(e){return e.replace(Zi,"")},"removeDirectives"),K_=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function bl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return G_[r]??t}f(bl,"interpolateToCurve");function kf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?p2(r):r}f(kf,"formatUrl");var Q_=f((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let n=0;n<i;n++)if(s=s[r[n]],!s){R.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function kl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(kl,"distance");function Tf(e){let t,r=0;e.forEach(a=>{r+=kl(a,t),t=a});const i=r/2;return Tl(e,i)}f(Tf,"traverseEdge");function _f(e){return e.length===1?e[0]:Tf(e)}f(_f,"calcLabelPosition");var cc=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Tl=f((e,t)=>{let r,i=t;for(const a of e){if(r){const s=kl(a,r);if(s===0)return r;if(s<i)i-=s;else{const n=i/s;if(n<=0)return r;if(n>=1)return{x:a.x,y:a.y};if(n>0&&n<1)return{x:cc((1-n)*r.x+n*a.x,5),y:cc((1-n)*r.y+n*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),J_=f((e,t,r)=>{R.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Tl(t,25),s=e?10:5,n=Math.atan2(t[0].y-a.y,t[0].x-a.x),o={x:0,y:0};return o.x=Math.sin(n)*s+(t[0].x+a.x)/2,o.y=-Math.cos(n)*s+(t[0].y+a.y)/2,o},"calcCardinalityPosition");function wf(e,t,r){const i=structuredClone(r);R.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Tl(i,a),n=10+e*.5,o=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+s.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+s.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+s.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+s.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+s.x)/2,l.y=-Math.cos(o)*n+(i[0].y+s.y)/2),l}f(wf,"calcTerminalLabelPosition");function Sf(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}}f(Sf,"getStylesFromArray");var uc=0,tw=f(()=>(uc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+uc),"generateId");function vf(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(vf,"makeRandomHex");var ew=f(e=>vf(e.length),"random"),rw=f(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"),iw=f(function(e,t){const r=t.text.replace(ya.lineBreakRegex," "),[,i]=Ks(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),aw=ka((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ya.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((n,o)=>{const l=Ve(`${n} `,r),h=Ve(s,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=sw(n,t,"-",r);a.push(s,...p),s=d}else h+l>=t?(a.push(s),s=n):s=[s,n].filter(Boolean).join(" ");o+1===i.length&&a.push(s)}),a.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sw=ka((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let n="";return a.forEach((o,l)=>{const h=`${n}${o}`;if(Ve(h,i)>=t){const u=l+1,p=a.length===u,d=`${h}${r}`;s.push(p?h:d),n=""}else n=h}),{hyphenatedStrings:s,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Bf(e,t){return _l(e,t).height}f(Bf,"calculateTextHeight");function Ve(e,t){return _l(e,t).width}f(Ve,"calculateTextWidth");var _l=ka((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Ks(r),n=["sans-serif",i],o=e.split(ya.lineBreakRegex),l=[],h=ct("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of n){let d=0;const m={width:0,height:0,lineHeight:0};for(const g of o){const y=rw();y.text=g||U_;const C=iw(c,y).style("font-size",s).style("font-weight",a).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)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}c.remove();const u=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[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),di,ow=(di=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(di,"InitIDGenerator"),di),Pa,nw=f(function(e){return Pa=Pa||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Pa.innerHTML=e,unescape(Pa.textContent)},"entityDecode");function wl(e){return"str"in e}f(wl,"isDetailedError");var lw=f((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ks=f(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 Sl(e,t){return j_({},e,t)}f(Sl,"cleanAndMerge");var Te={assignWithDepth:It,wrapLabel:aw,calculateTextHeight:Bf,calculateTextWidth:Ve,calculateTextDimensions:_l,cleanAndMerge:Sl,detectInit:V_,detectDirective:bf,isSubstringInArray:K_,interpolateToCurve:bl,calcLabelPosition:_f,calcCardinalityPosition:J_,calcTerminalLabelPosition:wf,formatUrl:kf,getStylesFromArray:Sf,generateId:tw,random:ew,runFunc:Q_,entityDecode:nw,insertTitle:lw,isLabelCoordinateInPath:Lf,parseFontSize:Ks,InitIDGenerator:ow},hw=f(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"),Fr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),RA=f((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function Nt(e){return e??null}f(Nt,"handleUndefinedAttr");function Lf(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}f(Lf,"isLabelCoordinateInPath");var vl=f(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Ff(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function n(){if(a.style.display="flex",a.style.flexDirection="column",i){const o=gt().fontSize?gt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=mu.fontSize]=Ks(o),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}f(n,"setupImage"),setTimeout(()=>{a.complete&&n()}),a.addEventListener("error",n),a.addEventListener("load",n)})))}f(Ff,"configureLabelImages");var cw=f(e=>{const{handDrawnSeed:t}=gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),_i=f(e=>{const t=uw([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),uw=f(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),Af=f(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"),V=f(e=>{const{stylesArray:t}=_i(e),r=[],i=[],a=[],s=[];return t.forEach(n=>{const o=n[0];Af(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&a.push(n.join(":")+" !important"),o==="fill"&&s.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),X=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=gt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:n}=_i(e);return Object.assign({roughness:.7,fill:n.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||a,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:dw(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),dw=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const pw=Object.freeze({left:0,top:0,width:16,height:16}),vs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ef=Object.freeze({...pw,...vs}),fw=Object.freeze({...Ef,body:"",hidden:!1}),gw=Object.freeze({width:null,height:null}),mw=Object.freeze({...gw,...vs}),yw=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const o=a.pop(),l=a.pop(),h={provider:a.length>0?a[0]:i,prefix:l,name:o};return Ao(h)?h:null}const s=a[0],n=s.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return Ao(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:s};return Ao(o,r)?o:null}return null},Ao=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Cw(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 dc(e,t){const r=Cw(e,t);for(const i in fw)i in vs?i in e&&!(i in r)&&(r[i]=vs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function xw(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(n){if(r[n])return a[n]=[];if(!(n in a)){a[n]=null;const o=i[n]&&i[n].parent,l=o&&s(o);l&&(a[n]=[o].concat(l))}return a[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function pc(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function n(o){s=dc(i[o]||a[o],s)}return n(t),r.forEach(n),dc(e,s)}function bw(e,t){if(e.icons[t])return pc(e,t,[]);const r=xw(e,[t])[t];return r?pc(e,t,r):null}const kw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Tw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fc(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(kw);if(i===null||!i.length)return e;const a=[];let s=i.shift(),n=Tw.test(s);for(;;){if(n){const o=parseFloat(s);isNaN(o)?a.push(s):a.push(Math.ceil(o*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");n=!n}}function _w(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const n=e.indexOf(">",s);if(n===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function ww(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Sw(e,t,r){const i=_w(e);return ww(i.defs,t+i.content+r)}const vw=e=>e==="unset"||e==="undefined"||e==="none";function Bw(e,t){const r={...Ef,...e},i={...mw,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(g=>{const y=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=a.height/2+a.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:_=a.width/2+a.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(a.left!==a.top&&(_=a.left,a.left=a.top,a.top=_),a.width!==a.height&&(_=a.width,a.width=a.height,a.height=_)),y.length&&(s=Sw(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=a.width,h=a.height;let c,u;n===null?(u=o===null?"1em":o==="auto"?h:o,c=fc(u,l/h)):(c=n==="auto"?l:n,u=o===null?fc(c,h/l):o==="auto"?h:o);const p={},d=(g,y)=>{vw(y)||(p[g]=y.toString())};d("width",c),d("height",u);const m=[a.left,a.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:s}}const Lw=/\sid="(\S+)"/g,gc=new Map;function Fw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=gc.get(e)||0;return gc.set(e,t+1),t?`${e}${t}`:e}function Aw(e){const t=[];let r;for(;r=Lw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=Fw(a),n=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Ew(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>"}function Bl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ir=Bl();function Mf(e){Ir=e}var ta={exec:()=>null};function mt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let n=typeof s=="string"?s:s.source;return n=n.replace(Qt.caret,"$1"),r=r.replace(a,n),i},getRegex:()=>new RegExp(r,t)};return i}var Mw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Qt={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")},$w=/^(?:[ \t]*(?:\n|$))+/,Ow=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Iw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ll=/(?:[*+-]|\d{1,9}[.)])/,$f=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Of=mt($f).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(),Pw=mt($f).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(),Fl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Rw=/^[^\n]+/,Al=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Nw=mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Al).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qw=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ll).getRegex(),Qs="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]*?(?:-->|$))/,zw=mt("^ {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",Qs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),If=mt(Fl).replace("hr",_a).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",Qs).getRegex(),Ww=mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",If).getRegex(),Ml={blockquote:Ww,code:Ow,def:Nw,fences:Iw,heading:Dw,hr:_a,html:zw,lheading:Of,list:qw,newline:$w,paragraph:If,table:ta,text:Rw},mc=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_a).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",Qs).getRegex(),Hw={...Ml,lheading:Pw,table:mc,paragraph:mt(Fl).replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mc).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",Qs).getRegex()},Yw={...Ml,html:mt(`^ *(?: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:ta,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(Fl).replace("hr",_a).replace("heading",` *#{1,6} *[^
|
|
160
|
+
]`).replace("lheading",Of).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Uw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Df=/^( {2,}|\\)\n(?!\s*$)/,Gw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Js=/[\p{P}\p{S}]/u,$l=/[\s\p{P}\p{S}]/u,Pf=/[^\s\p{P}\p{S}]/u,Xw=mt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$l).getRegex(),Rf=/(?!~)[\p{P}\p{S}]/u,Vw=/(?!~)[\s\p{P}\p{S}]/u,Zw=/(?:[^\s\p{P}\p{S}]|~)/u,Kw=mt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Mw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Nf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qw=mt(Nf,"u").replace(/punct/g,Js).getRegex(),Jw=mt(Nf,"u").replace(/punct/g,Rf).getRegex(),qf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tS=mt(qf,"gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,$l).replace(/punct/g,Js).getRegex(),eS=mt(qf,"gu").replace(/notPunctSpace/g,Zw).replace(/punctSpace/g,Vw).replace(/punct/g,Rf).getRegex(),rS=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pf).replace(/punctSpace/g,$l).replace(/punct/g,Js).getRegex(),iS=mt(/\\(punct)/,"gu").replace(/punct/g,Js).getRegex(),aS=mt(/^<(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(),sS=mt(El).replace("(?:-->|$)","-->").getRegex(),oS=mt("^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",sS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,nS=mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zf=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",Bs).replace("ref",Al).getRegex(),Wf=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Al).getRegex(),lS=mt("reflink|nolink(?!\\()","g").replace("reflink",zf).replace("nolink",Wf).getRegex(),yc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ol={_backpedal:ta,anyPunctuation:iS,autolink:aS,blockSkip:Kw,br:Df,code:Uw,del:ta,emStrongLDelim:Qw,emStrongRDelimAst:tS,emStrongRDelimUnd:rS,escape:jw,link:nS,nolink:Wf,punctuation:Xw,reflink:zf,reflinkSearch:lS,tag:oS,text:Gw,url:ta},hS={...Ol,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",Bs).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bs).getRegex()},kn={...Ol,emStrongRDelimAst:eS,emStrongLDelim:Jw,url:mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",yc).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:mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",yc).getRegex()},cS={...kn,br:mt(Df).replace("{2,}","*").getRegex(),text:mt(kn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ra={normal:Ml,gfm:Hw,pedantic:Yw},Ii={normal:Ol,gfm:kn,breaks:cS,pedantic:hS},uS={"&":"&","<":"<",">":">",'"':""","'":"'"},Cc=e=>uS[e];function Ee(e,t){if(t){if(Qt.escapeTest.test(e))return e.replace(Qt.escapeReplace,Cc)}else if(Qt.escapeTestNoEncode.test(e))return e.replace(Qt.escapeReplaceNoEncode,Cc);return e}function xc(e){try{e=encodeURI(e).replace(Qt.percentDecode,"%")}catch{return null}return e}function bc(e,t){var s;let r=e.replace(Qt.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Qt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(Qt.slashPipe,"|");return i}function Di(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function dS(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 kc(e,t,r,i,a){let s=t.href,n=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function pS(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
161
|
+
`).map(s=>{let n=s.match(r.other.beginningSpace);if(n===null)return s;let[o]=n;return o.length>=a.length?s.slice(a.length):s}).join(`
|
|
162
|
+
`)}var Ls=class{constructor(t){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=t||Ir}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:Di(i,`
|
|
163
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=pS(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:a}}}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 a=Di(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.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:Di(r[0],`
|
|
164
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Di(r[0],`
|
|
165
|
+
`).split(`
|
|
166
|
+
`),a="",s="",n=[];for(;i.length>0;){let o=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),o=!0;else if(!o)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
167
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
168
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
169
|
+
${c}`:c,s=s?`${s}
|
|
170
|
+
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=p,i.length===0)break;let d=n.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,g=m.raw+`
|
|
171
|
+
`+i.join(`
|
|
172
|
+
`),y=this.blockquote(g);n[n.length-1]=y,a=a.substring(0,a.length-m.raw.length)+y.raw,s=s.substring(0,s.length-m.text.length)+y.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,g=m.raw+`
|
|
173
|
+
`+i.join(`
|
|
174
|
+
`),y=this.list(g);n[n.length-1]=y,a=a.substring(0,a.length-d.raw.length)+y.raw,s=s.substring(0,s.length-m.raw.length)+y.raw,i=g.substring(n.at(-1).raw.length).split(`
|
|
175
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:n,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,c="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
|
|
176
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
177
|
+
`,1)[0],m=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):m?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
178
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),_=this.rules.other.fencesBeginRegex(g),w=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;t;){let T=t.split(`
|
|
179
|
+
`,1)[0],v;if(d=T,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),_.test(d)||w.test(d)||B.test(d)||b.test(d)||k.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
|
|
180
|
+
`+v.slice(g);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||w.test(p)||k.test(p))break;u+=`
|
|
181
|
+
`+d}!m&&!d.trim()&&(m=!0),c+=T+`
|
|
182
|
+
`,t=t.substring(T.length+1),p=v.slice(g)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));let y=null,C;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(C=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:u,tokens:[]}),s.raw+=c}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let c=s.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=u}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}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," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=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:a,title:s}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=bc(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
183
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of s)n.rows.push(bc(l,n.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[c]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
184
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=Di(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=dS(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(a);n&&(a=n[1],s=n[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),kc(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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 a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return kc(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,n,o,l=s,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+s);(a=c.exec(r))!=null;){if(n=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!n)continue;if(o=[...n].length,a[3]||a[4]){l+=o;continue}else if((a[5]||a[6])&&s%3&&!((s+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);let u=[...a[0]][0].length,p=t.slice(0,s+a.index+u+o);if(Math.min(s,o)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(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,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,s;if(r[2]==="@")a=r[0],s="mailto:"+a;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}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}}}},xe=class Tn{constructor(t){xt(this,"tokens");xt(this,"options");xt(this,"state");xt(this,"tokenizer");xt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ir,this.options.tokenizer=this.options.tokenizer||new Ls,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:Qt,block:Ra.normal,inline:Ii.normal};this.options.pedantic?(r.block=Ra.pedantic,r.inline=Ii.pedantic):this.options.gfm&&(r.block=Ra.gfm,this.options.breaks?r.inline=Ii.breaks:r.inline=Ii.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ra,inline:Ii}}static lex(t,r){return new Tn(r).lex(t)}static lexInline(t,r){return new Tn(r).inlineTokens(t)}lex(t){t=t.replace(Qt.carriageReturn,`
|
|
185
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,s,n;for(this.options.pedantic&&(t=t.replace(Qt.tabCharGlobal," ").replace(Qt.spaceLine,""));t;){let o;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
186
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
187
|
+
`)?"":`
|
|
188
|
+
`)+o.raw,h.text+=`
|
|
189
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+o.raw,h.text+=`
|
|
192
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+o.raw,h.text+=`
|
|
195
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+o.raw,h.text+=`
|
|
198
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(m=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),n=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Fs=class{constructor(t){xt(this,"options");xt(this,"parser");this.options=t||Ir}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let a=(n=(r||"").match(Qt.notSpaceStart))==null?void 0:n[0],s=t.replace(Qt.endingNewline,"")+`
|
|
199
|
+
`;return a?'<pre><code class="language-'+Ee(a)+'">'+(i?s:Ee(s,!0))+`</code></pre>
|
|
200
|
+
`:"<pre><code>"+(i?s:Ee(s,!0))+`</code></pre>
|
|
201
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
202
|
+
${this.parser.parse(t)}</blockquote>
|
|
203
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
204
|
+
`}hr(t){return`<hr>
|
|
205
|
+
`}list(t){let r=t.ordered,i=t.start,a="";for(let o=0;o<t.items.length;o++){let l=t.items[o];a+=this.listitem(l)}let s=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+s+n+`>
|
|
206
|
+
`+a+"</"+s+`>
|
|
207
|
+
`}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+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=a+" "+Ee(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
208
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
209
|
+
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let n=t.rows[s];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
210
|
+
<thead>
|
|
211
|
+
`+r+`</thead>
|
|
212
|
+
`+a+`</table>
|
|
213
|
+
`}tablerow({text:t}){return`<tr>
|
|
214
|
+
${t}</tr>
|
|
215
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
216
|
+
`}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>${Ee(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 a=this.parser.parseInline(i),s=xc(t);if(s===null)return a;t=s;let n='<a href="'+t+'"';return r&&(n+=' title="'+Ee(r)+'"'),n+=">"+a+"</a>",n}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=xc(t);if(s===null)return Ee(i);t=s;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${Ee(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ee(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""}},be=class _n{constructor(t){xt(this,"options");xt(this,"renderer");xt(this,"textRenderer");this.options=t||Ir,this.options.renderer=this.options.renderer||new Fs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Il}static parse(t,r){return new _n(r).parse(t)}static parseInline(t,r){return new _n(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[o.type]){let h=o,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],c+=`
|
|
217
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var a,s;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Ya,Ui=(Ya=class{constructor(t){xt(this,"options");xt(this,"block");this.options=t||Ir}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?xe.lex:xe.lexInline}provideParser(){return this.block?be.parse:be.parseInline}},xt(Ya,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),xt(Ya,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ya),fS=class{constructor(...t){xt(this,"defaults",Bl());xt(this,"options",this.setOptions);xt(this,"parse",this.parseMarkdown(!0));xt(this,"parseInline",this.parseMarkdown(!1));xt(this,"Parser",be);xt(this,"Renderer",Fs);xt(this,"TextRenderer",Il);xt(this,"Lexer",xe);xt(this,"Tokenizer",Ls);xt(this,"Hooks",Ui);this.use(...t)}walkTokens(t,r){var a,s;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let h=o[l].flat(1/0);i=i.concat(this.walkTokens(h,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 a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let n=r.renderers[s.name];n?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[s.level];n?n.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new Fs(this.defaults);for(let n in i.renderer){if(!(n in s))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],h=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ls(this.defaults);for(let n in i.tokenizer){if(!(n in s))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],h=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Ui;for(let n in i.hooks){if(!(n in s))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],h=s[o];Ui.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&Ui.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await l.call(s,c);return h.call(s,p)})();let u=l.call(s,c);return h.call(s,u)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(s,c);return p===!1&&(p=await h.apply(s,c)),p})();let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,n=i.walkTokens;a.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return xe.lex(t,r??this.defaults)}parser(t,r){return be.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},n=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?xe.lex:xe.lexInline)(o,s),h=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser():t?be.parse:be.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(n);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer():t?xe.lex:xe.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?be.parse:be.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
218
|
+
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Ee(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},Ar=new fS;function yt(e,t){return Ar.parse(e,t)}yt.options=yt.setOptions=function(e){return Ar.setOptions(e),yt.defaults=Ar.defaults,Mf(yt.defaults),yt};yt.getDefaults=Bl;yt.defaults=Ir;yt.use=function(...e){return Ar.use(...e),yt.defaults=Ar.defaults,Mf(yt.defaults),yt};yt.walkTokens=function(e,t){return Ar.walkTokens(e,t)};yt.parseInline=Ar.parseInline;yt.Parser=be;yt.parser=be.parse;yt.Renderer=Fs;yt.TextRenderer=Il;yt.Lexer=xe;yt.lexer=xe.lex;yt.Tokenizer=Ls;yt.Hooks=Ui;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;be.parse;xe.lex;function Hf(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 a=i.reduce(function(o,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):o},[]);if(a.length){var s=new RegExp(`
|
|
219
|
+
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(o){return o.replace(s,`
|
|
220
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,l){var h=n.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
221
|
+
`)&&(u=String(o).split(`
|
|
222
|
+
`).map(function(p,d){return d===0?p:""+c+p}).join(`
|
|
223
|
+
`)),n+=u+i[l+1]}),n}var gS={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},wn=new Map,Yf=new Map,mS=f(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(R.debug("Registering icon pack:",t.name),"loader"in t)Yf.set(t.name,t.loader);else if("icons"in t)wn.set(t.name,t.icons);else throw R.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),jf=f(async(e,t)=>{const r=yw(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 a=wn.get(i);if(!a){const n=Yf.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await n(),prefix:i},wn.set(i,a)}catch(o){throw R.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=bw(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),yS=f(async e=>{try{return await jf(e),!0}catch{return!1}},"isIconAvailable"),wa=f(async(e,t,r)=>{let i;try{i=await jf(e,t==null?void 0:t.fallbackPrefix)}catch(n){R.error(n),i=gS}const a=Bw(i,t),s=Ew(Aw(a.body),{...a.attributes,...r});return Se(s,St())},"getIconSVG");function Uf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
224
|
+
`).replace(/\n{2,}/g,`
|
|
225
|
+
`);return Hf(i)}f(Uf,"preprocessMarkdown");function Gf(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(Gf,"nonMarkdownToLines");function Xf(e,t={}){const r=Uf(e,t),i=yt.lexer(r),a=[[]];let s=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
226
|
+
`).forEach((c,u)=>{u!==0&&(s++,a.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&a[s].push({content:p,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&a[s].push({content:o.text,type:"normal"})}return f(n,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(h=>{n(h)}):o.type==="html"?a[s].push({content:o.text,type:"normal"}):a[s].push({content:o.raw,type:"normal"})}),a}f(Xf,"markdownToLines");function Vf(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(Vf,"nonMarkdownToHTML");function Zf(e,{markdownAutoWrap:t}={}){const r=yt.lexer(e);function i(a){var s,n,o;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(n=a.tokens)==null?void 0:n.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(o=a.tokens)==null?void 0:o.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(R.warn(`Unsupported markdown: ${a.type}`),a.raw)}return f(i,"output"),r.map(i).join("")}f(Zf,"markdownToHTML");function Kf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Kf,"splitTextToChars");function Qf(e,t){const r=Kf(t.content);return Dl(e,[],r,t.type)}f(Qf,"splitWordToFitWidth");function Dl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,n=[...t,a];return e([{content:n.join(""),type:i}])?Dl(e,n,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Dl,"splitWordToFitWidthRecursion");function Jf(e,t){if(e.some(({content:r})=>r.includes(`
|
|
227
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return As(e,t)}f(Jf,"splitLineToFitWidth");function As(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},n=[...i];if(a!==""&&n.push({content:a,type:"normal"}),n.push(s),t(n))return As(e,t,r,n);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[o,l]=Qf(t,s);r.push([o]),l.content&&e.unshift(l)}return As(e,t,r)}f(As,"splitLineToFitWidthRecursion");function Sn(e,t){t&&e.attr("style",t)}f(Sn,"applyStyle");var Tc=16384;async function tg(e,t,r,i,a=!1,s=St()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,Tc)}px`),n.attr("height",`${Math.min(10*r,Tc)}px`);const o=n.append("xhtml:div"),l=ra(t.label)?await Su(t.label.replace(ya.lineBreakRegex,`
|
|
228
|
+
`),s):Se(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(l),Sn(c,t.labelStyle),c.attr("class",`${h} ${i}`),Sn(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),n.node()}f(tg,"addHtmlSpan");function to(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}f(to,"createTspan");function eg(e,t,r){const i=e.append("text"),a=to(i,1,t);eo(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}f(eg,"computeWidthOfText");function CS(e,t,r){var n;const i=e.append("text"),a=to(i,1,t);eo(a,[{content:r,type:"normal"}]);const s=(n=a.node())==null?void 0:n.getBoundingClientRect();return s&&i.remove(),s}f(CS,"computeDimensionOfText");function rg(e,t,r,i=!1,a=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>eg(n,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:Jf(c,u);for(const d of p){const m=to(l,h,1.1,a);eo(m,d),h++}}if(i){const c=l.node().getBBox(),u=2;return o.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),n.node()}else return l.node()}f(rg,"createFormattedText");function vn(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}})}f(vn,"decodeHTMLEntities");function eo(e,t){e.text(""),t.forEach((r,i)=>{const a=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?a.text(vn(r.content)):a.text(" "+vn(r.content))})}f(eo,"updateTextContentAndStyles");async function ig(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,n)=>(r.push((async()=>{const o=`${s}:${n}`;return await yS(o)?await wa(o,void 0,{class:"label-icon"}):`<i class='${Se(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(ig,"replaceIconSubstring");var Qe=f(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:n=!0,isNode:o=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(R.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",h),s){const u=n?Zf(t,c):Vf(t),p=await ig(Fr(u),c),d=t.replace(/\\\\/g,"\\"),m={isNode:o,label:ra(t)?d:p,labelStyle:r.replace("fill:","color:")};return await tg(e,m,l,a,h,c)}else{const u=Fr(t.replace(/<br\s*\/?>/g,"<br/>")),p=n?Xf(u.replace("<br>","<br/>"),c):Gf(u),d=rg(l,e,p,t?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(d).select("text").attr("style",g)}return i?ct(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Eo(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,n=Math.cos(s),o=Math.sin(s);for(const l of e){const[h,c]=l;l[0]=(h-i)*n-(c-a)*o+i,l[1]=(h-i)*o+(c-a)*n+a}}}function xS(e,t){return e[0]===t[0]&&e[1]===t[1]}function bS(e,t,r,i=1){const a=r,s=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(a)for(const h of n)Eo(h,o,a);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];xS(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const m=[];for(const b of p)for(let k=0;k<b.length-1;k++){const _=b[k],w=b[k+1];if(_[1]!==w[1]){const B=Math.min(_[1],w[1]);m.push({ymin:B,ymax:Math.max(_[1],w[1]),x:B===_[1]?_[0]:w[0],islope:(w[0]-_[0])/(w[1]-_[1])})}}if(m.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!m.length)return d;let g=[],y=m[0].ymin,C=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>y);k++)b=k;m.splice(0,b+1).forEach(k=>{g.push({s:y,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=y)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%c==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const _=g[b].edge,w=g[k].edge;d.push([[Math.round(_.x),y],[Math.round(w.x),y]])}y+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(n,s,i);if(a){for(const h of n)Eo(h,o,-a);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),Eo(p,c,u)})(l,o,-a)}return l}function Sa(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),bS(e,a,i,s||1)}class Pl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Sa(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function ro(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 kS extends Pl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Sa(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[h,c]of a)ro([h,c])&&n.push([[h[0]-o,h[1]+l],[...c]],[[h[0]+o,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class TS extends Pl{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class _S{constructor(t){this.helper=t}fillPolygons(t,r){const i=Sa(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const n=a/4;for(const o of t){const l=ro(o),h=l/a,c=Math.ceil(h)-1,u=l-c*a,p=(o[0][0]+o[1][0])/2-a/4,d=Math.min(o[0][1],o[1][1]);for(let m=0;m<c;m++){const g=d+u+m*a,y=p-n+2*Math.random()*n,C=g-n+2*Math.random()*n,b=this.helper.ellipse(y,C,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class wS{constructor(t){this.helper=t}fillPolygons(t,r){const i=Sa(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,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach(n=>{const o=ro(n),l=Math.floor(o/(i+a)),h=(o+a-l*(i+a))/2;let c=n[0],u=n[1];c[0]>u[0]&&(c=n[1],u=n[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const m=d*(i+a),g=m+i,y=[c[0]+m*Math.cos(p)+h*Math.cos(p),c[1]+m*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}}),s}}class SS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Sa(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(s=>{const n=ro(s),o=Math.round(n/(2*r));let l=s[0],h=s[1];l[0]>h[0]&&(l=s[1],h=s[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<o;u++){const p=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],y=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[g[0]+m*Math.cos(c+Math.PI/4),g[1]+m*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}}),a}}const re={};class vS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const BS=0,Mo=1,_c=2,Na={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 $o(e,t){return e.type===t}function Rl(e){const t=[],r=function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:BS,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Mo,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:_c,text:""},o}(e);let i="BOD",a=0,s=r[a];for(;!$o(s,_c);){let n=0;const o=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Rl("M0,0"+e);a++,n=Na[s.text],i=s.text}else $o(s,Mo)?n=Na[i]:(a++,n=Na[s.text],i=s.text);if(!(a+n<r.length))throw new Error("Path data ended short");for(let l=a;l<a+n;l++){const h=r[l];if(!$o(h,Mo))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof Na[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),a+=n,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function ag(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:n,data:o}of e)switch(n){case"M":s.push({key:"M",data:[...o]}),[t,r]=o,[i,a]=o;break;case"m":t+=o[0],r+=o[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map((h,c)=>c%2?h+r:h+t);s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map((h,c)=>c%2?h+r:h+t);s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":s.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map((h,c)=>c%2?h+r:h+t);s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function sg(e){const t=[];let r="",i=0,a=0,s=0,n=0,o=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[s,n]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],o=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-o),p=a+(a-l)):(u=i,p=a),t.push({key:"C",data:[u,p,...c]}),o=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[u,p]=c;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-o),m=a+(a-l)):(d=i,m=a);const g=i+2*(d-i)/3,y=a+2*(m-a)/3,C=u+2*(d-u)/3,b=p+2*(m-p)/3;t.push({key:"C",data:[g,y,C,b,u,p]}),o=d,l=m,i=u,a=p;break}case"Q":{const[u,p,d,m]=c,g=i+2*(u-i)/3,y=a+2*(p-a)/3,C=d+2*(u-d)/3,b=m+2*(p-m)/3;t.push({key:"C",data:[g,y,C,b,d,m]}),o=u,l=p,i=d,a=m;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],m=c[3],g=c[4],y=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,a,y,C,y,C]}),i=y,a=C):(i!==y||a!==C)&&(og(i,a,y,C,u,p,d,m,g).forEach(function(b){t.push({key:"C",data:b})}),i=y,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=n}r=h}return t}function Pi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function og(e,t,r,i,a,s,n,o,l,h){const c=(u=n,Math.PI*u/180);var u;let p=[],d=0,m=0,g=0,y=0;if(h)[d,m,g,y]=h;else{[e,t]=Pi(e,t,-c),[r,i]=Pi(r,i,-c);const z=(e-r)/2,D=(t-i)/2;let E=z*z/(a*a)+D*D/(s*s);E>1&&(E=Math.sqrt(E),a*=E,s*=E);const F=a*a,I=s*s,A=F*I-F*D*D-I*z*z,W=F*D*D+I*z*z,H=(o===l?-1:1)*Math.sqrt(Math.abs(A/W));g=H*a*D/s+(e+r)/2,y=H*-s*z/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),m=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const z=m,D=r,E=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=og(r=g+a*Math.cos(m),i=y+s*Math.sin(m),D,E,a,s,n,0,l,[m,z,g,y])}C=m-d;const b=Math.cos(d),k=Math.sin(d),_=Math.cos(m),w=Math.sin(m),B=Math.tan(C/4),T=4/3*a*B,v=4/3*s*B,q=[e,t],P=[e+T*k,t-v*b],M=[r+T*w,i-v*_],Y=[r,i];if(P[0]=2*q[0]-P[0],P[1]=2*q[1]-P[1],h)return[P,M,Y].concat(p);{p=[P,M,Y].concat(p);const z=[];for(let D=0;D<p.length;D+=3){const E=Pi(p[D][0],p[D][1],c),F=Pi(p[D+1][0],p[D+1][1],c),I=Pi(p[D+2][0],p[D+2][1],c);z.push([E[0],E[1],F[0],F[1],I[0],I[1]])}return z}}const LS={randOffset:function(e,t){return st(e,t)},randOffsetWithRange:function(e,t,r){return Es(e,t,r)},ellipse:function(e,t,r,i,a){const s=lg(r,i,a);return Bn(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return lr(e,t,r,i,a,!0)}};function ng(e,t,r,i,a){return{type:"path",ops:lr(e,t,r,i,a)}}function Qa(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...lr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?ng(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function FS(e,t,r,i,a){return function(s,n){return Qa(s,!0,n)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function wc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=qa(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:qa(r[0],1.5*(1+.22*t.roughness),Bc(t));for(let s=1;s<r.length;s++){const n=r[s];if(n.length){const o=qa(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:qa(n,1.5*(1+.22*t.roughness),Bc(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function lg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=st(n*l,r),o+=st(o*l,r),{increment:s,rx:n,ry:o}}function Bn(e,t,r,i){const[a,s]=Lc(i.increment,e,t,i.rx,i.ry,1,i.increment*Es(.1,Es(.4,1,r),r),r);let n=Ms(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Lc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ms(o,null,r);n=n.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:n}}}function Sc(e,t,r,i,a,s,n,o,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=st(.01*u,l),p+=st(.01*p,l);let d=a,m=s;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-d)/2),C=Fc(y,h,c,u,p,d,m,1,l);if(!l.disableMultiStroke){const b=Fc(y,h,c,u,p,d,m,1.5,l);C.push(...b)}return n&&(o?C.push(...lr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...lr(h,c,h+u*Math.cos(m),c+p*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function vc(e,t){const r=sg(ag(Rl(e))),i=[];let a=[0,0],s=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":s=[o[0],o[1]],a=[o[0],o[1]];break;case"L":i.push(...lr(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[l,h,c,u,p,d]=o;i.push(...AS(l,h,c,u,p,d,s,t)),s=[p,d];break}case"Z":i.push(...lr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Oo(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+st(a,t),i[0][1]+st(a,t)]});for(let n=1;n<s;n++)r.push({op:"lineTo",data:[i[n][0]+st(a,t),i[n][1]+st(a,t)]})}}return{type:"fillPath",ops:r}}function Wr(e,t){return function(r,i){let a=r.fillStyle||"hachure";if(!re[a])switch(a){case"zigzag":re[a]||(re[a]=new kS(i));break;case"cross-hatch":re[a]||(re[a]=new TS(i));break;case"dots":re[a]||(re[a]=new _S(i));break;case"dashed":re[a]||(re[a]=new wS(i));break;case"zigzag-line":re[a]||(re[a]=new SS(i));break;default:a="hachure",re[a]||(re[a]=new Pl(i))}return re[a]}(t,LS).fillPolygons(e,t)}function Bc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function hg(e){return e.randomizer||(e.randomizer=new vS(e.seed||0)),e.randomizer.next()}function Es(e,t,r,i=1){return r.roughness*i*(hg(r)*(t-e)+e)}function st(e,t,r=1){return Es(-e,e,t,r)}function lr(e,t,r,i,a,s=!1){const n=s?a.disableMultiStrokeFill:a.disableMultiStroke,o=Ln(e,t,r,i,a,!0,!1);if(n)return o;const l=Ln(e,t,r,i,a,!0,!0);return o.concat(l)}function Ln(e,t,r,i,a,s,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>o&&(c=l/10);const u=c/2,p=.2+.2*hg(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,m=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=st(d,a,h),m=st(m,a,h);const g=[],y=()=>st(u,a,h),C=()=>st(c,a,h),b=a.preserveVertices;return n?g.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):g.push({op:"move",data:[e+(b?0:st(c,a,h)),t+(b?0:st(c,a,h))]}),n?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+y(),m+t+(i-t)*p+y(),d+e+2*(r-e)*p+y(),m+t+2*(i-t)*p+y(),r+(b?0:y()),i+(b?0:y())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function qa(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]),i.push([e[0][0]+st(t,r),e[0][1]+st(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]),a===e.length-1&&i.push([e[a][0]+st(t,r),e[a][1]+st(t,r)]);return Ms(i,null,r)}function Ms(e,t,r){const i=e.length,a=[];if(i>3){const s=[],n=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(n*e[o+1][0]-n*e[o-1][0])/6,l[1]+(n*e[o+1][1]-n*e[o-1][1])/6],s[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],s[3]=[e[o+1][0],e[o+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Ln(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Lc(e,t,r,i,a,s,n,o){const l=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+a*Math.sin(0)]),h.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=st(.5,o)-Math.PI/2;h.push([st(s,o)+t+.9*i*Math.cos(c-e),st(s,o)+r+.9*a*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[st(s,o)+t+i*Math.cos(p),st(s,o)+r+a*Math.sin(p)];l.push(d),h.push(d)}h.push([st(s,o)+t+i*Math.cos(c+2*Math.PI+.5*n),st(s,o)+r+a*Math.sin(c+2*Math.PI+.5*n)]),h.push([st(s,o)+t+.98*i*Math.cos(c+n),st(s,o)+r+.98*a*Math.sin(c+n)]),h.push([st(s,o)+t+.9*i*Math.cos(c+.5*n),st(s,o)+r+.9*a*Math.sin(c+.5*n)])}return[h,l]}function Fc(e,t,r,i,a,s,n,o,l){const h=s+st(.1,l),c=[];c.push([st(o,l)+t+.9*i*Math.cos(h-e),st(o,l)+r+.9*a*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)c.push([st(o,l)+t+i*Math.cos(u),st(o,l)+r+a*Math.sin(u)]);return c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),c.push([t+i*Math.cos(n),r+a*Math.sin(n)]),Ms(c,null,l)}function AS(e,t,r,i,a,s,n,o){const l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let c=[0,0];const u=o.disableMultiStroke?1:2,p=o.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(p?0:st(h[0],o)),n[1]+(p?0:st(h[0],o))]}),c=p?[a,s]:[a+st(h[d],o),s+st(h[d],o)],l.push({op:"bcurveTo",data:[e+st(h[d],o),t+st(h[d],o),r+st(h[d],o),i+st(h[d],o),c[0],c[1]]});return l}function Ri(e){return[...e]}function Ac(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(Ri(e[0]),Ri(e[1]),Ri(e[2]),Ri(e[2]));else{const a=[];a.push(e[0],e[0]);for(let o=1;o<e.length;o++)a.push(e[o]),o===e.length-1&&a.push(e[o]);const s=[],n=1-t;i.push(Ri(a[0]));for(let o=1;o+2<a.length;o++){const l=a[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(n*a[o+1][0]-n*a[o-1][0])/6,l[1]+(n*a[o+1][1]-n*a[o-1][1])/6],s[2]=[a[o+1][0]+(n*a[o][0]-n*a[o+2][0])/6,a[o+1][1]+(n*a[o][1]-n*a[o+2][1])/6],s[3]=[a[o+1][0],a[o+1][1]],i.push(s[1],s[2],s[3])}}return i}function Ja(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ES(e,t,r){const i=Ja(t,r);if(i===0)return Ja(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ja(e,mr(t,r,a))}function mr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Fn(e,t,r,i){const a=i||[];if(function(o,l){const h=o[l+0],c=o[l+1],u=o[l+2],p=o[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let m=3*c[1]-2*h[1]-p[1];m*=m;let g=3*u[0]-2*p[0]-h[0];g*=g;let y=3*u[1]-2*p[1]-h[1];return y*=y,d<g&&(d=g),m<y&&(m=y),d+m}(e,t)<r){const o=e[t+0];a.length?(s=a[a.length-1],n=o,Math.sqrt(Ja(s,n))>1&&a.push(o)):a.push(o),a.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=mr(l,h,.5),d=mr(h,c,.5),m=mr(c,u,.5),g=mr(p,d,.5),y=mr(d,m,.5),C=mr(g,y,.5);Fn([l,p,g,C],0,r,a),Fn([C,y,m,u],0,r,a)}var s,n;return a}function MS(e,t){return $s(e,0,e.length,t)}function $s(e,t,r,i,a){const s=a||[],n=e[t],o=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=ES(e[c],n,o);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?($s(e,t,h+1,i,s),$s(e,h,r,i,s)):(s.length||s.push(n),s.push(o)),s}function Io(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Fn(e,3*s,t,i);return r&&r>0?$s(i,0,i.length,r):i}const ce="none";class Os{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,a,s){const n=this._o(s);return this._d("line",[ng(t,r,i,a,n)],n)}rectangle(t,r,i,a,s){const n=this._o(s),o=[],l=FS(t,r,i,a,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];n.fillStyle==="solid"?o.push(Oo([h],n)):o.push(Wr([h],n))}return n.stroke!==ce&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,a,s){const n=this._o(s),o=[],l=lg(i,a,n),h=Bn(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Bn(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(Wr([h.estimatedPoints],n));return n.stroke!==ce&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Qa(t,!1,i)],i)}arc(t,r,i,a,s,n,o=!1,l){const h=this._o(l),c=[],u=Sc(t,r,i,a,s,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Sc(t,r,i,a,s,n,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,m,g,y,C,b){const k=p,_=d;let w=Math.abs(m/2),B=Math.abs(g/2);w+=st(.01*w,b),B+=st(.01*B,b);let T=y,v=C;for(;T<0;)T+=2*Math.PI,v+=2*Math.PI;v-T>2*Math.PI&&(T=0,v=2*Math.PI);const q=(v-T)/b.curveStepCount,P=[];for(let M=T;M<=v;M+=q)P.push([k+w*Math.cos(M),_+B*Math.sin(M)]);return P.push([k+w*Math.cos(v),_+B*Math.sin(v)]),P.push([k,_]),Wr([P],b)}(t,r,i,a,s,n,h));return h.stroke!==ce&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=wc(t,i);if(i.fill&&i.fill!==ce)if(i.fillStyle==="solid"){const n=wc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const h of l)h.length<3?n.push(...h):h.length===3?n.push(...Io(Ac([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Io(Ac(h),10,(1+i.roughness)/2))}n.length&&a.push(Wr([n],i))}return i.stroke!==ce&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Qa(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Oo([t],i)):a.push(Wr([t],i))),i.stroke!==ce&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==ce,n=i.stroke!==ce,o=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=sg(ag(Rl(c))),m=[];let g=[],y=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...Io(C,u)),C=[]},k=()=>{b(),g.length&&(m.push(g),g=[])};for(const{key:w,data:B}of d)switch(w){case"M":k(),y=[B[0],B[1]],g.push(y);break;case"L":b(),g.push([B[0],B[1]]);break;case"C":if(!C.length){const T=g.length?g[g.length-1]:y;C.push([T[0],T[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),g.push([y[0],y[1]])}if(k(),!p)return m;const _=[];for(const w of m){const B=MS(w,p);B.length&&_.push(B)}return _}(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=vc(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const c=vc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(Oo(l,i));else a.push(Wr(l,i));return n&&(o?l.forEach(c=>{a.push(Qa(c,!1,i))}):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map(n=>+n.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let n=null;switch(s.type){case"path":n={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ce};break;case"fillPath":n={d:this.opsToPath(s),stroke:ce,strokeWidth:0,fill:i.fill||ce};break;case"fillSketch":n=this.fillSketch(s,i)}n&&a.push(n)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ce,strokeWidth:i,fill:ce}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class $S{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Os(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,n,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,n,s,o),a.restore();break}case"fillSketch":this.fillSketch(a,n,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const n=typeof i=="number"&&i>=0?s.data.map(o=>+o.toFixed(i)):s.data;switch(s.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const n=this.gen.line(t,r,i,a,s);return this.draw(n),n}rectangle(t,r,i,a,s){const n=this.gen.rectangle(t,r,i,a,s);return this.draw(n),n}ellipse(t,r,i,a,s){const n=this.gen.ellipse(t,r,i,a,s);return this.draw(n),n}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}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,a,s,n,o=!1,l){const h=this.gen.arc(t,r,i,a,s,n,o,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const za="http://www.w3.org/2000/svg";class OS{constructor(t,r){this.svg=t,this.gen=new Os(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(za,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=a.createElementNS(za,"path"),l.setAttribute("d",this.opsToPath(o,n)),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=a.createElementNS(za,"path"),l.setAttribute("d",this.opsToPath(o,n)),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(a,o,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(za,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const n=this.gen.line(t,r,i,a,s);return this.draw(n)}rectangle(t,r,i,a,s){const n=this.gen.rectangle(t,r,i,a,s);return this.draw(n)}ellipse(t,r,i,a,s){const n=this.gen.ellipse(t,r,i,a,s);return this.draw(n)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}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,a,s,n,o=!1,l){const h=this.gen.arc(t,r,i,a,s,n,o,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var U={canvas:(e,t)=>new $S(e,t),svg:(e,t)=>new OS(e,t),generator:e=>new Os(e),newSeed:()=>Os.newSeed()},at=f(async(e,t,r)=>{var d,m;let i;const a=t.useHtmlLabels||Ze((d=gt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Qe(n,Se(Fr(o),gt()),{useHtmlLabels:a,width:t.width||((m=gt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},gt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(a){const g=c.children[0],y=ct(c);await Ff(g,o),u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}return a?n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):n.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:p,label:n}},"labelHelper"),Do=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??te(gt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Qe(a,Se(Fr(t),gt()),{useHtmlLabels:i,width:r.width||((h=(l=gt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let n=s.getBBox();const o=r.padding/2;if(te(gt())){const c=s.children[0],u=ct(s);n=c.getBoundingClientRect(),u.attr("width",n.width),u.attr("height",n.height)}return i?a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):a.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:a}},"insertLabel"),K=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(pt,"createPathFromPoints");function hr(e,t,r,i,a,s){const n=[],l=r-e,h=i-t,c=l/s,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const m=d/50,g=e+m*l,y=p+a*Math.sin(u*(g-e));n.push({x:g,y})}return n}f(hr,"generateFullSineWavePoints");function pa(e,t,r,i,a,s){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}f(pa,"generateCirclePoints");function An(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 a=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),n=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(a){const l={fill:n(a,"fill"),"fill-opacity":n(a,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(s){const l={stroke:n(s,"stroke"),"stroke-width":n(s,"stroke-width")??"1","stroke-opacity":n(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}f(An,"mergePaths");var IS=f((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,n=e.width/2,o=e.height/2,l,h;return Math.abs(s)*n>Math.abs(a)*o?(s<0&&(o=-o),l=s===0?0:o*a/s,h=o):(a<0&&(n=-n),l=n,h=a===0?0:n*s/a),{x:r+l,y:i+h}},"intersectRect"),wi=IS,DS=f(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const n=gt(),o=te(n);return await Qe(e,s,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},n)},"createLabel"),rr=DS,ur=f((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),cg=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=te(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Qe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await rr(d,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(te(r)){const T=m.children[0],v=ct(m);g=T.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const T=U.svg(u),v=X(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:a}),q=T.path(ur(b,k,y,C,0),v);_=u.insert(()=>(R.debug("Rough node insert CXC",q),q),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=vl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const B=_.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return wi(t,T)},{cluster:u,labelBBox:g}},"rect"),PS=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return wi(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),RS=f(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:n,compositeTitleBackground:o,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await rr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(te(r)){const q=d.children[0],P=ct(d);m=q.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const g=0*t.padding,y=g/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-m.height-6,_=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-y+m.height+2;let T;if(t.look==="handDrawn"){const q=t.cssClasses.includes("statediagram-cluster-alt"),P=U.svg(h),M=t.rx||t.ry?P.path(ur(_,w,C,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:a}):P.rectangle(_,w,C,b,{seed:a});T=h.insert(()=>M,":first-child");const Y=P.rectangle(_,B,C,k,{fill:q?s:n,fillStyle:q?"hachure":"solid",stroke:l,seed:a});T=h.insert(()=>M,":first-child"),p=h.insert(()=>Y)}else T=c.insert("rect",":first-child"),T.attr("class","outer").attr("x",_).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",_).attr("y",B).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(te(r)?0:3)})`);const v=T.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(q){return wi(t,q)},{cluster:h,labelBBox:m}},"roundedWithTitle"),NS=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=te(r),d=u.insert("g").attr("class","cluster-label "),m=await Qe(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=m.getBBox();if(te(r)){const T=m.children[0],v=ct(m);g=T.getBoundingClientRect(),v.attr("width",g.width),v.attr("height",g.height)}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-y/2,k=t.y-C/2;R.trace("Data ",t,JSON.stringify(t));let _;if(t.look==="handDrawn"){const T=U.svg(u),v=X(t,{roughness:.7,fill:s,stroke:n,fillWeight:4,seed:a}),q=T.path(ur(b,k,y,C,t.rx),v);_=u.insert(()=>(R.debug("Rough node insert CXC",q),q),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",c.join(";").replace("fill","stroke"))}else _=u.insert("rect",":first-child"),_.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:w}=vl(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),o){const T=d.select("span");T&&T.attr("style",o)}const B=_.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(T){return wi(t,T)},{cluster:u,labelBBox:g}},"kanbanSection"),qS=f((e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,n=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=n.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const y=U.svg(n).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=n.insert(()=>y,":first-child")}else{d=o.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return wi(t,g)},{cluster:n,labelBBox:{}}},"divider"),zS=cg,WS={rect:cg,squareRect:zS,roundedWithTitle:RS,noteGroup:PS,divider:qS,kanbanSection:NS},ug=new Map,HS=f(async(e,t)=>{const r=t.shape||"rect",i=await WS[r](e,t);return ug.set(t.id,i),i},"insertCluster"),YA=f(()=>{ug=new Map},"clear");function dg(e,t){return e.intersect(t)}f(dg,"intersectNode");var YS=dg;function pg(e,t,r,i){var a=e.x,s=e.y,n=a-i.x,o=s-i.y,l=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/l);i.x<a&&(h=-h);var c=Math.abs(t*r*o/l);return i.y<s&&(c=-c),{x:a+h,y:s+c}}f(pg,"intersectEllipse");var fg=pg;function gg(e,t,r){return fg(e,t,t,r)}f(gg,"intersectCircle");var jS=gg;function mg(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,n=t.x*e.y-e.x*t.y,o=a*r.x+s*r.y+n,l=a*i.x+s*i.y+n,h=1e-6;if(o!==0&&l!==0&&En(o,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,m=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(m)<h&&En(d,m))return;const g=a*u-c*s;if(g===0)return;const y=Math.abs(g/2);let C=s*p-u*n;const b=C<0?(C-y)/g:(C+y)/g;C=c*n-a*p;const k=C<0?(C-y)/g:(C+y)/g;return{x:b,y:k}}}f(mg,"intersectLine");function En(e,t){return e*t>0}f(En,"sameSign");var US=mg;function yg(e,t,r){let i=e.x,a=e.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){n=Math.min(n,c.x),o=Math.min(o,c.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let l=i-e.width/2-n,h=a-e.height/2-o;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=US(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,m=Math.sqrt(p*p+d*d),g=u.x-r.x,y=u.y-r.y,C=Math.sqrt(g*g+y*y);return m<C?-1:m===C?0:1}),s[0]):e}f(yg,"intersectPolygon");var GS=yg,j={node:YS,circle:jS,ellipse:fg,polygon:GS,rect:wi};function Cg(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=rt(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=U.svg(s),h=X(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),u=s.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",Nt(o)),K(t,u),t.intersect=function(p){return R.info("Circle intersect",t,n,p),j.circle(t,n,p)},s}f(Cg,"anchor");function Mn(e,t,r,i,a,s,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/a,m=p/s,g=Math.sqrt(d**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-g**2),C=l+y*s*Math.sin(c)*(n?-1:1),b=h-y*a*Math.cos(c)*(n?-1:1),k=Math.atan2((t-b)/s,(e-C)/a);let w=Math.atan2((i-b)/s,(r-C)/a)-k;n&&w<0&&(w+=2*Math.PI),!n&&w>0&&(w-=2*Math.PI);const B=[];for(let T=0;T<20;T++){const v=T/19,q=k+v*w,P=C+a*Math.cos(q),M=b+s*Math.sin(q);B.push({x:P,y:M})}return B}f(Mn,"generateArcPoints");function xg(e,t,r){const[i,a]=[t,r].sort((s,n)=>n-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}f(xg,"calculateArcSagitta");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=f(q=>q+n,"calcTotalHeight"),l=f(q=>{const P=q/2;return[P/(2.5+q/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),m=xg(u,p,d),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+m-m,C=u,{cssStyles:b}=t,k=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Mn(-y/2,-C/2,-y/2,C/2,p,d,!1),{x:y/2,y:C/2},...Mn(y/2,C/2,y/2,-C/2,p,d,!0)],_=U.svg(h),w=X(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=pt(k),T=_.path(B,w),v=h.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),K(t,v),t.intersect=function(q){return j.polygon(t,k,q)},h}f(bg,"bowTieRect");function Je(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Je,"insertPolygonShape");var Wa=12;async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,n=t.look==="neo"?24:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+Wa),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,p=h,d=-c,m=0,g=[{x:u+Wa,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Wa},{x:u+Wa,y:d}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=U.svg(o),k=X(t,{}),_=pt(g),w=b.path(_,k);y=o.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Je(o,h,c,g);return i&&y.attr("style",i),K(t,y),t.intersect=function(b){return j.polygon(t,g,b)},o}f(kg,"card");function Tg(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),n=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=U.svg(i),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(n),c=o.path(h,l),u=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return j.polygon(t,n,p)},i}f(Tg,"choice");async function Nl(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:n,halfPadding:o}=await at(e,t,rt(t)),l=16,h=(r==null?void 0:r.padding)??o,c=t.look==="neo"?n.width/2+l*2:n.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=U.svg(s),m=X(t,{}),g=d.circle(0,0,c*2,m);u=s.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Nt(p))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return K(t,u),t.calcIntersect=function(d,m){const g=d.width/2;return j.circle(d,g,m)},t.intersect=function(d){return R.info("Circle intersect",t,c,d),j.circle(t,c,d)},s}f(Nl,"circle");function _g(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${o.x},${o.y}
|
|
229
|
+
M ${a.x},${a.y} L ${n.x},${n.y}`}f(_g,"createLine");function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=U.svg(a),l=X(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,s*2,l),c=_g(s),u=o.path(c,l),p=a.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),K(t,p),t.intersect=function(d){return R.info("crossedCircle intersect",t,{radius:s,point:d}),j.circle(t,s,d)},a}f(wg,"crossedCircle");function Ye(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}f(Ye,"generateCirclePoints");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await at(e,t,rt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+o,c=s.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Ye(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Ye(h/2+u*2,-u,u,20,-180,-270),...Ye(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Ye(h/2,c/2,u,20,0,90)],m=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Ye(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Ye(h/2+h*.1,-u,u,20,-180,-270),...Ye(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Ye(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=U.svg(a),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),_=pt(m),w=g.path(_,{...y}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,B),t.intersect=function(T){return j.polygon(t,m,T)},a}f(Sg,"curlyBraceLeft");function je(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:d,y:m})}return n}f(je,"generateCirclePoints");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await at(e,t,rt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?o*2:o),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...je(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...je(h/2+u*2,-u,u,20,-180,-270),...je(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...je(h/2,c/2,u,20,0,90)],m=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...je(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...je(h/2+u*2,-u,u,20,-180,-270),...je(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...je(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=U.svg(a),y=X(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=pt(d).replace("Z",""),k=g.path(b,y),_=pt(m),w=g.path(_,{...y}),B=a.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,B),t.intersect=function(T){return j.polygon(t,m,T)},a}f(vg,"curlyBraceRight");function zt(e,t,r,i=100,a=0,s=180){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const p=o+u*c,d=e+r*Math.cos(p),m=t+r*Math.sin(p);n.push({x:-d,y:-m})}return n}f(zt,"generateCirclePoints");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await at(e,t,rt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?o*2:o),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...zt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...zt(h/2+u*2,-u,u,20,-180,-270),...zt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...zt(h/2,c/2,u,20,0,90)],m=[...zt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...zt(-h/2-u/2,-u,u,20,0,90),...zt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...zt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...zt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...zt(h/2+u*2,-u,u,20,-180,-270),...zt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...zt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...zt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...zt(-h/2-u/2,-u,u,20,0,90),...zt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...zt(-h/2+u+u/2,c/2,u,30,-180,-270)],y=U.svg(a),C=X(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(d).replace("Z",""),_=y.path(k,C),B=pt(m).replace("Z",""),T=y.path(B,C),v=pt(g),q=y.path(v,{...C}),P=a.insert("g",":first-child");return P.insert(()=>q,":first-child").attr("stroke-opacity",0),P.insert(()=>_,":first-child"),P.insert(()=>T,":first-child"),P.attr("class","text"),p&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),K(t,P),t.intersect=function(M){return j.polygon(t,g,M)},a}f(Bg,"curlyBraces");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=20,l=5,{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=Math.max(o,(c.width+s*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,g=U.svg(h),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=u,b=p,k=C-d,_=b/4,w=[{x:k,y:0},{x:_,y:0},{x:0,y:b/2},{x:_,y:b},{x:k,y:b},...pa(-k,-b/2,d,50,270,90)],B=pt(w),T=g.path(B,y),v=h.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-p/2})`),K(t,v),t.intersect=function(q){return j.polygon(t,w,q)},h}f(Lg,"curvedTrapezoid");var XS=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),VS=f((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),ZS=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ec=8,Mc=8;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,n=t.look==="neo"?24:a;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-n,t.width<Mc&&(t.width=Mc);const b=y/2/(2.5+y/50);t.height=(t.height??0)-s-b*3,t.height<Ec&&(t.height=Ec)}const{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=(t.width?t.width:l.width)+n,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+s+p;let m;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=U.svg(o),C=VS(0,0,c,d,u,p),b=ZS(0,p,c,d,u,p),k=X(t,{}),_=y.path(C,k),w=y.path(b,X(t,{fill:"none"}));m=o.insert(()=>w,":first-child"),m=o.insert(()=>_,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const y=XS(0,0,c,d,u,p);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Nt(g)).attr("style",i)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,m),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const C=j.rect(t,y),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,y.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},o}f(Fg,"cylinder");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=o.width+a,c=o.height+s,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:m}=t,g=U.svg(n),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=g.polygon(C.map(_=>[_.x,_.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+u+(t.padding??0)/2-(o.y-(o.top??0))})`),K(t,k),t.intersect=function(_){return j.rect(t,_)},n}f(Ag,"dividedRectangle");async function Eg(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=V(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,n=t.look==="neo"?16:s,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),c=h-a;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=U.svg(o),y=X(t,{roughness:.2,strokeWidth:2.5}),C=X(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,y),k=g.circle(0,0,c*2,C);u=o.insert("g",":first-child"),u.attr("class",Nt(t.cssClasses)).attr("style",Nt(p)),(d=u.node())==null||d.appendChild(b),(m=u.node())==null||m.appendChild(k)}else{u=o.insert("g",":first-child");const g=u.insert("circle",":first-child"),y=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return K(t,u),t.intersect=function(g){return R.info("DoubleCircle intersect",t,h,g),j.circle(t,h,g)},o}f(Eg,"doublecircle");function Mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=U.svg(s),{nodeBorder:h}=r,c=X(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,n*2,c),p=s.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),K(t,p),t.intersect=function(d){return R.info("filledCircle intersect",t,{radius:n,point:d}),j.circle(t,n,d)},s}f(Mg,"filledCircle");var $c=10,Oc=10;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<$c&&(t.height=$c),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<Oc&&(t.width=Oc));const{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(s??0),c=t!=null&&t.height?t==null?void 0:t.height:h+o.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,m=U.svg(n),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=pt(p),C=m.path(y,g),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,K(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return R.info("Triangle intersect",t,p,k),j.polygon(t,p,k)},n}f($g,"flippedTriangle");function Og(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=V(t);t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=U.svg(n),d=X(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(c,u,l,h,d),g=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),K(t,g);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(C){return j.rect(t,C)},n}f(Og,"forkJoin");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=15,s=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+n*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+o*2,p=u/2,{cssStyles:d}=t,m=U.svg(l),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...pa(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=pt(y),b=m.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(_){return R.info("Pill intersect",t,{radius:p,point:_}),j.polygon(t,y,_)},l}f(Ig,"halfRoundedRectangle");var KS=f((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,n=70,o=32,l=t.look==="neo"?n:s,h=t.look==="neo"?o:s;if(t.width||t.height){const k=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await at(e,t,rt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/a,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=U.svg(c),k=X(t,{}),_=KS(0,0,m,p,d),w=b.path(_,k);y=c.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&y.attr("style",C)}else y=Je(c,m,p,g);return i&&y.attr("style",i),t.width=m,t.height=p,K(t,y),t.intersect=function(b){return j.polygon(t,g,b)},c}f(Dg,"hexagon");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await at(e,t,rt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=U.svg(a),h=X(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:s,y:0},{x:0,y:n},{x:s,y:n}],u=pt(c),p=l.path(u,h),d=a.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-n/2})`),K(t,d),t.intersect=function(m){return R.info("Pill intersect",t,{points:c}),j.polygon(t,c,m)},a}f(Pg,"hourglass");async function Rg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await at(e,t,"icon-shape default"),p=t.pos==="t",d=o,m=o,{nodeBorder:g}=r,{stylesMap:y}=_i(t),C=-m/2,b=-d/2,k=t.label?8:0,_=U.svg(h),w=X(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=_.rectangle(C,b,m,d,w),T=Math.max(m,c.width),v=d+c.height+k,q=_.rectangle(-T/2,-v/2,T,v,{...w,fill:"transparent",stroke:"none"}),P=h.insert(()=>B,":first-child"),M=h.insert(()=>q);if(t.icon){const Y=h.append("g");Y.html(`<g>${await wa(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const z=Y.node().getBBox(),D=z.width,E=z.height,F=z.x,I=z.y;Y.attr("transform",`translate(${-D/2-F},${p?c.height/2+k/2-E/2-I:-c.height/2-k/2-E/2-I})`),Y.attr("style",`color: ${y.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),P.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),K(t,M),t.intersect=function(Y){if(R.info("iconSquare intersect",t,Y),!t.label)return j.rect(t,Y);const z=t.x??0,D=t.y??0,E=t.height??0;let F=[];return p?F=[{x:z-c.width/2,y:D-E/2},{x:z+c.width/2,y:D-E/2},{x:z+c.width/2,y:D-E/2+c.height+k},{x:z+m/2,y:D-E/2+c.height+k},{x:z+m/2,y:D+E/2},{x:z-m/2,y:D+E/2},{x:z-m/2,y:D-E/2+c.height+k},{x:z-c.width/2,y:D-E/2+c.height+k}]:F=[{x:z-m/2,y:D-E/2},{x:z+m/2,y:D-E/2},{x:z+m/2,y:D-E/2+d},{x:z+c.width/2,y:D-E/2+d},{x:z+c.width/2/2,y:D+E/2},{x:z-c.width/2,y:D+E/2},{x:z-c.width/2,y:D-E/2+d},{x:z-m/2,y:D-E/2+d}],j.polygon(t,F,Y)},h}f(Rg,"icon");async function Ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,label:u}=await at(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:C}=_i(t),b=U.svg(h),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=C.get("fill");k.stroke=_??y;const w=h.append("g");t.icon&&w.html(`<g>${await wa(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),T=B.width,v=B.height,q=B.x,P=B.y,M=Math.max(T,v)*Math.SQRT2+p*2,Y=b.circle(0,0,M,k),z=Math.max(M,c.width),D=M+c.height+d,E=b.rectangle(-z/2,-D/2,z,D,{...k,fill:"transparent",stroke:"none"}),F=h.insert(()=>Y,":first-child"),I=h.insert(()=>E);return w.attr("transform",`translate(${-T/2-q},${m?c.height/2+d/2-v/2-P:-c.height/2-d/2-v/2-P})`),w.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-D/2:D/2-c.height})`),F.attr("transform",`translate(0,${m?c.height/2+d/2:-c.height/2-d/2})`),K(t,I),t.intersect=function(A){return R.info("iconSquare intersect",t,A),j.rect(t,A)},h}f(Ng,"iconCircle");async function qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await at(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,g=o+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=_i(t),k=-g/2,_=-m/2,w=t.label?8:0,B=U.svg(h),T=X(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=b.get("fill");T.stroke=v??C;const q=B.path(ur(k,_,g,m,5),T),P=Math.max(g,c.width),M=m+c.height+w,Y=B.rectangle(-P/2,-M/2,P,M,{...T,fill:"transparent",stroke:"none"}),z=h.insert(()=>q,":first-child").attr("class","icon-shape2"),D=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await wa(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),I=F.width,A=F.height,W=F.x,H=F.y;E.attr("transform",`translate(${-I/2-W},${d?c.height/2+w/2-A/2-H:-c.height/2-w/2-A/2-H})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-M/2:M/2-c.height})`),z.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,D),t.intersect=function(E){if(R.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const F=t.x??0,I=t.y??0,A=t.height??0;let W=[];return d?W=[{x:F-c.width/2,y:I-A/2},{x:F+c.width/2,y:I-A/2},{x:F+c.width/2,y:I-A/2+c.height+w},{x:F+g/2,y:I-A/2+c.height+w},{x:F+g/2,y:I+A/2},{x:F-g/2,y:I+A/2},{x:F-g/2,y:I-A/2+c.height+w},{x:F-c.width/2,y:I-A/2+c.height+w}]:W=[{x:F-g/2,y:I-A/2},{x:F+g/2,y:I-A/2},{x:F+g/2,y:I-A/2+m},{x:F+c.width/2,y:I-A/2+m},{x:F+c.width/2/2,y:I+A/2},{x:F-c.width/2,y:I+A/2},{x:F-c.width/2,y:I-A/2+m},{x:F-g/2,y:I-A/2+m}],j.polygon(t,W,E)},h}f(qg,"iconRounded");async function zg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=V(t);t.labelStyle=a;const s=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(s,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await at(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,g=o+u*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:b}=_i(t),k=-g/2,_=-m/2,w=t.label?8:0,B=U.svg(h),T=X(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=b.get("fill");T.stroke=v??C;const q=B.path(ur(k,_,g,m,.1),T),P=Math.max(g,c.width),M=m+c.height+w,Y=B.rectangle(-P/2,-M/2,P,M,{...T,fill:"transparent",stroke:"none"}),z=h.insert(()=>q,":first-child"),D=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await wa(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const F=E.node().getBBox(),I=F.width,A=F.height,W=F.x,H=F.y;E.attr("transform",`translate(${-I/2-W},${d?c.height/2+w/2-A/2-H:-c.height/2-w/2-A/2-H})`),E.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-M/2:M/2-c.height})`),z.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),K(t,D),t.intersect=function(E){if(R.info("iconSquare intersect",t,E),!t.label)return j.rect(t,E);const F=t.x??0,I=t.y??0,A=t.height??0;let W=[];return d?W=[{x:F-c.width/2,y:I-A/2},{x:F+c.width/2,y:I-A/2},{x:F+c.width/2,y:I-A/2+c.height+w},{x:F+g/2,y:I-A/2+c.height+w},{x:F+g/2,y:I+A/2},{x:F-g/2,y:I+A/2},{x:F-g/2,y:I-A/2+c.height+w},{x:F-c.width/2,y:I-A/2+c.height+w}]:W=[{x:F-g/2,y:I-A/2},{x:F+g/2,y:I-A/2},{x:F+g/2,y:I-A/2+m},{x:F+c.width/2,y:I-A/2+m},{x:F+c.width/2/2,y:I+A/2},{x:F-c.width/2,y:I+A/2},{x:F-c.width/2,y:I-A/2+m},{x:F-g/2,y:I-A/2+m}],j.polygon(t,W,E)},h}f(zg,"iconSquare");async function Wg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:n}=V(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??a),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:p,label:d}=await at(e,t,"image-shape default"),m=t.pos==="t",g=-h/2,y=-c/2,C=t.label?8:0,b=U.svg(u),k=X(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=b.rectangle(g,y,h,c,k),w=Math.max(h,p.width),B=c+p.height+C,T=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),v=u.insert(()=>_,":first-child"),q=u.insert(()=>T);if(t.img){const P=u.append("image");P.attr("href",t.img),P.attr("width",h),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-h/2},${m?B/2-c:-B/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),K(t,q),t.intersect=function(P){if(R.info("iconSquare intersect",t,P),!t.label)return j.rect(t,P);const M=t.x??0,Y=t.y??0,z=t.height??0;let D=[];return m?D=[{x:M-p.width/2,y:Y-z/2},{x:M+p.width/2,y:Y-z/2},{x:M+p.width/2,y:Y-z/2+p.height+C},{x:M+h/2,y:Y-z/2+p.height+C},{x:M+h/2,y:Y+z/2},{x:M-h/2,y:Y+z/2},{x:M-h/2,y:Y-z/2+p.height+C},{x:M-p.width/2,y:Y-z/2+p.height+C}]:D=[{x:M-h/2,y:Y-z/2},{x:M+h/2,y:Y-z/2},{x:M+h/2,y:Y-z/2+c},{x:M+p.width/2,y:Y-z/2+c},{x:M+p.width/2/2,y:Y+z/2},{x:M-p.width/2,y:Y+z/2},{x:M-p.width/2,y:Y-z/2+c},{x:M-h/2,y:Y-z/2+c}],j.polygon(t,D,P)},u}f(Wg,"imageSquare");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=Math.max(l.width+(n??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(s??0)*2,(t==null?void 0:t.height)??0),u=[{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:d}=t;if(t.look==="handDrawn"){const m=U.svg(o),g=X(t,{}),y=pt(u),C=m.path(y,g);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Je(o,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},o}f(Hg,"inv_trapezoid");async function va(e,t,r){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{shapeSvg:s,bbox:n}=await at(e,t,rt(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=U.svg(s),y=X(t,{}),C=p||d?g.path(ur(h,c,o,l,p||0),y):g.rectangle(h,c,o,l,y);u=s.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Nt(m))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",Nt(p)).attr("ry",Nt(d)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return K(t,u),t.calcIntersect=function(g,y){return j.rect(g,y)},t.intersect=function(g){return j.rect(t,g)},s}f(va,"drawRect");async function Yg(e,t){const{shapeSvg:r,bbox:i,label:a}=await at(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),K(t,s),t.intersect=function(l){return j.rect(t,l)},r}f(Yg,"labelRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=U.svg(o),g=X(t,{}),y=pt(u),C=m.path(y,g);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},o}f(jg,"lean_left");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=U.svg(o),g=X(t,{}),y=pt(u),C=m.path(y,g);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},o}f(Ug,"lean_right");function Gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:n,y:0},{x:0,y:o+l/2},{x:n-2*l,y:o+l/2},{x:0,y:2*o},{x:n,y:o-l/2},{x:2*l,y:o-l/2}],c=U.svg(a),u=X(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=pt(h),d=c.path(p,u),m=a.insert(()=>d,":first-child");return m.attr("class","outer-path"),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),K(t,m),t.intersect=function(g){return R.info("lightningBolt intersect",t,g),j.polygon(t,h,g)},a}f(Gg,"lightningBolt");var QS=f((e,t,r,i,a,s,n)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+n}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),JS=f((e,t,r,i,a,s,n)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+n}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),tv=f((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ic=10,Dc=10;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<Dc&&(t.width=Dc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<Ic&&(t.height=Ic)}const{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+n*2,m=d*.1;let g;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=U.svg(o),b=JS(0,0,c,d,u,p,m),k=tv(0,p,c,d,u,p),_=X(t,{}),w=C.path(b,_),B=C.path(k,_);o.insert(()=>B,":first-child").attr("class","line"),g=o.insert(()=>w,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{const C=QS(0,0,c,d,u,p,m);g=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Nt(y)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),K(t,g),h.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=j.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let _=p*p*(1-k*k/(u*u));_>0&&(_=Math.sqrt(_)),_=p-_,C.y-(t.y??0)>0&&(_=-_),b.y+=_}return b},o}f(Xg,"linedCylinder");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;if(t.width||t.height){const _=t.width;t.width=(_??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,g=U.svg(o),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...hr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(C.map(_=>[_.x,_.y]),y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),K(t,k),t.intersect=function(_){return j.polygon(t,C,_)},o}f(Vg,"linedWaveEdgedRect");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:l,bbox:h,label:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*o,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,d=u-2*o,m=p-2*o,g=-d/2,y=-m/2,{cssStyles:C}=t,b=U.svg(l),k=X(t,{}),_=[{x:g-o,y:y+o},{x:g-o,y:y+m+o},{x:g+d-o,y:y+m+o},{x:g+d-o,y:y+m},{x:g+d,y:y+m},{x:g+d,y:y+m-o},{x:g+d+o,y:y+m-o},{x:g+d+o,y:y-o},{x:g+o,y:y-o},{x:g+o,y},{x:g,y},{x:g,y:y+o}],w=[{x:g,y:y+o},{x:g+d-o,y:y+o},{x:g+d-o,y:y+m},{x:g+d,y:y+m},{x:g+d,y},{x:g,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(_);let T=b.path(B,k);const v=pt(w);let q=b.path(v,k);t.look!=="handDrawn"&&(T=An(T),q=An(q));const P=l.insert("g",":first-child");return P.insert(()=>T),P.insert(()=>q),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),K(t,P),t.intersect=function(M){return j.polygon(t,_,M)},l}f(Zg,"multiRect");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await at(e,t,rt(t)),o=t.padding??0,l=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,m=p+(c?d/2:-d/2),g=-u/2,y=-m/2,C=10,{cssStyles:b}=t,k=hr(g-C,y+m+C,g+u-C,y+m+C,d,.8),_=k==null?void 0:k[k.length-1],w=[{x:g-C,y:y+C},{x:g-C,y:y+m+C},...k,{x:g+u-C,y:_.y-C},{x:g+u,y:_.y-C},{x:g+u,y:_.y-2*C},{x:g+u+C,y:_.y-2*C},{x:g+u+C,y:y-C},{x:g+C,y:y-C},{x:g+C,y},{x:g,y},{x:g,y:y+C}],B=[{x:g,y:y+C},{x:g+u-C,y:y+C},{x:g+u-C,y:_.y-C},{x:g+u,y:_.y-C},{x:g+u,y},{x:g,y}],T=U.svg(a),v=X(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const q=pt(w),P=T.path(q,v),M=pt(B),Y=T.path(M,v),z=a.insert(()=>P,":first-child");return z.insert(()=>Y),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-d/2})`),n.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-d/2-(s.y-(s.top??0))})`),K(t,z),t.intersect=function(D){return j.polygon(t,w,D)},a}f(Kg,"multiWaveEdgedRectangle");async function Qg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i,t.useHtmlLabels||te(St())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,m=U.svg(n),g=X(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=m.rectangle(u,p,h,c,g),C=n.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),K(t,C),t.intersect=function(b){return j.rect(t,b)},n}f(Qg,"note");var ev=f((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 Jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,rt(t)),n=s.width+(t.padding??0),o=s.height+(t.padding??0),l=n+o,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=U.svg(a),m=X(t,{}),g=ev(0,0,l),y=d.path(g,m);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Je(a,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),K(t,u),t.calcIntersect=function(d,m){const g=d.width,y=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=j.polygon(d,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}f(Jg,"question");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,n=t.look==="neo"?12:a??0,{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),p=-c/2,d=-u/2,m=d/2,g=[{x:p+m,y:d},{x:p,y:0},{x:p+m,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:y}=t,C=U.svg(o),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(g),_=C.path(k,b),w=o.insert(()=>_,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),K(t,w),t.intersect=function(B){return j.polygon(t,g,B)},o}f(tm,"rect_left_inv_arrow");async function em(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await rr(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(te(gt())){const v=c.children[0],q=ct(c);u=v.getBoundingClientRect(),q.attr("width",u.width),q.attr("height",u.height)}R.info("Text 2",l);const p=l||[],d=c.getBBox(),m=await rr(o,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=m.children[0],y=ct(m);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const C=(t.padding||0)/2;ct(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),ct(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),_=-u.width/2-C,w=-u.height/2-C;let B,T;if(t.look==="handDrawn"){const v=U.svg(s),q=X(t,{}),P=v.path(ur(_,w,b,k,t.rx||0),q),M=v.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,q);T=s.insert(()=>(R.debug("Rough node insert CXC",P),M),":first-child"),B=s.insert(()=>(R.debug("Rough node insert CXC",P),P),":first-child")}else B=n.insert("rect",":first-child"),T=n.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return K(t,B),t.intersect=function(v){return j.rect(t,v)},s}f(em,"rectWithTitle");async function rm(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,a={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return va(e,t,a)}f(rm,"roundedRect");var fr=8;async function im(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??o.width)+a*2+(t.look==="neo"?fr:fr*2),c=((t==null?void 0:t.height)??o.height)+s*2,u=h-fr,p=c,d=fr-h/2,m=-c/2,{cssStyles:g}=t,y=U.svg(n),C=X(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-fr,y:m+p},{x:d-fr,y:m},{x:d,y:m},{x:d,y:m+p}],k=y.polygon(b.map(w=>[w.x,w.y]),C),_=n.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path").attr("style",Nt(g)),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${fr/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),K(t,_),t.intersect=function(w){return j.rect(t,w)},n}f(im,"shadedProcess");async function am(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,p=c,d=u/1.5,m=-p/2,g=-d/2,{cssStyles:y}=t,C=U.svg(o),b=X(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y:g},{x:m,y:g+d},{x:m+p,y:g+d},{x:m+p,y:g-d/2}],_=pt(k),w=C.path(_,b),B=o.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),K(t,B),t.intersect=function(T){return j.polygon(t,k,T)},o}f(am,"slopedRect");async function sm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return va(e,t,s)}f(sm,"squareRect");async function om(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,n=t.look==="neo"?12:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?s*2:s),u=h/2,{cssStyles:p}=t,d=U.svg(o),m=X(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...pa(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...pa(c/2-u,0,u,50,270,450)],y=pt(g),C=d.path(y,m),b=o.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),K(t,b),t.intersect=function(k){return j.polygon(t,g,k)},o}f(om,"stadium");async function nm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return va(e,t,r)}f(nm,"state");function lm(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:n,stateBorder:o,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=U.svg(c),p=X(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:n,strokeWidth:2}),m=o??l,g=(t.width??0)*5/14,y=u.circle(0,0,g,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>y),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const _=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=_?`${_}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return K(t,C),t.intersect=function(_){return j.circle(t,(t.width??0)/2,_)},c}f(lm,"stateEnd");function hm(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:a}=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 s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const c=U.svg(s).circle(0,0,t.width,cw(i));n=s.insert(()=>c),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=s.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const h=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${c})`)}return K(t,n),t.intersect=function(h){return j.circle(t,(t.width??7)/2,h)},s}f(hm,"stateStart");var Hr=8;async function cm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:a,n=t.look==="neo"?12:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+2*Hr+s,c=((t==null?void 0:t.height)??l.height)+n,u=h-2*Hr,p=c,d=-h/2,m=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const y=U.svg(o),C=X(t,{}),b=y.rectangle(d,m,u+16,p,C),k=y.line(d+Hr,m,d+Hr,m+p,C),_=y.line(d+Hr+u,m,d+Hr+u,m+p,C);o.insert(()=>k,":first-child"),o.insert(()=>_,":first-child");const w=o.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",Nt(B)),K(t,w)}else{const y=Je(o,u,p,g);i&&y.attr("style",i),K(t,y)}return t.intersect=function(y){return j.polygon(t,g,y)},o}f(cm,"subroutine");var Po=.2;async function um(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Po*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=Po*h,u=Po*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+c-c,m=h,g=-d/2,y=-m/2,{cssStyles:C}=t,b=U.svg(o),k=X(t,{}),_=[{x:g-c/2,y},{x:g+d+c/2,y},{x:g+d+c/2,y:y+m},{x:g-c/2,y:y+m}],w=[{x:g+d-c/2,y:y+m},{x:g+d+c/2,y:y+m},{x:g+d+c/2,y:y+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=pt(_),T=b.path(B,k),v=pt(w),q=b.path(v,{...k,fillStyle:"solid"}),P=o.insert(()=>q,":first-child");return P.insert(()=>T,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),K(t,P),t.intersect=function(M){return j.polygon(t,_,M)},o}f(um,"taggedRect");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await at(e,t,rt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*o,u=.2*l,p=l+h,{cssStyles:d}=t,m=U.svg(a),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:p/2},...hr(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,h,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],C=-o/2+o/2*.1,b=-p/2-u*.4,k=[{x:C+o-c,y:(b+l)*1.3},{x:C+o,y:b+l-u},{x:C+o,y:(b+l)*.9},...hr(C+o,(b+l)*1.25,C+o-c,(b+l)*1.3,-l*.02,.5)],_=pt(y),w=m.path(_,g),B=pt(k),T=m.path(B,{...g,fillStyle:"solid"}),v=a.insert(()=>T,":first-child");return v.insert(()=>w,":first-child"),v.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),K(t,v),t.intersect=function(q){return j.polygon(t,y,q)},a}f(dm,"taggedWaveEdgedRectangle");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await at(e,t,rt(t)),n=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,h=-o/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",n).attr("height",o),K(t,c),t.intersect=function(u){return j.rect(t,u)},a}f(pm,"text");var rv=f((e,t,r,i,a,s)=>`M${e},${t}
|
|
230
|
+
a${a},${s} 0,0,1 0,${-i}
|
|
231
|
+
l${r},0
|
|
232
|
+
a${a},${s} 0,0,1 0,${i}
|
|
233
|
+
M${r},${-i}
|
|
234
|
+
a${a},${s} 0,0,0 0,${i}
|
|
235
|
+
l${-r},0`,"createCylinderPathD"),iv=f((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),av=f((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Pc=5,Rc=10;async function fm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-s,t.height<Pc&&(t.height=Pc);const C=g/2/(2.5+g/50);t.width=(t.width??0)-s-C*3,t.width<Rc&&(t.width=Rc)}const{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=(t.height?t.height:o.height)+s,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:o.width)+u+s,{cssStyles:d}=t;let m;if(t.look==="handDrawn"){const g=U.svg(n),y=iv(0,0,p,h,u,c),C=av(0,0,p,h,u,c),b=g.path(y,X(t,{})),k=g.path(C,X(t,{fill:"none"}));m=n.insert(()=>k,":first-child"),m=n.insert(()=>b,":first-child"),m.attr("class","basic label-container"),d&&m.attr("style",d)}else{const g=rv(0,0,p,h,u,c);m=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(d)).attr("style",i),m.attr("class","basic label-container outer-path"),d&&m.selectAll("path").attr("style",d),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",u),m.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(o.width/2)-u-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),K(t,m),t.intersect=function(g){const y=j.rect(t,g),C=y.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}f(fm,"tiltedCylinder");async function gm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=U.svg(o),g=X(t,{}),y=pt(u),C=m.path(y,g);p=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Je(o,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,K(t,p),t.intersect=function(m){return j.polygon(t,u,m)},o}f(gm,"trapezoid");async function mm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:d}=t,m=U.svg(h),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=pt(y),b=m.path(C,g),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},h}f(mm,"trapezoidalPentagon");var Nc=10,qc=10;async function ym(e,t){var _;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<qc&&(t.width=qc),t.height=(t==null?void 0:t.height)??0,t.height<Nc&&(t.height=Nc));const{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=Ze((_=gt().flowchart)==null?void 0:_.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s,u=t!=null&&t.height?t==null?void 0:t.height:c+o.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:m}=t,g=U.svg(n),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(d),b=g.path(C,y),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,K(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return R.info("Triangle intersect",t,d,w),j.polygon(t,d,w)},n}f(ym,"triangle");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await at(e,t,rt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,d=t.look==="neo"?p/4:p/8,m=p+(o?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=U.svg(l),_=X(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const w=[{x:-u/2-b,y:m/2},...hr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=pt(w),T=k.path(B,_),v=l.insert(()=>T,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),K(t,v),t.intersect=function(q){return j.polygon(t,w,q)},l}f(Cm,"waveEdgedRectangle");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?20:a;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const _=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-_*(20/9)),t.width=t.width-s*2}const{shapeSvg:o,bbox:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n,u=c/8,p=c+u*2,{cssStyles:d}=t,m=U.svg(o),g=X(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:p/2},...hr(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...hr(h/2,-p/2,-h/2,-p/2,u,-1)],C=pt(y),b=m.path(C,g),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),K(t,k),t.intersect=function(_){return j.polygon(t,y,_)},o}f(xm,"waveRectangle");var vt=10;async function bm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-vt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-vt,10));const{shapeSvg:n,bbox:o,label:l}=await at(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a*2+vt,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+s*2+vt,u=h-vt,p=c-vt,d=-u/2,m=-p/2,{cssStyles:g}=t,y=U.svg(n),C=X(t,{}),b=[{x:d-vt,y:m-vt},{x:d-vt,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-vt}],k=`M${d-vt},${m-vt} L${d+u},${m-vt} L${d+u},${m+p} L${d-vt},${m+p} L${d-vt},${m-vt}
|
|
236
|
+
M${d-vt},${m} L${d+u},${m}
|
|
237
|
+
M${d},${m-vt} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const _=y.path(k,C),w=n.insert(()=>_,":first-child");return w.attr("transform",`translate(${vt/2}, ${vt/2})`),w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+vt/2-(o.x-(o.left??0))}, ${-(o.height/2)+vt/2-(o.y-(o.top??0))})`),K(t,w),t.intersect=function(B){return j.polygon(t,b,B)},n}f(bm,"windowPane");var zc=new Set(["redux-color","redux-dark-color"]),sv=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ql(e,t){var bt,Ft,$t,ne;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=St(),{rowEven:s,rowOdd:n,nodeBorder:o,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:Q}=St(),{background:lt}=Q,Ct={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${lt}`]};await ql(e,Ct)}const h=St();t.useHtmlLabels=h.htmlLabels;let c=((bt=h.er)==null?void 0:bt.diagramPadding)??10,u=((Ft=h.er)==null?void 0:Ft.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=V(t);if(r.attributes.length===0&&t.label){const Q={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ve(t.label,h)+Q.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const lt=await va(e,t,Q);if(i!=null&&zc.has(i)){const Ct=r.colorIndex??0;lt.attr("data-color-id",`color-${Ct%l.length}`)}if(!Ze(h.htmlLabels)){const Ct=lt.select("text"),kt=($t=Ct.node())==null?void 0:$t.getBBox();Ct.attr("transform",`translate(${-kt.width/2}, 0)`)}return lt}h.htmlLabels||(c*=1.25,u*=1.25);let g=rt(t);g||(g="node default");const y=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await Gr(y,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],_=[];let w=0,B=0,T=0,v=0,q=!0,P=!0;for(const Q of r.attributes){const lt=await Gr(y,Q.type,h,0,b,["attribute-type"],d);w=Math.max(w,lt.width+c);const Ct=await Gr(y,Q.name,h,0,b,["attribute-name"],d);B=Math.max(B,Ct.width+c);const kt=await Gr(y,Q.keys.join(),h,0,b,["attribute-keys"],d);T=Math.max(T,kt.width+c);const le=await Gr(y,Q.comment,h,0,b,["attribute-comment"],d);v=Math.max(v,le.width+c);const Ht=Math.max(lt.height,Ct.height,kt.height,le.height)+u;_.push({yOffset:b,rowHeight:Ht}),b+=Ht}let M=4;T<=c&&(q=!1,T=0,M--),v<=c&&(P=!1,v=0,M--);const Y=y.node().getBBox();if(C.width+c*2-(w+B+T+v)>0){const Q=C.width+c*2-(w+B+T+v);w+=Q/M,B+=Q/M,T>0&&(T+=Q/M),v>0&&(v+=Q/M)}const z=w+B+T+v,D=U.svg(y),E=X(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let F=0;_.length>0&&(F=_.reduce((Q,lt)=>Q+((lt==null?void 0:lt.rowHeight)??0),0));const I=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,z),A=Math.max((F??0)+C.height,(t==null?void 0:t.height)||0),W=-I/2,H=-A/2;if(y.selectAll("g:not(:first-child)").each((Q,lt,Ct)=>{const kt=ct(Ct[lt]),le=kt.attr("transform");let Ht=0,Dr=0;if(le){const Le=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);Le&&(Ht=parseFloat(Le[1]),Dr=parseFloat(Le[2]),kt.attr("class").includes("attribute-name")?Ht+=w:kt.attr("class").includes("attribute-keys")?Ht+=w+B:kt.attr("class").includes("attribute-comment")&&(Ht+=w+B+T))}kt.attr("transform",`translate(${W+c/2+Ht}, ${Dr+H+C.height+u/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(H+u/2)+")"),i!=null&&zc.has(i)){const Q=r.colorIndex??0;y.attr("data-color-id",`color-${Q%l.length}`)}const Z=D.rectangle(W,H,I,A,E),ut=y.insert(()=>Z,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[Q,lt]of _.entries()){const kt=(Q+1)%2===0&<.yOffset!==0,le=D.rectangle(W,C.height+H+(lt==null?void 0:lt.yOffset),I,lt==null?void 0:lt.rowHeight,{...E,fill:kt?s:n,stroke:o});y.insert(()=>le,"g.label").attr("style",p.join("")).attr("class",`row-rect-${kt?"even":"odd"}`)}const it=1e-4;let dt=Xr(W,C.height+H,I+W,C.height+H,it),tt=D.polygon(dt.map(Q=>[Q.x,Q.y]),E);if(y.insert(()=>tt).attr("class","divider"),dt=Xr(w+W,C.height+H,w+W,A+H,it),tt=D.polygon(dt.map(Q=>[Q.x,Q.y]),E),y.insert(()=>tt).attr("class","divider"),q){const Q=w+B+W;dt=Xr(Q,C.height+H,Q,A+H,it),tt=D.polygon(dt.map(lt=>[lt.x,lt.y]),E),y.insert(()=>tt).attr("class","divider")}if(P){const Q=w+B+T+W;dt=Xr(Q,C.height+H,Q,A+H,it),tt=D.polygon(dt.map(lt=>[lt.x,lt.y]),E),y.insert(()=>tt).attr("class","divider")}for(const Q of k){const lt=C.height+H+Q;dt=Xr(W,lt,I+W,lt,it),tt=D.polygon(dt.map(Ct=>[Ct.x,Ct.y]),E),y.insert(()=>tt).attr("class","divider")}if(K(t,ut),m&&t.look!=="handDrawn")if(i!=null&&sv.has(i))y.selectAll("path").attr("style",m);else{const Q=m.split(";"),lt=(ne=Q==null?void 0:Q.filter(Ct=>Ct.includes("stroke")))==null?void 0:ne.map(Ct=>`${Ct}`).join("; ");y.selectAll("path").attr("style",lt??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(Q){return j.rect(t,Q)},y}f(ql,"erBox");async function Gr(e,t,r,i=0,a=0,s=[],n=""){const o=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",n);t!==Th(t)&&(t=Th(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Qe(o,t,{width:Ve(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Ze(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=ct(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(Gr,"addText");function Xr(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}f(Xr,"lineToPolygon");async function km(e,t,r,i,a=r.class.padding??12){const s=i?0:3,n=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let o=null,l=null,h=null,c=null,u=0,p=0,d=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Gi(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Gi(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,h=n.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await Gi(h,b,g,[b.parseClassifier()]);g+=k+s}d=h.node().getBBox().height,d<=0&&(d=a/2),c=n.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await Gi(c,b,y,[b.parseClassifier()]);y+=k+s}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+p+a*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+a*4:a*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}f(km,"textHelper");async function Gi(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=St();let n="useHtmlLabels"in t?t.useHtmlLabels:Ze(s.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),ra(o)&&(n=!0);const l=await Qe(a,Vn(Fr(o)),{width:Ve(o,s)+50,classes:"markdown-node-label",useHtmlLabels:n},s);let h,c=1;if(n){const u=l.children[0],p=ct(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const m=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(y=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",m){const k=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";g.style.minWidth=w,g.style.maxWidth=w}else g.style.width="100%";y(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(Gi,"addText");async function Tm(e,t){var D,E;const r=gt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,n=s,o=t.useHtmlLabels??Ze(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await km(e,t,r,o,n),{labelStyles:u,nodeStyles:p}=V(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((D=l.styles)==null?void 0:D.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),g=U.svg(h),y=X(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=n:l.members.length>0&&l.methods.length===0&&(b+=n*2);const _=-C/2,w=-b/2;let B=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(B=s*2);const T=g.rectangle(_-s,w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,b+2*s+B,y),v=h.insert(()=>T,":first-child");v.attr("class","basic label-container outer-path");const q=v.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,M=h.select(".label-group").node().getBBox().height-(m?s/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(m?s/2:0)||0,z=(P+M+w+s-(w-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((F,I,A)=>{var dt,tt;const W=ct(A[I]),H=W.attr("transform");let Z=0;if(H){const Ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(H);Ft&&(Z=parseFloat(Ft[2]))}let ut=Z+w+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(W.attr("class").includes("methods-group")){const bt=Math.max(Y,n/2);k?ut=Math.max(z,P+M+bt+w+n*2+s)+n*2:ut=P+M+bt+w+n*4+s}l.members.length===0&&l.methods.length===0&&((dt=r.class)!=null&&dt.hideEmptyMembersBox)&&(l.annotations.length>0?ut=Z-n:ut=Z),o||(ut-=4);let it=_;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(it=-((tt=W.node())==null?void 0:tt.getBBox().width)/2||0,h.selectAll("text").each(function(bt,Ft,$t){window.getComputedStyle($t[Ft]).textAnchor==="middle"&&(it=0)})),W.attr("transform",`translate(${it}, ${ut})`)}),l.members.length>0||l.methods.length>0||m){const F=P+M+w+s,I=g.line(q.x,F,q.x+q.width,F+.001,y);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const F=P+M+Y+w+n*2+s,I=g.line(q.x,k?Math.max(z,F):F,q.x+q.width,(k?Math.max(z,F):F)+.001,y);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),v.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!o){const F=RegExp(/color\s*:\s*([^;]*)/),I=F.exec(d);if(I){const A=I[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(u){const A=F.exec(u);if(A){const W=A[0].replace("color","fill");h.selectAll("tspan").attr("style",W)}}}return K(t,v),t.intersect=function(F){return j.rect(t,F)},h}f(Tm,"classBox");async function _m(e,t){var q,P;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const a=t,s=t,n=20,o=20,l="verifyMethod"in t,h=rt(t),{themeVariables:c}=gt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await Me(d,`<<${a.type}>>`,0,t.labelStyle):m=await Me(d,"<<Element>>",0,t.labelStyle);let g=m;const y=await Me(d,a.name,g,t.labelStyle+"; font-weight: bold;");if(g+=y+o,l){const M=await Me(d,`${a.requirementId?`ID: ${a.requirementId}`:""}`,g,t.labelStyle);g+=M;const Y=await Me(d,`${a.text?`Text: ${a.text}`:""}`,g,t.labelStyle);g+=Y;const z=await Me(d,`${a.risk?`Risk: ${a.risk}`:""}`,g,t.labelStyle);g+=z,await Me(d,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,g,t.labelStyle)}else{const M=await Me(d,`${s.type?`Type: ${s.type}`:""}`,g,t.labelStyle);g+=M,await Me(d,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,g,t.labelStyle)}const C=(((q=d.node())==null?void 0:q.getBBox().width)??200)+n,b=(((P=d.node())==null?void 0:P.getBBox().height)??200)+n,k=-C/2,_=-b/2,w=U.svg(d),B=X(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const T=w.rectangle(k,_,C,b,B),v=d.insert(()=>T,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const M=t.colorIndex??0;d.attr("data-color-id",`color-${M%u.length}`)}if(d.selectAll(".label").each((M,Y,z)=>{const D=ct(z[Y]),E=D.attr("transform");let F=0,I=0;if(E){const Z=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);Z&&(F=parseFloat(Z[1]),I=parseFloat(Z[2]))}const A=I-b/2;let W=k+n/2;(Y===0||Y===1)&&(W=F),D.attr("transform",`translate(${W}, ${A+n})`)}),g>m+y+o){const M=_+m+y+o;let Y;if(t.look==="neo"){const E=[[k,M],[k+C,M],[k+C,M+.001],[k,M+.001]];Y=w.polygon(E,B)}else Y=w.line(k,M,k+C,M,B);d.insert(()=>Y).attr("class","divider")}return K(t,v),t.intersect=function(M){return j.rect(t,M)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(_m,"requirementBox");async function Me(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=gt(),n=s.htmlLabels??!0,o=await Qe(a,Vn(Fr(t)),{width:Ve(t,s)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},s);let l;if(n){const h=o.children[0],c=ct(o);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=o.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=o.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(Me,"addText");var ov=f(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 wm(e,t,{config:r}){var Y,z;const{labelStyles:i,nodeStyles:a}=V(t);t.labelStyle=i||"";const s=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await at(e,t,rt(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(u=(z=r==null?void 0:r.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",t.ticket),p=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,g;p?{label:m,bbox:g}=await Do(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:g}=await Do(o,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:C}=await Do(o,"assigned"in t&&t.assigned||"",d);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,_=Math.max(g.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+_,B=-k/2,T=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-_-l.height/2)+")"),m.attr("transform","translate("+(c-k/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(c+k/2-C.width-2*s)+", "+(-_+l.height/2)+")");let v;const{rx:q,ry:P}=t,{cssStyles:M}=t;if(t.look==="handDrawn"){const D=U.svg(o),E=X(t,{}),F=q||P?D.path(ur(B,T,k,w,q||0),E):D.rectangle(B,T,k,w,E);v=o.insert(()=>F,":first-child"),v.attr("class","basic label-container").attr("style",M||null)}else{v=o.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",a).attr("rx",q??5).attr("ry",P??5).attr("x",B).attr("y",T).attr("width",k).attr("height",w);const D="priority"in t&&t.priority;if(D){const E=o.append("line"),F=B+2,I=T+Math.floor((q??0)/2),A=T+w-Math.floor((q??0)/2);E.attr("x1",F).attr("y1",I).attr("x2",F).attr("y2",A).attr("stroke-width","4").attr("stroke",ov(D))}}return K(t,v),t.height=w,t.intersect=function(D){return j.rect(t,D)},o}f(wm,"kanbanItem");async function Sm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await at(e,t,rt(t)),l=s.width+10*n,h=s.height+8*n,c=.15*l,{cssStyles:u}=t,p=s.width+20,d=s.height+20,m=Math.max(l,p),g=Math.max(h,d);o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
|
|
238
|
+
a${c},${c} 1 0,0 ${m*.25},${-1*g*.1}
|
|
239
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
240
|
+
a${c},${c} 1 0,0 ${m*.25},0
|
|
241
|
+
a${c},${c} 1 0,0 ${m*.25},${g*.1}
|
|
242
|
+
|
|
243
|
+
a${c},${c} 1 0,0 ${m*.15},${g*.33}
|
|
244
|
+
a${c*.8},${c*.8} 1 0,0 0,${g*.34}
|
|
245
|
+
a${c},${c} 1 0,0 ${-1*m*.15},${g*.33}
|
|
246
|
+
|
|
247
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${g*.15}
|
|
248
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
249
|
+
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
250
|
+
a${c},${c} 1 0,0 ${-1*m*.25},${-1*g*.15}
|
|
251
|
+
|
|
252
|
+
a${c},${c} 1 0,0 ${-1*m*.1},${-1*g*.33}
|
|
253
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34}
|
|
254
|
+
a${c},${c} 1 0,0 ${m*.1},${-1*g*.33}
|
|
255
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=U.svg(a),k=X(t,{}),_=b.path(C,k);y=a.insert(()=>_,":first-child"),y.attr("class","basic label-container").attr("style",Nt(u))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return y.attr("transform",`translate(${-m/2}, ${-g/2})`),K(t,y),t.calcIntersect=function(b,k){return j.rect(b,k)},t.intersect=function(b){return R.info("Bang intersect",t,b),j.rect(t,b)},a}f(Sm,"bang");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await at(e,t,rt(t)),l=s.width+2*n,h=s.height+2*n,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let g;const y=`M0 0
|
|
256
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
257
|
+
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
258
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
259
|
+
|
|
260
|
+
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
261
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
|
|
262
|
+
|
|
263
|
+
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
264
|
+
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
265
|
+
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
266
|
+
|
|
267
|
+
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
268
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
|
|
269
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=U.svg(a),b=X(t,{}),k=C.path(y,b);g=a.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",Nt(m))}else g=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),K(t,g),t.calcIntersect=function(C,b){return j.rect(C,b)},t.intersect=function(C){return R.info("Cloud intersect",t,C),j.rect(t,C)},a}f(vm,"cloud");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await at(e,t,rt(t)),l=s.width+8*n,h=s.height+2*n,c=5,u=t.look==="neo"?`
|
|
270
|
+
M${-l/2} ${h/2-c}
|
|
271
|
+
v${-h+2*c}
|
|
272
|
+
q0,-${c} ${c},-${c}
|
|
273
|
+
h${l-2*c}
|
|
274
|
+
q${c},0 ${c},${c}
|
|
275
|
+
v${h-c}
|
|
276
|
+
H${-l/2}
|
|
277
|
+
Z
|
|
278
|
+
`:`
|
|
279
|
+
M${-l/2} ${h/2-c}
|
|
280
|
+
v${-h+2*c}
|
|
281
|
+
q0,-${c} ${c},-${c}
|
|
282
|
+
h${l-2*c}
|
|
283
|
+
q${c},0 ${c},${c}
|
|
284
|
+
v${h-2*c}
|
|
285
|
+
q0,${c} ${-c},${c}
|
|
286
|
+
h${-(l-2*c)}
|
|
287
|
+
q${-c},0 ${-c},${-c}
|
|
288
|
+
Z
|
|
289
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>o.node()),K(t,p),t.calcIntersect=function(d,m){return j.rect(d,m)},t.intersect=function(d){return j.rect(t,d)},a}f(Bm,"defaultMindmapNode");async function Lm(e,t){const r={padding:t.padding??0};return Nl(e,t,r)}f(Lm,"mindmapCircle");var nv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:sm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:rm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:om},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:cm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Fg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Nl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Sm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:vm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Jg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Dg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Ug},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:jg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:gm},{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:Hg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Eg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:pm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:kg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:im},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:hm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:lm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Og},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Pg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Sg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Bg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Gg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Cm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ig},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Xg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Lg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ag},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ym},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:bm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Mg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:mm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:$g},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:am},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Kg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Zg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:bg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:wg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:dm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:um},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:xm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Vg}],lv=f(()=>{const t=[...Object.entries({state:nm,choice:Tg,note:Qg,rectWithTitle:em,labelRect:Yg,iconSquare:zg,iconCircle:Ng,icon:Rg,iconRounded:qg,imageSquare:Wg,anchor:Cg,kanbanItem:wm,mindmapCircle:Lm,defaultMindmapNode:Bm,classBox:Tm,erBox:ql,requirementBox:_m}),...nv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Fm=lv();function hv(e){return e in Fm}f(hv,"isValidShape");var io=new Map;async function Am(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Fm[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",Nt(t.look)),t.tooltip&&a.attr("title",t.tooltip),io.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Am,"insertNode");var jA=f((e,t)=>{io.set(t.id,e)},"setNodeElem"),UA=f(()=>{io.clear()},"clear"),GA=f(e=>{const t=io.get(e.id);R.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"),cv=f((e,t,r,i,a,s=!1,n)=>{t.arrowTypeStart&&Wc(e,"start",t.arrowTypeStart,r,i,a,s,n),t.arrowTypeEnd&&Wc(e,"end",t.arrowTypeEnd,r,i,a,s,n)},"addEdgeMarkers"),uv={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},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}},dv=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Wc=f((e,t,r,i,a,s,n=!1,o)=>{var m;const l=uv[r],h=l&&dv.includes(l.type);if(!l){R.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${a}_${s}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const g=o.replace(/[^\dA-Za-z]/g,"_"),y=`${d}_${g}`;if(!document.getElementById(y)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(_=>{_.setAttribute("stroke",o),l.fill&&_.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),pv=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=gt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Is=new Map,Wt=new Map,XA=f(()=>{Is.clear(),Wt.clear()},"clear"),Ni=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),fv=f(async(e,t)=>{const r=gt();let i=te(r);const{labelStyles:a}=V(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await Qe(e,t.label,{style:Ni(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),R.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],m=ct(h);c=d.getBoundingClientRect(),u=c,m.attr("width",c.width),m.attr("height",c.height)}else{const d=ct(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}n.attr("transform",$i(u,i)),Is.set(t.id,s),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.startLabelLeft,Ni(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startLeft=d,Xi(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.startLabelRight,Ni(t.labelStyle)||"",!1,!1);p=g,m.node().appendChild(g);let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).startRight=d,Xi(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.endLabelLeft,Ni(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),d.node().appendChild(g),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endLeft=d,Xi(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),g=await rr(m,t.endLabelRight,Ni(t.labelStyle)||"",!1,!1);p=g;let y=g.getBBox();if(i){const C=g.children[0],b=ct(g);y=C.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}m.attr("transform",$i(y,i)),d.node().appendChild(g),Wt.get(t.id)||Wt.set(t.id,{}),Wt.get(t.id).endRight=d,Xi(p,t.endLabelRight)}return h},"insertEdgeLabel");function Xi(e,t){te(gt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Xi,"setTerminalWidth");var gv=f((e,t)=>{R.debug("Moving label abc88 ",e.id,e.label,Is.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=gt(),{subGraphTitleTotalMargin:a}=vl(i);if(e.label){const s=Is.get(e.id);let n=e.x,o=e.y;if(r){const l=Te.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",n,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(n=l.x,o=l.y)}s.attr("transform",`translate(${n}, ${o+a/2})`)}if(e.startLabelLeft){const s=Wt.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const s=Wt.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const s=Wt.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const s=Wt.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=Te.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),mv=f((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return a>=n||s>=o},"outsideNode"),yv=f((e,t,r)=>{R.debug(`intersection calc abc89:
|
|
290
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
291
|
+
insidePoint : ${JSON.stringify(r)}
|
|
292
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-s:n+s;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;o=c*u/h;const p={x:r.x<t.x?r.x+o:r.x-c+o,y:r.y<t.y?r.y+h-u:r.y-h+u};return o===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),R.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${o}`,p),p}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=h*o/c,p=r.x<t.x?r.x+c-o:r.x-c+o,d=r.y<t.y?r.y+u:r.y-u;return R.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${o}`,{_x:p,_y:d}),o===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),Hc=f((e,t)=>{R.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(R.info("abc88 checking point",s,t),!mv(t,s)&&!a){const n=yv(t,i,s);R.debug("abc88 inside",s,i,n),R.debug("abc88 intersection",n,t);let o=!1;r.forEach(l=>{o=o||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?R.warn("abc88 no intersect",n,r):r.push(n),a=!0}else R.warn("abc88 outside",s,i),i=s,a||r.push(s)}),R.debug("returning points",r),r},"cutPathAtIntersect");function Em(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],n=e[i+1];(a.x===s.x&&s.y===n.y&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===n.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-n.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(Em,"extractCornerPoints");var Yc=f(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),n=r/s;return{x:t.x-n*i,y:t.y-n*a}},"findAdjacentPoint"),Cv=f(function(e){const{cornerPointPositions:t}=Em(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],n=e[i],o=Yc(a,n,5),l=Yc(s,n,5),h=l.x-o.x,c=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let p={x:n.x,y:n.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){R.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const d=5;n.x===o.x?p={x:h<0?o.x-d+u:o.x+d-u,y:c<0?o.y-u:o.y+u}:p={x:h<0?o.x-u:o.x+u,y:c<0?o.y-d+u:o.y+d-u}}else R.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),xv=f((e,t,r)=>{const i=e-t-r,a=2,s=2,n=a+s,o=Math.floor(i/n),l=Array(o).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),bv=f(function(e,t,r,i,a,s,n,o=!1){var I;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=gt();let h=t.points,c=!1;const u=a;var p=s;const d=[];for(const A in t.cssCompiledStyles)Af(A)||d.push(t.cssCompiledStyles[A]);R.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!o&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),R.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(R.info("to cluster abc88",r.get(t.toCluster)),h=Hc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(R.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Hc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(A=>!Number.isNaN(A.y));const y=pv(t.curve);y!=="rounded"&&(g=Cv(g));let C=Qi;switch(y){case"linear":C=Qi;break;case"basis":C=rn;break;case"cardinal":C=ld;break;case"bumpX":C=id;break;case"bumpY":C=ad;break;case"catmullRom":C=cd;break;case"monotoneX":C=md;break;case"monotoneY":C=yd;break;case"natural":C=xd;break;case"step":C=bd;break;case"stepAfter":C=Td;break;case"stepBefore":C=kd;break;case"rounded":C=Qi;break;default:C=rn}const{x:b,y:k}=d2(t),_=V1().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let B,T=y==="rounded"?Mm($m(g,t),5):_(g);const v=Array.isArray(t.style)?t.style:[t.style];let q=v.find(A=>A==null?void 0:A.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let M=!1;if(t.look==="handDrawn"){const A=U.svg(e);Object.assign([],g);const W=A.path(T,{roughness:.3,seed:l});w+=" transition",B=ct(W).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",v?v.reduce((Z,ut)=>Z+";"+ut,""):"");let H=B.attr("d");B.attr("d",H),e.node().appendChild(B.node())}else{const A=d.join(";"),W=v?v.reduce((tt,bt)=>tt+bt+";",""):"",H=(A?A+";"+W+";":W)+";"+(v?v.reduce((tt,bt)=>tt+";"+bt,""):"");B=e.append("path").attr("d",T).attr("id",`${n}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",H),q=(I=H.match(/stroke:([^;]+)/))==null?void 0:I[1],M=t.animate===!0||!!t.animation||A.includes("animation");const Z=B.node(),ut=typeof Z.getTotalLength=="function"?Z.getTotalLength():0,it=Vh[t.arrowTypeStart]||0,dt=Vh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!M){const bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?xv(ut,it,dt):`0 ${it} ${ut-it-dt} ${dt}`}; stroke-dashoffset: 0;`;B.attr("style",bt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",m),B.attr("data-look",Nt(t.look)),t.showPoints&&g.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(gt().flowchart.arrowMarkerAbsolute||gt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",t.arrowTypeStart),R.info("arrowTypeEnd",t.arrowTypeEnd);const z=!M&&(t==null?void 0:t.look)==="neo";cv(B,t,Y,n,i,z,q);const D=Math.floor(h.length/2),E=h[D];Te.isLabelCoordinateInPath(E,B.attr("d"))||(c=!0);let F={};return c&&(F.updatedPath=h),F.originalPath=t.points,F},"insertEdge");function Mm(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const n=e[s],o=e[s-1],l=e[s+1];if(s===0)r+=`M${n.x},${n.y}`;else if(s===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,c=n.y-o.y,u=l.x-n.x,p=l.y-n.y,d=Math.hypot(h,c),m=Math.hypot(u,p);if(d<a||m<a){r+=`L${n.x},${n.y}`;continue}const g=h/d,y=c/d,C=u/m,b=p/m,k=g*C+y*b,_=Math.max(-1,Math.min(1,k)),w=Math.acos(_);if(w<a||Math.abs(Math.PI-w)<a){r+=`L${n.x},${n.y}`;continue}const B=Math.min(t/Math.sin(w/2),d/2,m/2),T=n.x-g*B,v=n.y-y*B,q=n.x+C*B,P=n.y+b*B;r+=`L${T},${v}`,r+=`Q${n.x},${n.y} ${q},${P}`}}return r}f(Mm,"generateRoundedPath");function $n(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}}f($n,"calculateDeltaAndAngle");function $m(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Gt[t.arrowTypeStart]){const a=Gt[t.arrowTypeStart],s=e[0],n=e[1],{angle:o}=$n(s,n),l=a*Math.cos(o),h=a*Math.sin(o);r[0].x=s.x+l,r[0].y=s.y+h}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const a=Gt[t.arrowTypeEnd],s=e[i-1],n=e[i-2],{angle:o}=$n(n,s),l=a*Math.cos(o),h=a*Math.sin(o);r[i-1].x=s.x-l,r[i-1].y=s.y-h}return r}f($m,"applyMarkerOffsetsToPoints");var kv=f((e,t,r,i)=>{t.forEach(a=>{Yv[a](e,r,i)})},"insertMarkers"),Tv=f((e,t,r)=>{R.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",190).attr("markerHeight",240).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").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"),_v=f((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").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").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"),wv=f((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").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").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"),Sv=f((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").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").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"),vv=f((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").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").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"),Bv=f((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"),Lv=f((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"),Fv=f((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"),Av=f((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"),Ev=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{transitionColor:s}=a;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",`${s}`)},"barbNeo"),Mv=f((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"),$v=f((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Ov=f((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"),Iv=f((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 a=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");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Dv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`),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",`${s}`)},"only_one_neo"),Pv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:n}=a,o=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");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);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",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),Rv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`),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",`${s}`)},"one_or_more_neo"),Nv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:n}=a,o=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");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);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",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),qv=f((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
|
|
293
|
+
L20,10
|
|
294
|
+
M20,10
|
|
295
|
+
L0,20`)},"requirement_arrow"),zv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s}=a;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",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
296
|
+
L20,10
|
|
297
|
+
M20,10
|
|
298
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Wv=f((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"),Hv=f((e,t,r)=>{const i=St(),{themeVariables:a}=i,{strokeWidth:s}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),Yv={extension:Tv,composition:_v,aggregation:wv,dependency:Sv,lollipop:vv,point:Bv,circle:Lv,cross:Fv,barb:Av,barbNeo:Ev,only_one:Mv,zero_or_one:$v,one_or_more:Ov,zero_or_more:Iv,only_one_neo:Dv,zero_or_one_neo:Pv,one_or_more_neo:Rv,zero_or_more_neo:Nv,requirement_arrow:qv,requirement_contains:Wv,requirement_arrow_neo:zv,requirement_contains_neo:Hv},jv=kv,Uv={common:ya,getConfig:St,insertCluster:HS,insertEdge:bv,insertEdgeLabel:fv,insertMarkers:jv,insertNode:Am,interpolateToCurve:bl,labelHelper:at,log:R,positionEdgeLabel:gv},fa={},Om=f(e=>{for(const t of e)fa[t.name]=t},"registerLayoutLoaders"),Gv=f(()=>{Om([{name:"dagre",loader:f(async()=>await ft(()=>import("./dagre-KV5264BT-Ds0Sqext.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:f(async()=>await ft(()=>import("./cose-bilkent-S5V4N54A-fWyBR9Nn.js"),__vite__mapDeps([8,9,6,7])),"loader")}])},"registerDefaultLayoutLoaders");Gv();var VA=f(async(e,t)=>{if(!(e.layoutAlgorithm in fa))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=fa[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:n,gradientStart:o,gradientStop:l}=s,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),n){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Uv,{algorithm:r.algorithm})},"render"),ZA=f((e="",{fallback:t="dagre"}={})=>{if(e in fa)return e;if(t in fa)return R.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Im="comm",Dm="rule",Pm="decl",Xv="@import",Vv="@namespace",Zv="@keyframes",Kv="@layer",Qv=Math.abs,ea=String.fromCharCode;function Rm(e){return e.trim()}function On(e,t,r){return e.replace(t,r)}function Qr(e,t){return e.charCodeAt(t)|0}function xi(e,t,r){return e.slice(t,r)}function $e(e){return e.length}function Jv(e){return e.length}function Ha(e,t){return t.push(e),e}var ao=1,bi=1,Nm=0,me=0,Et=0,Si="";function zl(e,t,r,i,a,s,n,o){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:ao,column:bi,length:n,return:"",siblings:o}}function tB(){return Et}function eB(){return Et=me>0?Qr(Si,--me):0,bi--,Et===10&&(bi=1,ao--),Et}function we(){return Et=me<Nm?Qr(Si,me++):0,bi++,Et===10&&(bi=1,ao++),Et}function ir(){return Qr(Si,me)}function ts(){return me}function so(e,t){return xi(Si,e,t)}function ga(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 rB(e){return ao=bi=1,Nm=$e(Si=e),me=0,[]}function iB(e){return Si="",e}function Ro(e){return Rm(so(me-1,In(e===91?e+2:e===40?e+1:e)))}function aB(e){for(;(Et=ir())&&Et<33;)we();return ga(e)>2||ga(Et)>3?"":" "}function sB(e,t){for(;--t&&we()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return so(e,ts()+(t<6&&ir()==32&&we()==32))}function In(e){for(;we();)switch(Et){case e:return me;case 34:case 39:e!==34&&e!==39&&In(Et);break;case 40:e===41&&In(e);break;case 92:we();break}return me}function oB(e,t){for(;we()&&e+Et!==57;)if(e+Et===84&&ir()===47)break;return"/*"+so(t,me-1)+"*"+ea(e===47?e:we())}function nB(e){for(;!ga(ir());)we();return so(e,me)}function lB(e){return iB(es("",null,null,null,[""],e=rB(e),0,[0],e))}function es(e,t,r,i,a,s,n,o,l){for(var h=0,c=0,u=n,p=0,d=0,m=0,g=1,y=1,C=1,b=0,k=0,_="",w=a,B=s,T=i,v=_;y;)switch(m=k,k=we()){case 40:m!=108&&Qr(v,u-1)==58?(b++,v+="("):v+=Ro(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Ro(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=ea(k);break}v+=aB(m);break;case 92:v+=sB(ts()-1,7);continue;case 47:switch(ir()){case 42:case 47:Ha(hB(oB(we(),ts()),t,r,l),l),(ga(m||1)==5||ga(ir()||1)==5)&&$e(v)&&xi(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*g:o[h++]=$e(v)*C;case 125*g:case 59:case 0:if(b>0&&k){v+=ea(k);break}switch(k){case 0:case 125:y=0;case 59+c:C==-1&&(v=On(v,/\f/g,"")),d>0&&($e(v)-u||g===0)&&Ha(d>32?Uc(v+";",i,r,u-1,l):Uc(On(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(Ha(T=jc(v,t,r,h,c,a,o,_,w=[],B=[],u,s),s),k===123)if(c===0)es(v,t,T,T,w,s,u,o,B);else{switch(p){case 99:if(Qr(v,3)===110)break;case 108:if(Qr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?es(e,T,T,i&&Ha(jc(e,T,T,0,0,a,o,_,a,w=[],u,B),B),a,B,u,o,i?w:B):es(v,T,T,T,[""],B,0,o,B)}}h=c=d=0,g=C=1,_=v="",u=n;break;case 58:u=1+$e(v),d=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&eB()==125)continue}switch(v+=ea(k),k*g){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;o[h++]=($e(v)-1)*C,C=1;break;case 64:ir()===45&&(v+=Ro(we())),p=ir(),c=u=$e(_=v+=nB(ts())),k++;break;case 45:m===45&&$e(v)==2&&(g=0)}}return s}function jc(e,t,r,i,a,s,n,o,l,h,c,u){for(var p=a-1,d=a===0?s:[""],m=Jv(d),g=0,y=0,C=0;g<i;++g)for(var b=0,k=xi(e,p+1,p=Qv(y=n[g])),_=e;b<m;++b)(_=Rm(y>0?d[b]+" "+k:On(k,/&\f/g,d[b])))&&(l[C++]=_);return zl(e,t,r,a===0?Dm:o,l,h,c,u)}function hB(e,t,r,i){return zl(e,t,r,Im,ea(tB()),xi(e,2,-2),0,i)}function Uc(e,t,r,i,a){return zl(e,t,r,Pm,xi(e,0,i),xi(e,i+1,-1),i,a)}function Dn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function cB(e,t,r,i){switch(e.type){case Kv:if(e.children.length)break;case Xv:case Vv:case Pm:return e.return=e.return||e.value;case Im:return"";case Zv:return e.return=e.value+"{"+Dn(e.children,i)+"}";case Dm:if(!$e(e.value=e.props.join(",")))return""}return $e(r=Dn(e.children,i))?e.return=e.value+"{"+r+"}":""}var uB=hf(Object.keys,Object),dB=Object.prototype,pB=dB.hasOwnProperty;function fB(e){if(!Vs(e))return uB(e);var t=[];for(var r in Object(e))pB.call(e,r)&&r!="constructor"&&t.push(r);return t}var Pn=Or(qe,"DataView"),Rn=Or(qe,"Promise"),Nn=Or(qe,"Set"),qn=Or(qe,"WeakMap"),Gc="[object Map]",gB="[object Object]",Xc="[object Promise]",Vc="[object Set]",Zc="[object WeakMap]",Kc="[object DataView]",mB=$r(Pn),yB=$r(da),CB=$r(Rn),xB=$r(Nn),bB=$r(qn),yr=ki;(Pn&&yr(new Pn(new ArrayBuffer(1)))!=Kc||da&&yr(new da)!=Gc||Rn&&yr(Rn.resolve())!=Xc||Nn&&yr(new Nn)!=Vc||qn&&yr(new qn)!=Zc)&&(yr=function(e){var t=ki(e),r=t==gB?e.constructor:void 0,i=r?$r(r):"";if(i)switch(i){case mB:return Kc;case yB:return Gc;case CB:return Xc;case xB:return Vc;case bB:return Zc}return t});var kB="[object Map]",TB="[object Set]",_B=Object.prototype,wB=_B.hasOwnProperty;function Qc(e){if(e==null)return!0;if(Zs(e)&&(Ss(e)||typeof e=="string"||typeof e.splice=="function"||Cl(e)||xl(e)||ws(e)))return!e.length;var t=yr(e);if(t==kB||t==TB)return!e.size;if(Vs(e))return!fB(e).length;for(var r in e)if(wB.call(e,r))return!1;return!0}var qm="c4",SB=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),vB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./c4Diagram-AHTNJAMY-BNIKE8-Z.js");return{diagram:t}},__vite__mapDeps([10,11,6,7]));return{id:qm,diagram:e}},"loader"),BB={id:qm,detector:SB,loader:vB},LB=BB,zm="flowchart",FB=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),AB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-F3N9yTAB.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,6,7]));return{id:zm,diagram:e}},"loader"),EB={id:zm,detector:FB,loader:AB},MB=EB,Wm="flowchart-v2",$B=f((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),OB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-F3N9yTAB.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,6,7]));return{id:Wm,diagram:e}},"loader"),IB={id:Wm,detector:$B,loader:OB},DB=IB,Hm="er",PB=f(e=>/^\s*erDiagram/.test(e),"detector"),RB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./erDiagram-SMLLAGMA-DplAZ-yG.js");return{diagram:t}},__vite__mapDeps([17,14,15,16,6,7]));return{id:Hm,diagram:e}},"loader"),NB={id:Hm,detector:PB,loader:RB},qB=NB,Ym="gitGraph",zB=f(e=>/^\s*gitGraph/.test(e),"detector"),WB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./gitGraphDiagram-UUTBAWPF-htCk0oPz.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,6,7,4,2]));return{id:Ym,diagram:e}},"loader"),HB={id:Ym,detector:zB,loader:WB},YB=HB,jm="gantt",jB=f(e=>/^\s*gantt/.test(e),"detector"),UB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ganttDiagram-T4ZO3ILL-DebdM4S5.js");return{diagram:t}},__vite__mapDeps([22,6,7,23,24,25]));return{id:jm,diagram:e}},"loader"),GB={id:jm,detector:jB,loader:UB},XB=GB,Um="info",VB=f(e=>/^\s*info/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./infoDiagram-42DDH7IO-gTxegviJ.js");return{diagram:t}},__vite__mapDeps([26,21,6,7,4,2]));return{id:Um,diagram:e}},"loader"),KB={id:Um,detector:VB,loader:ZB},Gm="pie",QB=f(e=>/^\s*pie/.test(e),"detector"),JB=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./pieDiagram-DEJITSTG-Dl4plCTi.js");return{diagram:t}},__vite__mapDeps([27,19,21,6,7,4,2,28,29,24]));return{id:Gm,diagram:e}},"loader"),tL={id:Gm,detector:QB,loader:JB},Xm="quadrantChart",eL=f(e=>/^\s*quadrantChart/.test(e),"detector"),rL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./quadrantDiagram-34T5L4WZ-BeOEeelg.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,6,7]));return{id:Xm,diagram:e}},"loader"),iL={id:Xm,detector:eL,loader:rL},aL=iL,Vm="xychart",sL=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),oL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./xychartDiagram-5P7HB3ND-LogZ0Az9.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,6,7]));return{id:Vm,diagram:e}},"loader"),nL={id:Vm,detector:sL,loader:oL},lL=nL,Zm="requirement",hL=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),cL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./requirementDiagram-MS252O5E-CBh1jchM.js");return{diagram:t}},__vite__mapDeps([32,14,15,6,7]));return{id:Zm,diagram:e}},"loader"),uL={id:Zm,detector:hL,loader:cL},dL=uL,Km="sequence",pL=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),fL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sequenceDiagram-FGHM5R23-BtQwzsF5.js");return{diagram:t}},__vite__mapDeps([33,11,20,6,7]));return{id:Km,diagram:e}},"loader"),gL={id:Km,detector:pL,loader:fL},mL=gL,Qm="class",yL=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),CL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-6PBFFD2Q-CN-ZYMbT.js");return{diagram:t}},__vite__mapDeps([34,35,13,11,14,15,6,7]));return{id:Qm,diagram:e}},"loader"),xL={id:Qm,detector:yL,loader:CL},bL=xL,Jm="classDiagram",kL=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),TL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./classDiagram-v2-HSJHXN6E-CN-ZYMbT.js");return{diagram:t}},__vite__mapDeps([36,35,13,11,14,15,6,7]));return{id:Jm,diagram:e}},"loader"),_L={id:Jm,detector:kL,loader:TL},wL=_L,ty="state",SL=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),vL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-FHFEXIEX--kLQOi8R.js");return{diagram:t}},__vite__mapDeps([37,38,14,15,1,2,3,4,6,7]));return{id:ty,diagram:e}},"loader"),BL={id:ty,detector:SL,loader:vL},LL=BL,ey="stateDiagram",FL=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),AL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./stateDiagram-v2-QKLJ7IA2-CHEPjgB0.js");return{diagram:t}},__vite__mapDeps([39,38,14,15,6,7]));return{id:ey,diagram:e}},"loader"),EL={id:ey,detector:FL,loader:AL},ML=EL,ry="journey",$L=f(e=>/^\s*journey/.test(e),"detector"),OL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./journeyDiagram-VCZTEJTY-DgVc1q4D.js");return{diagram:t}},__vite__mapDeps([40,13,11,28,6,7]));return{id:ry,diagram:e}},"loader"),IL={id:ry,detector:$L,loader:OL},DL=IL,PL=f((e,t,r)=>{R.debug(`rendering svg for syntax error
|
|
299
|
+
`);const i=ak(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),vu(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),iy={draw:PL},RL=iy,NL={db:{},renderer:iy,parser:{parse:f(()=>{},"parse")}},qL=NL,ay="flowchart-elk",zL=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),WL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./flowDiagram-DWJPFMVM-F3N9yTAB.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,6,7]));return{id:ay,diagram:e}},"loader"),HL={id:ay,detector:zL,loader:WL},YL=HL,sy="timeline",jL=f(e=>/^\s*timeline/.test(e),"detector"),UL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./timeline-definition-GMOUNBTQ-CQ_-CLh7.js");return{diagram:t}},__vite__mapDeps([41,28,6,7]));return{id:sy,diagram:e}},"loader"),GL={id:sy,detector:jL,loader:UL},XL=GL,oy="mindmap",VL=f(e=>/^\s*mindmap/.test(e),"detector"),ZL=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./mindmap-definition-QFDTVHPH-FXXf4cJx.js");return{diagram:t}},__vite__mapDeps([42,14,15,6,7]));return{id:oy,diagram:e}},"loader"),KL={id:oy,detector:VL,loader:ZL},QL=KL,ny="kanban",JL=f(e=>/^\s*kanban/.test(e),"detector"),tF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./kanban-definition-6JOO6SKY-DcOf3i9N.js");return{diagram:t}},__vite__mapDeps([43,13,6,7]));return{id:ny,diagram:e}},"loader"),eF={id:ny,detector:JL,loader:tF},rF=eF,ly="sankey",iF=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),aF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./sankeyDiagram-XADWPNL6-BK6gG-ub.js");return{diagram:t}},__vite__mapDeps([44,29,24,6,7]));return{id:ly,diagram:e}},"loader"),sF={id:ly,detector:iF,loader:aF},oF=sF,hy="packet",nF=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),lF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-TYMM5635-C8i9zc-U.js");return{diagram:t}},__vite__mapDeps([45,19,21,6,7,4,2]));return{id:hy,diagram:e}},"loader"),hF={id:hy,detector:nF,loader:lF},cy="radar",cF=f(e=>/^\s*radar-beta/.test(e),"detector"),uF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-MMDJMWI5-BdoHW8mF.js");return{diagram:t}},__vite__mapDeps([46,19,21,6,7,4,2]));return{id:cy,diagram:e}},"loader"),dF={id:cy,detector:cF,loader:uF},uy="block",pF=f(e=>/^\s*block(-beta)?/.test(e),"detector"),fF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./blockDiagram-DXYQGD6D--wpvoBAt.js");return{diagram:t}},__vite__mapDeps([47,13,5,1,2,16,6,7]));return{id:uy,diagram:e}},"loader"),gF={id:uy,detector:pF,loader:fF},mF=gF,dy="treeView",yF=f(e=>/^\s*treeView-beta/.test(e),"detector"),CF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-5BDNPKRD-BGz_X007.js");return{diagram:t}},__vite__mapDeps([48,19,20,21,6,7,4,2]));return{id:dy,diagram:e}},"loader"),xF={id:dy,detector:yF,loader:CF},bF=xF,py="architecture",kF=f(e=>/^\s*architecture/.test(e),"detector"),TF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./architectureDiagram-Q4EWVU46-Cs9IdLQQ.js");return{diagram:t}},__vite__mapDeps([49,19,21,6,7,4,2,9]));return{id:py,diagram:e}},"loader"),_F={id:py,detector:kF,loader:TF},wF=_F,fy="ishikawa",SF=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),vF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./ishikawaDiagram-UXIWVN3A-DYSEsfUK.js");return{diagram:t}},__vite__mapDeps([50,6,7]));return{id:fy,diagram:e}},"loader"),BF={id:fy,detector:SF,loader:vF},gy="venn",LF=f(e=>/^\s*venn-beta/.test(e),"detector"),FF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./vennDiagram-DHZGUBPP-DBhKYAFT.js");return{diagram:t}},__vite__mapDeps([51,6,7]));return{id:gy,diagram:e}},"loader"),AF={id:gy,detector:LF,loader:FF},EF=AF,my="treemap",MF=f(e=>/^\s*treemap/.test(e),"detector"),$F=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./diagram-G4DWMVQ6-C78jeb-r.js");return{diagram:t}},__vite__mapDeps([52,15,19,21,6,7,4,2,25,29,24]));return{id:my,diagram:e}},"loader"),OF={id:my,detector:MF,loader:$F},yy="wardley-beta",IF=f(e=>/^\s*wardley-beta/i.test(e),"detector"),DF=f(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./wardleyDiagram-NUSXRM2D-Brb8ezsV.js");return{diagram:t}},__vite__mapDeps([53,19,21,6,7,4,2]));return{id:yy,diagram:e}},"loader"),PF={id:yy,detector:IF,loader:DF},RF=PF,Jc=!1,oo=f(()=>{Jc||(Jc=!0,os("error",qL,e=>e.toLowerCase().trim()==="error"),os("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Wo(YL,QL,wF),Wo(LB,rF,wL,bL,qB,XB,KB,tL,dL,mL,DB,MB,XL,YB,ML,LL,DL,aL,oF,hF,lL,mF,bF,dF,BF,OF,EF,RF))},"addDiagrams"),NF=f(async()=>{R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(wr).map(async([r,{detector:i,loader:a}])=>{if(a)try{Uo(r)}catch{try{const{diagram:s,id:n}=await a();os(n,s,i)}catch(s){throw R.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete wr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){R.error(`Failed to load ${t.length} external diagrams`);for(const r of t)R.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),qF="graphics-document document";function Cy(e,t){e.attr("role",qF),t!==""&&e.attr("aria-roledescription",t)}f(Cy,"setA11yDiagramInfo");function xy(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}f(xy,"addSVGa11yTitleDescription");var _r,zn=(_r=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var h,c;const i=St(),a=Yn(t,i);t=hw(t)+`
|
|
300
|
+
`;try{Uo(a)}catch{const u=_0(a);if(!u)throw new du(`Diagram ${a} not found.`);const{id:p,diagram:d}=await u();os(p,d)}const{db:s,parser:n,renderer:o,init:l}=Uo(a);return n.parser&&(n.parser.yy=s),(h=s.clear)==null||h.call(s),l==null||l(i),r.title&&((c=s.setDiagramTitle)==null||c.call(s,r.title)),await n.parse(t),new _r(a,t,s,n,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(_r,"Diagram"),_r),tu=[],zF=f(()=>{tu.forEach(e=>{e()}),tu=[]},"attachFunctions"),WF=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function by(e){const t=e.match(uu);if(!t)return{text:e,metadata:{}};let r=u2(t[1],{schema:c2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}f(by,"extractFrontMatter");var HF=f(e=>e.replace(/\r\n?/g,`
|
|
301
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),YF=f(e=>{const{text:t,metadata:r}=by(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),jF=f(e=>{const t=Te.detectInit(e)??{},r=Te.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Z_(e),directive:t}},"processDirectives");function Wl(e){const t=HF(e),r=YF(t),i=jF(r.text),a=Sl(r.config,i.directive);return e=WF(i.text),{code:e,title:r.title,config:a}}f(Wl,"preprocessDiagram");function ky(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(ky,"toBase64");var UF=5e4,GF="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",XF="sandbox",VF="loose",ZF="http://www.w3.org/2000/svg",KF="http://www.w3.org/1999/xlink",QF="http://www.w3.org/1999/xhtml",JF="100%",tA="100%",eA="border:0;margin:0;",rA="margin:0",iA="allow-top-navigation-by-user-activation allow-popups",aA='The "iframe" tag is not supported by your browser.',sA=["foreignobject"],oA=["dominant-baseline"];function Hl(e){const t=Wl(e);return as(),K0(t.config??{}),t}f(Hl,"processAndSetConfigs");async function Ty(e,t){oo();try{const{code:r,config:i}=Hl(e);return{diagramType:(await wy(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(Ty,"parse");var eu=f((e,t,r=[])=>`
|
|
302
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),nA=f((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
303
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
304
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
305
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const n=te(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Qc(o.styles)||n.forEach(l=>{r+=eu(o.id,l,o.styles)}),Qc(o.textStyles)||(r+=eu(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),lA=f((e,t,r,i)=>{const a=nA(e,r),s=mC(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return Dn(lB(`${i}{${s}}`),cB)},"createUserStyles"),hA=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Fr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),cA=f((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":tA,i=ky(`<body style="${rA}">${e}</body>`);return`<iframe style="width:${JF};height:${r};${eA}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${iA}">
|
|
306
|
+
${aA}
|
|
307
|
+
</iframe>`},"putIntoIFrame"),ru=f((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const n=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",ZF);return a&&n.attr("xmlns:xlink",a),n.append("g"),e},"appendDivSvgG");function Wn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Wn,"sandboxedIframe");var uA=f((e,t,r,i)=>{var a,s,n;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),dA=f(async function(e,t,r){var Y,z,D,E,F,I;oo();const i=Hl(t);t=i.code;const a=St();R.debug(a),t.length>((a==null?void 0:a.maxTextSize)??UF)&&(t=GF);const s="#"+e,n="i"+e,o="#"+n,l="d"+e,h="#"+l,c=f(()=>{const W=ct(p?o:h).node();W&&"remove"in W&&W.remove()},"removeTempElements");let u=ct("body");const p=a.securityLevel===XF,d=a.securityLevel===VF,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const A=Wn(ct(r),n);u=ct(A.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct(r);ru(u,e,l,`font-family: ${m}`,KF)}else{if(uA(document,e,l,n),p){const A=Wn(ct("body"),n);u=ct(A.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ct("body");ru(u,e,l)}let g,y;try{g=await zn.fromText(t,{title:i.title})}catch(A){if(a.suppressErrorRendering)throw c(),A;g=await zn.fromText("error"),y=A}const C=u.select(h).node(),b=g.type,k=C.firstChild,_=k.firstChild,w=(z=(Y=g.renderer).getClasses)==null?void 0:z.call(Y,t,g),B=lA(a,b,w,s),T=document.createElement("style");T.innerHTML=B,k.insertBefore(T,_);try{await g.renderer.draw(t,e,"11.14.0",g)}catch(A){throw a.suppressErrorRendering?c():RL.draw(t,e,"11.14.0"),A}const v=u.select(`${h} svg`),q=(E=(D=g.db).getAccTitle)==null?void 0:E.call(D),P=(I=(F=g.db).getAccDescription)==null?void 0:I.call(F);Sy(b,v,q,P),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",QF);let M=u.select(h).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),M=hA(M,p,Ze(a.arrowMarkerAbsolute)),p){const A=u.select(h+" svg").node();M=cA(M,A)}else d||(M=pi.sanitize(M,{ADD_TAGS:sA,ADD_ATTR:oA,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(zF(),y)throw y;return c(),{diagramType:b,svg:M,bindFunctions:g.db.bindFunctions}},"render");function _y(e={}){var i;const t=It({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),V0(t),t!=null&&t.theme&&t.theme in Ue?t.themeVariables=Ue[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ue.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?X0(t):yu();Hn(r.logLevel),oo()}f(_y,"initialize");var wy=f((e,t={})=>{const{code:r}=Wl(e);return zn.fromText(r,t)},"getDiagramFromText");function Sy(e,t,r,i){Cy(t,e),xy(t,r,i,t.attr("id"))}f(Sy,"addA11yInfo");var Er=Object.freeze({render:dA,parse:Ty,getDiagramFromText:wy,initialize:_y,getConfig:St,setConfig:Cu,getSiteConfig:yu,updateSiteConfig:Z0,reset:f(()=>{as()},"reset"),globalReset:f(()=>{as(fi)},"globalReset"),defaultConfig:fi});Hn(St().logLevel);as(St());var pA=f((e,t,r)=>{R.warn(e),wl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),vy=f(async function(e={querySelector:".mermaid"}){try{await fA(e)}catch(t){if(wl(t)&&R.error(t.str),ue.parseError&&ue.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),fA=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Er.getConfig();R.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");R.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(R.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Er.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new Te.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(a)){if(R.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;n=l.innerHTML,n=Hf(Te.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Te.detectInit(n);c&&R.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await Ay(h,n,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){pA(u,o,ue.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),By=f(function(e){Er.initialize(e)},"initialize"),gA=f(async function(e,t,r){R.warn("mermaid.init is deprecated. Please use run instead."),e&&By(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await vy(i)},"init"),mA=f(async(e,{lazyLoad:t=!0}={})=>{oo(),Wo(...e),t===!1&&await NF()},"registerExternalDiagrams"),Ly=f(function(){if(ue.startOnLoad){const{startOnLoad:e}=Er.getConfig();e&&ue.run().catch(t=>R.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Ly,!1);var yA=f(function(e){ue.parseError=e},"setParseErrorHandler"),Ds=[],No=!1,Fy=f(async()=>{if(!No){for(No=!0;Ds.length>0;){const e=Ds.shift();if(e)try{await e()}catch(t){R.error("Error executing queue",t)}}No=!1}},"executeQueue"),CA=f(async(e,t)=>new Promise((r,i)=>{const a=f(()=>new Promise((s,n)=>{Er.parse(e,t).then(o=>{s(o),r(o)},o=>{var l;R.error("Error parsing",o),(l=ue.parseError)==null||l.call(ue,o),n(o),i(o)})}),"performCall");Ds.push(a),Fy().catch(i)}),"parse"),Ay=f((e,t,r)=>new Promise((i,a)=>{const s=f(()=>new Promise((n,o)=>{Er.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;R.error("Error parsing",l),(h=ue.parseError)==null||h.call(ue,l),o(l),a(l)})}),"performCall");Ds.push(s),Fy().catch(a)}),"render"),xA=f(()=>Object.keys(wr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ue={startOnLoad:!0,mermaidAPI:Er,parse:CA,render:Ay,init:gA,run:vy,registerExternalDiagrams:mA,registerLayoutLoaders:Om,initialize:By,parseError:void 0,contentLoaded:Ly,setParseErrorHandler:yA,detectType:Yn,registerIconPacks:mS,getRegisteredDiagramsMetadata:xA},bA=ue;/*! Check if previously processed *//*!
|
|
308
|
+
* Wait for document loaded before starting the execution
|
|
309
|
+
*/const KA=Object.freeze(Object.defineProperty({__proto__:null,default:bA},Symbol.toStringTag,{value:"Module"}));export{Bu as $,vA as A,ar as B,Yy as C,St as D,SC as E,Sl as F,mu as G,ew as H,ak as I,c2 as J,F0 as K,ra as L,wA as M,Ks as N,sC as O,Su as P,Th as Q,V1 as R,rn as S,tw as T,ma as U,ve as V,O as W,$ as X,pC as Y,U_ as Z,f as _,xC as a,Mr as a$,j1 as a0,il as a1,AA as a2,$A as a3,zr as a4,Wh as a5,zh as a6,IA as a7,OA as a8,MA as a9,gv as aA,fv as aB,CS as aC,ou as aD,U1 as aE,_A as aF,Zs as aG,Ss as aH,xf as aI,wa as aJ,mS as aK,gS as aL,Jn as aM,er as aN,sa as aO,Ih as aP,Sb as aQ,b_ as aR,yf as aS,cf as aT,wT as aU,Ts as aV,ST as aW,Ta as aX,yr as aY,g_ as aZ,nc as a_,LA as aa,FA as ab,EA as ac,PA as ad,DA as ae,HS as af,Am as ag,GA as ah,d2 as ai,te as aj,Qe as ak,$i as al,vl as am,Sf as an,Fr as ao,Ff as ap,nt as aq,Ie as ar,U as as,jv as at,UA as au,XA as av,YA as aw,K as ax,jA as ay,bv as az,CC as b,vT as b0,Cl as b1,_T as b2,FT as b3,Ti as b4,x_ as b5,W_ as b6,OT as b7,I_ as b8,ml as b9,H_ as bA,yl as bB,j_ as bC,KA as bD,Qc as ba,V as bb,Af as bc,oe as bd,Cb as be,Qn as bf,zu as bg,xa as bh,Yu as bi,BA as bj,Hy as bk,ki as bl,v_ as bm,fB as bn,ka as bo,ws as bp,cr as bq,Us as br,rc as bs,xl as bt,df as bu,mf as bv,kT as bw,Nn as bx,z_ as by,O_ as bz,gt as c,ct as d,vu as e,It as f,kC as g,Ve as h,Se as i,p2 as j,ya as k,R as l,Bf as m,SA as n,ZA as o,TC as p,_C as q,VA as r,bC as s,u2 as t,Te as u,hv as v,aw as w,RA as x,pi as y,yC as z};
|