orbitchat 3.10.7 → 3.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/assets/{ChartRenderer-9FnwPEBX.js → ChartRenderer-DmEe5ux0.js} +1 -1
- package/dist/assets/MermaidRenderer-BNgxU_bM.js +312 -0
- package/dist/assets/architectureDiagram-3BPJPVTR-Bfi6eFLn.js +36 -0
- package/dist/assets/blockDiagram-GPEHLZMM-C_xOdSW3.js +132 -0
- package/dist/assets/{c4Diagram-LMCZKHZV-BUftbNWY.js → c4Diagram-AAUBKEIU-CfvQYM_q.js} +1 -1
- package/dist/assets/channel-zLwrxaPB.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-uT68_7rT.js → chunk-2J33WTMH-DeY8TrNw.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BjHi_aEM.js → chunk-4BX2VUAB-DIj3bLrU.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-BrvJt-u-.js → chunk-55IACEB6-I4-oEJEd.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-hSR6fEWT.js → chunk-727SXJPM-DCx2l0Oh.js} +4 -4
- package/dist/assets/chunk-AQP2D5EJ-D4KlRvHF.js +231 -0
- package/dist/assets/{chunk-5VM5RSS4-CQacO1HV.js → chunk-FMBD7UC4-CqHLqk3L.js} +1 -1
- package/dist/assets/{chunk-32BRIVSS-DnDG740s.js → chunk-ND2GUHAM-CHJjdC0m.js} +1 -1
- package/dist/assets/{chunk-2Q5K7J3B-CdU2Q6YZ.js → chunk-QZHKN3VN-slcsUOxD.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-CDbYhIhU.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-CDbYhIhU.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-C0vhiJLV.js → cose-bilkent-S5V4N54A-HnZrIUzr.js} +1 -1
- package/dist/assets/{cynefin-VYW2F7L2-CyM6ijR6.js → cynefin-VYW2F7L2-CPNTSJVR.js} +1 -1
- package/dist/assets/dagre-BM42HDAG-Cl88doFf.js +4 -0
- package/dist/assets/diagram-2AECGRRQ-2lPidS0l.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-_tROgYB3.js +10 -0
- package/dist/assets/{diagram-FQU43EPY-IlESJ0wh.js → diagram-KO2AKTUF-7mueA6fZ.js} +3 -3
- package/dist/assets/{diagram-NH7WQ7WH-B63W-pyC.js → diagram-LMA3HP47-BxKOasa5.js} +2 -2
- package/dist/assets/diagram-OG6HWLK6-Bwf3i6eI.js +24 -0
- package/dist/assets/erDiagram-TEJ5UH35-hortthG_.js +85 -0
- package/dist/assets/flowDiagram-I6XJVG4X-DgvKpDc5.js +162 -0
- package/dist/assets/ganttDiagram-6RSMTGT7-DR5xWqhT.js +292 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-DsT87XU7.js → gitGraphDiagram-PVQCEYII-RJLy0nV8.js} +7 -7
- package/dist/assets/{graph-C9eacEi8.js → graph-CAnANduQ.js} +1 -1
- package/dist/assets/{index-DfypiZL2.js → index-DnyY0OCY.js} +3 -3
- package/dist/assets/{infoDiagram-FWYZ7A6U-CkLm2oOh.js → infoDiagram-5YYISTIA-CdzF2MjL.js} +2 -2
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-BEPnPebm.js → ishikawaDiagram-YF4QCWOH-8YrFferA.js} +5 -5
- package/dist/assets/{journeyDiagram-5HDEW3XC-B3Sx5g-O.js → journeyDiagram-JHISSGLW-Bix7jj_6.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-BZwqoKM8.js → kanban-definition-UN3LZRKU-CJP7JJpX.js} +6 -6
- package/dist/assets/layout-DGIYPm2g.js +1 -0
- package/dist/assets/{mindmap-definition-LN4V7U3C-CyjRWos4.js → mindmap-definition-RKZ34NQL-Dk78wf-k.js} +9 -9
- package/dist/assets/pieDiagram-4H26LBE5-DkAjb9PV.js +30 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-DW4gRbec.js → quadrantDiagram-W4KKPZXB-DhA3Ltj3.js} +3 -3
- package/dist/assets/{requirementDiagram-TGXJPOKE-D898qBnU.js → requirementDiagram-4Y6WPE33-BwRKT1Ti.js} +1 -1
- package/dist/assets/sankeyDiagram-5OEKKPKP-Cq7Z3xZr.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-IjZb9M7w.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-CbH0JxsR.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-CzKw24Ws.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-CgFiawCT.js → timeline-definition-PNZ67QCA-ZZ8vXqsw.js} +3 -3
- package/dist/assets/vennDiagram-CIIHVFJN-Dqi0_zje.js +34 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-CtRzQ3q6.js → wardleyDiagram-YWT4CUSO-D7_vAxp3.js} +3 -3
- package/dist/assets/xychartDiagram-2RQKCTM6-BgFNWh3u.js +7 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/MermaidRenderer-CnzIvTlj.js +0 -317
- package/dist/assets/abnfDiagram-VRR7QNED-DChuAW5u.js +0 -1
- package/dist/assets/architectureDiagram-ZJ3FMSHR-DHJZWJhu.js +0 -36
- package/dist/assets/blockDiagram-677ZJIJ3-H_CNYF5m.js +0 -132
- package/dist/assets/channel-Cfw3OpIn.js +0 -1
- package/dist/assets/chunk-EX3LRPZG-Bq0HhB2B.js +0 -231
- package/dist/assets/chunk-MOJQB5TN-D2zfH4wm.js +0 -88
- package/dist/assets/chunk-RYQCIY6F-DSJh0d2F.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BkFPBJiF.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BkFPBJiF.js +0 -1
- package/dist/assets/cynefinDiagram-TSTJHNR4-MevACWGH.js +0 -62
- package/dist/assets/dagre-VKFMJZFB-BqR7tzk8.js +0 -4
- package/dist/assets/diagram-G47NLZAW-Bqjk3ZYu.js +0 -24
- package/dist/assets/diagram-OA4YK3LP-B0THRF0G.js +0 -30
- package/dist/assets/diagram-WEI45ONY-IZZ69bsz.js +0 -41
- package/dist/assets/ebnfDiagram-CCIWWBDH-B_U7c6VT.js +0 -1
- package/dist/assets/erDiagram-Q63AITRT-oGWxlmE8.js +0 -85
- package/dist/assets/flowDiagram-23GEKE2U-0scCMi71.js +0 -156
- package/dist/assets/ganttDiagram-NO4QXBWP-DIS-iO_q.js +0 -292
- package/dist/assets/layout-DEXfKzaS.js +0 -1
- package/dist/assets/map-Czzmt4hB.js +0 -1
- package/dist/assets/pegDiagram-2B236MQR-DItVX4G3.js +0 -1
- package/dist/assets/pieDiagram-ENE6RG2P-CTRyME0H.js +0 -39
- package/dist/assets/railroadDiagram-RFXS5EU6-_rBw9Q9b.js +0 -1
- package/dist/assets/sankeyDiagram-HTMAVEWB-doAkRLNI.js +0 -40
- package/dist/assets/sequenceDiagram-DBY2YBRQ-D4HUsfB2.js +0 -162
- package/dist/assets/sizeCapture-X5ZJPWSS-DJJLR6R7.js +0 -1
- package/dist/assets/stateDiagram-2N3HPSRC-0IOXcLaP.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BjcuRalB.js +0 -1
- package/dist/assets/swimlanes-5IMT3BWC-HIPL1mdx.js +0 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-usVEFD6y.js +0 -8
- package/dist/assets/vennDiagram-L72KCM5P-DiY3ySIT.js +0 -34
- package/dist/assets/xychartDiagram-FW5EYKEG-OjszPLMV.js +0 -7
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-BqR7tzk8.js","assets/chunk-RYQCIY6F-DSJh0d2F.js","assets/graph-C9eacEi8.js","assets/map-Czzmt4hB.js","assets/layout-DEXfKzaS.js","assets/vendor-markdown-BRX1CUPf.js","assets/vendor-syntax-DG6Vo7Ci.js","assets/purify.es-D6gMnemd.js","assets/isPrototype-DezZrpQP.js","assets/swimlanes-5IMT3BWC-HIPL1mdx.js","assets/cose-bilkent-JH36ORCC-C0vhiJLV.js","assets/cytoscape.esm-DTSO7Bv0.js","assets/c4Diagram-LMCZKHZV-BUftbNWY.js","assets/chunk-32BRIVSS-DnDG740s.js","assets/flowDiagram-23GEKE2U-0scCMi71.js","assets/chunk-5VM5RSS4-CQacO1HV.js","assets/chunk-XXDRQBXY-BrvJt-u-.js","assets/chunk-VR4S4FIN-uT68_7rT.js","assets/channel-Cfw3OpIn.js","assets/swimlanesDiagram-G3AALYLV-usVEFD6y.js","assets/erDiagram-Q63AITRT-oGWxlmE8.js","assets/gitGraphDiagram-IHSO6WYX-DsT87XU7.js","assets/chunk-2Q5K7J3B-CdU2Q6YZ.js","assets/chunk-JWPE2WC7-BjHi_aEM.js","assets/cynefin-VYW2F7L2-CyM6ijR6.js","assets/ganttDiagram-NO4QXBWP-DIS-iO_q.js","assets/time-DJ0lCX4i.js","assets/linear-BGneeY6s.js","assets/init-Dmth1JHB.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FWYZ7A6U-CkLm2oOh.js","assets/pieDiagram-ENE6RG2P-CTRyME0H.js","assets/arc-1qRI0DXn.js","assets/ordinal-DILIJJjt.js","assets/quadrantDiagram-ABIIQ3AL-DW4gRbec.js","assets/xychartDiagram-FW5EYKEG-OjszPLMV.js","assets/band-CquvqAHh.js","assets/requirementDiagram-TGXJPOKE-D898qBnU.js","assets/sequenceDiagram-DBY2YBRQ-D4HUsfB2.js","assets/classDiagram-OUVF2IWQ-BkFPBJiF.js","assets/chunk-V7JOEXUC-hSR6fEWT.js","assets/classDiagram-v2-EOCWNBFH-BkFPBJiF.js","assets/stateDiagram-2N3HPSRC-0IOXcLaP.js","assets/chunk-EX3LRPZG-Bq0HhB2B.js","assets/stateDiagram-v2-6OUMAXLB-BjcuRalB.js","assets/journeyDiagram-5HDEW3XC-B3Sx5g-O.js","assets/timeline-definition-FHXFAJF6-CgFiawCT.js","assets/mindmap-definition-LN4V7U3C-CyjRWos4.js","assets/kanban-definition-HUTT4EX6-BZwqoKM8.js","assets/sankeyDiagram-HTMAVEWB-doAkRLNI.js","assets/diagram-NH7WQ7WH-B63W-pyC.js","assets/diagram-WEI45ONY-IZZ69bsz.js","assets/blockDiagram-677ZJIJ3-H_CNYF5m.js","assets/diagram-OA4YK3LP-B0THRF0G.js","assets/architectureDiagram-ZJ3FMSHR-DHJZWJhu.js","assets/diagram-FQU43EPY-IlESJ0wh.js","assets/ishikawaDiagram-FXEZZL3T-BEPnPebm.js","assets/vennDiagram-L72KCM5P-DiY3ySIT.js","assets/diagram-G47NLZAW-Bqjk3ZYu.js","assets/wardleyDiagram-EHGQE667-CtRzQ3q6.js","assets/cynefinDiagram-TSTJHNR4-MevACWGH.js","assets/railroadDiagram-RFXS5EU6-_rBw9Q9b.js","assets/chunk-MOJQB5TN-D2zfH4wm.js","assets/ebnfDiagram-CCIWWBDH-B_U7c6VT.js","assets/abnfDiagram-VRR7QNED-DChuAW5u.js","assets/pegDiagram-2B236MQR-DItVX4G3.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ep=Object.defineProperty;var rp=(e,t,r)=>t in e?ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xt=(e,t,r)=>rp(e,typeof t!="symbol"?t+"":t,r);import{g as ip,r as Vt,j as Mt}from"./vendor-markdown-BRX1CUPf.js";import{_ as ht}from"./vendor-syntax-DG6Vo7Ci.js";import{p as xr}from"./purify.es-D6gMnemd.js";import{Z as Oe,_ as $o,$ as Io,a0 as ap,a1 as jn,a2 as qi,e as Do,n as Vn,a3 as sp,a4 as op,a5 as np,a6 as Ha,a7 as Gn,a8 as Oo,a9 as lp,aa as Po,ab as Aa,q as Si,ac as hp,ad as cp,ae as Zn,af as Qn,ag as Kn,ah as Jn,ai as tl,aj as el,ak as dp,al as Ti,am as rl,an as il,ao as up,ap as gp,c as Ya,l as pp}from"./isPrototype-DezZrpQP.js";var al=Object.defineProperty,p=(e,t)=>al(e,"name",{value:t,configurable:!0}),fp=(e,t)=>{for(var r in t)al(e,r,{get:t[r],enumerable:!0})},Bi={exports:{}},mp=Bi.exports,Ro;function yp(){return Ro||(Ro=1,(function(e,t){(function(r,i){e.exports=i()})(mp,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",n="second",o="minute",l="hour",h="day",c="week",d="month",g="quarter",u="year",m="date",f="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={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($){var F=["th","st","nd","rd"],L=$%100;return"["+$+(F[(L-20)%10]||F[L]||F[0])+"]"}},b=function($,F,L){var E=String($);return!E||E.length>=F?$:""+Array(F+1-E.length).join(L)+$},w={s:b,z:function($){var F=-$.utcOffset(),L=Math.abs(F),E=Math.floor(L/60),M=L%60;return(F<=0?"+":"-")+b(E,2,"0")+":"+b(M,2,"0")},m:function $(F,L){if(F.date()<L.date())return-$(L,F);var E=12*(L.year()-F.year())+(L.month()-F.month()),M=F.clone().add(E,d),R=L-M<0,N=F.clone().add(E+(R?-1:1),d);return+(-(E+(L-M)/(R?M-N:N-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:c,d:h,D:m,h:l,m:o,s:n,ms:s,Q:g}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",T={};T[S]=k;var B="$isDayjsObject",_=function($){return $ instanceof H||!(!$||!$[B])},W=function $(F,L,E){var M;if(!F)return S;if(typeof F=="string"){var R=F.toLowerCase();T[R]&&(M=R),L&&(T[R]=L,M=R);var N=F.split("-");if(!M&&N.length>1)return $(N[0])}else{var U=F.name;T[U]=F,M=U}return!E&&M&&(S=M),M||!E&&S},P=function($,F){if(_($))return $.clone();var L=typeof F=="object"?F:{};return L.date=$,L.args=arguments,new H(L)},A=w;A.l=W,A.i=_,A.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var H=(function(){function $(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[B]=!0}var F=$.prototype;return F.parse=function(L){this.$d=(function(E){var M=E.date,R=E.utc;if(M===null)return new Date(NaN);if(A.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var N=M.match(y);if(N){var U=N[2]-1||0,Z=(N[7]||"0").substring(0,3);return R?new Date(Date.UTC(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)):new Date(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)}}return new Date(M)})(L),this.init()},F.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},F.$utils=function(){return A},F.isValid=function(){return this.$d.toString()!==f},F.isSame=function(L,E){var M=P(L);return this.startOf(E)<=M&&M<=this.endOf(E)},F.isAfter=function(L,E){return P(L)<this.startOf(E)},F.isBefore=function(L,E){return this.endOf(E)<P(L)},F.$g=function(L,E,M){return A.u(L)?this[E]:this.set(M,L)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(L,E){var M=this,R=!!A.u(E)||E,N=A.p(L),U=function(bt,Y){var K=A.w(M.$u?Date.UTC(M.$y,Y,bt):new Date(M.$y,Y,bt),M);return R?K:K.endOf(h)},Z=function(bt,Y){return A.w(M.toDate()[bt].apply(M.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(Y)),M)},et=this.$W,tt=this.$M,ot=this.$D,gt="set"+(this.$u?"UTC":"");switch(N){case u:return R?U(1,0):U(31,11);case d:return R?U(1,tt):U(0,tt+1);case c:var ut=this.$locale().weekStart||0,kt=(et<ut?et+7:et)-ut;return U(R?ot-kt:ot+(6-kt),tt);case h:case m:return Z(gt+"Hours",0);case l:return Z(gt+"Minutes",1);case o:return Z(gt+"Seconds",2);case n:return Z(gt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(L){return this.startOf(L,!1)},F.$set=function(L,E){var M,R=A.p(L),N="set"+(this.$u?"UTC":""),U=(M={},M[h]=N+"Date",M[m]=N+"Date",M[d]=N+"Month",M[u]=N+"FullYear",M[l]=N+"Hours",M[o]=N+"Minutes",M[n]=N+"Seconds",M[s]=N+"Milliseconds",M)[R],Z=R===h?this.$D+(E-this.$W):E;if(R===d||R===u){var et=this.clone().set(m,1);et.$d[U](Z),et.init(),this.$d=et.set(m,Math.min(this.$D,et.daysInMonth())).$d}else U&&this.$d[U](Z);return this.init(),this},F.set=function(L,E){return this.clone().$set(L,E)},F.get=function(L){return this[A.p(L)]()},F.add=function(L,E){var M,R=this;L=Number(L);var N=A.p(E),U=function(tt){var ot=P(R);return A.w(ot.date(ot.date()+Math.round(tt*L)),R)};if(N===d)return this.set(d,this.$M+L);if(N===u)return this.set(u,this.$y+L);if(N===h)return U(1);if(N===c)return U(7);var Z=(M={},M[o]=i,M[l]=a,M[n]=r,M)[N]||1,et=this.$d.getTime()+L*Z;return A.w(et,this)},F.subtract=function(L,E){return this.add(-1*L,E)},F.format=function(L){var E=this,M=this.$locale();if(!this.isValid())return M.invalidDate||f;var R=L||"YYYY-MM-DDTHH:mm:ssZ",N=A.z(this),U=this.$H,Z=this.$m,et=this.$M,tt=M.weekdays,ot=M.months,gt=M.meridiem,ut=function(Y,K,dt,ft){return Y&&(Y[K]||Y(E,R))||dt[K].slice(0,ft)},kt=function(Y){return A.s(U%12||12,Y,"0")},bt=gt||function(Y,K,dt){var ft=Y<12?"AM":"PM";return dt?ft.toLowerCase():ft};return R.replace(C,(function(Y,K){return K||(function(dt){switch(dt){case"YY":return String(E.$y).slice(-2);case"YYYY":return A.s(E.$y,4,"0");case"M":return et+1;case"MM":return A.s(et+1,2,"0");case"MMM":return ut(M.monthsShort,et,ot,3);case"MMMM":return ut(ot,et);case"D":return E.$D;case"DD":return A.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return ut(M.weekdaysMin,E.$W,tt,2);case"ddd":return ut(M.weekdaysShort,E.$W,tt,3);case"dddd":return tt[E.$W];case"H":return String(U);case"HH":return A.s(U,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return bt(U,Z,!0);case"A":return bt(U,Z,!1);case"m":return String(Z);case"mm":return A.s(Z,2,"0");case"s":return String(E.$s);case"ss":return A.s(E.$s,2,"0");case"SSS":return A.s(E.$ms,3,"0");case"Z":return N}return null})(Y)||N.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(L,E,M){var R,N=this,U=A.p(E),Z=P(L),et=(Z.utcOffset()-this.utcOffset())*i,tt=this-Z,ot=function(){return A.m(N,Z)};switch(U){case u:R=ot()/12;break;case d:R=ot();break;case g:R=ot()/3;break;case c:R=(tt-et)/6048e5;break;case h:R=(tt-et)/864e5;break;case l:R=tt/a;break;case o:R=tt/i;break;case n:R=tt/r;break;default:R=tt}return M?R:A.a(R)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return T[this.$L]},F.locale=function(L,E){if(!L)return this.$L;var M=this.clone(),R=W(L,E,!0);return R&&(M.$L=R),M},F.clone=function(){return A.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},$})(),q=H.prototype;return P.prototype=q,[["$ms",s],["$s",n],["$m",o],["$H",l],["$W",h],["$M",d],["$y",u],["$D",m]].forEach((function($){q[$[1]]=function(F){return this.$g(F,$[0],$[1])}})),P.extend=function($,F){return $.$i||($(F,H,P),$.$i=!0),P},P.locale=W,P.isDayjs=_,P.unix=function($){return P(1e3*$)},P.en=T[S],P.Ls=T,P.p={},P}))})(Bi)),Bi.exports}var Cp=yp();const xp=ip(Cp);var me={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Os=p(function(e="fatal"){let t=me.fatal;typeof e=="string"?e.toLowerCase()in me&&(t=me[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=me.fatal&&(z.fatal=console.error?console.error.bind(console,Gt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Gt("FATAL"))),t<=me.error&&(z.error=console.error?console.error.bind(console,Gt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Gt("ERROR"))),t<=me.warn&&(z.warn=console.warn?console.warn.bind(console,Gt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Gt("WARN"))),t<=me.info&&(z.info=console.info?console.info.bind(console,Gt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Gt("INFO"))),t<=me.debug&&(z.debug=console.debug?console.debug.bind(console,Gt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gt("DEBUG"))),t<=me.trace&&(z.trace=console.debug?console.debug.bind(console,Gt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gt("TRACE")))},"setLogLevel"),Gt=p(e=>`%c${xp().format("ss.SSS")} : ${e} : `,"format");const vi={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 vi.hue2rgb(s,a,e+1/3)*255;case"g":return vi.hue2rgb(s,a,e)*255;case"b":return vi.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}}},kp={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},bp={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},lt={channel:vi,lang:kp,unit:bp},Be={};for(let e=0;e<=255;e++)Be[e]=lt.unit.dec2hex(e);const Dt={ALL:0,RGB:1,HSL:2};class wp{constructor(){this.type=Dt.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=Dt.ALL}is(t){return this.type===t}}class Sp{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new wp}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Dt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=lt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=lt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=lt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=lt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Dt.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Dt.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Dt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Dt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Dt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Dt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Dt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Dt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ga=new Sp({r:0,g:0,b:0,a:0},"transparent"),ir={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ir.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 ga.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?`#${Be[Math.round(t)]}${Be[Math.round(r)]}${Be[Math.round(i)]}${Be[Math.round(a*255)]}`:`#${Be[Math.round(t)]}${Be[Math.round(r)]}${Be[Math.round(i)]}`}},Re={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(Re.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Re.re);if(!r)return;const[,i,a,s,n,o]=r;return ga.set({h:Re._hue2deg(i),s:lt.channel.clamp.s(parseFloat(a)),l:lt.channel.clamp.l(parseFloat(s)),a:n?lt.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(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${a})`:`hsl(${lt.lang.round(t)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`}},Xr={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=Xr.colors[e];if(t)return ir.parse(t)},stringify:e=>{const t=ir.stringify(e);for(const r in Xr.colors)if(Xr.colors[r]===t)return r}},Pr={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(Pr.re);if(!r)return;const[,i,a,s,n,o,l,h,c]=r;return ga.set({r:lt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:lt.channel.clamp.g(n?parseFloat(s)*2.55:parseFloat(s)),b:lt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:h?lt.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(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(a)})`:`rgb(${lt.lang.round(t)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`}},he={format:{keyword:Xr,hex:ir,rgb:Pr,rgba:Pr,hsl:Re,hsla:Re},parse:e=>{if(typeof e!="string")return e;const t=ir.parse(e)||Pr.parse(e)||Re.parse(e)||Xr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Dt.HSL)||e.data.r===void 0?Re.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Pr.stringify(e):ir.stringify(e)},sl=(e,t)=>{const r=he.parse(e);for(const i in t)r[i]=lt.channel.clamp[i](t[i]);return he.stringify(r)},Le=(e,t,r=0,i=1)=>{if(typeof e!="number")return sl(e,{a:t});const a=ga.set({r:lt.channel.clamp.r(e),g:lt.channel.clamp.g(t),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return he.stringify(a)},Tp=e=>{const{r:t,g:r,b:i}=he.parse(e),a=.2126*lt.channel.toLinear(t)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(a)},Bp=e=>Tp(e)>=.5,ie=e=>!Bp(e),ol=(e,t,r)=>{const i=he.parse(e),a=i[t],s=lt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),he.stringify(i)},D=(e,t)=>ol(e,"l",t),O=(e,t)=>ol(e,"l",-t),x=(e,t)=>{const r=he.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return sl(e,i)},vp=(e,t,r=50)=>{const{r:i,g:a,b:s,a:n}=he.parse(e),{r:o,g:l,b:h,a:c}=he.parse(t),d=r/100,g=d*2-1,u=n-c,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,y=1-f,C=i*f+o*y,k=a*f+l*y,b=s*f+h*y,w=n*d+c*(1-d);return Le(C,k,b,w)},v=(e,t=100)=>{const r=he.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vp(r,e,t)};var Xa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>Xa(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]=Xa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Lt=Xa,de="#ffffff",ue="#f2f2f2",st=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),sr,_p=(sr=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,d,g,u,m,f,y,C,k,b,w,S,T,B,_,W,P,A,H,q,$,F,L,E,M,R,N,U,Z,et,tt,ot,gt,ut,kt,bt,Y,K,dt,ft,I;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||D(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,10)):(this.rowOdd=this.rowOdd||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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 nt=0;nt<this.THEME_COLOR_LIMIT;nt++)this["cScale"+nt]=O(this["cScale"+nt],75);else for(let nt=0;nt<this.THEME_COLOR_LIMIT;nt++)this["cScale"+nt]=O(this["cScale"+nt],25);for(let nt=0;nt<this.THEME_COLOR_LIMIT;nt++)this["cScaleInv"+nt]=this["cScaleInv"+nt]||v(this["cScale"+nt]);for(let nt=0;nt<this.THEME_COLOR_LIMIT;nt++)this.darkMode?this["cScalePeer"+nt]=this["cScalePeer"+nt]||D(this["cScale"+nt],10):this["cScalePeer"+nt]=this["cScalePeer"+nt]||O(this["cScale"+nt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let nt=0;nt<this.THEME_COLOR_LIMIT;nt++)this["cScaleLabel"+nt]=this["cScaleLabel"+nt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let nt=0;nt<5;nt++)this["surface"+nt]=this["surface"+nt]||x(this.mainBkg,{h:180,s:-15,l:t*(5+nt*3)}),this["surfacePeer"+nt]=this["surfacePeer"+nt]||x(this.mainBkg,{h:180,s:-15,l:t*(8+nt*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.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((d=this.cynefin)==null?void 0:d.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((f=this.cynefin)==null?void 0:f.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((T=this.radar)==null?void 0:T.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((_=this.radar)==null?void 0:_.graticuleOpacity)||.3,legendBoxSize:((W=this.radar)==null?void 0:W.legendBoxSize)||12,legendFontSize:((P=this.radar)==null?void 0:P.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((A=this.wardley)==null?void 0:A.backgroundColor)||this.background,axisColor:((H=this.wardley)==null?void 0:H.axisColor)||this.lineColor,axisTextColor:((q=this.wardley)==null?void 0:q.axisTextColor)||this.primaryTextColor,gridColor:(($=this.wardley)==null?void 0:$.gridColor)||this.gridColor,componentFill:((F=this.wardley)==null?void 0:F.componentFill)||this.background,componentStroke:((L=this.wardley)==null?void 0:L.componentStroke)||this.lineColor,componentLabelColor:((E=this.wardley)==null?void 0:E.componentLabelColor)||this.primaryTextColor,linkStroke:((M=this.wardley)==null?void 0:M.linkStroke)||this.lineColor,evolutionStroke:((R=this.wardley)==null?void 0:R.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((U=this.wardley)==null?void 0:U.annotationTextColor)||this.primaryTextColor,annotationFill:((Z=this.wardley)==null?void 0:Z.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((et=this.xyChart)==null?void 0:et.backgroundColor)||this.background,titleColor:((tt=this.xyChart)==null?void 0:tt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((gt=this.xyChart)==null?void 0:gt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ut=this.xyChart)==null?void 0:ut.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((kt=this.xyChart)==null?void 0:kt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((bt=this.xyChart)==null?void 0:bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((K=this.xyChart)==null?void 0:K.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((dt=this.xyChart)==null?void 0:dt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((ft=this.xyChart)==null?void 0:ft.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((I=this.xyChart)==null?void 0:I.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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue,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]})}},p(sr,"Theme"),sr),Lp=p(e=>{const t=new _p;return t.calculate(e),t},"getThemeVariables"),or,Fp=(or=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(v("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Le(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=O("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=O(this.sectionBkgColor,10),this.taskBorderColor=Le(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Le(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||O(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,d,g,u,m,f,y,C,k,b,w,S,T,B,_,W,P,A,H,q,$,F,L,E,M,R,N,U,Z,et,tt,ot,gt,ut,kt,bt,Y,K,dt,ft;this.secondBkg=D(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=D(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=D(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=v(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 I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleInv"+I]=this["cScaleInv"+I]||v(this["cScale"+I]);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScalePeer"+I]=this["cScalePeer"+I]||D(this["cScale"+I],10);for(let I=0;I<5;I++)this["surface"+I]=this["surface"+I]||x(this.mainBkg,{h:30,s:-30,l:-(-10+I*4)}),this["surfacePeer"+I]=this["surfacePeer"+I]||x(this.mainBkg,{h:30,s:-30,l:-(-7+I*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleLabel"+I]=this["cScaleLabel"+I]||this.scaleLabelColor;for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["pie"+I]=this["cScale"+I];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 I=0;I<8;I++)this["venn"+(I+1)]=this["venn"+(I+1)]??D(this["cScale"+I],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#FF6B6B",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#0D47A1",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#BF360C",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#F57F17",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((f=this.cynefin)==null?void 0:f.labelColor)||this.primaryTextColor},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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((y=this.xyChart)==null?void 0:y.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((b=this.xyChart)==null?void 0:b.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((B=this.xyChart)==null?void 0:B.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((P=this.xyChart)==null?void 0:P.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.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:((H=this.radar)==null?void 0:H.axisColor)||this.lineColor,axisStrokeWidth:((q=this.radar)==null?void 0:q.axisStrokeWidth)||2,axisLabelFontSize:(($=this.radar)==null?void 0:$.axisLabelFontSize)||12,curveOpacity:((F=this.radar)==null?void 0:F.curveOpacity)||.5,curveStrokeWidth:((L=this.radar)==null?void 0:L.curveStrokeWidth)||2,graticuleColor:((E=this.radar)==null?void 0:E.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((M=this.radar)==null?void 0:M.graticuleStrokeWidth)||1,graticuleOpacity:((R=this.radar)==null?void 0:R.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((Z=this.wardley)==null?void 0:Z.backgroundColor)||this.background,axisColor:((et=this.wardley)==null?void 0:et.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((ot=this.wardley)==null?void 0:ot.gridColor)||this.gridColor,componentFill:((gt=this.wardley)==null?void 0:gt.componentFill)||this.mainBkg,componentStroke:((ut=this.wardley)==null?void 0:ut.componentStroke)||this.lineColor,componentLabelColor:((kt=this.wardley)==null?void 0:kt.componentLabelColor)||this.primaryTextColor,linkStroke:((bt=this.wardley)==null?void 0:bt.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((K=this.wardley)==null?void 0:K.annotationStroke)||this.lineColor,annotationTextColor:((dt=this.wardley)==null?void 0:dt.annotationTextColor)||this.primaryTextColor,annotationFill:((ft=this.wardley)==null?void 0:ft.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?O(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.secondaryColor,20),this.git1=D(this.pie2||this.secondaryColor,20),this.git2=D(this.pie3||this.tertiaryColor,20),this.git3=D(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=D(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=D(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=D(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=D(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||D("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||D("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||D("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||D("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||D(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||D(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||D(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||D(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]})}},p(or,"Theme"),or),Mp=p(e=>{const t=new Fp;return t.calculate(e),t},"getThemeVariables"),nr,Ap=(nr=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=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Le(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,d,g,u,m,f,y,C,k,b,w,S,T,B,_,W,P,A,H,q,$,F,L,E,M,R,N,U,Z,et,tt,ot,gt,ut,kt,bt,Y,K,dt,ft;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||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScale"+I]=O(this["cScale"+I],10),this["cScalePeer"+I]=this["cScalePeer"+I]||O(this["cScale"+I],25);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleInv"+I]=this["cScaleInv"+I]||x(this["cScale"+I],{h:180});for(let I=0;I<5;I++)this["surface"+I]=this["surface"+I]||x(this.mainBkg,{h:30,l:-(5+I*5)}),this["surfacePeer"+I]=this["surfacePeer"+I]||x(this.mainBkg,{h:30,l:-(7+I*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||v(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||v(this.labelTextColor);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleLabel"+I]=this["cScaleLabel"+I]||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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||D(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||D(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.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((f=this.cynefin)==null?void 0:f.labelColor)||this.primaryTextColor},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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((b=this.radar)==null?void 0:b.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((B=this.radar)==null?void 0:B.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((P=this.wardley)==null?void 0:P.backgroundColor)||this.background,axisColor:((A=this.wardley)==null?void 0:A.axisColor)||this.lineColor,axisTextColor:((H=this.wardley)==null?void 0:H.axisTextColor)||this.primaryTextColor,gridColor:((q=this.wardley)==null?void 0:q.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((F=this.wardley)==null?void 0:F.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((M=this.wardley)==null?void 0:M.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((R=this.wardley)==null?void 0:R.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((U=this.wardley)==null?void 0:U.annotationFill)||this.background},this.xyChart={backgroundColor:((Z=this.xyChart)==null?void 0:Z.backgroundColor)||this.background,titleColor:((et=this.xyChart)==null?void 0:et.titleColor)||this.primaryTextColor,dataLabelColor:((tt=this.xyChart)==null?void 0:tt.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ot=this.xyChart)==null?void 0:ot.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ut=this.xyChart)==null?void 0:ut.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((kt=this.xyChart)==null?void 0:kt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((K=this.xyChart)==null?void 0:K.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((dt=this.xyChart)==null?void 0:dt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((ft=this.xyChart)==null?void 0:ft.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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||O(v(this.git0),25),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(nr,"Theme"),nr),Ep=p(e=>{const t=new Ap;return t.calculate(e),t},"getThemeVariables"),lr,$p=(lr=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=D("#cde498",10),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.primaryColor),this.lineColor=v(this.background),this.textColor=v(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,d,g,u,m,f,y,C,k,b,w,S,T,B,_,W,P,A,H,q,$,F,L,E,M,R,N,U,Z,et,tt,ot,gt,ut,kt,bt,Y,K,dt,ft;this.actorBorder=O(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||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||O(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||O(this.tertiaryColor,40);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScale"+I]=O(this["cScale"+I],10),this["cScalePeer"+I]=this["cScalePeer"+I]||O(this["cScale"+I],25);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleInv"+I]=this["cScaleInv"+I]||x(this["cScale"+I],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleLabel"+I]=this["cScaleLabel"+I]||this.scaleLabelColor;for(let I=0;I<5;I++)this["surface"+I]=this["surface"+I]||x(this.mainBkg,{h:30,s:-30,l:-(5+I*5)}),this["surfacePeer"+I]=this["surfacePeer"+I]||x(this.mainBkg,{h:30,s:-30,l:-(8+I*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||D(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||D(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.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B4513",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#DCEDC8",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FFE0B2",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF9C4",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((f=this.cynefin)==null?void 0:f.labelColor)||this.primaryTextColor},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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((b=this.radar)==null?void 0:b.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((T=this.radar)==null?void 0:T.graticuleStrokeWidth)||1,graticuleOpacity:((B=this.radar)==null?void 0:B.graticuleOpacity)||.3,legendBoxSize:((_=this.radar)==null?void 0:_.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((P=this.wardley)==null?void 0:P.backgroundColor)||this.background,axisColor:((A=this.wardley)==null?void 0:A.axisColor)||this.lineColor,axisTextColor:((H=this.wardley)==null?void 0:H.axisTextColor)||this.primaryTextColor,gridColor:((q=this.wardley)==null?void 0:q.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((F=this.wardley)==null?void 0:F.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((E=this.wardley)==null?void 0:E.linkStroke)||this.lineColor,evolutionStroke:((M=this.wardley)==null?void 0:M.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((R=this.wardley)==null?void 0:R.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((U=this.wardley)==null?void 0:U.annotationFill)||this.background},this.xyChart={backgroundColor:((Z=this.xyChart)==null?void 0:Z.backgroundColor)||this.background,titleColor:((et=this.xyChart)==null?void 0:et.titleColor)||this.primaryTextColor,dataLabelColor:((tt=this.xyChart)==null?void 0:tt.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ot=this.xyChart)==null?void 0:ot.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((ut=this.xyChart)==null?void 0:ut.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((kt=this.xyChart)==null?void 0:kt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((bt=this.xyChart)==null?void 0:bt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((K=this.xyChart)==null?void 0:K.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((dt=this.xyChart)==null?void 0:dt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((ft=this.xyChart)==null?void 0:ft.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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(lr,"Theme"),lr),Ip=p(e=>{const t=new $p;return t.calculate(e),t},"getThemeVariables"),hr,Dp=(hr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(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||D(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,d,g,u,m,f,y,C,k,b,w,S,T,B,_,W,P,A,H,q,$,F,L,E,M,R,N,U,Z,et,tt,ot,gt,ut,kt,bt,Y,K,dt,ft;this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleInv"+I]=this["cScaleInv"+I]||v(this["cScale"+I]);for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this.darkMode?this["cScalePeer"+I]=this["cScalePeer"+I]||D(this["cScale"+I],10):this["cScalePeer"+I]=this["cScalePeer"+I]||O(this["cScale"+I],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let I=0;I<this.THEME_COLOR_LIMIT;I++)this["cScaleLabel"+I]=this["cScaleLabel"+I]||this.scaleLabelColor;for(let I=0;I<5;I++)this["surface"+I]=this["surface"+I]||x(this.mainBkg,{l:-(5+I*5)}),this["surfacePeer"+I]=this["surfacePeer"+I]||x(this.mainBkg,{l:-(8+I*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=D(this.contrast,30),this.sectionBkgColor2=D(this.contrast,30),this.taskBorderColor=O(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=D(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=O(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 I=0;I<this.THEME_COLOR_LIMIT;I++)this["pie"+I]=this["cScale"+I];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 I=0;I<8;I++)this["venn"+(I+1)]=this["venn"+(I+1)]??this["cScale"+I];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((u=this.cynefin)==null?void 0:u.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((f=this.cynefin)==null?void 0:f.labelColor)||this.primaryTextColor},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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((y=this.xyChart)==null?void 0:y.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((b=this.xyChart)==null?void 0:b.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((T=this.xyChart)==null?void 0:T.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((B=this.xyChart)==null?void 0:B.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((P=this.xyChart)==null?void 0:P.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((H=this.radar)==null?void 0:H.axisColor)||this.lineColor,axisStrokeWidth:((q=this.radar)==null?void 0:q.axisStrokeWidth)||2,axisLabelFontSize:(($=this.radar)==null?void 0:$.axisLabelFontSize)||12,curveOpacity:((F=this.radar)==null?void 0:F.curveOpacity)||.5,curveStrokeWidth:((L=this.radar)==null?void 0:L.curveStrokeWidth)||2,graticuleColor:((E=this.radar)==null?void 0:E.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((M=this.radar)==null?void 0:M.graticuleStrokeWidth)||1,graticuleOpacity:((R=this.radar)==null?void 0:R.graticuleOpacity)||.3,legendBoxSize:((N=this.radar)==null?void 0:N.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((Z=this.wardley)==null?void 0:Z.backgroundColor)||this.background,axisColor:((et=this.wardley)==null?void 0:et.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((ot=this.wardley)==null?void 0:ot.gridColor)||this.gridColor,componentFill:((gt=this.wardley)==null?void 0:gt.componentFill)||this.background,componentStroke:((ut=this.wardley)==null?void 0:ut.componentStroke)||this.lineColor,componentLabelColor:((kt=this.wardley)==null?void 0:kt.componentLabelColor)||this.primaryTextColor,linkStroke:((bt=this.wardley)==null?void 0:bt.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((K=this.wardley)==null?void 0:K.annotationStroke)||this.lineColor,annotationTextColor:((dt=this.wardley)==null?void 0:dt.annotationTextColor)||this.primaryTextColor,annotationFill:((ft=this.wardley)==null?void 0:ft.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(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||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(hr,"Theme"),hr),Op=p(e=>{const t=new Dp;return t.calculate(e),t},"getThemeVariables"),cr,Pp=(cr=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=st(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var s,n,o,l,h,c,d,g,u,m,f;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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||D(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]=O(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=O(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||v(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||O(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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(cr,"Theme"),cr),Rp=p(e=>{const t=new Pp;return t.calculate(e),t},"getThemeVariables"),dr,qp=(dr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(v("#323D47"),10),this.border1="#ccc",this.border2=Le(255,255,255,.25),this.arrowheadColor=v(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,d,g;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||D(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=O(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=O(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||D(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.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||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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(dr,"Theme"),dr),Wp=p(e=>{const t=new qp;return t.calculate(e),t},"getThemeVariables"),ur,zp=(ur=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=st("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var s,n,o,l,h,c,d,g,u,m,f;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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||D(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]=O(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=O(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||v(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||O(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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(ur,"Theme"),ur),Np=p(e=>{const t=new zp;return t.calculate(e),t},"getThemeVariables"),gr,Hp=(gr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(v("#323D47"),10),this.border1="#ccc",this.border2=Le(255,255,255,.25),this.arrowheadColor=v(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,d,g;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||D(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=O(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=O(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||D(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.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||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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(gr,"Theme"),gr),Yp=p(e=>{const t=new Hp;return t.calculate(e),t},"getThemeVariables"),pr,Xp=(pr=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=st(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,d,g,u,m,f;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;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||D(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]||v(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||D(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||O(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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(pr,"Theme"),pr),Up=p(e=>{const t=new Xp;return t.calculate(e),t},"getThemeVariables"),fr,jp=(fr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(v("#323D47"),10),this.border1="#ccc",this.border2=Le(255,255,255,.25),this.arrowheadColor=v(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,d,g;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||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(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?O(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||O(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||D(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 u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||D(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=O(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*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||ie(this.quadrant1Fill)?D(this.quadrant1Fill):O(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:((d=this.xyChart)==null?void 0:d.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||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?O(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=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(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.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(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||de,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue}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]})}},p(fr,"Theme"),fr),Vp=p(e=>{const t=new jp;return t.calculate(e),t},"getThemeVariables"),ke={base:{getThemeVariables:Lp},dark:{getThemeVariables:Mp},default:{getThemeVariables:Ep},forest:{getThemeVariables:Ip},neutral:{getThemeVariables:Op},neo:{getThemeVariables:Rp},"neo-dark":{getThemeVariables:Wp},redux:{getThemeVariables:Np},"redux-dark":{getThemeVariables:Yp},"redux-color":{getThemeVariables:Up},"redux-dark-color":{getThemeVariables:Vp}},Et={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"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},nl={...Et,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ke.default.getThemeVariables(),sequence:{...Et.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Et.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Et.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Et.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Et.pie,useWidth:984},xyChart:{...Et.xyChart,useWidth:void 0},requirement:{...Et.requirement,useWidth:void 0},packet:{...Et.packet},eventmodeling:{...Et.eventmodeling},treeView:{...Et.treeView,useWidth:void 0},radar:{...Et.radar},railroad:{...Et.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Et.ishikawa},sankey:{...Et.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Et.venn},cynefin:{...Et.cynefin}},ll=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ll(e[i],"")]:[...r,t+i],[]),"keyify"),Gp=new Set(ll(nl,"")),hl=nl,Zp={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Qp=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(z.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Wi=p(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Wi(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Gp.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Zp[t];i?Qp(e[t],i):(z.debug("sanitizing object",t),Wi(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=cl(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]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),cl=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),kr=Object.freeze(hl),ge=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ht=Lt({},kr),zi,Ne=[],Ur=Lt({},kr),pa=p((e,t)=>{let r=Lt({},e),i={};for(const a of t)gl(a),i=Lt(i,a);if(r=Lt(r,i),i.theme&&i.theme in ke){const a=Lt({},zi),s=Lt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in ke&&(r.themeVariables=ke[r.theme].getThemeVariables(s))}return Ur=r,fl(Ur),Ur},"updateCurrentConfig"),Kp=p(e=>(Ht=Lt({},kr),Ht=Lt(Ht,e),e.theme&&ke[e.theme]&&(Ht.themeVariables=ke[e.theme].getThemeVariables(e.themeVariables)),pa(Ht,Ne),Ht),"setSiteConfig"),Jp=p(e=>{zi=Lt({},e)},"saveConfigFromInitialize"),tf=p(e=>(Ht=Lt(Ht,e),pa(Ht,Ne),Ht),"updateSiteConfig"),dl=p(()=>Lt({},Ht),"getSiteConfig"),ul=p(e=>(fl(e),Lt(Ur,e),St()),"setConfig"),St=p(()=>Lt({},Ur),"getConfig"),gl=p(e=>{e&&(["secure",...Ht.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&gl(e[t])}))},"sanitize"),ef=p(e=>{var t;Wi(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ne.push(e),pa(Ht,Ne)},"addDirective"),Ni=p((e=Ht)=>{Ne=[],pa(e,Ne)},"reset"),rf={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."},qo={},pl=p(e=>{qo[e]||(z.warn(rf[e]),qo[e]=!0)},"issueWarning"),fl=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&pl("LAZY_LOAD_DEPRECATED")},"checkConfig"),ZS=p(()=>{let e={};zi&&(e=Lt(e,zi));for(const t of Ne)e=Lt(e,t);return e},"getUserDefinedConfig"),zt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&pl("FLOWCHART_HTML_LABELS_DEPRECATED"),ge(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ml=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,jr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,af=/\s*%%.*\n/gm,mr,yl=(mr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(mr,"UnknownDiagramError"),mr),He={},Ps=p(function(e,t){e=e.replace(ml,"").replace(jr,"").replace(af,`
|
|
3
|
-
`);for(const[r,{detector:i}]of Object.entries(He))if(i(e,t))return r;throw new yl(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ua=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Cl(t,r,i)},"registerLazyLoadedDiagrams"),Cl=p((e,t,r)=>{He[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),He[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),sf=p(e=>He[e].loader,"getDiagramLoader"),si=/<br\s*\/?>/gi,of=p(e=>e?bl(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),nf=(()=>{let e=!1;return()=>{e||(xl(),e=!0)}})();function xl(){const e="data-temp-href-target";xr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),xr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(xl,"setupDompurifyHooks");var kl=p(e=>(nf(),xr.sanitize(e)),"removeScript"),Wo=p((e,t)=>{if(zt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=kl(e):r!=="loose"&&(e=bl(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=df(e))}return e},"sanitizeMore"),re=p((e,t)=>e&&(t.dompurifyConfig?e=xr.sanitize(Wo(e,t),t.dompurifyConfig).toString():e=xr.sanitize(Wo(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),lf=p((e,t)=>typeof e=="string"?re(e,t):e.flat().map(r=>re(r,t)),"sanitizeTextOrArray"),hf=p(e=>si.test(e),"hasBreaks"),cf=p(e=>e.split(si),"splitBreaks"),df=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),bl=p(e=>e.replace(si,"#br#"),"breakToPlaceholder"),uf=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),gf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),pf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),zo=p(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];ff(s,n)&&(a=s+","+n,i++,r.pop())}r.push(mf(a))}return r.join("")},"parseGenericTypes"),ja=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),ff=p((e,t)=>{const r=ja(e,"~"),i=ja(t,"~");return r===1&&i===1},"shouldCombineSets"),mf=p(e=>{const t=ja(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"),No=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Va=/\$\$(.*?)\$\$/g,Zr=p(e=>{var t;return(((t=e.match(Va))==null?void 0:t.length)??0)>0},"hasKatex"),QS=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await wl(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"),yf=p(async(e,t)=>{if(!Zr(e))return e;if(!(No()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Va,"MathML is unsupported in this environment.");{const{default:r}=await ht(async()=>{const{default:a}=await import("./vendor-markdown-BRX1CUPf.js").then(s=>s.h);return{default:a}},[]),i=t.forceLegacyMathML||!No()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(si).map(a=>Zr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Va,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),wl=p(async(e,t)=>re(await yf(e,t),t),"renderKatexSanitized"),oi={getRows:of,sanitizeText:re,sanitizeTextOrArray:lf,hasBreaks:hf,splitBreaks:cf,lineBreakRegex:si,removeScript:kl,getUrl:uf,evaluate:ge,getMax:gf,getMin:pf},Cf=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),xf=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Sl=p(function(e,t,r,i){const a=xf(t,r,i);Cf(e,a)},"configureSvgSize"),kf=p(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,n=a.height;z.info(`SVG bounds: ${s}x${n}`,a);let o=0,l=0;z.info(`Graph bounds: ${o}x${l}`,e),o=s+r*2,l=n+r*2,z.info(`Calculated bounds: ${o}x${l}`),Sl(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"),_i={};function Ga(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
4
|
-
`)}p(Ga,"cssStyleSheetToString");var bf=p((e,t,r,i)=>{let a="";return e in _i&&_i[e]?a=_i[e]({...r,svgId:i}):z.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
|
-
[data-look="neo"].swimlane.cluster rect {
|
|
87
|
-
filter: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[data-look="neo"].node path {
|
|
92
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
93
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[data-look="neo"].node .outer-path {
|
|
97
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
[data-look="neo"].node .neo-line path {
|
|
101
|
-
stroke: ${r.nodeBorder};
|
|
102
|
-
filter: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[data-look="neo"].node circle{
|
|
106
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
107
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
[data-look="neo"].node circle .state-start{
|
|
111
|
-
fill: #000000;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[data-look="neo"].icon-shape .icon {
|
|
115
|
-
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
116
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
120
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
121
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
${t}
|
|
125
|
-
`},"getStyles"),wf=p((e,t)=>{t!==void 0&&(_i[e]=t)},"addStylesForDiagram"),Sf=bf,Tl={};fp(Tl,{clear:()=>Tf,getAccDescription:()=>Lf,getAccTitle:()=>vf,getDiagramTitle:()=>Mf,setAccDescription:()=>_f,setAccTitle:()=>Bf,setDiagramTitle:()=>Ff});var Rs="",qs="",Ws="",zs=p(e=>re(e,St()),"sanitizeText"),Tf=p(()=>{Rs="",Ws="",qs=""},"clear"),Bf=p(e=>{Rs=zs(e).replace(/^\s+/g,"")},"setAccTitle"),vf=p(()=>Rs,"getAccTitle"),_f=p(e=>{Ws=zs(e).replace(/\n\s+/g,`
|
|
126
|
-
`)},"setAccDescription"),Lf=p(()=>Ws,"getAccDescription"),Ff=p(e=>{qs=zs(e)},"setDiagramTitle"),Mf=p(()=>qs,"getDiagramTitle"),Ho=z,Af=Os,mt=St,KS=ul,JS=kr,Ns=p(e=>re(e,mt()),"sanitizeText"),Ef=kf,$f=p(()=>Tl,"getCommonDb"),Hi={},Yi=p((e,t,r)=>{var i;Hi[e]&&Ho.warn(`Diagram with id ${e} already registered. Overwriting.`),Hi[e]=t,r&&Cl(e,r),wf(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ho,Af,mt,Ns,Ef,$f(),()=>{})},"registerDiagram"),Za=p(e=>{if(e in Hi)return Hi[e];throw new If(e)},"getDiagram"),yr,If=(yr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(yr,"DiagramNotFoundError"),yr),Df={value:()=>{}};function Bl(){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 Li(r)}function Li(e){this._=e}function Of(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}})}Li.prototype=Bl.prototype={constructor:Li,on:function(e,t){var r=this._,i=Of(e+"",r),a,s=-1,n=i.length;if(arguments.length<2){for(;++s<n;)if((a=(e=i[s]).type)&&(a=Pf(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]=Yo(r[a],e.name,t);else if(t==null)for(a in r)r[a]=Yo(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 Li(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 Pf(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function Yo(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=Df,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Qa="http://www.w3.org/1999/xhtml";const Xo={svg:"http://www.w3.org/2000/svg",xhtml:Qa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Xo.hasOwnProperty(t)?{space:Xo[t],local:e}:e}function Rf(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Qa&&t.documentElement.namespaceURI===Qa?t.createElement(e):t.createElementNS(r,e)}}function qf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function vl(e){var t=fa(e);return(t.local?qf:Rf)(t)}function Wf(){}function Hs(e){return e==null?Wf:function(){return this.querySelector(e)}}function zf(e){typeof e!="function"&&(e=Hs(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 jt(i,this._parents)}function Nf(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Hf(){return[]}function _l(e){return e==null?Hf:function(){return this.querySelectorAll(e)}}function Yf(e){return function(){return Nf(e.apply(this,arguments))}}function Xf(e){typeof e=="function"?e=Yf(e):e=_l(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 jt(i,a)}function Ll(e){return function(){return this.matches(e)}}function Fl(e){return function(t){return t.matches(e)}}var Uf=Array.prototype.find;function jf(e){return function(){return Uf.call(this.children,e)}}function Vf(){return this.firstElementChild}function Gf(e){return this.select(e==null?Vf:jf(typeof e=="function"?e:Fl(e)))}var Zf=Array.prototype.filter;function Qf(){return Array.from(this.children)}function Kf(e){return function(){return Zf.call(this.children,e)}}function Jf(e){return this.selectAll(e==null?Qf:Kf(typeof e=="function"?e:Fl(e)))}function tm(e){typeof e!="function"&&(e=Ll(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 jt(i,this._parents)}function Ml(e){return new Array(e.length)}function em(){return new jt(this._enter||this._groups.map(Ml),this._parents)}function Xi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xi.prototype={constructor:Xi,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 rm(e){return function(){return e}}function im(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 Xi(e,s[n]);for(;n<l;++n)(o=t[n])&&(a[n]=o)}function am(e,t,r,i,a,s,n){var o,l,h=new Map,c=t.length,d=s.length,g=new Array(c),u;for(o=0;o<c;++o)(l=t[o])&&(g[o]=u=n.call(l,l.__data__,o,t)+"",h.has(u)?a[o]=l:h.set(u,l));for(o=0;o<d;++o)u=n.call(e,s[o],o,s)+"",(l=h.get(u))?(i[o]=l,l.__data__=s[o],h.delete(u)):r[o]=new Xi(e,s[o]);for(o=0;o<c;++o)(l=t[o])&&h.get(g[o])===l&&(a[o]=l)}function sm(e){return e.__data__}function om(e,t){if(!arguments.length)return Array.from(this,sm);var r=t?am:im,i=this._parents,a=this._groups;typeof e!="function"&&(e=rm(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],d=a[h],g=d.length,u=nm(e.call(c,c&&c.__data__,h,i)),m=u.length,f=o[h]=new Array(m),y=n[h]=new Array(m),C=l[h]=new Array(g);r(c,d,f,y,C,u,t);for(var k=0,b=0,w,S;k<m;++k)if(w=f[k]){for(k>=b&&(b=k+1);!(S=y[b])&&++b<m;);w._next=S||null}}return n=new jt(n,i),n._enter=o,n._exit=l,n}function nm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lm(){return new jt(this._exit||this._groups.map(Ml),this._parents)}function hm(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 cm(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],d=h.length,g=o[l]=new Array(d),u,m=0;m<d;++m)(u=h[m]||c[m])&&(g[m]=u);for(;l<a;++l)o[l]=r[l];return new jt(o,this._parents)}function dm(){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 um(e){e||(e=gm);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}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 jt(a,this._parents).order()}function gm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function fm(){return Array.from(this)}function mm(){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 ym(){let e=0;for(const t of this)++e;return e}function Cm(){return!this.node()}function xm(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 km(e){return function(){this.removeAttribute(e)}}function bm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wm(e,t){return function(){this.setAttribute(e,t)}}function Sm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Tm(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Bm(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 vm(e,t){var r=fa(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?bm:km:typeof t=="function"?r.local?Bm:Tm:r.local?Sm:wm)(r,t))}function Al(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _m(e){return function(){this.style.removeProperty(e)}}function Lm(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Fm(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Mm(e,t,r){return arguments.length>1?this.each((t==null?_m:typeof t=="function"?Fm:Lm)(e,t,r??"")):br(this.node(),e)}function br(e,t){return e.style.getPropertyValue(t)||Al(e).getComputedStyle(e,null).getPropertyValue(t)}function Am(e){return function(){delete this[e]}}function Em(e,t){return function(){this[e]=t}}function $m(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Im(e,t){return arguments.length>1?this.each((t==null?Am:typeof t=="function"?$m:Em)(e,t)):this.node()[e]}function El(e){return e.trim().split(/^|\s+/)}function Ys(e){return e.classList||new $l(e)}function $l(e){this._node=e,this._names=El(e.getAttribute("class")||"")}$l.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 Il(e,t){for(var r=Ys(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function Dl(e,t){for(var r=Ys(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function Dm(e){return function(){Il(this,e)}}function Om(e){return function(){Dl(this,e)}}function Pm(e,t){return function(){(t.apply(this,arguments)?Il:Dl)(this,e)}}function Rm(e,t){var r=El(e+"");if(arguments.length<2){for(var i=Ys(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?Pm:t?Dm:Om)(r,t))}function qm(){this.textContent=""}function Wm(e){return function(){this.textContent=e}}function zm(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Nm(e){return arguments.length?this.each(e==null?qm:(typeof e=="function"?zm:Wm)(e)):this.node().textContent}function Hm(){this.innerHTML=""}function Ym(e){return function(){this.innerHTML=e}}function Xm(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Um(e){return arguments.length?this.each(e==null?Hm:(typeof e=="function"?Xm:Ym)(e)):this.node().innerHTML}function jm(){this.nextSibling&&this.parentNode.appendChild(this)}function Vm(){return this.each(jm)}function Gm(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zm(){return this.each(Gm)}function Qm(e){var t=typeof e=="function"?e:vl(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Km(){return null}function Jm(e,t){var r=typeof e=="function"?e:vl(e),i=t==null?Km:typeof t=="function"?t:Hs(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ty(){var e=this.parentNode;e&&e.removeChild(this)}function ey(){return this.each(ty)}function ry(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ay(e){return this.select(e?iy:ry)}function sy(e){return arguments.length?this.property("__data__",e):this.node().__data__}function oy(e){return function(t){e.call(this,t,this.__data__)}}function ny(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 ly(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 hy(e,t,r){return function(){var i=this.__on,a,s=oy(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 cy(e,t,r){var i=ny(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?hy:ly,a=0;a<s;++a)this.each(o(i[a],t,r));return this}function Ol(e,t,r){var i=Al(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 dy(e,t){return function(){return Ol(this,e,t)}}function uy(e,t){return function(){return Ol(this,e,t.apply(this,arguments))}}function gy(e,t){return this.each((typeof t=="function"?uy:dy)(e,t))}function*py(){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 Pl=[null];function jt(e,t){this._groups=e,this._parents=t}function ni(){return new jt([[document.documentElement]],Pl)}function fy(){return this}jt.prototype=ni.prototype={constructor:jt,select:zf,selectAll:Xf,selectChild:Gf,selectChildren:Jf,filter:tm,data:om,enter:em,exit:lm,join:hm,merge:cm,selection:fy,order:dm,sort:um,call:pm,nodes:fm,node:mm,size:ym,empty:Cm,each:xm,attr:vm,style:Mm,property:Im,classed:Rm,text:Nm,html:Um,raise:Vm,lower:Zm,append:Qm,insert:Jm,remove:ey,clone:ay,datum:sy,on:cy,dispatch:gy,[Symbol.iterator]:py};function ct(e){return typeof e=="string"?new jt([[document.querySelector(e)]],[document.documentElement]):new jt([[e]],Pl)}var Uo=180/Math.PI,Ka={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rl(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)*Uo,skewX:Math.atan(l)*Uo,scaleX:n,scaleY:o}}var gi;function my(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ka:Rl(t.a,t.b,t.c,t.d,t.e,t.f)}function yy(e){return e==null||(gi||(gi=document.createElementNS("http://www.w3.org/2000/svg","g")),gi.setAttribute("transform",e),!(e=gi.transform.baseVal.consolidate()))?Ka:(e=e.matrix,Rl(e.a,e.b,e.c,e.d,e.e,e.f))}function ql(e,t,r,i){function a(h){return h.length?h.pop()+" ":""}function s(h,c,d,g,u,m){if(h!==d||c!==g){var f=u.push("translate(",null,t,null,r);m.push({i:f-4,x:Oe(h,d)},{i:f-2,x:Oe(c,g)})}else(d||g)&&u.push("translate("+d+t+g+r)}function n(h,c,d,g){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),g.push({i:d.push(a(d)+"rotate(",null,i)-2,x:Oe(h,c)})):c&&d.push(a(d)+"rotate("+c+i)}function o(h,c,d,g){h!==c?g.push({i:d.push(a(d)+"skewX(",null,i)-2,x:Oe(h,c)}):c&&d.push(a(d)+"skewX("+c+i)}function l(h,c,d,g,u,m){if(h!==d||c!==g){var f=u.push(a(u)+"scale(",null,",",null,")");m.push({i:f-4,x:Oe(h,d)},{i:f-2,x:Oe(c,g)})}else(d!==1||g!==1)&&u.push(a(u)+"scale("+d+","+g+")")}return function(h,c){var d=[],g=[];return h=e(h),c=e(c),s(h.translateX,h.translateY,c.translateX,c.translateY,d,g),n(h.rotate,c.rotate,d,g),o(h.skewX,c.skewX,d,g),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,d,g),h=c=null,function(u){for(var m=-1,f=g.length,y;++m<f;)d[(y=g[m]).i]=y.x(u);return d.join("")}}}var Cy=ql(my,"px, ","px)","deg)"),xy=ql(yy,", ",")",")"),wr=0,Rr=0,Mr=0,Wl=1e3,Ui,qr,ji=0,Ye=0,ma=0,Qr=typeof performance=="object"&&performance.now?performance:Date,zl=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Xs(){return Ye||(zl(ky),Ye=Qr.now()+ma)}function ky(){Ye=0}function Vi(){this._call=this._time=this._next=null}Vi.prototype=Nl.prototype={constructor:Vi,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Xs():+r)+(t==null?0:+t),!this._next&&qr!==this&&(qr?qr._next=this:Ui=this,qr=this),this._call=e,this._time=r,Ja()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ja())}};function Nl(e,t,r){var i=new Vi;return i.restart(e,t,r),i}function by(){Xs(),++wr;for(var e=Ui,t;e;)(t=Ye-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wr}function jo(){Ye=(ji=Qr.now())+ma,wr=Rr=0;try{by()}finally{wr=0,Sy(),Ye=0}}function wy(){var e=Qr.now(),t=e-ji;t>Wl&&(ma-=t,ji=e)}function Sy(){for(var e,t=Ui,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:Ui=r);qr=e,Ja(i)}function Ja(e){if(!wr){Rr&&(Rr=clearTimeout(Rr));var t=e-Ye;t>24?(e<1/0&&(Rr=setTimeout(jo,e-Qr.now()-ma)),Mr&&(Mr=clearInterval(Mr))):(Mr||(ji=Qr.now(),Mr=setInterval(wy,Wl)),wr=1,zl(jo))}}function Vo(e,t,r){var i=new Vi;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Ty=Bl("start","end","cancel","interrupt"),By=[],Hl=0,Go=1,ts=2,Fi=3,Zo=4,es=5,Mi=6;function ya(e,t,r,i,a,s){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;vy(e,r,{name:t,index:i,group:a,on:Ty,tween:By,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Hl})}function Us(e,t){var r=ae(e,t);if(r.state>Hl)throw new Error("too late; already scheduled");return r}function pe(e,t){var r=ae(e,t);if(r.state>Fi)throw new Error("too late; already running");return r}function ae(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function vy(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Nl(s,0,r.time);function s(h){r.state=Go,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var c,d,g,u;if(r.state!==Go)return l();for(c in i)if(u=i[c],u.name===r.name){if(u.state===Fi)return Vo(n);u.state===Zo?(u.state=Mi,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<t&&(u.state=Mi,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(Vo(function(){r.state===Fi&&(r.state=Zo,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=ts,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ts){for(r.state=Fi,a=new Array(g=r.tween.length),c=0,d=-1;c<g;++c)(u=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(a[++d]=u);a.length=d+1}}function o(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=es,1),d=-1,g=a.length;++d<g;)a[d].call(e,c);r.state===es&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Mi,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function _y(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>ts&&i.state<es,i.state=Mi,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}s&&delete e.__transition}}function Ly(e){return this.each(function(){_y(this,e)})}function Fy(e,t){var r,i;return function(){var a=pe(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 My(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=pe(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 Ay(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ae(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?Fy:My)(r,e,t))}function js(e,t,r){var i=e._id;return e.each(function(){var a=pe(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return ae(a,i).value[t]}}function Yl(e,t){var r;return(typeof t=="number"?Oe:t instanceof $o?Io:(r=$o(t))?(t=r,Io):ap)(e,t)}function Ey(e){return function(){this.removeAttribute(e)}}function $y(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Iy(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 Dy(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 Oy(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 Py(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 Ry(e,t){var r=fa(e),i=r==="transform"?xy:Yl;return this.attrTween(e,typeof t=="function"?(r.local?Py:Oy)(r,i,js(this,"attr."+e,t)):t==null?(r.local?$y:Ey)(r):(r.local?Dy:Iy)(r,i,t))}function qy(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Wy(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function zy(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Wy(e,s)),r}return a._value=t,a}function Ny(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&qy(e,s)),r}return a._value=t,a}function Hy(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=fa(e);return this.tween(r,(i.local?zy:Ny)(i,t))}function Yy(e,t){return function(){Us(this,e).delay=+t.apply(this,arguments)}}function Xy(e,t){return t=+t,function(){Us(this,e).delay=t}}function Uy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Yy:Xy)(t,e)):ae(this.node(),t).delay}function jy(e,t){return function(){pe(this,e).duration=+t.apply(this,arguments)}}function Vy(e,t){return t=+t,function(){pe(this,e).duration=t}}function Gy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jy:Vy)(t,e)):ae(this.node(),t).duration}function Zy(e,t){if(typeof t!="function")throw new Error;return function(){pe(this,e).ease=t}}function Qy(e){var t=this._id;return arguments.length?this.each(Zy(t,e)):ae(this.node(),t).ease}function Ky(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;pe(this,e).ease=r}}function Jy(e){if(typeof e!="function")throw new Error;return this.each(Ky(this._id,e))}function tC(e){typeof e!="function"&&(e=Ll(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 we(i,this._parents,this._name,this._id)}function eC(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,d=n[o]=new Array(c),g,u=0;u<c;++u)(g=l[u]||h[u])&&(d[u]=g);for(;o<i;++o)n[o]=t[o];return new we(n,this._parents,this._name,this._id)}function rC(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 iC(e,t,r){var i,a,s=rC(t)?Us:pe;return function(){var n=s(this,e),o=n.on;o!==i&&(a=(i=o).copy()).on(t,r),n.on=a}}function aC(e,t){var r=this._id;return arguments.length<2?ae(this.node(),r).on.on(e):this.each(iC(r,e,t))}function sC(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function oC(){return this.on("end.remove",sC(this._id))}function nC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Hs(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,d,g=0;g<l;++g)(c=o[g])&&(d=e.call(c,c.__data__,g,o))&&("__data__"in c&&(d.__data__=c.__data__),h[g]=d,ya(h[g],t,r,g,h,ae(c,r)));return new we(s,this._parents,t,r)}function lC(e){var t=this._name,r=this._id;typeof e!="function"&&(e=_l(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,d=0;d<h;++d)if(c=l[d]){for(var g=e.call(c,c.__data__,d,l),u,m=ae(c,r),f=0,y=g.length;f<y;++f)(u=g[f])&&ya(u,t,r,f,g,m);s.push(g),n.push(c)}return new we(s,n,t,r)}var hC=ni.prototype.constructor;function cC(){return new hC(this._groups,this._parents)}function dC(e,t){var r,i,a;return function(){var s=br(this,e),n=(this.style.removeProperty(e),br(this,e));return s===n?null:s===r&&n===i?a:a=t(r=s,i=n)}}function Xl(e){return function(){this.style.removeProperty(e)}}function uC(e,t,r){var i,a=r+"",s;return function(){var n=br(this,e);return n===a?null:n===i?s:s=t(i=n,r)}}function gC(e,t,r){var i,a,s;return function(){var n=br(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),br(this,e))),n===l?null:n===i&&l===a?s:(a=l,s=t(i=n,o))}}function pC(e,t){var r,i,a,s="style."+t,n="end."+s,o;return function(){var l=pe(this,e),h=l.on,c=l.value[s]==null?o||(o=Xl(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(n,a=c),l.on=i}}function fC(e,t,r){var i=(e+="")=="transform"?Cy:Yl;return t==null?this.styleTween(e,dC(e,i)).on("end.style."+e,Xl(e)):typeof t=="function"?this.styleTween(e,gC(e,i,js(this,"style."+e,t))).each(pC(this._id,e)):this.styleTween(e,uC(e,i,t),r).on("end.style."+e,null)}function mC(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function yC(e,t,r){var i,a;function s(){var n=t.apply(this,arguments);return n!==a&&(i=(a=n)&&mC(e,n,r)),i}return s._value=t,s}function CC(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,yC(e,t,r??""))}function xC(e){return function(){this.textContent=e}}function kC(e){return function(){var t=e(this);this.textContent=t??""}}function bC(e){return this.tween("text",typeof e=="function"?kC(js(this,"text",e)):xC(e==null?"":e+""))}function wC(e){return function(t){this.textContent=e.call(this,t)}}function SC(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&wC(a)),t}return i._value=e,i}function TC(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,SC(e))}function BC(){for(var e=this._name,t=this._id,r=Ul(),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=ae(l,t);ya(l,e,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new we(i,this._parents,e,r)}function vC(){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=pe(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 _C=0;function we(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Ul(){return++_C}var ye=ni.prototype;we.prototype={constructor:we,select:nC,selectAll:lC,selectChild:ye.selectChild,selectChildren:ye.selectChildren,filter:tC,merge:eC,selection:cC,transition:BC,call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:aC,attr:Ry,attrTween:Hy,style:fC,styleTween:CC,text:bC,textTween:TC,remove:oC,tween:Ay,delay:Uy,duration:Gy,ease:Qy,easeVarying:Jy,end:vC,[Symbol.iterator]:ye[Symbol.iterator]};function LC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var FC={time:null,delay:0,duration:250,ease:LC};function MC(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 AC(e){var t,r;e instanceof we?(t=e._id,e=e._name):(t=Ul(),(r=FC).time=Xs(),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])&&ya(l,e,t,h,n,r||MC(l,t));return new we(i,this._parents,e,t)}ni.prototype.interrupt=Ly;ni.prototype.transition=AC;function jl(e,t){this._basis=new jn(e),this._beta=t}jl.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 EC=(function e(t){function r(i){return t===1?new jn(i):new jl(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Gi(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 Vs(e,t){this._context=e,this._k=(1-t)/6}Vs.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:Gi(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:Gi(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 Vl=(function e(t){function r(i){return new Vs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Gs(e,t){this._context=e,this._k=(1-t)/6}Gs.prototype={areaStart:qi,areaEnd:qi,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:Gi(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 $C=(function e(t){function r(i){return new Gs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Zs(e,t){this._context=e,this._k=(1-t)/6}Zs.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:Gi(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 IC=(function e(t){function r(i){return new Zs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Qs(e,t,r){var i=e._x1,a=e._y1,s=e._x2,n=e._y2;if(e._l01_a>Do){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>Do){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 Gl(e,t){this._context=e,this._alpha=t}Gl.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:Qs(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 Zl=(function e(t){function r(i){return t?new Gl(i,t):new Vs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ql(e,t){this._context=e,this._alpha=t}Ql.prototype={areaStart:qi,areaEnd:qi,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:Qs(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 DC=(function e(t){function r(i){return t?new Ql(i,t):new Gs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Kl(e,t){this._context=e,this._alpha=t}Kl.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:Qs(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 OC=(function e(t){function r(i){return t?new Kl(i,t):new Zs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Wr(e,t,r){this.k=e,this.x=t,this.y=r}Wr.prototype={constructor:Wr,scale:function(e){return e===1?this:new Wr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wr(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+")"}};Wr.prototype;var PC=p(e=>{var a;const{securityLevel:t}=mt();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 Ks(e){return typeof e>"u"||e===null}p(Ks,"isNothing");function Jl(e){return typeof e=="object"&&e!==null}p(Jl,"isObject");function th(e){return Array.isArray(e)?e:Ks(e)?[]:[e]}p(th,"toArray");function eh(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}p(eh,"extend");function rh(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(rh,"repeat");function ih(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(ih,"isNegativeZero");var RC=Ks,qC=Jl,WC=th,zC=rh,NC=ih,HC=eh,Ft={isNothing:RC,isObject:qC,toArray:WC,repeat:zC,isNegativeZero:NC,extend:HC};function Js(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+=`
|
|
127
|
-
|
|
128
|
-
`+e.mark.snippet),i+" "+r):i}p(Js,"formatError");function Sr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Js(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Sr,"YAMLException$1");Sr.prototype=Object.create(Error.prototype);Sr.prototype.constructor=Sr;Sr.prototype.toString=p(function(t){return this.name+": "+Js(this,t)},"toString");var Yt=Sr;function Ai(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}}p(Ai,"getLine");function Ei(e,t){return Ft.repeat(" ",t-e.length)+e}p(Ei,"padStart");function ah(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,d=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)h=Ai(e.buffer,i[n-l],a[n-l],e.position-(i[n]-i[n-l]),d),o=Ft.repeat(" ",t.indent)+Ei((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
129
|
-
`+o;for(h=Ai(e.buffer,i[n],a[n],e.position,d),o+=Ft.repeat(" ",t.indent)+Ei((e.line+1).toString(),c)+" | "+h.str+`
|
|
130
|
-
`,o+=Ft.repeat("-",t.indent+c+3+h.pos)+`^
|
|
131
|
-
`,l=1;l<=t.linesAfter&&!(n+l>=a.length);l++)h=Ai(e.buffer,i[n+l],a[n+l],e.position-(i[n]-i[n+l]),d),o+=Ft.repeat(" ",t.indent)+Ei((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
132
|
-
`;return o.replace(/\n$/,"")}p(ah,"makeSnippet");var YC=ah,XC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],UC=["scalar","sequence","mapping"];function sh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(sh,"compileStyleAliases");function oh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(XC.indexOf(r)===-1)throw new Yt('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=sh(t.styleAliases||null),UC.indexOf(this.kind)===-1)throw new Yt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(oh,"Type$1");var Pt=oh;function rs(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}p(rs,"compileList");function nh(){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(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(nh,"compileMap");function Zi(e){return this.extend(e)}p(Zi,"Schema$1");Zi.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Pt)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 Yt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Pt))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Yt("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 Yt("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 Pt))throw new Yt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Zi.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=rs(a,"implicit"),a.compiledExplicit=rs(a,"explicit"),a.compiledTypeMap=nh(a.compiledImplicit,a.compiledExplicit),a},"extend");var jC=Zi,VC=new Pt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),GC=new Pt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),ZC=new Pt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),QC=new jC({explicit:[VC,GC,ZC]});function lh(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(lh,"resolveYamlNull");function hh(){return null}p(hh,"constructYamlNull");function ch(e){return e===null}p(ch,"isNull");var KC=new Pt("tag:yaml.org,2002:null",{kind:"scalar",resolve:lh,construct:hh,predicate:ch,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function dh(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")}p(dh,"resolveYamlBoolean");function uh(e){return e==="true"||e==="True"||e==="TRUE"}p(uh,"constructYamlBoolean");function gh(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(gh,"isBoolean");var JC=new Pt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:dh,construct:uh,predicate:gh,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ph(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(ph,"isHexCode");function fh(e){return 48<=e&&e<=55}p(fh,"isOctCode");function mh(e){return 48<=e&&e<=57}p(mh,"isDecCode");function yh(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(!ph(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!fh(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!mh(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}p(yh,"resolveYamlInteger");function Ch(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)}p(Ch,"constructYamlInteger");function xh(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ft.isNegativeZero(e)}p(xh,"isInteger");var t0=new Pt("tag:yaml.org,2002:int",{kind:"scalar",resolve:yh,construct:Ch,predicate:xh,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(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"]}}),e0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function kh(e){return!(e===null||!e0.test(e)||e[e.length-1]==="_")}p(kh,"resolveYamlFloat");function bh(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)}p(bh,"constructYamlFloat");var r0=/^[-+]?[0-9]+e/;function wh(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(Ft.isNegativeZero(e))return"-0.0";return r=e.toString(10),r0.test(r)?r.replace("e",".e"):r}p(wh,"representYamlFloat");function Sh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ft.isNegativeZero(e))}p(Sh,"isFloat");var i0=new Pt("tag:yaml.org,2002:float",{kind:"scalar",resolve:kh,construct:bh,predicate:Sh,represent:wh,defaultStyle:"lowercase"}),Th=QC.extend({implicit:[KC,JC,t0,i0]}),a0=Th,Bh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vh=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 _h(e){return e===null?!1:Bh.exec(e)!==null||vh.exec(e)!==null}p(_h,"resolveYamlTimestamp");function Lh(e){var t,r,i,a,s,n,o,l=0,h=null,c,d,g;if(t=Bh.exec(e),t===null&&(t=vh.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],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),g=new Date(Date.UTC(r,i,a,s,n,o,l)),h&&g.setTime(g.getTime()-h),g}p(Lh,"constructYamlTimestamp");function Fh(e){return e.toISOString()}p(Fh,"representYamlTimestamp");var s0=new Pt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_h,construct:Lh,instanceOf:Date,represent:Fh});function Mh(e){return e==="<<"||e===null}p(Mh,"resolveYamlMerge");var o0=new Pt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mh}),to=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
133
|
-
\r`;function Ah(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=to;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}p(Ah,"resolveYamlBinary");function Eh(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=to,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)}p(Eh,"constructYamlBinary");function $h(e){var t="",r=0,i,a,s=e.length,n=to;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}p($h,"representYamlBinary");function Ih(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Ih,"isBinary");var n0=new Pt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ah,construct:Eh,predicate:Ih,represent:$h}),l0=Object.prototype.hasOwnProperty,h0=Object.prototype.toString;function Dh(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,h0.call(a)!=="[object Object]")return!1;for(s in a)if(l0.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}p(Dh,"resolveYamlOmap");function Oh(e){return e!==null?e:[]}p(Oh,"constructYamlOmap");var c0=new Pt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Dh,construct:Oh}),d0=Object.prototype.toString;function Ph(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],d0.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}p(Ph,"resolveYamlPairs");function Rh(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}p(Rh,"constructYamlPairs");var u0=new Pt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ph,construct:Rh}),g0=Object.prototype.hasOwnProperty;function qh(e){if(e===null)return!0;var t,r=e;for(t in r)if(g0.call(r,t)&&r[t]!==null)return!1;return!0}p(qh,"resolveYamlSet");function Wh(e){return e!==null?e:{}}p(Wh,"constructYamlSet");var p0=new Pt("tag:yaml.org,2002:set",{kind:"mapping",resolve:qh,construct:Wh}),zh=a0.extend({implicit:[s0,o0],explicit:[n0,c0,u0,p0]}),Me=Object.prototype.hasOwnProperty,Qi=1,Nh=2,Hh=3,Ki=4,Ea=1,f0=2,Qo=3,m0=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y0=/[\x85\u2028\u2029]/,C0=/[,\[\]\{\}]/,Yh=/^(?:!|!!|![a-z\-]+!)$/i,Xh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is(e){return Object.prototype.toString.call(e)}p(is,"_class");function te(e){return e===10||e===13}p(te,"is_EOL");function Fe(e){return e===9||e===32}p(Fe,"is_WHITE_SPACE");function qt(e){return e===9||e===32||e===10||e===13}p(qt,"is_WS_OR_EOL");function qe(e){return e===44||e===91||e===93||e===123||e===125}p(qe,"is_FLOW_INDICATOR");function Uh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(Uh,"fromHexCode");function jh(e){return e===120?2:e===117?4:e===85?8:0}p(jh,"escapedHexLen");function Vh(e){return 48<=e&&e<=57?e-48:-1}p(Vh,"fromDecimalCode");function as(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
134
|
-
`: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":""}p(as,"simpleEscapeSequence");function Gh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Gh,"charFromCodepoint");function eo(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(eo,"setProperty");var Zh=new Array(256),Qh=new Array(256);for(Ie=0;Ie<256;Ie++)Zh[Ie]=as(Ie)?1:0,Qh[Ie]=as(Ie);var Ie;function Kh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||zh,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=[]}p(Kh,"State$1");function ro(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=YC(r),new Yt(t,r)}p(ro,"generateError");function J(e,t){throw ro(e,t)}p(J,"throwError");function Kr(e,t){e.onWarning&&e.onWarning.call(null,ro(e,t))}p(Kr,"throwWarning");var Ko={YAML:p(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&&Kr(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var a,s;i.length!==2&&J(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],Yh.test(a)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),Me.call(t.tagMap,a)&&J(t,'there is a previously declared suffix for "'+a+'" tag handle'),Xh.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 be(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 m0.test(o)&&J(e,"the stream contains non-printable characters");e.result+=o}}p(be,"captureSegment");function ss(e,t,r,i){var a,s,n,o;for(Ft.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],Me.call(t,s)||(eo(t,s,r[s]),i[s]=!0)}p(ss,"mergeMappings");function We(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"&&is(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&is(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)ss(e,t,s[h],r);else ss(e,t,s,r);else!e.json&&!Me.call(r,a)&&Me.call(t,a)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,J(e,"duplicated mapping key")),eo(t,a,s),delete r[a];return t}p(We,"storeMappingPair");function Ca(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}p(Ca,"readLineBreak");function Bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Fe(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(te(a))for(Ca(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&&Kr(e,"deficient indentation"),i}p(Bt,"skipSeparationSpace");function li(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||qt(r)))}p(li,"testDocumentSeparator");function xa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ft.repeat(`
|
|
135
|
-
`,t-1))}p(xa,"writeFoldedLines");function Jh(e,t,r){var i,a,s,n,o,l,h,c,d=e.kind,g=e.result,u;if(u=e.input.charCodeAt(e.position),qt(u)||qe(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(a=e.input.charCodeAt(e.position+1),qt(a)||r&&qe(a)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;u!==0;){if(u===58){if(a=e.input.charCodeAt(e.position+1),qt(a)||r&&qe(a))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&li(e)||r&&qe(u))break;if(te(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=h,e.lineIndent=c;break}}o&&(be(e,s,n,!1),xa(e,e.line-l),s=n=e.position,o=!1),Fe(u)||(n=e.position+1),u=e.input.charCodeAt(++e.position)}return be(e,s,n,!1),e.result?!0:(e.kind=d,e.result=g,!1)}p(Jh,"readPlainScalar");function tc(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(be(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 te(r)?(be(e,i,a,!0),xa(e,Bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&li(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")}p(tc,"readSingleQuotedScalar");function ec(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 be(e,r,e.position,!0),e.position++,!0;if(o===92){if(be(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),te(o))Bt(e,!1,t);else if(o<256&&Zh[o])e.result+=Qh[o],e.position++;else if((n=jh(o))>0){for(a=n,s=0;a>0;a--)o=e.input.charCodeAt(++e.position),(n=Uh(o))>=0?s=(s<<4)+n:J(e,"expected hexadecimal character");e.result+=Gh(s),e.position++}else J(e,"unknown escape sequence");r=i=e.position}else te(o)?(be(e,r,i,!0),xa(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&li(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")}p(ec,"readDoubleQuotedScalar");function rc(e,t){var r=!0,i,a,s,n=e.tag,o,l=e.anchor,h,c,d,g,u,m=Object.create(null),f,y,C,k;if(k=e.input.charCodeAt(e.position),k===91)c=93,u=!1,o=[];else if(k===123)c=125,u=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),k=e.input.charCodeAt(++e.position);k!==0;){if(Bt(e,!0,t),k=e.input.charCodeAt(e.position),k===c)return e.position++,e.tag=n,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=o,!0;r?k===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),y=f=C=null,d=g=!1,k===63&&(h=e.input.charCodeAt(e.position+1),qt(h)&&(d=g=!0,e.position++,Bt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,Xe(e,t,Qi,!1,!0),y=e.tag,f=e.result,Bt(e,!0,t),k=e.input.charCodeAt(e.position),(g||e.line===i)&&k===58&&(d=!0,k=e.input.charCodeAt(++e.position),Bt(e,!0,t),Xe(e,t,Qi,!1,!0),C=e.result),u?We(e,o,m,y,f,C,i,a,s):d?o.push(We(e,null,m,y,f,C,i,a,s)):o.push(f),Bt(e,!0,t),k=e.input.charCodeAt(e.position),k===44?(r=!0,k=e.input.charCodeAt(++e.position)):r=!1}J(e,"unexpected end of the stream within a flow collection")}p(rc,"readFlowCollection");function ic(e,t){var r,i,a=Ea,s=!1,n=!1,o=t,l=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Ea===a?a=d===43?Qo:f0:J(e,"repeat of a chomping mode identifier");else if((c=Vh(d))>=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(Fe(d)){do d=e.input.charCodeAt(++e.position);while(Fe(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!te(d)&&d!==0)}for(;d!==0;){for(Ca(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),te(d)){l++;continue}if(e.lineIndent<o){a===Qo?e.result+=Ft.repeat(`
|
|
136
|
-
`,s?1+l:l):a===Ea&&s&&(e.result+=`
|
|
137
|
-
`);break}for(i?Fe(d)?(h=!0,e.result+=Ft.repeat(`
|
|
138
|
-
`,s?1+l:l)):h?(h=!1,e.result+=Ft.repeat(`
|
|
139
|
-
`,l+1)):l===0?s&&(e.result+=" "):e.result+=Ft.repeat(`
|
|
140
|
-
`,l):e.result+=Ft.repeat(`
|
|
141
|
-
`,s?1+l:l),s=!0,n=!0,l=0,r=e.position;!te(d)&&d!==0;)d=e.input.charCodeAt(++e.position);be(e,r,e.position,!1)}return!0}p(ic,"readBlockScalar");function os(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),!qt(n))));){if(o=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Xe(e,t,Hh,!1,!0),s.push(e.result),Bt(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}p(os,"readBlockSequence");function ac(e,t,r){var i,a,s,n,o,l,h=e.tag,c=e.anchor,d={},g=Object.create(null),u=null,m=null,f=null,y=!1,C=!1,k;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),k=e.input.charCodeAt(e.position);k!==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,(k===63||k===58)&&qt(i))k===63?(y&&(We(e,d,g,u,m,null,n,o,l),u=m=f=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,k=i;else{if(n=e.line,o=e.lineStart,l=e.position,!Xe(e,r,Nh,!1,!0))break;if(e.line===s){for(k=e.input.charCodeAt(e.position);Fe(k);)k=e.input.charCodeAt(++e.position);if(k===58)k=e.input.charCodeAt(++e.position),qt(k)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,d,g,u,m,null,n,o,l),u=m=f=null),C=!0,y=!1,a=!1,u=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),Xe(e,t,Ki,!0,a)&&(y?m=e.result:f=e.result),y||(We(e,d,g,u,m,f,n,o,l),u=m=f=null),Bt(e,!0,-1),k=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&k!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,d,g,u,m,null,n,o,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}p(ac,"readBlockMapping");function sc(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&&!qt(n);)n===33&&(i?J(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Yh.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),C0.test(s)&&J(e,"tag suffix cannot contain flow indicator characters")}s&&!Xh.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:Me.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}p(sc,"readTagProperty");function oc(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&&!qt(r)&&!qe(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}p(oc,"readAnchorProperty");function nc(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&&!qt(i)&&!qe(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),Me.call(e.anchorMap,r)||J(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}p(nc,"readAlias");function Xe(e,t,r,i,a){var s,n,o,l=1,h=!1,c=!1,d,g,u,m,f,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=Ki===r||Hh===r,i&&Bt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;sc(e)||oc(e);)Bt(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||Ki===r)&&(Qi===r||Nh===r?f=t:f=t+1,y=e.position-e.lineStart,l===1?o&&(os(e,y)||ac(e,y,f))||rc(e,f)?c=!0:(n&&ic(e,f)||tc(e,f)||ec(e,f)?c=!0:nc(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):Jh(e,f,Qi===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=o&&os(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+'"'),d=0,g=e.implicitTypes.length;d<g;d+=1)if(m=e.implicitTypes[d],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(Me.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,g=u.length;d<g;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){m=u[d];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}p(Xe,"composeNode");function lc(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&&(Bt(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&&!qt(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(;Fe(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!te(n));break}if(te(n))break;for(r=e.position;n!==0&&!qt(n);)n=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}n!==0&&Ca(e),Me.call(Ko,i)?Ko[i](e,i,a):Kr(e,'unknown document directive "'+i+'"')}if(Bt(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,Bt(e,!0,-1)):s&&J(e,"directives end mark is expected"),Xe(e,e.lineIndent-1,Ki,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&y0.test(e.input.slice(t,e.position))&&Kr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&li(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}p(lc,"readDocument");function io(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
142
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Kh(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;)lc(r);return r.documents}p(io,"loadDocuments");function x0(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=io(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}p(x0,"loadAll$1");function hc(e,t){var r=io(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Yt("expected a single document in the stream, but found more")}}p(hc,"load$1");var k0=hc,b0={load:k0},cc=Object.prototype.toString,dc=Object.prototype.hasOwnProperty,ao=65279,w0=9,Jr=10,S0=13,T0=32,B0=33,v0=34,ns=35,_0=37,L0=38,F0=39,M0=42,uc=44,A0=45,Ji=58,E0=61,$0=62,I0=63,D0=64,gc=91,pc=93,O0=96,fc=123,P0=124,mc=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var R0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],q0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yc(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&&dc.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[n]=o;return r}p(yc,"compileStyleMap");function Cc(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 Yt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ft.repeat("0",i-t.length)+t}p(Cc,"encodeHex");var W0=1,ti=2;function xc(e){this.schema=e.schema||zh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ft.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=yc(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==='"'?ti:W0,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}p(xc,"State");function ls(e,t){for(var r=Ft.repeat(" ",t),i=0,a=-1,s="",n,o=e.length;i<o;)a=e.indexOf(`
|
|
143
|
-
`,i),a===-1?(n=e.slice(i),i=o):(n=e.slice(i,a+1),i=a+1),n.length&&n!==`
|
|
144
|
-
`&&(s+=r),s+=n;return s}p(ls,"indentString");function ta(e,t){return`
|
|
145
|
-
`+Ft.repeat(" ",e.indent*t)}p(ta,"generateNextLine");function kc(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}p(kc,"testImplicitResolving");function ei(e){return e===T0||e===w0}p(ei,"isWhitespace");function Tr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ao||65536<=e&&e<=1114111}p(Tr,"isPrintable");function hs(e){return Tr(e)&&e!==ao&&e!==S0&&e!==Jr}p(hs,"isNsCharOrWhitespace");function cs(e,t,r){var i=hs(e),a=i&&!ei(e);return(r?i:i&&e!==uc&&e!==gc&&e!==pc&&e!==fc&&e!==mc)&&e!==ns&&!(t===Ji&&!a)||hs(t)&&!ei(t)&&e===ns||t===Ji&&a}p(cs,"isPlainSafe");function bc(e){return Tr(e)&&e!==ao&&!ei(e)&&e!==A0&&e!==I0&&e!==Ji&&e!==uc&&e!==gc&&e!==pc&&e!==fc&&e!==mc&&e!==ns&&e!==L0&&e!==M0&&e!==B0&&e!==P0&&e!==E0&&e!==$0&&e!==F0&&e!==v0&&e!==_0&&e!==D0&&e!==O0}p(bc,"isPlainSafeFirst");function wc(e){return!ei(e)&&e!==Ji}p(wc,"isPlainSafeLast");function rr(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}p(rr,"codePointAt");function so(e){var t=/^\n* /;return t.test(e)}p(so,"needIndentIndicator");var Sc=1,ds=2,Tc=3,Bc=4,Je=5;function vc(e,t,r,i,a,s,n,o){var l,h=0,c=null,d=!1,g=!1,u=i!==-1,m=-1,f=bc(rr(e,0))&&wc(rr(e,e.length-1));if(t||n)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=rr(e,l),!Tr(h))return Je;f=f&&cs(h,c,o),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=rr(e,l),h===Jr)d=!0,u&&(g=g||l-m-1>i&&e[m+1]!==" ",m=l);else if(!Tr(h))return Je;f=f&&cs(h,c,o),c=h}g=g||u&&l-m-1>i&&e[m+1]!==" "}return!d&&!g?f&&!n&&!a(e)?Sc:s===ti?Je:ds:r>9&&so(e)?Je:n?s===ti?Je:ds:g?Bc:Tc}p(vc,"chooseScalarStyle");function _c(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===ti?'""':"''";if(!e.noCompatMode&&(R0.indexOf(t)!==-1||q0.test(t)))return e.quotingType===ti?'"'+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 kc(e,h)}switch(p(l,"testAmbiguity"),vc(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!i,a)){case Sc:return t;case ds:return"'"+t.replace(/'/g,"''")+"'";case Tc:return"|"+us(t,e.indent)+gs(ls(t,s));case Bc:return">"+us(t,e.indent)+gs(ls(Lc(t,n),s));case Je:return'"'+Fc(t)+'"';default:throw new Yt("impossible error: invalid scalar style")}})()}p(_c,"writeScalar");function us(e,t){var r=so(e)?String(t):"",i=e[e.length-1]===`
|
|
146
|
-
`,a=i&&(e[e.length-2]===`
|
|
147
|
-
`||e===`
|
|
148
|
-
`),s=a?"+":i?"":"-";return r+s+`
|
|
149
|
-
`}p(us,"blockHeader");function gs(e){return e[e.length-1]===`
|
|
150
|
-
`?e.slice(0,-1):e}p(gs,"dropEndingNewline");function Lc(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
|
|
151
|
-
`);return h=h!==-1?h:e.length,r.lastIndex=h,ps(e.slice(0,h),t)})(),a=e[0]===`
|
|
152
|
-
`||e[0]===" ",s,n;n=r.exec(e);){var o=n[1],l=n[2];s=l[0]===" ",i+=o+(!a&&!s&&l!==""?`
|
|
153
|
-
`:"")+ps(l,t),a=s}return i}p(Lc,"foldString");function ps(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+=`
|
|
154
|
-
`+e.slice(a,s),a=s+1),n=o;return l+=`
|
|
155
|
-
`,e.length-a>t&&n>a?l+=e.slice(a,n)+`
|
|
156
|
-
`+e.slice(n+1):l+=e.slice(a),l.slice(1)}p(ps,"foldLine");function Fc(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=rr(e,a),i=Rt[r],!i&&Tr(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Cc(r);return t}p(Fc,"escapeString");function Mc(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)),(ce(e,t,o,!1,!1)||typeof o>"u"&&ce(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}p(Mc,"writeFlowSequence");function fs(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)),(ce(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ce(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=ta(e,t)),e.dump&&Jr===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}p(fs,"writeBlockSequence");function Ac(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)),ce(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ce(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}p(Ac,"writeFlowMapping");function Ec(e,t,r,i){var a="",s=e.tag,n=Object.keys(r),o,l,h,c,d,g;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new Yt("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)g="",(!i||a!=="")&&(g+=ta(e,t)),h=n[o],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),ce(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Jr===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=ta(e,t)),ce(e,t+1,c,!0,d)&&(e.dump&&Jr===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,a+=g));e.tag=s,e.dump=a||"{}"}p(Ec,"writeBlockMapping");function ms(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,cc.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(dc.call(o.represent,l))i=o.represent[l](t,l);else throw new Yt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(ms,"detectType");function ce(e,t,r,i,a,s,n){e.tag=null,e.dump=r,ms(e,r,!1)||ms(e,r,!0);var o=cc.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",d,g;if(c&&(d=e.duplicates.indexOf(r),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(a=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Ec(e,t,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(Ac(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?fs(e,t-1,e.dump,a):fs(e,t,e.dump,a),g&&(e.dump="&ref_"+d+e.dump)):(Mc(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&_c(e,e.dump,t,s,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Yt("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}p(ce,"writeNode");function $c(e,t){var r=[],i=[],a,s;for(ea(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}p($c,"getDuplicateReferences");function ea(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)ea(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)ea(e[i[a]],t,r)}p(ea,"inspectNode");function z0(e,t){t=t||{};var r=new xc(t);r.noRefs||$c(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ce(r,0,i,!0,!0)?r.dump+`
|
|
157
|
-
`:""}p(z0,"dump$1");function N0(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.")}}p(N0,"renamed");var H0=Th,Y0=b0.load;/*! Bundled license information:
|
|
158
|
-
|
|
159
|
-
js-yaml/dist/js-yaml.mjs:
|
|
160
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
161
|
-
*/var X0=p(e=>{const{handDrawnSeed:t}=mt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),_r=p(e=>{const t=U0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),U0=p(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"),Ic=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),G=p(e=>{const{stylesArray:t}=_r(e),r=[],i=[],a=[],s=[];return t.forEach(n=>{const o=n[0];Ic(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"),j=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=mt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:n}=_r(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:j0(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),j0=p(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"),pi={},_t={},Jo;function V0(){return Jo||(Jo=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.BLANK_URL=_t.relativeFirstCharacters=_t.whitespaceEscapeCharsRegex=_t.urlSchemeRegex=_t.ctrlCharactersRegex=_t.htmlCtrlEntityRegex=_t.htmlEntitiesRegex=_t.invalidProtocolRegex=void 0,_t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,_t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,_t.htmlCtrlEntityRegex=/&(newline|tab);/gi,_t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,_t.urlSchemeRegex=/^.+(:|:)/gim,_t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,_t.relativeFirstCharacters=[".","/"],_t.BLANK_URL="about:blank"),_t}var tn;function G0(){if(tn)return pi;tn=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.sanitizeUrl=s;var e=V0();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function a(n){try{return decodeURIComponent(n)}catch{return n}}function s(n){if(!n)return e.BLANK_URL;var o,l=a(n.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),d=c.match(e.urlSchemeRegex);if(!d)return h;var g=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(g))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return u;if(g==="http:"||g==="https:"){if(!i(u))return e.BLANK_URL;var m=new URL(u);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return u}return pi}var Z0=G0();function Q0(){}function hi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);const n=e.apply(this,i);return r.cache=s.set(a,n)||s,n};return r.cache=new(hi.Cache||Map),r}hi.Cache=Map;function K0(e){if(Vn(e))return e;if(Array.isArray(e)||sp(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function J0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let a=e;for(let s=0;s<r.length;s++){const n=r[s];a=$i(a,n,i,new Map)}return a}function $i(e,t,r,i){if(Vn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return K0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const a=[...Object.keys(t),...op(t)];for(let s=0;s<a.length;s++){const n=a[s];if(np(n))continue;let o=t[n],l=e[n];if(Ha(o)&&(o={...o}),Ha(l)&&(l={...l}),Gn(o)&&(o=Oo(o)),Array.isArray(o))if(Array.isArray(l)){const c=[],d=Reflect.ownKeys(l);for(let g=0;g<d.length;g++){const u=d[g];c[u]=l[u]}l=c}else if(lp(l)){const c=[];for(let d=0;d<l.length;d++)c[d]=l[d];l=c}else l=[];const h=r(l,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Po(l)&&Po(o)&&(Aa(l)||Aa(o)||Si(l)||Si(o))?e[n]=$i(l,o,r,i):l==null&&Aa(o)?e[n]=$i({},o,r,i):l==null&&Si(o)?e[n]=Oo(o):(l===void 0||o!==void 0)&&(e[n]=o)}return e}function tx(e,...t){return J0(e,...t,Q0)}function en(e){if(e==null)return!0;if(hp(e))return typeof e.splice!="function"&&typeof e!="string"&&!Gn(e)&&!Si(e)&&!Ha(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return cp(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var ex="",rx={curveBasis:Ya,curveBasisClosed:gp,curveBasisOpen:up,curveBumpX:il,curveBumpY:rl,curveBundle:EC,curveCardinalClosed:$C,curveCardinalOpen:IC,curveCardinal:Vl,curveCatmullRomClosed:DC,curveCatmullRomOpen:OC,curveCatmullRom:Zl,curveLinear:Ti,curveLinearClosed:dp,curveMonotoneX:el,curveMonotoneY:tl,curveNatural:Jn,curveStep:Kn,curveStepAfter:Qn,curveStepBefore:Zn},ix=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ax=p(function(e,t){const r=Dc(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Wi(n),i=Lt(i,[...n])}else i=r.args;if(!i)return;let a=Ps(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Dc=p(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${ix.source})(?=[}][%]{2}).*
|
|
162
|
-
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const n=[];for(;(s=jr.exec(e))!==null;)if(s.index===jr.lastIndex&&jr.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 z.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),sx=p(function(e){return e.replace(jr,"")},"removeDirectives"),ox=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function oo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return rx[r]??t}p(oo,"interpolateToCurve");function Oc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Z0.sanitizeUrl(r):r}p(Oc,"formatUrl");var nx=p((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){z.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function no(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(no,"distance");function Pc(e){let t,r=0;e.forEach(a=>{r+=no(a,t),t=a});const i=r/2;return lo(e,i)}p(Pc,"traverseEdge");function Rc(e){return e.length===1?e[0]:Pc(e)}p(Rc,"calcLabelPosition");var rn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),lo=p((e,t)=>{let r,i=t;for(const a of e){if(r){const s=no(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:rn((1-n)*r.x+n*a.x,5),y:rn((1-n)*r.y+n*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),lx=p((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=lo(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 qc(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=lo(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}p(qc,"calcTerminalLabelPosition");function Wc(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Wc,"getStylesFromArray");var an=0,hx=p(()=>(an++,"id-"+Math.random().toString(36).substr(2,12)+"-"+an),"generateId");function zc(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}p(zc,"makeRandomHex");var cx=p(e=>zc(e.length),"random"),dx=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),ux=p(function(e,t){const r=t.text.replace(oi.lineBreakRegex," "),[,i]=ka(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"),gx=hi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),oi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((n,o)=>{const l=Se(`${n} `,r),h=Se(s,r);if(l>t){const{hyphenatedStrings:g,remainingWord:u}=px(n,t,"-",r);a.push(s,...g),s=u}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}`),px=hi((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(Se(h,i)>=t){const d=l+1,g=a.length===d,u=`${h}${r}`;s.push(g?h:u),n=""}else n=h}),{hyphenatedStrings:s,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Nc(e,t){return ho(e,t).height}p(Nc,"calculateTextHeight");function Se(e,t){return ho(e,t).width}p(Se,"calculateTextWidth");var ho=hi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=ka(r),n=["sans-serif",i],o=e.split(oi.lineBreakRegex),l=[],h=ct("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const g of n){let u=0;const m={width:0,height:0,lineHeight:0};for(const f of o){const y=dx();y.text=f||ex;const C=ux(c,y).style("font-size",s).style("font-weight",a).style("font-family",g),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),u=Math.round(k.height),m.height+=u,m.lineHeight=Math.round(Math.max(m.lineHeight,u))}l.push(m)}c.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Cr,fx=(Cr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Cr,"InitIDGenerator"),Cr),fi,mx=p(function(e){return fi=fi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),fi.innerHTML=e,unescape(fi.textContent)},"entityDecode");function co(e){return"str"in e}p(co,"isDetailedError");var yx=p((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"),ka=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function uo(e,t){return tx({},e,t)}p(uo,"cleanAndMerge");var Jt={assignWithDepth:Lt,wrapLabel:gx,calculateTextHeight:Nc,calculateTextWidth:Se,calculateTextDimensions:ho,cleanAndMerge:uo,detectInit:ax,detectDirective:Dc,isSubstringInArray:ox,interpolateToCurve:oo,calcLabelPosition:Rc,calcCardinalityPosition:lx,calcTerminalLabelPosition:qc,formatUrl:Oc,getStylesFromArray:Wc,generateId:hx,random:cx,runFunc:nx,entityDecode:mx,insertTitle:yx,isLabelCoordinateInPath:Hc,parseFontSize:ka,InitIDGenerator:fx},Cx=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ue=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tT=p((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function At(e){return e??null}p(At,"handleUndefinedAttr");function Hc(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())}p(Hc,"isLabelCoordinateInPath");var go=p(({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 Yc(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=mt().fontSize?mt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=hl.fontSize]=ka(o),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}p(n,"setupImage"),setTimeout(()=>{a.complete&&n()}),a.addEventListener("error",n),a.addEventListener("load",n)})))}p(Yc,"configureLabelImages");const xx=Object.freeze({left:0,top:0,width:16,height:16}),ra=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xc=Object.freeze({...xx,...ra}),kx=Object.freeze({...Xc,body:"",hidden:!1}),bx=Object.freeze({width:null,height:null}),wx=Object.freeze({...bx,...ra}),Sx=(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 $a(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 $a(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:s};return $a(o,r)?o:null}return null},$a=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Tx(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 sn(e,t){const r=Tx(e,t);for(const i in kx)i in ra?i in e&&!(i in r)&&(r[i]=ra[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Bx(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 on(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function n(o){s=sn(i[o]||a[o],s)}return n(t),r.forEach(n),sn(e,s)}function vx(e,t){if(e.icons[t])return on(e,t,[]);const r=Bx(e,[t])[t];return r?on(e,t,r):null}const _x=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Lx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nn(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(_x);if(i===null||!i.length)return e;const a=[];let s=i.shift(),n=Lx.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 Fx(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 Mx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Ax(e,t,r){const i=Fx(e);return Mx(i.defs,t+i.content+r)}const Ex=e=>e==="unset"||e==="undefined"||e==="none";function $x(e,t){const r={...Xc,...e},i={...wx,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(f=>{const y=[],C=f.hFlip,k=f.vFlip;let b=f.rotate;C?k?b+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):k&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=a.height/2+a.top,y.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,y.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),y.length&&(s=Ax(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=a.width,h=a.height;let c,d;n===null?(d=o===null?"1em":o==="auto"?h:o,c=nn(d,l/h)):(c=n==="auto"?l:n,d=o===null?nn(c,h/l):o==="auto"?h:o);const g={},u=(f,y)=>{Ex(y)||(g[f]=y.toString())};u("width",c),u("height",d);const m=[a.left,a.top,l,h];return g.viewBox=m.join(" "),{attributes:g,viewBox:m,body:s}}const Ix=/\sid="(\S+)"/g,ln=new Map;function Dx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=ln.get(e)||0;return ln.set(e,t+1),t?`${e}${t}`:e}function Ox(e){const t=[];let r;for(;r=Ix.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=Dx(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 Px(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Rx={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},ys=new Map,Uc=new Map,qx=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",t.name),"loader"in t)Uc.set(t.name,t.loader);else if("icons"in t)ys.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),jc=p(async(e,t)=>{const r=Sx(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=ys.get(i);if(!a){const n=Uc.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await n(),prefix:i},ys.set(i,a)}catch(o){throw z.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=vx(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),Wx=p(async e=>{try{return await jc(e),!0}catch{return!1}},"isIconAvailable"),ci=p(async(e,t,r)=>{let i;try{i=await jc(e,t==null?void 0:t.fallbackPrefix)}catch(n){z.error(n),i=Rx}const a=$x(i,t),s=Px(Ox(a.body),{...a.attributes,...r});return re(s,St())},"getIconSVG");function po(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ge=po();function Vc(e){Ge=e}var Vr={exec:()=>null};function yt(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(Wt.caret,"$1"),r=r.replace(a,n),i},getRegex:()=>new RegExp(r,t)};return i}var zx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Wt={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")},Nx=/^(?:[ \t]*(?:\n|$))+/,Hx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fo=/(?:[*+-]|\d{1,9}[.)])/,Gc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zc=yt(Gc).replace(/bull/g,fo).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(),Ux=yt(Gc).replace(/bull/g,fo).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(),mo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jx=/^[^\n]+/,yo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vx=yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gx=yt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fo).getRegex(),ba="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",Co=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zx=yt("^ {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",Co).replace("tag",ba).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qc=yt(mo).replace("hr",di).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",ba).getRegex(),Qx=yt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qc).getRegex(),xo={blockquote:Qx,code:Hx,def:Vx,fences:Yx,heading:Xx,hr:di,html:Zx,lheading:Zc,list:Gx,newline:Nx,paragraph:Qc,table:Vr,text:jx},hn=yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",di).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",ba).getRegex(),Kx={...xo,lheading:Ux,table:hn,paragraph:yt(mo).replace("hr",di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hn).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",ba).getRegex()},Jx={...xo,html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Co).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:Vr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(mo).replace("hr",di).replace("heading",` *#{1,6} *[^
|
|
163
|
-
]`).replace("lheading",Zc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ek=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Kc=/^( {2,}|\\)\n(?!\s*$)/,rk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,wa=/[\p{P}\p{S}]/u,ko=/[\s\p{P}\p{S}]/u,Jc=/[^\s\p{P}\p{S}]/u,ik=yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ko).getRegex(),td=/(?!~)[\p{P}\p{S}]/u,ak=/(?!~)[\s\p{P}\p{S}]/u,sk=/(?:[^\s\p{P}\p{S}]|~)/u,ok=yt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ed=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nk=yt(ed,"u").replace(/punct/g,wa).getRegex(),lk=yt(ed,"u").replace(/punct/g,td).getRegex(),rd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hk=yt(rd,"gu").replace(/notPunctSpace/g,Jc).replace(/punctSpace/g,ko).replace(/punct/g,wa).getRegex(),ck=yt(rd,"gu").replace(/notPunctSpace/g,sk).replace(/punctSpace/g,ak).replace(/punct/g,td).getRegex(),dk=yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Jc).replace(/punctSpace/g,ko).replace(/punct/g,wa).getRegex(),uk=yt(/\\(punct)/,"gu").replace(/punct/g,wa).getRegex(),gk=yt(/^<(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(),pk=yt(Co).replace("(?:-->|$)","-->").getRegex(),fk=yt("^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",pk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ia=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mk=yt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),id=yt(/^!?\[(label)\]\[(ref)\]/).replace("label",ia).replace("ref",yo).getRegex(),ad=yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",yo).getRegex(),yk=yt("reflink|nolink(?!\\()","g").replace("reflink",id).replace("nolink",ad).getRegex(),cn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bo={_backpedal:Vr,anyPunctuation:uk,autolink:gk,blockSkip:ok,br:Kc,code:ek,del:Vr,emStrongLDelim:nk,emStrongRDelimAst:hk,emStrongRDelimUnd:dk,escape:tk,link:mk,nolink:ad,punctuation:ik,reflink:id,reflinkSearch:yk,tag:fk,text:rk,url:Vr},Ck={...bo,link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",ia).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ia).getRegex()},Cs={...bo,emStrongRDelimAst:ck,emStrongLDelim:lk,url:yt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",cn).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:yt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",cn).getRegex()},xk={...Cs,br:yt(Kc).replace("{2,}","*").getRegex(),text:yt(Cs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mi={normal:xo,gfm:Kx,pedantic:Jx},Ar={normal:bo,gfm:Cs,breaks:xk,pedantic:Ck},kk={"&":"&","<":"<",">":">",'"':""","'":"'"},dn=e=>kk[e];function oe(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,dn)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,dn);return e}function un(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch{return null}return e}function gn(e,t){var s;let r=e.replace(Wt.findPipe,(n,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Wt.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(Wt.slashPipe,"|");return i}function Er(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 bk(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 pn(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 wk(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
164
|
-
`).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(`
|
|
165
|
-
`)}var aa=class{constructor(t){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=t||Ge}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:Er(i,`
|
|
166
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=wk(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=Er(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:Er(r[0],`
|
|
167
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Er(r[0],`
|
|
168
|
-
`).split(`
|
|
169
|
-
`),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(`
|
|
170
|
-
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
171
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
172
|
-
${c}`:c,s=s?`${s}
|
|
173
|
-
${d}`:d;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=g,i.length===0)break;let u=n.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let m=u,f=m.raw+`
|
|
174
|
-
`+i.join(`
|
|
175
|
-
`),y=this.blockquote(f);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((u==null?void 0:u.type)==="list"){let m=u,f=m.raw+`
|
|
176
|
-
`+i.join(`
|
|
177
|
-
`),y=this.list(f);n[n.length-1]=y,a=a.substring(0,a.length-u.raw.length)+y.raw,s=s.substring(0,s.length-m.raw.length)+y.raw,i=f.substring(n.at(-1).raw.length).split(`
|
|
178
|
-
`);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="",d="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let g=r[2].split(`
|
|
179
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),u=t.split(`
|
|
180
|
-
`,1)[0],m=!g.trim(),f=0;if(this.options.pedantic?(f=2,d=g.trimStart()):m?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=g.slice(f),f+=r[1].length),m&&this.rules.other.blankLine.test(u)&&(c+=u+`
|
|
181
|
-
`,t=t.substring(u.length+1),h=!0),!h){let k=this.rules.other.nextBulletRegex(f),b=this.rules.other.hrRegex(f),w=this.rules.other.fencesBeginRegex(f),S=this.rules.other.headingBeginRegex(f),T=this.rules.other.htmlBeginRegex(f);for(;t;){let B=t.split(`
|
|
182
|
-
`,1)[0],_;if(u=B,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),_=u):_=u.replace(this.rules.other.tabCharGlobal," "),w.test(u)||S.test(u)||T.test(u)||k.test(u)||b.test(u))break;if(_.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+=`
|
|
183
|
-
`+_.slice(f);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||S.test(g)||b.test(g))break;d+=`
|
|
184
|
-
`+u}!m&&!u.trim()&&(m=!0),c+=B+`
|
|
185
|
-
`,t=t.substring(B.length+1),g=_.slice(f)}}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(d),y&&(C=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:C,loose:!1,text:d,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(g=>g.type==="space"),d=c.length>0&&c.some(g=>this.rules.other.anyLine.test(g.raw));s.loose=d}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=gn(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(`
|
|
186
|
-
`):[],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(gn(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)===`
|
|
187
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=Er(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=bk(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)),pn(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 pn(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 d=[...a[0]][0].length,g=t.slice(0,s+a.index+d+o);if(Math.min(s,o)%2){let m=g.slice(1,-1);return{type:"em",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}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}}}},Qt=class xs{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||Ge,this.options.tokenizer=this.options.tokenizer||new aa,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:Wt,block:mi.normal,inline:Ar.normal};this.options.pedantic?(r.block=mi.pedantic,r.inline=Ar.pedantic):this.options.gfm&&(r.block=mi.gfm,this.options.breaks?r.inline=Ar.breaks:r.inline=Ar.gfm),this.tokenizer.rules=r}static get rules(){return{block:mi,inline:Ar}}static lex(t,r){return new xs(r).lex(t)}static lexInline(t,r){return new xs(r).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
|
|
188
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,s,n;for(this.options.pedantic&&(t=t.replace(Wt.tabCharGlobal," ").replace(Wt.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+=`
|
|
189
|
-
`: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(`
|
|
190
|
-
`)?"":`
|
|
191
|
-
`)+o.raw,h.text+=`
|
|
192
|
-
`+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(`
|
|
193
|
-
`)?"":`
|
|
194
|
-
`)+o.raw,h.text+=`
|
|
195
|
-
`+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),d;this.options.extensions.startBlock.forEach(g=>{d=g.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),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(`
|
|
196
|
-
`)?"":`
|
|
197
|
-
`)+o.raw,h.text+=`
|
|
198
|
-
`+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(`
|
|
199
|
-
`)?"":`
|
|
200
|
-
`)+o.raw,h.text+=`
|
|
201
|
-
`+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,d,g;let i=t,a=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.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 u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(f=>(u=f.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,o)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let m=t;if((g=this.options.extensions)!=null&&g.startInline){let f=1/0,y=t.slice(1),C;this.options.extensions.startInline.forEach(k=>{C=k.call({lexer:this},y),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(m=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(m)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(o=u.raw.slice(-1)),n=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},sa=class{constructor(t){xt(this,"options");xt(this,"parser");this.options=t||Ge}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let a=(n=(r||"").match(Wt.notSpaceStart))==null?void 0:n[0],s=t.replace(Wt.endingNewline,"")+`
|
|
202
|
-
`;return a?'<pre><code class="language-'+oe(a)+'">'+(i?s:oe(s,!0))+`</code></pre>
|
|
203
|
-
`:"<pre><code>"+(i?s:oe(s,!0))+`</code></pre>
|
|
204
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
205
|
-
${this.parser.parse(t)}</blockquote>
|
|
206
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
207
|
-
`}hr(t){return`<hr>
|
|
208
|
-
`}list(t){let r=t.ordered,i=t.start,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+`>
|
|
209
|
-
`+a+"</"+s+`>
|
|
210
|
-
`}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+" "+oe(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>
|
|
211
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
212
|
-
`}table(t){let r="",i="";for(let 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>
|
|
213
|
-
<thead>
|
|
214
|
-
`+r+`</thead>
|
|
215
|
-
`+a+`</table>
|
|
216
|
-
`}tablerow({text:t}){return`<tr>
|
|
217
|
-
${t}</tr>
|
|
218
|
-
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
219
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${oe(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=un(t);if(s===null)return a;t=s;let n='<a href="'+t+'"';return r&&(n+=' title="'+oe(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=un(t);if(s===null)return oe(i);t=s;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${oe(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:oe(t.text)}},wo=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""}},Kt=class ks{constructor(t){xt(this,"options");xt(this,"renderer");xt(this,"textRenderer");this.options=t||Ge,this.options.renderer=this.options.renderer||new sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wo}static parse(t,r){return new ks(r).parse(t)}static parseInline(t,r){return new ks(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+=`
|
|
220
|
-
`+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}},wi,zr=(wi=class{constructor(t){xt(this,"options");xt(this,"block");this.options=t||Ge}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Qt.lex:Qt.lexInline}provideParser(){return this.block?Kt.parse:Kt.parseInline}},xt(wi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),xt(wi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),wi),Sk=class{constructor(...t){xt(this,"defaults",po());xt(this,"options",this.setOptions);xt(this,"parse",this.parseMarkdown(!0));xt(this,"parseInline",this.parseMarkdown(!1));xt(this,"Parser",Kt);xt(this,"Renderer",sa);xt(this,"TextRenderer",wo);xt(this,"Lexer",Qt);xt(this,"Tokenizer",aa);xt(this,"Hooks",zr);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 sa(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 d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new aa(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 d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new zr;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];zr.passThroughHooks.has(n)?s[o]=c=>{if(this.defaults.async&&zr.passThroughHooksRespectAsync.has(n))return(async()=>{let g=await l.call(s,c);return h.call(s,g)})();let d=l.call(s,c);return h.call(s,d)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(s,c);return g===!1&&(g=await h.apply(s,c)),g})();let d=l.apply(s,c);return d===!1&&(d=h.apply(s,c)),d}}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 Qt.lex(t,r??this.defaults)}parser(t,r){return Kt.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?Qt.lex:Qt.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?Kt.parse:Kt.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?Qt.lex:Qt.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?Kt.parse:Kt.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+=`
|
|
221
|
-
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+oe(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},je=new Sk;function Ct(e,t){return je.parse(e,t)}Ct.options=Ct.setOptions=function(e){return je.setOptions(e),Ct.defaults=je.defaults,Vc(Ct.defaults),Ct};Ct.getDefaults=po;Ct.defaults=Ge;Ct.use=function(...e){return je.use(...e),Ct.defaults=je.defaults,Vc(Ct.defaults),Ct};Ct.walkTokens=function(e,t){return je.walkTokens(e,t)};Ct.parseInline=je.parseInline;Ct.Parser=Kt;Ct.parser=Kt.parse;Ct.Renderer=sa;Ct.TextRenderer=wo;Ct.Lexer=Qt;Ct.lexer=Qt.lex;Ct.Tokenizer=aa;Ct.Hooks=zr;Ct.parse=Ct;Ct.options;Ct.setOptions;Ct.use;Ct.walkTokens;Ct.parseInline;Kt.parse;Qt.lex;function sd(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 d,g;return(g=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&g!==void 0?g:0})):o},[]);if(a.length){var s=new RegExp(`
|
|
222
|
-
[ ]{`.concat(Math.min.apply(Math,a),"}"),"g");i=i.map(function(o){return o.replace(s,`
|
|
223
|
-
`)})}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]:"",d=o;typeof o=="string"&&o.includes(`
|
|
224
|
-
`)&&(d=String(o).split(`
|
|
225
|
-
`).map(function(g,u){return u===0?g:"".concat(c).concat(g)}).join(`
|
|
226
|
-
`)),n+=d+i[l+1]}),n}function od(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
227
|
-
`).replace(/\n{2,}/g,`
|
|
228
|
-
`);return sd(i)}p(od,"preprocessMarkdown");function nd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(nd,"nonMarkdownToLines");function ld(e,t={}){const r=od(e,t),i=Ct.lexer(r),a=[[]];let s=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
|
|
229
|
-
`).forEach((c,d)=>{d!==0&&(s++,a.push([])),c.split(" ").forEach(g=>{g=g.replace(/'/g,"'"),g&&a[s].push({content:g,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 p(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}p(ld,"markdownToLines");function hd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(hd,"nonMarkdownToHTML");function cd(e,{markdownAutoWrap:t}={}){const r=Ct.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:(z.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(cd,"markdownToHTML");function dd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(dd,"splitTextToChars");function ud(e,t){const r=dd(t.content);return So(e,[],r,t.type)}p(ud,"splitWordToFitWidth");function So(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}])?So(e,n,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(So,"splitWordToFitWidthRecursion");function gd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
230
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return oa(e,t)}p(gd,"splitLineToFitWidth");function oa(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 oa(e,t,r,n);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[o,l]=ud(t,s);r.push([o]),l.content&&e.unshift(l)}return oa(e,t,r)}p(oa,"splitLineToFitWidthRecursion");function bs(e,t){t&&e.attr("style",t)}p(bs,"applyStyle");var fn=16384;async function pd(e,t,r,i,a=!1,s=St()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,fn)}px`),n.attr("height",`${Math.min(10*r,fn)}px`);const o=n.append("xhtml:div"),l=Zr(t.label)?await wl(t.label.replace(oi.lineBreakRegex,`
|
|
231
|
-
`),s):re(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(l),bs(c,t.labelStyle),c.attr("class",`${h} ${i}`),bs(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 d=o.node().getBoundingClientRect();return d.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),d=o.node().getBoundingClientRect()),n.node()}p(pd,"addHtmlSpan");function Sa(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}p(Sa,"createTspan");function fd(e,t,r){const i=e.append("text"),a=Sa(i,1,t);Ta(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}p(fd,"computeWidthOfText");function Tk(e,t,r){var n;const i=e.append("text"),a=Sa(i,1,t);Ta(a,[{content:r,type:"normal"}]);const s=(n=a.node())==null?void 0:n.getBoundingClientRect();return s&&i.remove(),s}p(Tk,"computeDimensionOfText");function md(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 d=p(u=>fd(n,1.1,u)<=e,"checkWidth"),g=d(c)?[c]:gd(c,d);for(const u of g){const m=Sa(l,h,1.1,a);Ta(m,u),h++}}if(i){const c=l.node().getBBox(),d=2;return o.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),n.node()}else return l.node()}p(md,"createFormattedText");function ws(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(ws,"decodeHTMLEntities");function Ta(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(ws(r.content)):a.text(" "+ws(r.content))})}p(Ta,"updateTextContentAndStyles");async function yd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,n)=>(r.push((async()=>{const o=`${s}:${n}`;return await Wx(o)?await ci(o,void 0,{class:"label-icon"}):`<i class='${re(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(yd,"replaceIconSubstring");var fe=p(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(z.debug("XYZ createText",t,r,i,a,s,o,"addSvgBackground: ",h),s){const d=n?cd(t,c):hd(t),g=await yd(Ue(d),c),u=t.replace(/\\\\/g,"\\"),m={isNode:o,label:Zr(t)?u:g,labelStyle:r.replace("fill:","color:")};return await pd(e,m,l,a,h,c)}else{const d=Ue(t.replace(/<br\s*\/?>/g,"<br/>")),g=n?ld(d.replace("<br>","<br/>"),c):nd(d),u=md(l,e,g,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(u).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(u).select("rect").attr("style",m.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).select("text").attr("style",f)}return i?ct(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Ia(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 Bk(e,t){return e[0]===t[0]&&e[1]===t[1]}function vk(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)Ia(h,o,a);const l=(function(h,c,d){const g=[];for(const k of h){const b=[...k];Bk(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&g.push(b)}const u=[];c=Math.max(c,.1);const m=[];for(const k of g)for(let b=0;b<k.length-1;b++){const w=k[b],S=k[b+1];if(w[1]!==S[1]){const T=Math.min(w[1],S[1]);m.push({ymin:T,ymax:Math.max(w[1],S[1]),x:T===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(m.sort(((k,b)=>k.ymin<b.ymin?-1:k.ymin>b.ymin?1:k.x<b.x?-1:k.x>b.x?1:k.ymax===b.ymax?0:(k.ymax-b.ymax)/Math.abs(k.ymax-b.ymax))),!m.length)return u;let f=[],y=m[0].ymin,C=0;for(;f.length||m.length;){if(m.length){let k=-1;for(let b=0;b<m.length&&!(m[b].ymin>y);b++)k=b;m.splice(0,k+1).forEach((b=>{f.push({s:y,edge:b})}))}if(f=f.filter((k=>!(k.edge.ymax<=y))),f.sort(((k,b)=>k.edge.x===b.edge.x?0:(k.edge.x-b.edge.x)/Math.abs(k.edge.x-b.edge.x))),(d!==1||C%c==0)&&f.length>1)for(let k=0;k<f.length;k+=2){const b=k+1;if(b>=f.length)break;const w=f[k].edge,S=f[b].edge;u.push([[Math.round(w.x),y],[Math.round(S.x),y]])}y+=d,f.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),C++}return u})(n,s,i);if(a){for(const h of n)Ia(h,o,-a);(function(h,c,d){const g=[];h.forEach((u=>g.push(...u))),Ia(g,c,d)})(l,o,-a)}return l}function ui(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),vk(e,a,i,s||1)}class To{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ui(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 Ba(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 _k extends To{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=ui(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)Ba([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 Lk extends To{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 Fk{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(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=Ba(o),h=l/a,c=Math.ceil(h)-1,d=l-c*a,g=(o[0][0]+o[1][0])/2-a/4,u=Math.min(o[0][1],o[1][1]);for(let m=0;m<c;m++){const f=u+d+m*a,y=g-n+2*Math.random()*n,C=f-n+2*Math.random()*n,k=this.helper.ellipse(y,C,s,s,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class Mk{constructor(t){this.helper=t}fillPolygons(t,r){const i=ui(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=Ba(n),l=Math.floor(o/(i+a)),h=(o+a-l*(i+a))/2;let c=n[0],d=n[1];c[0]>d[0]&&(c=n[1],d=n[0]);const g=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const m=u*(i+a),f=m+i,y=[c[0]+m*Math.cos(g)+h*Math.cos(g),c[1]+m*Math.sin(g)+h*Math.sin(g)],C=[c[0]+f*Math.cos(g)+h*Math.cos(g),c[1]+f*Math.sin(g)+h*Math.sin(g)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],r))}})),s}}class Ak{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=ui(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=Ba(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 d=0;d<o;d++){const g=2*d*r,u=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+g*Math.cos(c),l[1]+g*Math.sin(c)],y=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[f[0]+m*Math.cos(c+Math.PI/4),f[1]+m*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i))}})),a}}const Nt={};class Ek{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $k=0,Da=1,mn=2,yi={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 Oa(e,t){return e.type===t}function Bo(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:$k,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:Da,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:mn,text:""},o})(e);let i="BOD",a=0,s=r[a];for(;!Oa(s,mn);){let n=0;const o=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Bo("M0,0"+e);a++,n=yi[s.text],i=s.text}else Oa(s,Da)?n=yi[i]:(a++,n=yi[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(!Oa(h,Da))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof yi[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 Cd(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 xd(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 d=0,g=0;r==="C"||r==="S"?(d=i+(i-o),g=a+(a-l)):(d=i,g=a),t.push({key:"C",data:[d,g,...c]}),o=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[d,g]=c;let u=0,m=0;r==="Q"||r==="T"?(u=i+(i-o),m=a+(a-l)):(u=i,m=a);const f=i+2*(u-i)/3,y=a+2*(m-a)/3,C=d+2*(u-d)/3,k=g+2*(m-g)/3;t.push({key:"C",data:[f,y,C,k,d,g]}),o=u,l=m,i=d,a=g;break}case"Q":{const[d,g,u,m]=c,f=i+2*(d-i)/3,y=a+2*(g-a)/3,C=u+2*(d-u)/3,k=m+2*(g-m)/3;t.push({key:"C",data:[f,y,C,k,u,m]}),o=d,l=g,i=u,a=m;break}case"A":{const d=Math.abs(c[0]),g=Math.abs(c[1]),u=c[2],m=c[3],f=c[4],y=c[5],C=c[6];d===0||g===0?(t.push({key:"C",data:[i,a,y,C,y,C]}),i=y,a=C):(i!==y||a!==C)&&(kd(i,a,y,C,d,g,u,m,f).forEach((function(k){t.push({key:"C",data:k})})),i=y,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=n}r=h}return t}function $r(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function kd(e,t,r,i,a,s,n,o,l,h){const c=(d=n,Math.PI*d/180);var d;let g=[],u=0,m=0,f=0,y=0;if(h)[u,m,f,y]=h;else{[e,t]=$r(e,t,-c),[r,i]=$r(r,i,-c);const q=(e-r)/2,$=(t-i)/2;let F=q*q/(a*a)+$*$/(s*s);F>1&&(F=Math.sqrt(F),a*=F,s*=F);const L=a*a,E=s*s,M=L*E-L*$*$-E*q*q,R=L*$*$+E*q*q,N=(o===l?-1:1)*Math.sqrt(Math.abs(M/R));f=N*a*$/s+(e+r)/2,y=N*-s*q/a+(t+i)/2,u=Math.asin(parseFloat(((t-y)/s).toFixed(9))),m=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(m=Math.PI-m),u<0&&(u=2*Math.PI+u),m<0&&(m=2*Math.PI+m),l&&u>m&&(u-=2*Math.PI),!l&&m>u&&(m-=2*Math.PI)}let C=m-u;if(Math.abs(C)>120*Math.PI/180){const q=m,$=r,F=i;m=l&&m>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,g=kd(r=f+a*Math.cos(m),i=y+s*Math.sin(m),$,F,a,s,n,0,l,[m,q,f,y])}C=m-u;const k=Math.cos(u),b=Math.sin(u),w=Math.cos(m),S=Math.sin(m),T=Math.tan(C/4),B=4/3*a*T,_=4/3*s*T,W=[e,t],P=[e+B*b,t-_*k],A=[r+B*S,i-_*w],H=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,A,H].concat(g);{g=[P,A,H].concat(g);const q=[];for(let $=0;$<g.length;$+=3){const F=$r(g[$][0],g[$][1],c),L=$r(g[$+1][0],g[$+1][1],c),E=$r(g[$+2][0],g[$+2][1],c);q.push([F[0],F[1],L[0],L[1],E[0],E[1]])}return q}}const Ik={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return na(e,t,r)},ellipse:function(e,t,r,i,a){const s=wd(r,i,a);return Ss(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Ae(e,t,r,i,a,!0)}};function bd(e,t,r,i,a){return{type:"path",ops:Ae(e,t,r,i,a)}}function Ii(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Ae(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Ae(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?bd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Dk(e,t,r,i,a){return(function(s,n){return Ii(s,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function yn(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ci(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Ci(r[0],1.5*(1+.22*t.roughness),kn(t));for(let s=1;s<r.length;s++){const n=r[s];if(n.length){const o=Ci(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ci(n,1.5*(1+.22*t.roughness),kn(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 wd(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+=at(n*l,r),o+=at(o*l,r),{increment:s,rx:n,ry:o}}function Ss(e,t,r,i){const[a,s]=bn(i.increment,e,t,i.rx,i.ry,1,i.increment*na(.1,na(.4,1,r),r),r);let n=la(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=bn(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=la(o,null,r);n=n.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:n}}}function Cn(e,t,r,i,a,s,n,o,l){const h=e,c=t;let d=Math.abs(r/2),g=Math.abs(i/2);d+=at(.01*d,l),g+=at(.01*g,l);let u=a,m=s;for(;u<0;)u+=2*Math.PI,m+=2*Math.PI;m-u>2*Math.PI&&(u=0,m=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(m-u)/2),C=wn(y,h,c,d,g,u,m,1,l);if(!l.disableMultiStroke){const k=wn(y,h,c,d,g,u,m,1.5,l);C.push(...k)}return n&&(o?C.push(...Ae(h,c,h+d*Math.cos(u),c+g*Math.sin(u),l),...Ae(h,c,h+d*Math.cos(m),c+g*Math.sin(m),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+g*Math.sin(u)]})),{type:"path",ops:C}}function xn(e,t){const r=xd(Cd(Bo(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(...Ae(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[l,h,c,d,g,u]=o;i.push(...Ok(l,h,c,d,g,u,s,t)),s=[g,u];break}case"Z":i.push(...Ae(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Pa(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]+at(a,t),i[0][1]+at(a,t)]});for(let n=1;n<s;n++)r.push({op:"lineTo",data:[i[n][0]+at(a,t),i[n][1]+at(a,t)]})}}return{type:"fillPath",ops:r}}function Qe(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Nt[a])switch(a){case"zigzag":Nt[a]||(Nt[a]=new _k(i));break;case"cross-hatch":Nt[a]||(Nt[a]=new Lk(i));break;case"dots":Nt[a]||(Nt[a]=new Fk(i));break;case"dashed":Nt[a]||(Nt[a]=new Mk(i));break;case"zigzag-line":Nt[a]||(Nt[a]=new Ak(i));break;default:a="hachure",Nt[a]||(Nt[a]=new To(i))}return Nt[a]})(t,Ik).fillPolygons(e,t)}function kn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sd(e){return e.randomizer||(e.randomizer=new Ek(e.seed||0)),e.randomizer.next()}function na(e,t,r,i=1){return r.roughness*i*(Sd(r)*(t-e)+e)}function at(e,t,r=1){return na(-e,e,t,r)}function Ae(e,t,r,i,a,s=!1){const n=s?a.disableMultiStrokeFill:a.disableMultiStroke,o=Ts(e,t,r,i,a,!0,!1);if(n)return o;const l=Ts(e,t,r,i,a,!0,!0);return o.concat(l)}function Ts(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 d=c/2,g=.2+.2*Sd(a);let u=a.bowing*a.maxRandomnessOffset*(i-t)/200,m=a.bowing*a.maxRandomnessOffset*(e-r)/200;u=at(u,a,h),m=at(m,a,h);const f=[],y=()=>at(d,a,h),C=()=>at(c,a,h),k=a.preserveVertices;return n?f.push({op:"move",data:[e+(k?0:y()),t+(k?0:y())]}):f.push({op:"move",data:[e+(k?0:at(c,a,h)),t+(k?0:at(c,a,h))]}),n?f.push({op:"bcurveTo",data:[u+e+(r-e)*g+y(),m+t+(i-t)*g+y(),u+e+2*(r-e)*g+y(),m+t+2*(i-t)*g+y(),r+(k?0:y()),i+(k?0:y())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*g+C(),m+t+(i-t)*g+C(),u+e+2*(r-e)*g+C(),m+t+2*(i-t)*g+C(),r+(k?0:C()),i+(k?0:C())]}),f}function Ci(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+at(t,r),e[a][1]+at(t,r)]),a===e.length-1&&i.push([e[a][0]+at(t,r),e[a][1]+at(t,r)]);return la(i,null,r)}function la(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(...Ts(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function bn(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 d=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(d),h.push(d)}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=at(.5,o)-Math.PI/2;h.push([at(s,o)+t+.9*i*Math.cos(c-e),at(s,o)+r+.9*a*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let g=c;g<d;g+=e){const u=[at(s,o)+t+i*Math.cos(g),at(s,o)+r+a*Math.sin(g)];l.push(u),h.push(u)}h.push([at(s,o)+t+i*Math.cos(c+2*Math.PI+.5*n),at(s,o)+r+a*Math.sin(c+2*Math.PI+.5*n)]),h.push([at(s,o)+t+.98*i*Math.cos(c+n),at(s,o)+r+.98*a*Math.sin(c+n)]),h.push([at(s,o)+t+.9*i*Math.cos(c+.5*n),at(s,o)+r+.9*a*Math.sin(c+.5*n)])}return[h,l]}function wn(e,t,r,i,a,s,n,o,l){const h=s+at(.1,l),c=[];c.push([at(o,l)+t+.9*i*Math.cos(h-e),at(o,l)+r+.9*a*Math.sin(h-e)]);for(let d=h;d<=n;d+=e)c.push([at(o,l)+t+i*Math.cos(d),at(o,l)+r+a*Math.sin(d)]);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)]),la(c,null,l)}function Ok(e,t,r,i,a,s,n,o){const l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let c=[0,0];const d=o.disableMultiStroke?1:2,g=o.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(g?0:at(h[0],o)),n[1]+(g?0:at(h[0],o))]}),c=g?[a,s]:[a+at(h[u],o),s+at(h[u],o)],l.push({op:"bcurveTo",data:[e+at(h[u],o),t+at(h[u],o),r+at(h[u],o),i+at(h[u],o),c[0],c[1]]});return l}function Ir(e){return[...e]}function Sn(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(Ir(e[0]),Ir(e[1]),Ir(e[2]),Ir(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(Ir(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 Di(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Pk(e,t,r){const i=Di(t,r);if(i===0)return Di(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)),Di(e,Pe(t,r,a))}function Pe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Bs(e,t,r,i){const a=i||[];if((function(o,l){const h=o[l+0],c=o[l+1],d=o[l+2],g=o[l+3];let u=3*c[0]-2*h[0]-g[0];u*=u;let m=3*c[1]-2*h[1]-g[1];m*=m;let f=3*d[0]-2*g[0]-h[0];f*=f;let y=3*d[1]-2*g[1]-h[1];return y*=y,u<f&&(u=f),m<y&&(m=y),u+m})(e,t)<r){const o=e[t+0];a.length?(s=a[a.length-1],n=o,Math.sqrt(Di(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],d=e[t+3],g=Pe(l,h,.5),u=Pe(h,c,.5),m=Pe(c,d,.5),f=Pe(g,u,.5),y=Pe(u,m,.5),C=Pe(f,y,.5);Bs([l,g,f,C],0,r,a),Bs([C,y,m,d],0,r,a)}var s,n;return a}function Rk(e,t){return ha(e,0,e.length,t)}function ha(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 d=Pk(e[c],n,o);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(ha(e,t,h+1,i,s),ha(e,h,r,i,s)):(s.length||s.push(n),s.push(o)),s}function Ra(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Bs(e,3*s,t,i);return r&&r>0?ha(i,0,i.length,r):i}const Xt="none";class ca{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",[bd(t,r,i,a,n)],n)}rectangle(t,r,i,a,s){const n=this._o(s),o=[],l=Dk(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(Pa([h],n)):o.push(Qe([h],n))}return n.stroke!==Xt&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,a,s){const n=this._o(s),o=[],l=wd(i,a,n),h=Ss(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const c=Ss(t,r,n,l).opset;c.type="fillPath",o.push(c)}else o.push(Qe([h.estimatedPoints],n));return n.stroke!==Xt&&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",[Ii(t,!1,i)],i)}arc(t,r,i,a,s,n,o=!1,l){const h=this._o(l),c=[],d=Cn(t,r,i,a,s,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const u=Cn(t,r,i,a,s,n,!0,!1,g);u.type="fillPath",c.push(u)}else c.push((function(g,u,m,f,y,C,k){const b=g,w=u;let S=Math.abs(m/2),T=Math.abs(f/2);S+=at(.01*S,k),T+=at(.01*T,k);let B=y,_=C;for(;B<0;)B+=2*Math.PI,_+=2*Math.PI;_-B>2*Math.PI&&(B=0,_=2*Math.PI);const W=(_-B)/k.curveStepCount,P=[];for(let A=B;A<=_;A+=W)P.push([b+S*Math.cos(A),w+T*Math.sin(A)]);return P.push([b+S*Math.cos(_),w+T*Math.sin(_)]),P.push([b,w]),Qe([P],k)})(t,r,i,a,s,n,h));return h.stroke!==Xt&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=yn(t,i);if(i.fill&&i.fill!==Xt)if(i.fillStyle==="solid"){const n=yn(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(...Ra(Sn([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Ra(Sn(h),10,(1+i.roughness)/2))}n.length&&a.push(Qe([n],i))}return i.stroke!==Xt&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Ii(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Pa([t],i)):a.push(Qe([t],i))),i.stroke!==Xt&&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!==Xt,n=i.stroke!==Xt,o=!!(i.simplification&&i.simplification<1),l=(function(c,d,g){const u=xd(Cd(Bo(c))),m=[];let f=[],y=[0,0],C=[];const k=()=>{C.length>=4&&f.push(...Ra(C,d)),C=[]},b=()=>{k(),f.length&&(m.push(f),f=[])};for(const{key:S,data:T}of u)switch(S){case"M":b(),y=[T[0],T[1]],f.push(y);break;case"L":k(),f.push([T[0],T[1]]);break;case"C":if(!C.length){const B=f.length?f[f.length-1]:y;C.push([B[0],B[1]])}C.push([T[0],T[1]]),C.push([T[2],T[3]]),C.push([T[4],T[5]]);break;case"Z":k(),f.push([y[0],y[1]])}if(b(),!g)return m;const w=[];for(const S of m){const T=Rk(S,g);T.length&&w.push(T)}return w})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=xn(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const c=xn(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(Pa(l,i));else a.push(Qe(l,i));return n&&(o?l.forEach((c=>{a.push(Ii(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:Xt};break;case"fillPath":n={d:this.opsToPath(s),stroke:Xt,strokeWidth:0,fill:i.fill||Xt};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||Xt,strokeWidth:i,fill:Xt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class qk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ca(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 xi="http://www.w3.org/2000/svg";class Wk{constructor(t,r){this.svg=t,this.gen=new ca(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(xi,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=a.createElementNS(xi,"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(xi,"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(xi,"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 V={canvas:(e,t)=>new qk(e,t),svg:(e,t)=>new Wk(e,t),generator:e=>new ca(e),newSeed:()=>ca.newSeed()},it=p(async(e,t,r)=>{var u,m;let i;const a=t.useHtmlLabels||ge((u=mt())==null?void 0:u.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",At(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 fe(n,re(Ue(o),mt()),{useHtmlLabels:a,width:t.width||((m=mt().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},mt());let d=c.getBBox();const g=((t==null?void 0:t.padding)??0)/2;if(a){const f=c.children[0],y=ct(c);await Yc(f,o),d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height)}return a?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:g,label:n}},"labelHelper"),qa=p(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??zt(mt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await fe(a,re(Ue(t),mt()),{useHtmlLabels:i,width:r.width||((h=(l=mt())==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(zt(mt())){const c=s.children[0],d=ct(s);n=c.getBoundingClientRect(),d.attr("width",n.width),d.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"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((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(" ")}p(pt,"createPathFromPoints");function Ee(e,t,r,i,a,s){const n=[],l=r-e,h=i-t,c=l/s,d=2*Math.PI/c,g=t+h/2;for(let u=0;u<=50;u++){const m=u/50,f=e+m*l,y=g+a*Math.sin(d*(f-e));n.push({x:f,y})}return n}p(Ee,"generateFullSineWavePoints");function ri(e,t,r,i,a,s){const n=[],o=a*Math.PI/180,c=(s*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p(ri,"generateCirclePoints");function vs(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=p((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}p(vs,"mergePaths");var zk=p((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"),Ze=zk,Nk=p(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const n=mt(),o=zt(n);return await fe(e,s,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},n)},"createLabel"),ve=Nk,$e=p((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"),Hk=p(async(e,t)=>{const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:n}=i,o=n,{labelStyles:l,nodeStyles:h,borderStyles:c,backgroundStyles:d}=G(t),g=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),u=ge(r.flowchart.htmlLabels),m=t.direction==="LR",f=g.insert("g").attr("class","cluster-label swimlane-label"),y=await fe(f,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let C=y.getBBox();if(u){const q=y.children[0],$=ct(y);C=q.getBoundingClientRect(),$.attr("width",C.width),$.attr("height",C.height)}const k=t.padding??0,b=t.width<=C.width+k?C.width+k:t.width;t.width<=C.width+k?t.diff=(b-t.width)/2-k:t.diff=-k;const w=t.height,S=t.y-w/2,T=t.y+w/2,B=t.x-b/2,_=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,W=m?4:0,P=C.height+2*W;let A,H;if(m){const q=Math.max(P,C.height+2*W),$=B+q,F=Math.max(0,b-q);if(t.look==="handDrawn"){const M=V.svg(g),R=j(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),N=j(t,{roughness:.7,fill:"none",stroke:o,seed:a}),U=M.rectangle(B,S,q,w,R);A=g.insert(()=>U,":first-child");const Z=M.rectangle($,S,F,w,N);H=g.insert(()=>Z,":first-child"),A.select("path:nth-child(2)").attr("style",c.join(";")),A.select("path").attr("style",d.join(";").replace("fill","stroke"))}else A=g.insert("rect",":first-child"),H=g.insert("rect",":first-child"),A.attr("class","swimlane-title").attr("style",h).attr("x",B).attr("y",S).attr("width",q).attr("height",w).attr("fill",s).attr("stroke",o),H.attr("class","swimlane-body").attr("style",h).attr("x",$).attr("y",S).attr("width",F).attr("height",w).attr("fill","none").attr("stroke",o);const L=B+q/2,E=t.y;f.attr("transform",`translate(${L}, ${E}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const q=Math.max(0,_-S),$=Math.min(P,q),F=S+$,L=Math.max(0,T-F),E=t.x-b/2;if(t.look==="handDrawn"){const N=V.svg(g),U=j(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),Z=j(t,{roughness:.7,fill:"none",stroke:o,seed:a}),et=N.rectangle(E,S,b,$,U);A=g.insert(()=>et,":first-child");const tt=N.rectangle(E,F,b,L,Z);H=g.insert(()=>tt,":first-child"),A.select("path:nth-child(2)").attr("style",c.join(";")),A.select("path").attr("style",d.join(";").replace("fill","stroke"))}else A=g.insert("rect",":first-child"),H=g.insert("rect",":first-child"),A.attr("class","swimlane-title").attr("style",h).attr("x",E).attr("y",S).attr("width",b).attr("height",$).attr("fill",s).attr("stroke",o),H.attr("class","swimlane-body").attr("style",h).attr("x",E).attr("y",F).attr("width",b).attr("height",L).attr("fill","none").attr("stroke",o);const M=t.x-C.width/2,R=S+($-C.height)/2;f.attr("transform",`translate(${M}, ${R})`)}if(z.trace("Swimlane data ",t,JSON.stringify(t)),l){const q=f.select("span");q&&q.attr("style",l)}return t.offsetX=0,t.width=b,t.height=w,t.offsetY=C.height-k/2,t.intersect=function(q){return Ze(t,q)},{cluster:g,labelBBox:C}},"swimlane"),Td=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=zt(r),u=d.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await fe(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):m=await ve(u,t.label,t.labelStyle||"",!1,!0);let f=m.getBBox();if(zt(r)){const B=m.children[0],_=ct(m);f=B.getBoundingClientRect(),_.attr("width",f.width),_.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-y/2,b=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const B=V.svg(d),_=j(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:a}),W=B.path($e(k,b,y,C,0),_);w=d.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",b).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=go(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+S})`),o){const B=u.select("span");B&&B.attr("style",o)}const T=w.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=f.height-t.padding/2,t.intersect=function(B){return Ze(t,B)},{cluster:d,labelBBox:f}},"rect"),Yk=p((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 Ze(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Xk=p(async(e,t)=>{const r=mt(),{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"),d=h.insert("g").attr("class","cluster-label");let g=h.append("rect");const u=await ve(d,t.label,t.labelStyle,void 0,!0);let m=u.getBBox();if(zt(r)){const W=u.children[0],P=ct(u);m=W.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const f=0*t.padding,y=f/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+f;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+f,b=t.height+f-m.height-6,w=t.x-C/2,S=t.y-k/2;t.width=C;const T=t.y-t.height/2-y+m.height+2;let B;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=V.svg(h),A=t.rx||t.ry?P.path($e(w,S,C,k,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:a}):P.rectangle(w,S,C,k,{seed:a});B=h.insert(()=>A,":first-child");const H=P.rectangle(w,T,C,b,{fill:W?s:n,fillStyle:W?"hachure":"solid",stroke:l,seed:a});B=h.insert(()=>A,":first-child"),g=h.insert(()=>H)}else B=c.insert("rect",":first-child"),B.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",k).attr("data-look",t.look),g.attr("class","inner").attr("x",w).attr("y",T).attr("width",C).attr("height",b);d.attr("transform",`translate(${t.x-m.width/2}, ${S+1-(zt(r)?0:3)})`);const _=B.node().getBBox();return t.height=_.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(W){return Ze(t,W)},{cluster:h,labelBBox:m}},"roundedWithTitle"),Uk=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=mt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:h,backgroundStyles:c}=G(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=zt(r),u=d.insert("g").attr("class","cluster-label "),m=await fe(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let f=m.getBBox();if(zt(r)){const B=m.children[0],_=ct(m);f=B.getBoundingClientRect(),_.attr("width",f.width),_.attr("height",f.height)}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-y/2,b=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const B=V.svg(d),_=j(t,{roughness:.7,fill:s,stroke:n,fillWeight:4,seed:a}),W=B.path($e(k,b,y,C,t.rx),_);w=d.insert(()=>(z.debug("Rough node insert CXC",W),W),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",b).attr("width",y).attr("height",C);const{subGraphTitleTopMargin:S}=go(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+S})`),o){const B=u.select("span");B&&B.attr("style",o)}const T=w.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=f.height-t.padding/2,t.intersect=function(B){return Ze(t,B)},{cluster:d,labelBBox:f}},"kanbanSection"),jk=p((e,t)=>{const r=mt(),{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,d=t.x-h/2,g=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const y=V.svg(n).rectangle(d,g,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});u=n.insert(()=>y,":first-child")}else{u=o.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",g).attr("width",h).attr("height",c).attr("data-look",t.look)}const m=u.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return Ze(t,f)},{cluster:n,labelBBox:{}}},"divider"),Vk=Td,Gk={rect:Td,squareRect:Vk,roundedWithTitle:Xk,noteGroup:Yk,divider:jk,kanbanSection:Uk,swimlane:Hk},Bd=new Map,Zk=p(async(e,t)=>{const r=t.shape||"rect",i=await Gk[r](e,t);return Bd.set(t.id,i),i},"insertCluster"),oT=p(()=>{Bd=new Map},"clear");function vd(e,t){return e.intersect(t)}p(vd,"intersectNode");var Qk=vd;function _d(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}}p(_d,"intersectEllipse");var Ld=_d;function Fd(e,t,r){return Ld(e,t,t,r)}p(Fd,"intersectCircle");var Kk=Fd;function Md(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&&_s(o,l))return;const c=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+g,m=c*t.x+d*t.y+g;if(Math.abs(u)<h&&Math.abs(m)<h&&_s(u,m))return;const f=a*d-c*s;if(f===0)return;const y=Math.abs(f/2);let C=s*g-d*n;const k=C<0?(C-y)/f:(C+y)/f;C=c*n-a*g;const b=C<0?(C-y)/f:(C+y)/f;return{x:k,y:b}}}p(Md,"intersectLine");function _s(e,t){return e*t>0}p(_s,"sameSign");var Jk=Md;function Ad(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 d=t[c],g=t[c<t.length-1?c+1:0],u=Jk(e,r,{x:l+d.x,y:h+d.y},{x:l+g.x,y:h+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(c,d){let g=c.x-r.x,u=c.y-r.y,m=Math.sqrt(g*g+u*u),f=d.x-r.x,y=d.y-r.y,C=Math.sqrt(f*f+y*y);return m<C?-1:m===C?0:1}),s[0]):e}p(Ad,"intersectPolygon");var tb=Ad,X={node:Qk,circle:Kk,ellipse:Ld,polygon:tb,rect:Ze};function Ed(e,t){const{labelStyles:r}=G(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=V.svg(s),h=j(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,n*2,h),d=s.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",At(o)),Q(t,d),t.intersect=function(g){return z.info("Circle intersect",t,n,g),X.circle(t,n,g)},s}p(Ed,"anchor");function Ls(e,t,r,i,a,s,n){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,g=(i-t)/2,u=d/a,m=g/s,f=Math.sqrt(u**2+m**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-f**2),C=l+y*s*Math.sin(c)*(n?-1:1),k=h-y*a*Math.cos(c)*(n?-1:1),b=Math.atan2((t-k)/s,(e-C)/a);let S=Math.atan2((i-k)/s,(r-C)/a)-b;n&&S<0&&(S+=2*Math.PI),!n&&S>0&&(S-=2*Math.PI);const T=[];for(let B=0;B<20;B++){const _=B/19,W=b+_*S,P=C+a*Math.cos(W),A=k+s*Math.sin(W);T.push({x:P,y:A})}return T}p(Ls,"generateArcPoints");function $d(e,t,r){const[i,a]=[t,r].sort((s,n)=>n-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}p($d,"calculateArcSagitta");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,n=t.look==="neo"?12:a,o=p(W=>W+n,"calcTotalHeight"),l=p(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await it(e,t,rt(t)),d=o(t!=null&&t.height?t==null?void 0:t.height:c.height),[g,u]=l(d),m=$d(d,g,u),y=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+m-m,C=d,{cssStyles:k}=t,b=[{x:y/2,y:-C/2},{x:-y/2,y:-C/2},...Ls(-y/2,-C/2,-y/2,C/2,g,u,!1),{x:y/2,y:C/2},...Ls(y/2,C/2,y/2,-C/2,g,u,!0)],w=V.svg(h),S=j(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=pt(b),B=w.path(T,S),_=h.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${g/2}, 0)`),Q(t,_),t.intersect=function(W){return X.polygon(t,b,W)},h}p(Id,"bowTieRect");function Te(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+")")}p(Te,"insertPolygonShape");var ki=12;async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+ki),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),d=0,g=h,u=-c,m=0,f=[{x:d+ki,y:u},{x:g,y:u},{x:g,y:m},{x:d,y:m},{x:d,y:u+ki},{x:d+ki,y:u}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=V.svg(o),b=j(t,{}),w=pt(f),S=k.path(w,b);y=o.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&y.attr("style",C)}else y=Te(o,h,c,f);return i&&y.attr("style",i),Q(t,y),t.intersect=function(k){return X.polygon(t,f,k)},o}p(Dd,"card");function Od(e,t){const{nodeStyles:r}=G(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=V.svg(i),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(n),c=o.path(h,l),d=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return X.polygon(t,n,g)},i}p(Od,"choice");async function vo(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:n,halfPadding:o}=await it(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 d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=V.svg(s),m=j(t,{}),f=u.circle(0,0,c*2,m);d=s.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",At(g))}else d=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,d),t.calcIntersect=function(u,m){const f=u.width/2;return X.circle(u,f,m)},t.intersect=function(u){return z.info("Circle intersect",t,c,u),X.circle(t,c,u)},s}p(vo,"circle");function Pd(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}
|
|
232
|
-
M ${a.x},${a.y} L ${n.x},${n.y}`}p(Pd,"createLine");function Rd(e,t){const{labelStyles:r,nodeStyles:i}=G(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=V.svg(a),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=o.circle(0,0,s*2,l),c=Pd(s),d=o.path(c,l),g=a.insert(()=>h,":first-child");return g.insert(()=>d),g.attr("class","outer-path"),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),Q(t,g),t.intersect=function(u){return z.info("crossedCircle intersect",t,{radius:s,point:u}),X.circle(t,s,u)},a}p(Rd,"crossedCircle");function Ce(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 d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p(Ce,"generateCirclePoints");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await it(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,d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...Ce(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...Ce(h/2+d*2,-d,d,20,-180,-270),...Ce(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...Ce(h/2,c/2,d,20,0,90)],m=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...Ce(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...Ce(h/2+h*.1,-d,d,20,-180,-270),...Ce(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...Ce(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=V.svg(a),y=j(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const k=pt(u).replace("Z",""),b=f.path(k,y),w=pt(m),S=f.path(w,{...y}),T=a.insert("g",":first-child");return T.insert(()=>S,":first-child").attr("stroke-opacity",0),T.insert(()=>b,":first-child"),T.attr("class","text"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${d}, 0)`),n.attr("transform",`translate(${-h/2+d-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Q(t,T),t.intersect=function(B){return X.polygon(t,m,B)},a}p(qd,"curlyBraceLeft");function xe(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 d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:u,y:m})}return n}p(xe,"generateCirclePoints");async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await it(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),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...xe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...xe(h/2+d*2,-d,d,20,-180,-270),...xe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...xe(h/2,c/2,d,20,0,90)],m=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...xe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...xe(h/2+d*2,-d,d,20,-180,-270),...xe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...xe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=V.svg(a),y=j(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const k=pt(u).replace("Z",""),b=f.path(k,y),w=pt(m),S=f.path(w,{...y}),T=a.insert("g",":first-child");return T.insert(()=>S,":first-child").attr("stroke-opacity",0),T.insert(()=>b,":first-child"),T.attr("class","text"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-d}, 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))})`),Q(t,T),t.intersect=function(B){return X.polygon(t,m,B)},a}p(Wd,"curlyBraceRight");function $t(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 d=0;d<i;d++){const g=o+d*c,u=e+r*Math.cos(g),m=t+r*Math.sin(g);n.push({x:-u,y:-m})}return n}p($t,"generateCirclePoints");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await it(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),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...$t(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...$t(h/2+d*2,-d,d,20,-180,-270),...$t(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...$t(h/2,c/2,d,20,0,90)],m=[...$t(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...$t(-h/2-d/2,-d,d,20,0,90),...$t(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...$t(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...$t(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...$t(h/2+d*2,-d,d,20,-180,-270),...$t(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...$t(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...$t(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...$t(-h/2-d/2,-d,d,20,0,90),...$t(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...$t(-h/2+d+d/2,c/2,d,30,-180,-270)],y=V.svg(a),C=j(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=pt(u).replace("Z",""),w=y.path(b,C),T=pt(m).replace("Z",""),B=y.path(T,C),_=pt(f),W=y.path(_,{...C}),P=a.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>w,":first-child"),P.insert(()=>B,":first-child"),P.attr("class","text"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${d-d/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))})`),Q(t,P),t.intersect=function(A){return X.polygon(t,f,A)},a}p(zd,"curlyBraces");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),d=Math.max(o,(c.width+s*2)*1.25,(t==null?void 0:t.width)??0),g=Math.max(l,c.height+n*2,(t==null?void 0:t.height)??0),u=g/2,{cssStyles:m}=t,f=V.svg(h),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=d,k=g,b=C-u,w=k/4,S=[{x:b,y:0},{x:w,y:0},{x:0,y:k/2},{x:w,y:k},{x:b,y:k},...ri(-b,-k/2,u,50,270,90)],T=pt(S),B=f.path(T,y),_=h.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(${-d/2}, ${-g/2})`),Q(t,_),t.intersect=function(W){return X.polygon(t,S,W)},h}p(Nd,"curvedTrapezoid");var eb=p((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"),rb=p((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"),ib=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tn=8,Bn=8;async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=G(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<Bn&&(t.width=Bn);const k=y/2/(2.5+y/50);t.height=(t.height??0)-s-k*3,t.height<Tn&&(t.height=Tn)}const{shapeSvg:o,bbox:l,label:h}=await it(e,t,rt(t)),c=(t.width?t.width:l.width)+n,d=c/2,g=d/(2.5+c/50),u=(t.height?t.height:l.height)+s+g;let m;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=V.svg(o),C=rb(0,0,c,u,d,g),k=ib(0,g,c,u,d,g),b=j(t,{}),w=y.path(C,b),S=y.path(k,j(t,{fill:"none"}));m=o.insert(()=>S,":first-child"),m=o.insert(()=>w,":first-child"),m.attr("class","basic label-container"),f&&m.attr("style",f)}else{const y=eb(0,0,c,u,d,g);m=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",At(f)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),Q(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=X.rect(t,y),k=C.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-g)){let b=g*g*(1-k*k/(d*d));b>0&&(b=Math.sqrt(b)),b=g-b,y.y-(t.y??0)>0&&(b=-b),C.y+=b}return C},o}p(Hd,"cylinder");async function Lr(e,t,r){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i;const{shapeSvg:s,bbox:n}=await it(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 d,{rx:g,ry:u}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(g=r.rx,u=r.ry),t.look==="handDrawn"){const f=V.svg(s),y=j(t,{}),C=g||u?f.path($e(h,c,o,l,g||0),y):f.rectangle(h,c,o,l,y);d=s.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",At(m))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",At(g)).attr("ry",At(u)).attr("x",h).attr("y",c).attr("width",o).attr("height",l);return Q(t,d),t.calcIntersect=function(f,y){return X.rect(f,y)},t.intersect=function(f){return X.rect(t,f)},s}p(Lr,"drawRect");async function Yd(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:a,padding:s,width:n,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:a??s??0},h=await Lr(e,t,l);if(t.look==="handDrawn"){const u=V.svg(h),m=j(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),y=f.node();if(!y)return h;let C=null;if(y instanceof SVGGraphicsElement)C=y.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||n)??0,g=(Number(c.attr("height"))||o)??0;return d>0&&g>0&&c.attr("stroke-dasharray",`${d} ${g}`),h}p(Yd,"datastore");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=o.width+a,c=o.height+s,d=c*.2,g=-h/2,u=-c/2-d/2,{cssStyles:m}=t,f=V.svg(n),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:g,y:u+d},{x:-g,y:u+d},{x:-g,y:-u},{x:g,y:-u},{x:g,y:u},{x:-g,y:u},{x:-g,y:u+d}],k=f.polygon(C.map(w=>[w.x,w.y]),y),b=n.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${g+(t.padding??0)/2-(o.x-(o.left??0))}, ${u+d+(t.padding??0)/2-(o.y-(o.top??0))})`),Q(t,b),t.intersect=function(w){return X.rect(t,w)},n}p(Xd,"dividedRectangle");async function Ud(e,t){var u,m;const{labelStyles:r,nodeStyles:i}=G(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 it(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 d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=V.svg(o),y=j(t,{roughness:.2,strokeWidth:2.5}),C=j(t,{roughness:.2,strokeWidth:1.5}),k=f.circle(0,0,h*2,y),b=f.circle(0,0,c*2,C);d=o.insert("g",":first-child"),d.attr("class",At(t.cssClasses)).attr("style",At(g)),(u=d.node())==null||u.appendChild(k),(m=d.node())==null||m.appendChild(b)}else{d=o.insert("g",":first-child");const f=d.insert("circle",":first-child"),y=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.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 Q(t,d),t.intersect=function(f){return z.info("DoubleCircle intersect",t,h,f),X.circle(t,h,f)},o}p(Ud,"doublecircle");function jd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(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=V.svg(s),{nodeBorder:h}=r,c=j(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,n*2,c),g=s.insert(()=>d,":first-child");return g.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),Q(t,g),t.intersect=function(u){return z.info("filledCircle intersect",t,{radius:n,point:u}),X.circle(t,n,u)},s}p(jd,"filledCircle");var vn=10,_n=10;async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=G(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<vn&&(t.height=vn),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<_n&&(t.width=_n));const{shapeSvg:n,bbox:o,label:l}=await it(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,d=c,g=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,m=V.svg(n),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=pt(g),C=m.path(y,f),k=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=c,Q(t,k),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(b){return z.info("Triangle intersect",t,g,b),X.polygon(t,g,b)},n}p(Vd,"flippedTriangle");function Gd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=G(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,d=-1*h/2,g=V.svg(n),u=j(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const m=g.rectangle(c,d,l,h,u),f=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),Q(t,f);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 X.rect(t,C)},n}p(Gd,"forkJoin");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+n*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+o*2,g=d/2,{cssStyles:u}=t,m=V.svg(l),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-c/2,y:-d/2},{x:c/2-g,y:-d/2},...ri(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},{x:-c/2,y:d/2}],C=pt(y),k=m.path(C,f),b=l.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(w){return z.info("Pill intersect",t,{radius:g,point:w}),X.polygon(t,y,w)},l}p(Zd,"halfRoundedRectangle");var ab=p((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 Qd(e,t){const{labelStyles:r,nodeStyles:i}=G(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 b=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*b-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:d}=await it(e,t,rt(t)),g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=g/a,m=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:m-u,y:0},{x:m,y:-g/2},{x:m-u,y:-g},{x:u,y:-g},{x:0,y:-g/2}];let y;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=V.svg(c),b=j(t,{}),w=ab(0,0,m,g,u),S=k.path(w,b);y=c.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${g/2})`),C&&y.attr("style",C)}else y=Te(c,m,g,f);return i&&y.attr("style",i),t.width=m,t.height=g,Q(t,y),t.intersect=function(k){return X.polygon(t,f,k)},c}p(Qd,"hexagon");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await it(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=V.svg(a),h=j(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}],d=pt(c),g=l.path(d,h),u=a.insert(()=>g,":first-child");return u.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-s/2}, ${-n/2})`),Q(t,u),t.intersect=function(m){return z.info("Pill intersect",t,{points:c}),X.polygon(t,c,m)},a}p(Kd,"hourglass");async function Jd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(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:d}=await it(e,t,"icon-shape default"),g=t.pos==="t",u=o,m=o,{nodeBorder:f}=r,{stylesMap:y}=_r(t),C=-m/2,k=-u/2,b=t.label?8:0,w=V.svg(h),S=j(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const T=w.rectangle(C,k,m,u,S),B=Math.max(m,c.width),_=u+c.height+b,W=w.rectangle(-B/2,-_/2,B,_,{...S,fill:"transparent",stroke:"none"}),P=h.insert(()=>T,":first-child"),A=h.insert(()=>W);if(t.icon){const H=h.append("g");H.html(`<g>${await ci(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const q=H.node().getBBox(),$=q.width,F=q.height,L=q.x,E=q.y;H.attr("transform",`translate(${-$/2-L},${g?c.height/2+b/2-F/2-E:-c.height/2-b/2-F/2-E})`),H.attr("style",`color: ${y.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-_/2:_/2-c.height})`),P.attr("transform",`translate(0,${g?c.height/2+b/2:-c.height/2-b/2})`),Q(t,A),t.intersect=function(H){if(z.info("iconSquare intersect",t,H),!t.label)return X.rect(t,H);const q=t.x??0,$=t.y??0,F=t.height??0;let L=[];return g?L=[{x:q-c.width/2,y:$-F/2},{x:q+c.width/2,y:$-F/2},{x:q+c.width/2,y:$-F/2+c.height+b},{x:q+m/2,y:$-F/2+c.height+b},{x:q+m/2,y:$+F/2},{x:q-m/2,y:$+F/2},{x:q-m/2,y:$-F/2+c.height+b},{x:q-c.width/2,y:$-F/2+c.height+b}]:L=[{x:q-m/2,y:$-F/2},{x:q+m/2,y:$-F/2},{x:q+m/2,y:$-F/2+u},{x:q+c.width/2,y:$-F/2+u},{x:q+c.width/2/2,y:$+F/2},{x:q-c.width/2,y:$+F/2},{x:q-c.width/2,y:$-F/2+u},{x:q-m/2,y:$-F/2+u}],X.polygon(t,L,H)},h}p(Jd,"icon");async function tu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(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:d}=await it(e,t,"icon-shape default"),g=20,u=t.label?8:0,m=t.pos==="t",{nodeBorder:f,mainBkg:y}=r,{stylesMap:C}=_r(t),k=V.svg(h),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=C.get("fill");b.stroke=w??y;const S=h.append("g");t.icon&&S.html(`<g>${await ci(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const T=S.node().getBBox(),B=T.width,_=T.height,W=T.x,P=T.y,A=Math.max(B,_)*Math.SQRT2+g*2,H=k.circle(0,0,A,b),q=Math.max(A,c.width),$=A+c.height+u,F=k.rectangle(-q/2,-$/2,q,$,{...b,fill:"transparent",stroke:"none"}),L=h.insert(()=>H,":first-child"),E=h.insert(()=>F);return S.attr("transform",`translate(${-B/2-W},${m?c.height/2+u/2-_/2-P:-c.height/2-u/2-_/2-P})`),S.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${m?-$/2:$/2-c.height})`),L.attr("transform",`translate(0,${m?c.height/2+u/2:-c.height/2-u/2})`),Q(t,E),t.intersect=function(M){return z.info("iconSquare intersect",t,M),X.rect(t,M)},h}p(tu,"iconCircle");async function eu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(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:d,label:g}=await it(e,t,"icon-shape default"),u=t.pos==="t",m=o+d*2,f=o+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:k}=_r(t),b=-f/2,w=-m/2,S=t.label?8:0,T=V.svg(h),B=j(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const _=k.get("fill");B.stroke=_??C;const W=T.path($e(b,w,f,m,5),B),P=Math.max(f,c.width),A=m+c.height+S,H=T.rectangle(-P/2,-A/2,P,A,{...B,fill:"transparent",stroke:"none"}),q=h.insert(()=>W,":first-child").attr("class","icon-shape2"),$=h.insert(()=>H);if(t.icon){const F=h.append("g");F.html(`<g>${await ci(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=F.node().getBBox(),E=L.width,M=L.height,R=L.x,N=L.y;F.attr("transform",`translate(${-E/2-R},${u?c.height/2+S/2-M/2-N:-c.height/2-S/2-M/2-N})`),F.attr("style",`color: ${k.get("stroke")??y};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-A/2:A/2-c.height})`),q.attr("transform",`translate(0,${u?c.height/2+S/2:-c.height/2-S/2})`),Q(t,$),t.intersect=function(F){if(z.info("iconSquare intersect",t,F),!t.label)return X.rect(t,F);const L=t.x??0,E=t.y??0,M=t.height??0;let R=[];return u?R=[{x:L-c.width/2,y:E-M/2},{x:L+c.width/2,y:E-M/2},{x:L+c.width/2,y:E-M/2+c.height+S},{x:L+f/2,y:E-M/2+c.height+S},{x:L+f/2,y:E+M/2},{x:L-f/2,y:E+M/2},{x:L-f/2,y:E-M/2+c.height+S},{x:L-c.width/2,y:E-M/2+c.height+S}]:R=[{x:L-f/2,y:E-M/2},{x:L+f/2,y:E-M/2},{x:L+f/2,y:E-M/2+m},{x:L+c.width/2,y:E-M/2+m},{x:L+c.width/2/2,y:E+M/2},{x:L-c.width/2,y:E+M/2},{x:L-c.width/2,y:E-M/2+m},{x:L-f/2,y:E-M/2+m}],X.polygon(t,R,F)},h}p(eu,"iconRounded");async function ru(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=G(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:d,label:g}=await it(e,t,"icon-shape default"),u=t.pos==="t",m=o+d*2,f=o+d*2,{nodeBorder:y,mainBkg:C}=r,{stylesMap:k}=_r(t),b=-f/2,w=-m/2,S=t.label?8:0,T=V.svg(h),B=j(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const _=k.get("fill");B.stroke=_??C;const W=T.path($e(b,w,f,m,.1),B),P=Math.max(f,c.width),A=m+c.height+S,H=T.rectangle(-P/2,-A/2,P,A,{...B,fill:"transparent",stroke:"none"}),q=h.insert(()=>W,":first-child"),$=h.insert(()=>H);if(t.icon){const F=h.append("g");F.html(`<g>${await ci(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=F.node().getBBox(),E=L.width,M=L.height,R=L.x,N=L.y;F.attr("transform",`translate(${-E/2-R},${u?c.height/2+S/2-M/2-N:-c.height/2-S/2-M/2-N})`),F.attr("style",`color: ${k.get("stroke")??y};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-A/2:A/2-c.height})`),q.attr("transform",`translate(0,${u?c.height/2+S/2:-c.height/2-S/2})`),Q(t,$),t.intersect=function(F){if(z.info("iconSquare intersect",t,F),!t.label)return X.rect(t,F);const L=t.x??0,E=t.y??0,M=t.height??0;let R=[];return u?R=[{x:L-c.width/2,y:E-M/2},{x:L+c.width/2,y:E-M/2},{x:L+c.width/2,y:E-M/2+c.height+S},{x:L+f/2,y:E-M/2+c.height+S},{x:L+f/2,y:E+M/2},{x:L-f/2,y:E+M/2},{x:L-f/2,y:E-M/2+c.height+S},{x:L-c.width/2,y:E-M/2+c.height+S}]:R=[{x:L-f/2,y:E-M/2},{x:L+f/2,y:E-M/2},{x:L+f/2,y:E-M/2+m},{x:L+c.width/2,y:E-M/2+m},{x:L+c.width/2/2,y:E+M/2},{x:L-c.width/2,y:E+M/2},{x:L-c.width/2,y:E-M/2+m},{x:L-f/2,y:E-M/2+m}],X.polygon(t,R,F)},h}p(ru,"iconSquare");async function iu(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}=G(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:d,bbox:g,label:u}=await it(e,t,"image-shape default"),m=t.pos==="t",f=-h/2,y=-c/2,C=t.label?8:0,k=V.svg(d),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=k.rectangle(f,y,h,c,b),S=Math.max(h,g.width),T=c+g.height+C,B=k.rectangle(-S/2,-T/2,S,T,{...b,fill:"none",stroke:"none"}),_=d.insert(()=>w,":first-child"),W=d.insert(()=>B);if(t.img){const P=d.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?T/2-c:-T/2})`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${m?-c/2-g.height/2-C/2:c/2-g.height/2+C/2})`),_.attr("transform",`translate(0,${m?g.height/2+C/2:-g.height/2-C/2})`),Q(t,W),t.intersect=function(P){if(z.info("iconSquare intersect",t,P),!t.label)return X.rect(t,P);const A=t.x??0,H=t.y??0,q=t.height??0;let $=[];return m?$=[{x:A-g.width/2,y:H-q/2},{x:A+g.width/2,y:H-q/2},{x:A+g.width/2,y:H-q/2+g.height+C},{x:A+h/2,y:H-q/2+g.height+C},{x:A+h/2,y:H+q/2},{x:A-h/2,y:H+q/2},{x:A-h/2,y:H-q/2+g.height+C},{x:A-g.width/2,y:H-q/2+g.height+C}]:$=[{x:A-h/2,y:H-q/2},{x:A+h/2,y:H-q/2},{x:A+h/2,y:H-q/2+c},{x:A+g.width/2,y:H-q/2+c},{x:A+g.width/2/2,y:H+q/2},{x:A-g.width/2,y:H+q/2},{x:A-g.width/2,y:H-q/2+c},{x:A-h/2,y:H-q/2+c}],X.polygon(t,$,P)},d}p(iu,"imageSquare");async function au(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await it(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),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=V.svg(o),f=j(t,{}),y=pt(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&g.attr("style",u)}else g=Te(o,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,Q(t,g),t.intersect=function(m){return X.polygon(t,d,m)},o}p(au,"inv_trapezoid");async function su(e,t){const{shapeSvg:r,bbox:i,label:a}=await it(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))})`),Q(t,s),t.intersect=function(l){return X.rect(t,l)},r}p(su,"labelRect");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=V.svg(o),f=j(t,{}),y=pt(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=Te(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,Q(t,g),t.intersect=function(m){return X.polygon(t,d,m)},o}p(ou,"lean_left");async function nu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=a,n=t.look==="neo"?a*2:a,{shapeSvg:o,bbox:l}=await it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=V.svg(o),f=j(t,{}),y=pt(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=Te(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,Q(t,g),t.intersect=function(m){return X.polygon(t,d,m)},o}p(nu,"lean_right");function lu(e,t){const{labelStyles:r,nodeStyles:i}=G(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=V.svg(a),d=j(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=pt(h),u=c.path(g,d),m=a.insert(()=>u,":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})`),Q(t,m),t.intersect=function(f){return z.info("lightningBolt intersect",t,f),X.polygon(t,h,f)},a}p(lu,"lightningBolt");var sb=p((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"),ob=p((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"),nb=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ln=10,Fn=10;async function hu(e,t){const{labelStyles:r,nodeStyles:i}=G(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<Fn&&(t.width=Fn);const b=C/2/(2.5+C/50);t.height=(t.height??0)-n-b*3,t.height<Ln&&(t.height=Ln)}const{shapeSvg:o,bbox:l,label:h}=await it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,d=c/2,g=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+g+n*2,m=u*.1;let f;const{cssStyles:y}=t;if(t.look==="handDrawn"){const C=V.svg(o),k=ob(0,0,c,u,d,g,m),b=nb(0,g,c,u,d,g),w=j(t,{}),S=C.path(k,w),T=C.path(b,w);o.insert(()=>T,":first-child").attr("class","line"),f=o.insert(()=>S,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const C=sb(0,0,c,u,d,g,m);f=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",At(y)).attr("style",i)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),Q(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+g-(l.y-(l.top??0))})`),t.intersect=function(C){const k=X.rect(t,C),b=k.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-g)){let w=g*g*(1-b*b/(d*d));w>0&&(w=Math.sqrt(w)),w=g-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},o}p(hu,"linedCylinder");async function cu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 w=t.width;t.width=(w??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 it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(n??0)*2,g=t.look==="neo"?d/4:d/8,u=d+g,{cssStyles:m}=t,f=V.svg(o),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...Ee(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,g,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],k=f.polygon(C.map(w=>[w.x,w.y]),y),b=o.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-g/2-(l.y-(l.top??0))})`),Q(t,b),t.intersect=function(w){return X.polygon(t,C,w)},o}p(cu,"linedWaveEdgedRect");async function du(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*o,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,u=d-2*o,m=g-2*o,f=-u/2,y=-m/2,{cssStyles:C}=t,k=V.svg(l),b=j(t,{}),w=[{x:f-o,y:y+o},{x:f-o,y:y+m+o},{x:f+u-o,y:y+m+o},{x:f+u-o,y:y+m},{x:f+u,y:y+m},{x:f+u,y:y+m-o},{x:f+u+o,y:y+m-o},{x:f+u+o,y:y-o},{x:f+o,y:y-o},{x:f+o,y},{x:f,y},{x:f,y:y+o}],S=[{x:f,y:y+o},{x:f+u-o,y:y+o},{x:f+u-o,y:y+m},{x:f+u,y:y+m},{x:f+u,y},{x:f,y}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=pt(w);let B=k.path(T,b);const _=pt(S);let W=k.path(_,b);t.look!=="handDrawn"&&(B=vs(B),W=vs(W));const P=l.insert("g",":first-child");return P.insert(()=>B),P.insert(()=>W),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))})`),Q(t,P),t.intersect=function(A){return X.polygon(t,w,A)},l}p(du,"multiRect");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await it(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 d=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,g=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?g/4:g/8,m=g+(c?u/2:-u/2),f=-d/2,y=-m/2,C=10,{cssStyles:k}=t,b=Ee(f-C,y+m+C,f+d-C,y+m+C,u,.8),w=b==null?void 0:b[b.length-1],S=[{x:f-C,y:y+C},{x:f-C,y:y+m+C},...b,{x:f+d-C,y:w.y-C},{x:f+d,y:w.y-C},{x:f+d,y:w.y-2*C},{x:f+d+C,y:w.y-2*C},{x:f+d+C,y:y-C},{x:f+C,y:y-C},{x:f+C,y},{x:f,y},{x:f,y:y+C}],T=[{x:f,y:y+C},{x:f+d-C,y:y+C},{x:f+d-C,y:w.y-C},{x:f+d,y:w.y-C},{x:f+d,y},{x:f,y}],B=V.svg(a),_=j(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const W=pt(S),P=B.path(W,_),A=pt(T),H=B.path(A,_),q=a.insert(()=>P,":first-child");return q.insert(()=>H),q.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(0,${-u/2})`),n.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-u/2-(s.y-(s.top??0))})`),Q(t,q),t.intersect=function($){return X.polygon(t,S,$)},a}p(uu,"multiWaveEdgedRectangle");async function gu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i,t.useHtmlLabels||zt(St())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await it(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),d=-h/2,g=-c/2,{cssStyles:u}=t,m=V.svg(n),f=j(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=m.rectangle(d,g,h,c,f),C=n.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),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))})`),Q(t,C),t.intersect=function(k){return X.rect(t,k)},n}p(gu,"note");var lb=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function pu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(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 d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=V.svg(a),m=j(t,{}),f=lb(0,0,l),y=u.path(f,m);d=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),g&&d.attr("style",g)}else d=Te(a,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),Q(t,d),t.calcIntersect=function(u,m){const f=u.width,y=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=X.polygon(u,y,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},a}p(pu,"question");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),g=-c/2,u=-d/2,m=u/2,f=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:y}=t,C=V.svg(o),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const b=pt(f),w=C.path(b,k),S=o.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.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))})`),Q(t,S),t.intersect=function(T){return X.polygon(t,f,T)},o}p(fu,"rect_left_inv_arrow");async function mu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 ve(o,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(zt(mt())){const _=c.children[0],W=ct(c);d=_.getBoundingClientRect(),W.attr("width",d.width),W.attr("height",d.height)}z.info("Text 2",l);const g=l||[],u=c.getBBox(),m=await ve(o,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),f=m.children[0],y=ct(m);d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const C=(t.padding||0)/2;ct(m).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),ct(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const k=d.width+(t.padding||0),b=d.height+(t.padding||0),w=-d.width/2-C,S=-d.height/2-C;let T,B;if(t.look==="handDrawn"){const _=V.svg(s),W=j(t,{}),P=_.path($e(w,S,k,b,t.rx||0),W),A=_.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,W);B=s.insert(()=>(z.debug("Rough node insert CXC",P),A),":first-child"),T=s.insert(()=>(z.debug("Rough node insert CXC",P),P),":first-child")}else T=n.insert("rect",":first-child"),B=n.insert("line"),T.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),B.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return Q(t,T),t.intersect=function(_){return X.rect(t,_)},s}p(mu,"rectWithTitle");async function yu(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 Lr(e,t,a)}p(yu,"roundedRect");var De=8;async function Cu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=((t==null?void 0:t.width)??o.width)+a*2+(t.look==="neo"?De:De*2),c=((t==null?void 0:t.height)??o.height)+s*2,d=h-De,g=c,u=De-h/2,m=-c/2,{cssStyles:f}=t,y=V.svg(n),C=j(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:u,y:m},{x:u+d,y:m},{x:u+d,y:m+g},{x:u-De,y:m+g},{x:u-De,y:m},{x:u,y:m},{x:u,y:m+g}],b=y.polygon(k.map(S=>[S.x,S.y]),C),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path").attr("style",At(f)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${De/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Q(t,w),t.intersect=function(S){return X.rect(t,S)},n}p(Cu,"shadedProcess");async function xu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2)*1.5,g=c,u=d/1.5,m=-g/2,f=-u/2,{cssStyles:y}=t,C=V.svg(o),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const b=[{x:m,y:f},{x:m,y:f+u},{x:m+g,y:f+u},{x:m+g,y:f-u/2}],w=pt(b),S=C.path(w,k),T=o.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-g/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),Q(t,T),t.intersect=function(B){return X.polygon(t,b,B)},o}p(xu,"slopedRect");async function ku(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 Lr(e,t,s)}p(ku,"squareRect");async function bu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=l.height+(t.look==="neo"?n*2:n),c=l.width+h/4+(t.look==="neo"?s*2:s),d=h/2,{cssStyles:g}=t,u=V.svg(o),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...ri(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...ri(c/2-d,0,d,50,270,450)],y=pt(f),C=u.path(y,m),k=o.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Q(t,k),t.intersect=function(b){return X.polygon(t,f,b)},o}p(bu,"stadium");async function wu(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Lr(e,t,r)}p(wu,"state");function Su(e,t,{config:{themeVariables:r}}){var k,b;const{labelStyles:i,nodeStyles:a}=G(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),d=V.svg(c),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const u=d.circle(0,0,t.width,{...g,stroke:n,strokeWidth:2}),m=o??l,f=(t.width??0)*5/14,y=d.circle(0,0,f,{...g,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":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 w=((b=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:b.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return Q(t,C),t.intersect=function(w){return X.circle(t,(t.width??0)/2,w)},c}p(Su,"stateEnd");function Tu(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=V.svg(s).circle(0,0,t.width,X0(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 Q(t,n),t.intersect=function(h){return X.circle(t,(t.width??7)/2,h)},s}p(Tu,"stateStart");var Ke=8;async function Bu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=((t==null?void 0:t.width)??l.width)+2*Ke+s,c=((t==null?void 0:t.height)??l.height)+n,d=h-2*Ke,g=c,u=-h/2,m=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const y=V.svg(o),C=j(t,{}),k=y.rectangle(u,m,d+16,g,C),b=y.line(u+Ke,m,u+Ke,m+g,C),w=y.line(u+Ke+d,m,u+Ke+d,m+g,C);o.insert(()=>b,":first-child"),o.insert(()=>w,":first-child");const S=o.insert(()=>k,":first-child"),{cssStyles:T}=t;S.attr("class","basic label-container").attr("style",At(T)),Q(t,S)}else{const y=Te(o,d,g,f);i&&y.attr("style",i),Q(t,y)}return t.intersect=function(y){return X.polygon(t,f,y)},o}p(Bu,"subroutine");var Wa=.2;async function vu(e,t){const{labelStyles:r,nodeStyles:i}=G(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-Wa*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await it(e,t,rt(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,c=Wa*h,d=Wa*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+c-c,m=h,f=-u/2,y=-m/2,{cssStyles:C}=t,k=V.svg(o),b=j(t,{}),w=[{x:f-c/2,y},{x:f+u+c/2,y},{x:f+u+c/2,y:y+m},{x:f-c/2,y:y+m}],S=[{x:f+u-c/2,y:y+m},{x:f+u+c/2,y:y+m},{x:f+u+c/2,y:y+m-d}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=pt(w),B=k.path(T,b),_=pt(S),W=k.path(_,{...b,fillStyle:"solid"}),P=o.insert(()=>W,":first-child");return P.insert(()=>B,":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),Q(t,P),t.intersect=function(A){return X.polygon(t,w,A)},o}p(vu,"taggedRect");async function _u(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await it(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,d=.2*l,g=l+h,{cssStyles:u}=t,m=V.svg(a),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:g/2},...Ee(-o/2-o/2*.1,g/2,o/2+o/2*.1,g/2,h,.8),{x:o/2+o/2*.1,y:-g/2},{x:-o/2-o/2*.1,y:-g/2}],C=-o/2+o/2*.1,k=-g/2-d*.4,b=[{x:C+o-c,y:(k+l)*1.3},{x:C+o,y:k+l-d},{x:C+o,y:(k+l)*.9},...Ee(C+o,(k+l)*1.25,C+o-c,(k+l)*1.3,-l*.02,.5)],w=pt(y),S=m.path(w,f),T=pt(b),B=m.path(T,{...f,fillStyle:"solid"}),_=a.insert(()=>B,":first-child");return _.insert(()=>S,":first-child"),_.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.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))})`),Q(t,_),t.intersect=function(W){return X.polygon(t,y,W)},a}p(_u,"taggedWaveEdgedRectangle");async function Lu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await it(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),Q(t,c),t.intersect=function(d){return X.rect(t,d)},a}p(Lu,"text");var hb=p((e,t,r,i,a,s)=>`M${e},${t}
|
|
233
|
-
a${a},${s} 0,0,1 0,${-i}
|
|
234
|
-
l${r},0
|
|
235
|
-
a${a},${s} 0,0,1 0,${i}
|
|
236
|
-
M${r},${-i}
|
|
237
|
-
a${a},${s} 0,0,0 0,${i}
|
|
238
|
-
l${-r},0`,"createCylinderPathD"),cb=p((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"),db=p((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Mn=5,An=10;async function Fu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-s,t.height<Mn&&(t.height=Mn);const C=f/2/(2.5+f/50);t.width=(t.width??0)-s-C*3,t.width<An&&(t.width=An)}const{shapeSvg:n,bbox:o,label:l}=await it(e,t,rt(t)),h=(t.height?t.height:o.height)+s,c=h/2,d=c/(2.5+h/50),g=(t.width?t.width:o.width)+d+s,{cssStyles:u}=t;let m;if(t.look==="handDrawn"){const f=V.svg(n),y=cb(0,0,g,h,d,c),C=db(0,0,g,h,d,c),k=f.path(y,j(t,{})),b=f.path(C,j(t,{fill:"none"}));m=n.insert(()=>b,":first-child"),m=n.insert(()=>k,":first-child"),m.attr("class","basic label-container"),u&&m.attr("style",u)}else{const f=hb(0,0,g,h,d,c);m=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",At(u)).attr("style",i),m.attr("class","basic label-container outer-path"),u&&m.selectAll("path").attr("style",u),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-g/2}, ${h/2} )`),l.attr("transform",`translate(${-(o.width/2)-d-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Q(t,m),t.intersect=function(f){const y=X.rect(t,f),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-d)){let k=d*d*(1-C*C/(c*c));k!=0&&(k=Math.sqrt(Math.abs(k))),k=d-k,f.x-(t.x??0)>0&&(k=-k),y.x+=k}return y},n}p(Fu,"tiltedCylinder");async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+n,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const m=V.svg(o),f=j(t,{}),y=pt(d),C=m.path(y,f);g=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=Te(o,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,Q(t,g),t.intersect=function(m){return X.polygon(t,d,m)},o}p(Mu,"trapezoid");async function Au(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,{cssStyles:u}=t,m=V.svg(h),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-d/2*.8,y:-g/2},{x:d/2*.8,y:-g/2},{x:d/2,y:-g/2*.6},{x:d/2,y:g/2},{x:-d/2,y:g/2},{x:-d/2,y:-g/2*.6}],C=pt(y),k=m.path(C,f),b=h.insert(()=>k,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(w){return X.polygon(t,y,w)},h}p(Au,"trapezoidalPentagon");var En=10,$n=10;async function Eu(e,t){var w;const{labelStyles:r,nodeStyles:i}=G(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<$n&&(t.width=$n),t.height=(t==null?void 0:t.height)??0,t.height<En&&(t.height=En));const{shapeSvg:n,bbox:o,label:l}=await it(e,t,rt(t)),h=ge((w=mt().flowchart)==null?void 0:w.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s,d=t!=null&&t.height?t==null?void 0:t.height:c+o.height,g=d,u=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-d}],{cssStyles:m}=t,f=V.svg(n),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=pt(u),k=f.path(C,y),b=n.insert(()=>k,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=d,Q(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${d/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(S){return z.info("Triangle intersect",t,u,S),X.polygon(t,u,S)},n}p(Eu,"triangle");async function $u(e,t){const{labelStyles:r,nodeStyles:i}=G(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 it(e,t,rt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,u=t.look==="neo"?g/4:g/8,m=g+(o?u:-u),{cssStyles:f}=t,C=14-d,k=C>0?C/2:0,b=V.svg(l),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-d/2-k,y:m/2},...Ee(-d/2-k,m/2,d/2+k,m/2,u,.8),{x:d/2+k,y:-m/2},{x:-d/2-k,y:-m/2}],T=pt(S),B=b.path(T,w),_=l.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-g/2+(t.padding??0)-u-(h.y-(h.top??0))})`),Q(t,_),t.intersect=function(W){return X.polygon(t,S,W)},l}p($u,"waveEdgedRectangle");async function Iu(e,t){const{labelStyles:r,nodeStyles:i}=G(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 w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-w*(20/9)),t.width=t.width-s*2}const{shapeSvg:o,bbox:l}=await it(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,d=c/8,g=c+d*2,{cssStyles:u}=t,m=V.svg(o),f=j(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:g/2},...Ee(-h/2,g/2,h/2,g/2,d,1),{x:h/2,y:-g/2},...Ee(h/2,-g/2,-h/2,-g/2,d,-1)],C=pt(y),k=m.path(C,f),b=o.insert(()=>k,":first-child");return b.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),Q(t,b),t.intersect=function(w){return X.polygon(t,y,w)},o}p(Iu,"waveRectangle");var Tt=10;async function Du(e,t){const{labelStyles:r,nodeStyles:i}=G(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-Tt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Tt,10));const{shapeSvg:n,bbox:o,label:l}=await it(e,t,rt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a*2+Tt,c=(t!=null&&t.height?t==null?void 0:t.height:o.height)+s*2+Tt,d=h-Tt,g=c-Tt,u=-d/2,m=-g/2,{cssStyles:f}=t,y=V.svg(n),C=j(t,{}),k=[{x:u-Tt,y:m-Tt},{x:u-Tt,y:m+g},{x:u+d,y:m+g},{x:u+d,y:m-Tt}],b=`M${u-Tt},${m-Tt} L${u+d},${m-Tt} L${u+d},${m+g} L${u-Tt},${m+g} L${u-Tt},${m-Tt}
|
|
239
|
-
M${u-Tt},${m} L${u+d},${m}
|
|
240
|
-
M${u},${m-Tt} L${u},${m+g}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=y.path(b,C),S=n.insert(()=>w,":first-child");return S.attr("transform",`translate(${Tt/2}, ${Tt/2})`),S.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+Tt/2-(o.x-(o.left??0))}, ${-(o.height/2)+Tt/2-(o.y-(o.top??0))})`),Q(t,S),t.intersect=function(T){return X.polygon(t,k,T)},n}p(Du,"windowPane");var In=new Set(["redux-color","redux-dark-color"]),ub=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function _o(e,t){var gt,ut,kt,bt;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:Y}=St(),{background:K}=Y,dt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await _o(e,dt)}const h=St();t.useHtmlLabels=h.htmlLabels;let c=((gt=h.er)==null?void 0:gt.diagramPadding)??10,d=((ut=h.er)==null?void 0:ut.entityPadding)??6;const{cssStyles:g}=t,{labelStyles:u,nodeStyles:m}=G(t);if(r.attributes.length===0&&t.label){const Y={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Se(t.label,h)+Y.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const K=await Lr(e,t,Y);if(i!=null&&In.has(i)){const dt=r.colorIndex??0;K.attr("data-color-id",`color-${dt%l.length}`)}if(!ge(h.htmlLabels)){const dt=K.select("text"),ft=(kt=dt.node())==null?void 0:kt.getBBox();dt.attr("transform",`translate(${-ft.width/2}, 0)`)}return K}h.htmlLabels||(c*=1.25,d*=1.25);let f=rt(t);f||(f="node default");const y=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await tr(y,t.label??"",h,0,0,["name"],u);C.height+=d;let k=0;const b=[],w=[];let S=0,T=0,B=0,_=0,W=!0,P=!0;for(const Y of r.attributes){const K=await tr(y,Y.type,h,0,k,["attribute-type"],u);S=Math.max(S,K.width+c);const dt=await tr(y,Y.name,h,0,k,["attribute-name"],u);T=Math.max(T,dt.width+c);const ft=await tr(y,Y.keys.join(),h,0,k,["attribute-keys"],u);B=Math.max(B,ft.width+c);const I=await tr(y,Y.comment,h,0,k,["attribute-comment"],u);_=Math.max(_,I.width+c);const nt=Math.max(K.height,dt.height,ft.height,I.height)+d;w.push({yOffset:k,rowHeight:nt}),k+=nt}let A=4;B<=c&&(W=!1,B=0,A--),_<=c&&(P=!1,_=0,A--);const H=y.node().getBBox();if(C.width+c*2-(S+T+B+_)>0){const Y=C.width+c*2-(S+T+B+_);S+=Y/A,T+=Y/A,B>0&&(B+=Y/A),_>0&&(_+=Y/A)}const q=S+T+B+_,$=V.svg(y),F=j(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((Y,K)=>Y+((K==null?void 0:K.rowHeight)??0),0));const E=Math.max(H.width+c*2,(t==null?void 0:t.width)||0,q),M=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),R=-E/2,N=-M/2;if(y.selectAll("g:not(:first-child)").each((Y,K,dt)=>{const ft=ct(dt[K]),I=ft.attr("transform");let nt=0,Eo=0;if(I){const Ma=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);Ma&&(nt=parseFloat(Ma[1]),Eo=parseFloat(Ma[2]),ft.attr("class").includes("attribute-name")?nt+=S:ft.attr("class").includes("attribute-keys")?nt+=S+T:ft.attr("class").includes("attribute-comment")&&(nt+=S+T+B))}ft.attr("transform",`translate(${R+c/2+nt}, ${Eo+N+C.height+d/2})`)}),y.select(".name").attr("transform","translate("+-C.width/2+", "+(N+d/2)+")"),i!=null&&In.has(i)){const Y=r.colorIndex??0;y.attr("data-color-id",`color-${Y%l.length}`)}const U=$.rectangle(R,N,E,M,F),Z=y.insert(()=>U,":first-child").attr("class","outer-path").attr("style",g.join(""));b.push(0);for(const[Y,K]of w.entries()){const ft=(Y+1)%2===0&&K.yOffset!==0,I=$.rectangle(R,C.height+N+(K==null?void 0:K.yOffset),E,K==null?void 0:K.rowHeight,{...F,fill:ft?s:n,stroke:o});y.insert(()=>I,"g.label").attr("style",g.join("")).attr("class",`row-rect-${ft?"even":"odd"}`)}const et=1e-4;let tt=er(R,C.height+N,E+R,C.height+N,et),ot=$.polygon(tt.map(Y=>[Y.x,Y.y]),F);if(y.insert(()=>ot).attr("class","divider"),tt=er(S+R,C.height+N,S+R,M+N,et),ot=$.polygon(tt.map(Y=>[Y.x,Y.y]),F),y.insert(()=>ot).attr("class","divider"),W){const Y=S+T+R;tt=er(Y,C.height+N,Y,M+N,et),ot=$.polygon(tt.map(K=>[K.x,K.y]),F),y.insert(()=>ot).attr("class","divider")}if(P){const Y=S+T+B+R;tt=er(Y,C.height+N,Y,M+N,et),ot=$.polygon(tt.map(K=>[K.x,K.y]),F),y.insert(()=>ot).attr("class","divider")}for(const Y of b){const K=C.height+N+Y;tt=er(R,K,E+R,K,et),ot=$.polygon(tt.map(dt=>[dt.x,dt.y]),F),y.insert(()=>ot).attr("class","divider")}if(Q(t,Z),m&&t.look!=="handDrawn")if(i!=null&&ub.has(i))y.selectAll("path").attr("style",m);else{const Y=m.split(";"),K=(bt=Y==null?void 0:Y.filter(dt=>dt.includes("stroke")))==null?void 0:bt.map(dt=>`${dt}`).join("; ");y.selectAll("path").attr("style",K??""),y.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(Y){return X.rect(t,Y)},y}p(_o,"erBox");async function tr(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!==zo(t)&&(t=zo(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await fe(o,t,{width:Se(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(ge(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=ct(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}p(tr,"addText");function er(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}]}p(er,"lineToPolygon");async function Ou(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,d=0,g=0,u=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Nr(o,{text:`«${k}»`},0),d=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Nr(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();g=m.height,h=n.insert("g").attr("class","members-group text");let f=0;for(const k of t.members){const b=await Nr(h,k,f,[k.parseClassifier()]);f+=b+s}u=h.node().getBBox().height,u<=0&&(u=a/2),c=n.insert("g").attr("class","methods-group text");let y=0;for(const k of t.methods){const b=await Nr(c,k,y,[k.parseClassifier()]);y+=b+s}let C=n.node().getBBox();if(o!==null){const k=o.node().getBBox();o.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${d})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${d+g+a*2})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${d+g+(u?u+a*4:a*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}p(Ou,"textHelper");async function Nr(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:ge(s.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),Zr(o)&&(n=!0);const l=await fe(a,Ns(Ue(o)),{width:Se(o,s)+50,classes:"markdown-node-label",useHtmlLabels:n},s);let h,c=1;if(n){const d=l.children[0],g=ct(l);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const m=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(y=>{function C(){var k;if(f.style.display="flex",f.style.flexDirection="column",m){const b=((k=s.fontSize)==null?void 0:k.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";f.style.minWidth=S,f.style.maxWidth=S}else f.style.width="100%";y(f)}p(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(Nr,"addText");async function Pu(e,t){var $,F;const r=mt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,n=s,o=t.useHtmlLabels??ge(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Ou(e,t,r,o,n),{labelStyles:d,nodeStyles:g}=G(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=(($=l.styles)==null?void 0:$.join(";"))||g||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((F=r.class)!=null&&F.hideEmptyMembersBox),f=V.svg(h),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=Math.max(t.width??0,c.width);let k=Math.max(t.height??0,c.height);const b=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?k+=n:l.members.length>0&&l.methods.length===0&&(k+=n*2);const w=-C/2,S=-k/2;let T=m?s*2:l.members.length===0&&l.methods.length===0?-s:0;b&&(T=s*2);const B=f.rectangle(w-s,S-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,k+2*s+T,y),_=h.insert(()=>B,":first-child");_.attr("class","basic label-container outer-path");const W=_.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(m?s/2:0)||0,A=h.select(".label-group").node().getBBox().height-(m?s/2:0)||0,H=h.select(".members-group").node().getBBox().height-(m?s/2:0)||0,q=(P+A+S+s-(S-s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((L,E,M)=>{var tt,ot;const R=ct(M[E]),N=R.attr("transform");let U=0;if(N){const ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);ut&&(U=parseFloat(ut[2]))}let Z=U+S+s-(m?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(R.attr("class").includes("methods-group")){const gt=Math.max(H,n/2);b?Z=Math.max(q,P+A+gt+S+n*2+s)+n*2:Z=P+A+gt+S+n*4+s}l.members.length===0&&l.methods.length===0&&((tt=r.class)!=null&&tt.hideEmptyMembersBox)&&(l.annotations.length>0?Z=U-n:Z=U),o||(Z-=4);let et=w;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(et=-((ot=R.node())==null?void 0:ot.getBBox().width)/2||0,h.selectAll("text").each(function(gt,ut,kt){window.getComputedStyle(kt[ut]).textAnchor==="middle"&&(et=0)})),R.attr("transform",`translate(${et}, ${Z})`)}),l.members.length>0||l.methods.length>0||m){const L=P+A+S+s,E=f.line(W.x,L,W.x+W.width,L+.001,y);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(m||l.members.length>0||l.methods.length>0){const L=P+A+H+S+n*2+s,E=f.line(W.x,b?Math.max(q,L):L,W.x+W.width,(b?Math.max(q,L):L)+.001,y);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),_.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!o){const L=RegExp(/color\s*:\s*([^;]*)/),E=L.exec(u);if(E){const M=E[0].replace("color","fill");h.selectAll("tspan").attr("style",M)}else if(d){const M=L.exec(d);if(M){const R=M[0].replace("color","fill");h.selectAll("tspan").attr("style",R)}}}return Q(t,_),t.intersect=function(L){return X.rect(t,L)},h}p(Pu,"classBox");async function Ru(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const a=t,s=t,n=20,o=20,l="verifyMethod"in t,h=rt(t),{themeVariables:c}=mt(),{borderColorArray:d,requirementEdgeLabelBackground:g}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let m;l?m=await ne(u,`<<${a.type}>>`,0,t.labelStyle):m=await ne(u,"<<Element>>",0,t.labelStyle);let f=m;const y=await ne(u,a.name,f,t.labelStyle+"; font-weight: bold;");if(f+=y+o,l){const A=await ne(u,`${a.requirementId?`ID: ${a.requirementId}`:""}`,f,t.labelStyle);f+=A;const H=await ne(u,`${a.text?`Text: ${a.text}`:""}`,f,t.labelStyle);f+=H;const q=await ne(u,`${a.risk?`Risk: ${a.risk}`:""}`,f,t.labelStyle);f+=q,await ne(u,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,f,t.labelStyle)}else{const A=await ne(u,`${s.type?`Type: ${s.type}`:""}`,f,t.labelStyle);f+=A,await ne(u,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,f,t.labelStyle)}const C=(((W=u.node())==null?void 0:W.getBBox().width)??200)+n,k=(((P=u.node())==null?void 0:P.getBBox().height)??200)+n,b=-C/2,w=-k/2,S=V.svg(u),T=j(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const B=S.rectangle(b,w,C,k,T),_=u.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const A=t.colorIndex??0;u.attr("data-color-id",`color-${A%d.length}`)}if(u.selectAll(".label").each((A,H,q)=>{const $=ct(q[H]),F=$.attr("transform");let L=0,E=0;if(F){const U=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);U&&(L=parseFloat(U[1]),E=parseFloat(U[2]))}const M=E-k/2;let R=b+n/2;(H===0||H===1)&&(R=L),$.attr("transform",`translate(${R}, ${M+n})`)}),f>m+y+o){const A=w+m+y+o;let H;if(t.look==="neo"){const F=[[b,A],[b+C,A],[b+C,A+.001],[b,A+.001]];H=S.polygon(F,T)}else H=S.line(b,A,b+C,A,T);u.insert(()=>H).attr("class","divider")}return Q(t,_),t.intersect=function(A){return X.rect(t,A)},i&&t.look!=="handDrawn"&&(g||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}p(Ru,"requirementBox");async function ne(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=mt(),n=s.htmlLabels??!0,o=await fe(a,Ns(Ue(t)),{width:Se(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}p(ne,"addText");var gb=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function qu(e,t,{config:r}){var H,q;const{labelStyles:i,nodeStyles:a}=G(t);t.labelStyle=i||"";const s=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:h}=await it(e,t,rt(t)),c=t.padding||10;let d="",g;"ticket"in t&&t.ticket&&((H=r==null?void 0:r.kanban)!=null&&H.ticketBaseUrl)&&(d=(q=r==null?void 0:r.kanban)==null?void 0:q.ticketBaseUrl.replace("#TICKET#",t.ticket),g=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,f;g?{label:m,bbox:f}=await qa(g,"ticket"in t&&t.ticket||"",u):{label:m,bbox:f}=await qa(o,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:C}=await qa(o,"assigned"in t&&t.assigned||"",u);t.width=n;const k=10,b=(t==null?void 0:t.width)||0,w=Math.max(f.height,C.height)/2,S=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+w,T=-b/2,B=-S/2;h.attr("transform","translate("+(c-b/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(c-b/2)+", "+(-w+l.height/2)+")"),y.attr("transform","translate("+(c+b/2-C.width-2*s)+", "+(-w+l.height/2)+")");let _;const{rx:W,ry:P}=t,{cssStyles:A}=t;if(t.look==="handDrawn"){const $=V.svg(o),F=j(t,{}),L=W||P?$.path($e(T,B,b,S,W||0),F):$.rectangle(T,B,b,S,F);_=o.insert(()=>L,":first-child"),_.attr("class","basic label-container").attr("style",A||null)}else{_=o.insert("rect",":first-child"),_.attr("class","basic label-container __APA__").attr("style",a).attr("rx",W??5).attr("ry",P??5).attr("x",T).attr("y",B).attr("width",b).attr("height",S);const $="priority"in t&&t.priority;if($){const F=o.append("line"),L=T+2,E=B+Math.floor((W??0)/2),M=B+S-Math.floor((W??0)/2);F.attr("x1",L).attr("y1",E).attr("x2",L).attr("y2",M).attr("stroke-width","4").attr("stroke",gb($))}}return Q(t,_),t.height=S,t.intersect=function($){return X.rect(t,$)},o}p(qu,"kanbanItem");async function Wu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await it(e,t,rt(t)),l=s.width+10*n,h=s.height+8*n,c=.15*l,{cssStyles:d}=t,g=s.width+20,u=s.height+20,m=Math.max(l,g),f=Math.max(h,u);o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let y;const C=`M0 0
|
|
241
|
-
a${c},${c} 1 0,0 ${m*.25},${-1*f*.1}
|
|
242
|
-
a${c},${c} 1 0,0 ${m*.25},0
|
|
243
|
-
a${c},${c} 1 0,0 ${m*.25},0
|
|
244
|
-
a${c},${c} 1 0,0 ${m*.25},${f*.1}
|
|
245
|
-
|
|
246
|
-
a${c},${c} 1 0,0 ${m*.15},${f*.33}
|
|
247
|
-
a${c*.8},${c*.8} 1 0,0 0,${f*.34}
|
|
248
|
-
a${c},${c} 1 0,0 ${-1*m*.15},${f*.33}
|
|
249
|
-
|
|
250
|
-
a${c},${c} 1 0,0 ${-1*m*.25},${f*.15}
|
|
251
|
-
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
252
|
-
a${c},${c} 1 0,0 ${-1*m*.25},0
|
|
253
|
-
a${c},${c} 1 0,0 ${-1*m*.25},${-1*f*.15}
|
|
254
|
-
|
|
255
|
-
a${c},${c} 1 0,0 ${-1*m*.1},${-1*f*.33}
|
|
256
|
-
a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
|
|
257
|
-
a${c},${c} 1 0,0 ${m*.1},${-1*f*.33}
|
|
258
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const k=V.svg(a),b=j(t,{}),w=k.path(C,b);y=a.insert(()=>w,":first-child"),y.attr("class","basic label-container").attr("style",At(d))}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}, ${-f/2})`),Q(t,y),t.calcIntersect=function(k,b){return X.rect(k,b)},t.intersect=function(k){return z.info("Bang intersect",t,k),X.rect(t,k)},a}p(Wu,"bang");async function zu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await it(e,t,rt(t)),l=s.width+2*n,h=s.height+2*n,c=.15*l,d=.25*l,g=.35*l,u=.2*l,{cssStyles:m}=t;let f;const y=`M0 0
|
|
259
|
-
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
260
|
-
a${g},${g} 1 0,1 ${l*.4},${-1*l*.1}
|
|
261
|
-
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
262
|
-
|
|
263
|
-
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
264
|
-
a${u},${u} 1 0,1 ${-1*l*.15},${h*.65}
|
|
265
|
-
|
|
266
|
-
a${d},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
267
|
-
a${g},${g} 1 0,1 ${-1*l*.5},0
|
|
268
|
-
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
269
|
-
|
|
270
|
-
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
271
|
-
a${u},${u} 1 0,1 ${l*.1},${-1*h*.65}
|
|
272
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=V.svg(a),k=j(t,{}),b=C.path(y,k);f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container").attr("style",At(m))}else f=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})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),Q(t,f),t.calcIntersect=function(C,k){return X.rect(C,k)},t.intersect=function(C){return z.info("Cloud intersect",t,C),X.rect(t,C)},a}p(zu,"cloud");async function Nu(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:o}=await it(e,t,rt(t)),l=s.width+8*n,h=s.height+2*n,c=5,d=t.look==="neo"?`
|
|
273
|
-
M${-l/2} ${h/2-c}
|
|
274
|
-
v${-h+2*c}
|
|
275
|
-
q0,-${c} ${c},-${c}
|
|
276
|
-
h${l-2*c}
|
|
277
|
-
q${c},0 ${c},${c}
|
|
278
|
-
v${h-c}
|
|
279
|
-
H${-l/2}
|
|
280
|
-
Z
|
|
281
|
-
`:`
|
|
282
|
-
M${-l/2} ${h/2-c}
|
|
283
|
-
v${-h+2*c}
|
|
284
|
-
q0,-${c} ${c},-${c}
|
|
285
|
-
h${l-2*c}
|
|
286
|
-
q${c},0 ${c},${c}
|
|
287
|
-
v${h-2*c}
|
|
288
|
-
q0,${c} ${-c},${c}
|
|
289
|
-
h${-(l-2*c)}
|
|
290
|
-
q${-c},0 ${-c},${-c}
|
|
291
|
-
Z
|
|
292
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);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()),Q(t,g),t.calcIntersect=function(u,m){return X.rect(u,m)},t.intersect=function(u){return X.rect(t,u)},a}p(Nu,"defaultMindmapNode");async function Hu(e,t){const r={padding:t.padding??0};return vo(e,t,r)}p(Hu,"mindmapCircle");var pb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ku},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:yu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:bu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Bu},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Hd},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Yd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:vo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Wu},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:zu},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:pu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Qd},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:nu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ou},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Mu},{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:au},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ud},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Lu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Dd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Tu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Su},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Gd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Kd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:qd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Wd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:zd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:lu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:$u},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Zd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Fu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:hu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Nd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Xd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Eu},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Du},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:jd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Au},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Vd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:xu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:uu},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:du},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Id},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Rd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:_u},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Iu},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fu},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:cu}],fb=p(()=>{const t=[...Object.entries({state:wu,choice:Od,note:gu,rectWithTitle:mu,labelRect:su,iconSquare:ru,iconCircle:tu,icon:Jd,iconRounded:eu,imageSquare:iu,anchor:Ed,kanbanItem:qu,mindmapCircle:Hu,defaultMindmapNode:Nu,classBox:Pu,erBox:_o,requirementBox:Ru}),...pb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Yu=fb();function mb(e){return e in Yu}p(mb,"isValidShape");var va=new Map;async function Xu(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?Yu[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",At(t.look)),t.tooltip&&a.attr("title",t.tooltip),va.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Xu,"insertNode");var nT=p((e,t)=>{va.set(t.id,e)},"setNodeElem"),lT=p(()=>{va.clear()},"clear"),hT=p(e=>{const t=va.get(e.id);z.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"),Dr=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ot={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},Dn={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Hr(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}}p(Hr,"calculateDeltaAndAngle");var wt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),yb=p(e=>({x:p(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(Ot,e.arrowTypeStart)){const{angle:u,deltaX:m}=Hr(i[0],i[1]);a=Ot[e.arrowTypeStart]*Math.cos(u)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ot,e.arrowTypeEnd)){const{angle:u,deltaX:m}=Hr(i[i.length-1],i[i.length-2]);a=Ot[e.arrowTypeEnd]*Math.cos(u)*(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=Ot[e.arrowTypeStart],d=Ot[e.arrowTypeEnd],g=1;if(n<d&&n>0&&o<d){let u=d+g-n;u*=s==="right"?-1:1,a-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=s==="right"?-1:1,a+=u}return wt(t).x+a},"x"),y:p(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(Ot,e.arrowTypeStart)){const{angle:u,deltaY:m}=Hr(i[0],i[1]);a=Ot[e.arrowTypeStart]*Math.abs(Math.sin(u))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ot,e.arrowTypeEnd)){const{angle:u,deltaY:m}=Hr(i[i.length-1],i[i.length-2]);a=Ot[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(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=Ot[e.arrowTypeStart],d=Ot[e.arrowTypeEnd],g=1;if(n<d&&n>0&&o<d){let u=d+g-n;u*=s==="up"?-1:1,a-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=s==="up"?-1:1,a+=u}return wt(t).y+a},"y")}),"getLineFunctionsWithOffset"),Cb=p((e,t,r,i,a,s=!1,n)=>{t.arrowTypeStart&&On(e,"start",t.arrowTypeStart,r,i,a,s,n),t.arrowTypeEnd&&On(e,"end",t.arrowTypeEnd,r,i,a,s,n)},"addEdgeMarkers"),xb={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}},kb=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],On=p((e,t,r,i,a,s,n=!1,o)=>{var m;const l=xb[r],h=l&&kb.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${a}_${s}-${c}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const f=o.replace(/[^\dA-Za-z]/g,"_"),y=`${u}_${f}`;if(!document.getElementById(y)){const C=document.getElementById(u);if(C){const k=C.cloneNode(!0);k.id=y,k.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",o),l.fill&&w.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),bb=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=mt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),da=new Map,It=new Map,cT=p(()=>{da.clear(),It.clear()},"clear"),Or=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),wb=p(async(e,t)=>{const r=mt();let i=zt(r);const{labelStyles:a}=G(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 fe(e,t.label,{style:Or(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),z.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],m=ct(h);c=u.getBoundingClientRect(),d=c,m.attr("width",c.width),m.attr("height",c.height)}else{const u=ct(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}n.attr("transform",Dr(d,i)),da.set(t.id,s),t.width=c.width,t.height=c.height;let g;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(m,t.startLabelLeft,Or(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=ct(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Dr(y,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).startLeft=u,Yr(g,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(m,t.startLabelRight,Or(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=ct(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Dr(y,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).startRight=u,Yr(g,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(u,t.endLabelLeft,Or(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=ct(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Dr(y,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).endLeft=u,Yr(g,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),m=u.insert("g").attr("class","inner"),f=await ve(u,t.endLabelRight,Or(t.labelStyle)||"",!1,!1);g=f;let y=f.getBBox();if(i){const C=f.children[0],k=ct(f);y=C.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}m.attr("transform",Dr(y,i)),It.get(t.id)||It.set(t.id,{}),It.get(t.id).endRight=u,Yr(g,t.endLabelRight)}return h},"insertEdgeLabel");function Yr(e,t){zt(mt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Yr,"setTerminalWidth");var Sb=p((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,da.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=mt(),{subGraphTitleTotalMargin:a}=go(i);if(e.label){const s=da.get(e.id);let n=e.x,o=e.y;if(r){const l=Jt.calcLabelPosition(r);z.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=It.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=Jt.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=It.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=Jt.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=It.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=Jt.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=It.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=Jt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}s.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),Tb=p((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,a=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return a<.001||s<.001?t:s>=a?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Bb=p((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"),vb=p((e,t,r)=>{z.debug(`intersection calc abc89:
|
|
293
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
294
|
-
insidePoint : ${JSON.stringify(r)}
|
|
295
|
-
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 d=r.y<t.y?t.y-l-a:a-l-t.y;o=c*d/h;const g={x:r.x<t.x?r.x+o:r.x-c+o,y:r.y<t.y?r.y+h-d:r.y-h+d};return o===0&&(g.x=t.x,g.y=t.y),c===0&&(g.x=t.x),h===0&&(g.y=t.y),z.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${o}`,g),g}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let d=h*o/c,g=r.x<t.x?r.x+c-o:r.x-c+o,u=r.y<t.y?r.y+d:r.y-d;return z.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${o}`,{_x:g,_y:u}),o===0&&(g=t.x,u=t.y),c===0&&(g=t.x),h===0&&(u=t.y),{x:g,y:u}}},"intersection"),Pn=p((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(z.info("abc88 checking point",s,t),!Bb(t,s)&&!a){const n=vb(t,i,s);z.debug("abc88 inside",s,i,n),z.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)?z.warn("abc88 no intersect",n,r):r.push(n),a=!0}else z.warn("abc88 outside",s,i),i=s,a||r.push(s)}),z.debug("returning points",r),r},"cutPathAtIntersect");function Uu(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}}p(Uu,"extractCornerPoints");var Rn=p(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"),_b=p(function(e){const{cornerPointPositions:t}=Uu(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=Rn(a,n,5),l=Rn(s,n,5),h=l.x-o.x,c=l.y-o.y;r.push(o);const d=Math.sqrt(2)*2;let g={x:n.x,y:n.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){z.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const u=5;n.x===o.x?g={x:h<0?o.x-u+d:o.x+u-d,y:c<0?o.y-d:o.y+d}:g={x:h<0?o.x-d:o.x+d,y:c<0?o.y-u+d:o.y+u-d}}else z.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(g,l)}else r.push(e[i]);return r},"fixCorners"),Lb=p((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"),Fb=p(function(e,t,r,i,a,s,n,o=!1){var M;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:h}=mt();let c=t.points,d=!1;const g=a;var u=s;const m=[];for(const R in t.cssCompiledStyles)Ic(R)||m.push(t.cssCompiledStyles[R]);if(h==="swimlane"){if(u.intersect&&g.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[g.intersect(c[0]),u.intersect(c[1])];else{const R=c.slice(1,-1),N=R[0],U=R[R.length-1],Z=.5,et=Math.abs(c[c.length-1].x-U.x)<Z&&Math.abs(c[c.length-1].y-U.y)<Z,tt=g.intersect(N),ot=et?U:u.intersect(U),gt=Math.abs(ot.x-U.x)<Z&&Math.abs(ot.y-U.y)<Z,kt=Math.abs(tt.x-N.x)<Z&&Math.abs(tt.y-N.y)<Z?[]:[tt],bt=gt?[]:[ot];c=[...kt,...R,...bt]}c=Tb(t,c)}else u.intersect&&g.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(g.intersect(c[0])),c.push(u.intersect(c[c.length-1])));const f=btoa(JSON.stringify(c));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),c=Pn(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Pn(c.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=c.filter(R=>!Number.isNaN(R.y));const C=bb(t.curve);C!=="rounded"&&(y=_b(y));let k=Ti;switch(C){case"linear":k=Ti;break;case"basis":k=Ya;break;case"cardinal":k=Vl;break;case"bumpX":k=il;break;case"bumpY":k=rl;break;case"catmullRom":k=Zl;break;case"monotoneX":k=el;break;case"monotoneY":k=tl;break;case"natural":k=Jn;break;case"step":k=Kn;break;case"stepAfter":k=Qn;break;case"stepBefore":k=Zn;break;case"rounded":k=Ti;break;default:k=Ya}const{x:b,y:w}=yb(t),S=pp().x(b).y(w).curve(k);let T;switch(t.thickness){case"normal":T="edge-thickness-normal";break;case"thick":T="edge-thickness-thick";break;case"invisible":T="edge-thickness-invisible";break;default:T="edge-thickness-normal"}switch(t.pattern){case"solid":T+=" edge-pattern-solid";break;case"dotted":T+=" edge-pattern-dotted";break;case"dashed":T+=" edge-pattern-dashed";break;default:T+=" edge-pattern-solid"}let B,_=C==="rounded"?ju(Vu(y,t),5):S(y);const W=Array.isArray(t.style)?t.style:[t.style];let P=W.find(R=>R==null?void 0:R.startsWith("stroke:")),A="";t.animate&&(A="edge-animation-fast"),t.animation&&(A="edge-animation-"+t.animation);let H=!1;if(t.look==="handDrawn"){const R=V.svg(e);Object.assign([],y);const N=R.path(_,{roughness:.3,seed:l});T+=" transition",B=ct(N).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+T+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",W?W.reduce((Z,et)=>Z+";"+et,""):"");let U=B.attr("d");B.attr("d",U),e.node().appendChild(B.node())}else{const R=m.join(";"),N=W?W.reduce((gt,ut)=>gt+ut+";",""):"",U=(R?R+";"+N+";":N)+";"+(W?W.reduce((gt,ut)=>gt+";"+ut,""):"");B=e.append("path").attr("d",_).attr("id",`${n}-${t.id}`).attr("class"," "+T+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",U),P=(M=U.match(/stroke:([^;]+)/))==null?void 0:M[1],H=t.animate===!0||!!t.animation||R.includes("animation");const Z=B.node(),et=typeof Z.getTotalLength=="function"?Z.getTotalLength():0,tt=Dn[t.arrowTypeStart]||0,ot=Dn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!H){const ut=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Lb(et,tt,ot):`0 ${tt} ${et-tt-ot} ${ot}`}; stroke-dashoffset: 0;`;B.attr("style",ut+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",f),B.attr("data-look",At(t.look)),t.showPoints&&y.forEach(R=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",R.x).attr("cy",R.y)});let q="";(mt().flowchart.arrowMarkerAbsolute||mt().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const $=!H&&(t==null?void 0:t.look)==="neo";Cb(B,t,q,n,i,$,P);const F=Math.floor(c.length/2),L=c[F];Jt.isLabelCoordinateInPath(L,B.attr("d"))||(d=!0);let E={};return d&&(E.updatedPath=c),E.originalPath=t.points,E},"insertEdge");function ju(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,d=l.x-n.x,g=l.y-n.y,u=Math.hypot(h,c),m=Math.hypot(d,g);if(u<a||m<a){r+=`L${n.x},${n.y}`;continue}const f=h/u,y=c/u,C=d/m,k=g/m,b=f*C+y*k,w=Math.max(-1,Math.min(1,b)),S=Math.acos(w);if(S<a||Math.abs(Math.PI-S)<a){r+=`L${n.x},${n.y}`;continue}const T=Math.min(t/Math.sin(S/2),u/2,m/2),B=n.x-f*T,_=n.y-y*T,W=n.x+C*T,P=n.y+k*T;r+=`L${B},${_}`,r+=`Q${n.x},${n.y} ${W},${P}`}}return r}p(ju,"generateRoundedPath");function Fs(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Fs,"calculateDeltaAndAngle");function Vu(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&Ot[t.arrowTypeStart]){const a=Ot[t.arrowTypeStart],s=e[0],n=e[1],{angle:o}=Fs(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&&Ot[t.arrowTypeEnd]){const a=Ot[t.arrowTypeEnd],s=e[i-1],n=e[i-2],{angle:o}=Fs(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}p(Vu,"applyMarkerOffsetsToPoints");var Mb=p((e,t,r,i)=>{t.forEach(a=>{Jb[a](e,r,i)})},"insertMarkers"),Ab=p((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").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"),Eb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),$b=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),Ib=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),Db=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").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"),Ob=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Pb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Rb=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),qb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Wb=p((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"),zb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Nb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const 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"),Hb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Yb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const 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"),Xb=p((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"),Ub=p((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"),jb=p((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"),Vb=p((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"),Gb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
296
|
-
L20,10
|
|
297
|
-
M20,10
|
|
298
|
-
L0,20`)},"requirement_arrow"),Zb=p((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
|
|
299
|
-
L20,10
|
|
300
|
-
M20,10
|
|
301
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Qb=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Kb=p((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"),Jb={extension:Ab,composition:Eb,aggregation:$b,dependency:Ib,lollipop:Db,point:Ob,circle:Pb,cross:Rb,barb:qb,barbNeo:Wb,only_one:zb,zero_or_one:Nb,one_or_more:Hb,zero_or_more:Yb,only_one_neo:Xb,zero_or_one_neo:Ub,one_or_more_neo:jb,zero_or_more_neo:Vb,requirement_arrow:Gb,requirement_contains:Qb,requirement_arrow_neo:Zb,requirement_contains_neo:Kb},t1=Mb,e1={common:oi,getConfig:St,insertCluster:Zk,insertEdge:Fb,insertEdgeLabel:wb,insertMarkers:t1,insertNode:Xu,interpolateToCurve:oo,labelHelper:it,log:z,positionEdgeLabel:Sb},ii={},Gu=p(e=>{for(const t of e)ii[t.name]=t},"registerLayoutLoaders"),r1=p(()=>{Gu([{name:"dagre",loader:p(async()=>await ht(()=>import("./dagre-VKFMJZFB-BqR7tzk8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),"loader")},{name:"swimlane",loader:p(async()=>await ht(()=>import("./swimlanes-5IMT3BWC-HIPL1mdx.js"),__vite__mapDeps([9,6,5,1,2,3,7,8])),"loader")},{name:"cose-bilkent",loader:p(async()=>await ht(()=>import("./cose-bilkent-JH36ORCC-C0vhiJLV.js"),__vite__mapDeps([10,11,5,6,7,8])),"loader")}])},"registerDefaultLayoutLoaders");r1();var dT=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in ii))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const g=d.domId||d.id;d.domId=`${e.diagramId}-${g}`}const i=ii[e.layoutAlgorithm],a=await i.loader(),{theme:s,themeVariables:n}=e.config,{useGradient:o,gradientStart:l,gradientStop:h}=n,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return a.render(e,t,e1,{algorithm:i.algorithm},r)},"render"),uT=p((e="",{fallback:t="dagre"}={})=>{if(e in ii)return e;if(t in ii)return z.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"),Lo="comm",Zu="rule",Qu="decl",i1="@media",a1="@import",s1="@supports",o1="@namespace",Ms="@keyframes",Ku="@layer",n1="@scope",l1=Math.abs,Gr=String.fromCharCode;function Ju(e){return e.trim()}function As(e,t,r){return e.replace(t,r)}function ar(e,t){return e.charCodeAt(t)|0}function Br(e,t,r){return e.slice(t,r)}function le(e){return e.length}function tg(e){return e.length}function bi(e,t){return t.push(e),e}var _a=1,vr=1,eg=0,Zt=0,vt=0,Fr="";function Fo(e,t,r,i,a,s,n,o){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:_a,column:vr,length:n,return:"",siblings:o}}function h1(){return vt}function c1(){return vt=Zt>0?ar(Fr,--Zt):0,vr--,vt===10&&(vr=1,_a--),vt}function ee(){return vt=Zt<eg?ar(Fr,Zt++):0,vr++,vt===10&&(vr=1,_a++),vt}function _e(){return ar(Fr,Zt)}function Oi(){return Zt}function La(e,t){return Br(Fr,e,t)}function ai(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 d1(e){return _a=vr=1,eg=le(Fr=e),Zt=0,[]}function u1(e){return Fr="",e}function za(e){return Ju(La(Zt-1,Es(e===91?e+2:e===40?e+1:e)))}function g1(e){for(;(vt=_e())&&vt<33;)ee();return ai(e)>2||ai(vt)>3?"":" "}function p1(e,t){for(;--t&&ee()&&!(vt<48||vt>102||vt>57&&vt<65||vt>70&&vt<97););return La(e,Oi()+(t<6&&_e()==32&&ee()==32))}function Es(e){for(;ee();)switch(vt){case e:return Zt;case 34:case 39:e!==34&&e!==39&&Es(vt);break;case 40:e===41&&Es(e);break;case 92:ee();break}return Zt}function f1(e,t){for(;ee()&&e+vt!==57;)if(e+vt===84&&_e()===47)break;return"/*"+La(t,Zt-1)+"*"+Gr(e===47?e:ee())}function m1(e){for(;!ai(_e());)ee();return La(e,Zt)}function y1(e){return u1(Pi("",null,null,null,[""],e=d1(e),0,[0],e))}function Pi(e,t,r,i,a,s,n,o,l){for(var h=0,c=0,d=n,g=0,u=0,m=0,f=1,y=1,C=1,k=0,b=0,w="",S=a,T=s,B=i,_=w;y;)switch(m=b,b=ee()){case 40:m!=108&&ar(_,d-1)==58?(k++,_+="("):_+=za(b);break;case 41:k--,_+=")";break;case 34:case 39:case 91:_+=za(b);break;case 9:case 10:case 13:case 32:if(k>0){_+=Gr(b);break}_+=g1(m);break;case 92:_+=p1(Oi()-1,7);continue;case 47:switch(_e()){case 42:case 47:bi(C1(f1(ee(),Oi()),t,r,l),l),(ai(m||1)==5||ai(_e()||1)==5)&&le(_)&&Br(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*f:o[h++]=le(_)*C;case 125*f:case 59:case 0:if(k>0&&b){_+=Gr(b);break}switch(b){case 0:case 125:y=0;case 59+c:C==-1&&(_=As(_,/\f/g,"")),u>0&&(le(_)-d||f===0)&&bi(u>32?Wn(_+";",i,r,d-1,l):Wn(As(_," ","")+";",i,r,d-2,l),l);break;case 59:_+=";";default:if(bi(B=qn(_,t,r,h,c,a,o,w,S=[],T=[],d,s),s),b===123)if(c===0)Pi(_,t,B,B,S,s,d,o,T);else{switch(g){case 99:if(ar(_,3)===110)break;case 108:if(ar(_,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Pi(e,B,B,i&&bi(qn(e,B,B,0,0,a,o,w,a,S=[],d,T),T),a,T,d,o,i?S:T):Pi(_,B,B,B,[""],T,0,o,T)}}h=c=u=0,f=C=1,w=_="",d=n;break;case 58:d=1+le(_),u=m;default:if(f<1){if(b==123)--f;else if(b==125&&f++==0&&c1()==125)continue}switch(_+=Gr(b),b*f){case 38:C=c>0?1:(_+="\f",-1);break;case 44:if(k>0)break;o[h++]=(le(_)-1)*C,C=1;break;case 64:_e()===45&&(_+=za(ee())),g=_e(),c=d=le(w=_+=m1(Oi())),b++;break;case 45:m===45&&le(_)==2&&(f=0)}}return s}function qn(e,t,r,i,a,s,n,o,l,h,c,d){for(var g=a-1,u=a===0?s:[""],m=tg(u),f=0,y=0,C=0;f<i;++f)for(var k=0,b=Br(e,g+1,g=l1(y=n[f])),w=e;k<m;++k)(w=Ju(y>0?u[k]+" "+b:As(b,/&\f/g,u[k])))&&(l[C++]=w);return Fo(e,t,r,a===0?Zu:o,l,h,c,d)}function C1(e,t,r,i){return Fo(e,t,r,Lo,Gr(h1()),Br(e,2,-2),0,i)}function Wn(e,t,r,i,a){return Fo(e,t,r,Qu,Br(e,0,i),Br(e,i+1,-1),i,a)}function $s(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function x1(e,t,r,i){switch(e.type){case Ku:if(e.children.length)break;case a1:case o1:case Qu:return e.return=e.return||e.value;case Lo:return"";case Ms:return e.return=e.value+"{"+$s(e.children,i)+"}";case Zu:if(!le(e.value=e.props.join(",")))return""}return le(r=$s(e.children,i))?e.return=e.value+"{"+r+"}":""}function k1(e){var t=tg(e);return function(r,i,a,s){for(var n="",o=0;o<t;o++)n+=e[o](r,i,a,s)||"";return n}}var rg="c4",b1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),w1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-BUftbNWY.js");return{diagram:t}},__vite__mapDeps([12,13,5,6,7,8]));return{id:rg,diagram:e}},"loader"),S1={id:rg,detector:b1,loader:w1},T1=S1,ig="flowchart",B1=p((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"),v1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-0scCMi71.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([14,15,16,17,13,7,18]));return{id:ig,diagram:e}},"loader"),_1={id:ig,detector:B1,loader:v1},L1=_1,ag="flowchart-v2",F1=p((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"),M1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-0scCMi71.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([14,15,16,17,13,7,18]));return{id:ag,diagram:e}},"loader"),A1={id:ag,detector:F1,loader:M1},E1=A1,sg="swimlane",$1=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),I1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-usVEFD6y.js");return{diagram:t}},__vite__mapDeps([19,14,15,16,17,13,7,18,5,6,8]));return{id:sg,diagram:e}},"loader"),D1={id:sg,detector:$1,loader:I1},O1=D1,og="er",P1=p(e=>/^\s*erDiagram/.test(e),"detector"),R1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-oGWxlmE8.js");return{diagram:t}},__vite__mapDeps([20,16,17,18,5,6,7,8]));return{id:og,diagram:e}},"loader"),q1={id:og,detector:P1,loader:R1},W1=q1,ng="gitGraph",z1=p(e=>/^\s*gitGraph/.test(e),"detector"),N1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-DsT87XU7.js");return{diagram:t}},__vite__mapDeps([21,22,23,24,6,5,7,8]));return{id:ng,diagram:e}},"loader"),H1={id:ng,detector:z1,loader:N1},Y1=H1,lg="gantt",X1=p(e=>/^\s*gantt/.test(e),"detector"),U1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-DIS-iO_q.js");return{diagram:t}},__vite__mapDeps([25,5,26,27,8,28,29,6,7]));return{id:lg,diagram:e}},"loader"),j1={id:lg,detector:X1,loader:U1},V1=j1,hg="info",G1=p(e=>/^\s*info/.test(e),"detector"),Z1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-CkLm2oOh.js");return{diagram:t}},__vite__mapDeps([30,24,6,5,7,8]));return{id:hg,diagram:e}},"loader"),Q1={id:hg,detector:G1,loader:Z1},cg="pie",K1=p(e=>/^\s*pie/.test(e),"detector"),J1=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-CTRyME0H.js");return{diagram:t}},__vite__mapDeps([31,23,24,6,5,32,8,33,28,7]));return{id:cg,diagram:e}},"loader"),t2={id:cg,detector:K1,loader:J1},dg="quadrantChart",e2=p(e=>/^\s*quadrantChart/.test(e),"detector"),r2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-DW4gRbec.js");return{diagram:t}},__vite__mapDeps([34,27,8,28,29,5,6,7]));return{id:dg,diagram:e}},"loader"),i2={id:dg,detector:e2,loader:r2},a2=i2,ug="xychart",s2=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),o2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-OjszPLMV.js");return{diagram:t}},__vite__mapDeps([35,36,28,33,27,8,29,5,6,7]));return{id:ug,diagram:e}},"loader"),n2={id:ug,detector:s2,loader:o2},l2=n2,gg="requirement",h2=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),c2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-D898qBnU.js");return{diagram:t}},__vite__mapDeps([37,16,17,5,6,7,8]));return{id:gg,diagram:e}},"loader"),d2={id:gg,detector:h2,loader:c2},u2=d2,pg="sequence",g2=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),p2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-D4HUsfB2.js");return{diagram:t}},__vite__mapDeps([38,22,13,5,6,7,8]));return{id:pg,diagram:e}},"loader"),f2={id:pg,detector:g2,loader:p2},m2=f2,fg="class",y2=p((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"),C2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-BkFPBJiF.js");return{diagram:t}},__vite__mapDeps([39,40,15,16,17,13,7,5,6,8]));return{id:fg,diagram:e}},"loader"),x2={id:fg,detector:y2,loader:C2},k2=x2,mg="classDiagram",b2=p((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"),w2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-BkFPBJiF.js");return{diagram:t}},__vite__mapDeps([41,40,15,16,17,13,7,5,6,8]));return{id:mg,diagram:e}},"loader"),S2={id:mg,detector:b2,loader:w2},T2=S2,yg="state",B2=p((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"),v2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-0IOXcLaP.js");return{diagram:t}},__vite__mapDeps([42,43,16,17,13,7,2,4,3,8,5,6]));return{id:yg,diagram:e}},"loader"),_2={id:yg,detector:B2,loader:v2},L2=_2,Cg="stateDiagram",F2=p((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"),M2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-BjcuRalB.js");return{diagram:t}},__vite__mapDeps([44,43,16,17,13,7,5,6,8]));return{id:Cg,diagram:e}},"loader"),A2={id:Cg,detector:F2,loader:M2},E2=A2,xg="journey",$2=p(e=>/^\s*journey/.test(e),"detector"),I2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-B3Sx5g-O.js");return{diagram:t}},__vite__mapDeps([45,15,13,32,8,5,6,7]));return{id:xg,diagram:e}},"loader"),D2={id:xg,detector:$2,loader:I2},O2=D2,P2=p((e,t,r)=>{z.debug(`rendering svg for syntax error
|
|
302
|
-
`);const i=PC(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Sl(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"),kg={draw:P2},R2=kg,q2={db:{},renderer:kg,parser:{parse:p(()=>{},"parse")}},W2=q2,bg="flowchart-elk",z2=p((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"),N2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-0scCMi71.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([14,15,16,17,13,7,18]));return{id:bg,diagram:e}},"loader"),H2={id:bg,detector:z2,loader:N2},Y2=H2,wg="timeline",X2=p(e=>/^\s*timeline/.test(e),"detector"),U2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-CgFiawCT.js");return{diagram:t}},__vite__mapDeps([46,32,8,5,6,7]));return{id:wg,diagram:e}},"loader"),j2={id:wg,detector:X2,loader:U2},V2=j2,Sg="mindmap",G2=p(e=>/^\s*mindmap/.test(e),"detector"),Z2=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-CyjRWos4.js");return{diagram:t}},__vite__mapDeps([47,16,17,5,6,7,8]));return{id:Sg,diagram:e}},"loader"),Q2={id:Sg,detector:G2,loader:Z2},K2=Q2,Tg="kanban",J2=p(e=>/^\s*kanban/.test(e),"detector"),tw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-BZwqoKM8.js");return{diagram:t}},__vite__mapDeps([48,15,5,6,7,8]));return{id:Tg,diagram:e}},"loader"),ew={id:Tg,detector:J2,loader:tw},rw=ew,Bg="sankey",iw=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),aw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-doAkRLNI.js");return{diagram:t}},__vite__mapDeps([49,33,28,5,6,7,8]));return{id:Bg,diagram:e}},"loader"),sw={id:Bg,detector:iw,loader:aw},ow=sw,vg="packet",nw=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),lw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-B63W-pyC.js");return{diagram:t}},__vite__mapDeps([50,23,24,6,5,7,8]));return{id:vg,diagram:e}},"loader"),hw={id:vg,detector:nw,loader:lw},_g="radar",cw=p(e=>/^\s*radar-beta/.test(e),"detector"),dw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-IZZ69bsz.js");return{diagram:t}},__vite__mapDeps([51,23,24,6,5,7,8]));return{id:_g,diagram:e}},"loader"),uw={id:_g,detector:cw,loader:dw},Lg="block",gw=p(e=>/^\s*block(-beta)?/.test(e),"detector"),pw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-H_CNYF5m.js");return{diagram:t}},__vite__mapDeps([52,15,8,2,18,5,6,7]));return{id:Lg,diagram:e}},"loader"),fw={id:Lg,detector:gw,loader:pw},mw=fw,Fg="treeView",yw=p(e=>/^\s*treeView-beta/.test(e),"detector"),Cw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-B0THRF0G.js");return{diagram:t}},__vite__mapDeps([53,22,23,24,6,5,7,8]));return{id:Fg,diagram:e}},"loader"),xw={id:Fg,detector:yw,loader:Cw},kw=xw,Mg="architecture",bw=p(e=>/^\s*architecture/.test(e),"detector"),ww=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-DHJZWJhu.js");return{diagram:t}},__vite__mapDeps([54,23,24,6,5,11,7,8]));return{id:Mg,diagram:e}},"loader"),Sw={id:Mg,detector:bw,loader:ww},Tw=Sw,Ag="eventmodeling",Bw=p(e=>/^\s*eventmodeling/.test(e),"detector"),vw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-IlESJ0wh.js");return{diagram:t}},__vite__mapDeps([55,23,24,6,5,7,8]));return{id:Ag,diagram:e}},"loader"),_w={id:Ag,detector:Bw,loader:vw},Lw=_w,Eg="ishikawa",Fw=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Mw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-BEPnPebm.js");return{diagram:t}},__vite__mapDeps([56,5,6,7,8]));return{id:Eg,diagram:e}},"loader"),Aw={id:Eg,detector:Fw,loader:Mw},$g="venn",Ew=p(e=>/^\s*venn-beta/.test(e),"detector"),$w=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-DiY3ySIT.js");return{diagram:t}},__vite__mapDeps([57,5,6,7,8]));return{id:$g,diagram:e}},"loader"),Iw={id:$g,detector:Ew,loader:$w},Dw=Iw,Ig="treemap",Ow=p(e=>/^\s*treemap/.test(e),"detector"),Pw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-Bqjk3ZYu.js");return{diagram:t}},__vite__mapDeps([58,23,17,24,6,5,29,33,28,7,8]));return{id:Ig,diagram:e}},"loader"),Rw={id:Ig,detector:Ow,loader:Pw},Dg="wardley",qw=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Ww=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-CtRzQ3q6.js");return{diagram:t}},__vite__mapDeps([59,23,24,6,5,7,8]));return{id:Dg,diagram:e}},"loader"),zw={id:Dg,detector:qw,loader:Ww},Nw=zw,Og="cynefin",Hw=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Yw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-MevACWGH.js");return{diagram:t}},__vite__mapDeps([60,23,24,6,5,7,8]));return{id:Og,diagram:e}},"loader"),Xw={id:Og,detector:Hw,loader:Yw},Pg="railroad",Uw=p(e=>/^\s*railroad-beta/i.test(e),"detector"),jw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-_rBw9Q9b.js");return{diagram:t}},__vite__mapDeps([61,62,23,24,6,5,7,8]));return{id:Pg,diagram:e}},"loader"),Vw={id:Pg,detector:Uw,loader:jw},Rg="railroadEbnf",Gw=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Zw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-B_U7c6VT.js");return{diagram:t}},__vite__mapDeps([63,62,23,24,6,5,7,8]));return{id:Rg,diagram:e}},"loader"),Qw={id:Rg,detector:Gw,loader:Zw},qg="railroadAbnf",Kw=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Jw=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-DChuAW5u.js");return{diagram:t}},__vite__mapDeps([64,62,23,24,6,5,7,8]));return{id:qg,diagram:e}},"loader"),tS={id:qg,detector:Kw,loader:Jw},Wg="railroadPeg",eS=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),rS=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-DItVX4G3.js");return{diagram:t}},__vite__mapDeps([65,62,23,24,6,5,7,8]));return{id:Wg,diagram:e}},"loader"),iS={id:Wg,detector:eS,loader:rS},zn=!1,Fa=p(()=>{zn||(zn=!0,Yi("error",W2,e=>e.toLowerCase().trim()==="error"),Yi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ua(Y2,K2,Tw),Ua(T1,rw,T2,k2,W1,V1,Q1,t2,u2,m2,O1,E1,L1,V2,Y1,E2,L2,O2,a2,ow,hw,l2,mw,Lw,kw,uw,Aw,Rw,Vw,Qw,tS,iS,Dw,Nw,Xw))},"addDiagrams"),aS=p(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(He).map(async([r,{detector:i,loader:a}])=>{if(a)try{Za(r)}catch{try{const{diagram:s,id:n}=await a();Yi(n,s,i)}catch(s){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete He[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),sS="graphics-document document";function zg(e,t){e.attr("role",sS),t!==""&&e.attr("aria-roledescription",t)}p(zg,"setA11yDiagramInfo");function Ng(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)}}}p(Ng,"addSVGa11yTitleDescription");var ze,Is=(ze=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=Ps(t,i);t=Cx(t)+`
|
|
303
|
-
`;try{Za(a)}catch{const d=sf(a);if(!d)throw new yl(`Diagram ${a} not found.`);const{id:g,diagram:u}=await d();Yi(g,u)}const{db:s,parser:n,renderer:o,init:l}=Za(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 ze(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}},p(ze,"Diagram"),ze),Nn=[],oS=p(()=>{Nn.forEach(e=>{e()}),Nn=[]},"attachFunctions"),nS=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Hg(e){const t=e.match(ml);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
304
|
-
`).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
|
|
305
|
-
`):t[2];let a=Y0(i,{schema:H0})??{};a=typeof a=="object"&&!Array.isArray(a)?a:{};const s={};return a.displayMode&&(s.displayMode=a.displayMode.toString()),a.title&&(s.title=a.title.toString()),a.config&&(s.config=a.config),{text:e.slice(t[0].length),metadata:s}}p(Hg,"extractFrontMatter");var lS=p(e=>e.replace(/\r\n?/g,`
|
|
306
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),hS=p(e=>{const{text:t,metadata:r}=Hg(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"),cS=p(e=>{const t=Jt.detectInit(e)??{},r=Jt.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:sx(e),directive:t}},"processDirectives");function Mo(e){const t=lS(e),r=hS(t),i=cS(r.text),a=uo(r.config,i.directive);return e=nS(i.text),{code:e,title:r.title,config:a}}p(Mo,"preprocessDiagram");function Yg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Yg,"toBase64");var dS=5e4,uS="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",gS="sandbox",pS="loose",fS="http://www.w3.org/2000/svg",mS="http://www.w3.org/1999/xlink",yS="http://www.w3.org/1999/xhtml",CS="100%",xS="100%",kS="border:0;margin:0;",bS="margin:0",wS="allow-top-navigation-by-user-activation allow-popups",SS='The "iframe" tag is not supported by your browser.',TS=["foreignobject"],BS=["dominant-baseline"];function Ao(e){const t=Mo(e);return Ni(),ef(t.config??{}),t}p(Ao,"processAndSetConfigs");async function Xg(e,t){Fa();try{const{code:r,config:i}=Ao(e);return{diagramType:(await jg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(Xg,"parse");var Hn=p((e,t,r=[])=>{const i=cl(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),vS=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=zt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{en(l.styles)||o.forEach(h=>{r.insertRule(Hn(l.id,h,l.styles),r.cssRules.length)}),en(l.textStyles)||r.insertRule(Hn(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const a=new CSSStyleSheet;a.replaceSync(e.themeCSS),i=Ga(a)+`
|
|
307
|
-
`}else i+=`${e.themeCSS}
|
|
308
|
-
`;return i+Ga(r)},"createCssStyles"),_S=p((e,t)=>$s(y1(`${e}{${t}}`),k1([p(function(i,a,s,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Ms)return;i.props=i.props.map(o=>o.startsWith(e)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[i1,s1,Ku,n1,"@container","@starting-style"],Ms].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Lo))},"addNamespace"),x1])),"compileCSS"),LS=p((e,t,r,i)=>{const a=vS(e,r),s=Sf(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return _S(i,s)},"createUserStyles"),FS=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ue(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),MS=p((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":xS,i=Yg(`<body style="${bS}">${e}</body>`);return`<iframe style="width:${CS};height:${r};${kS}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${wS}">
|
|
309
|
-
${SS}
|
|
310
|
-
</iframe>`},"putIntoIFrame"),Yn=p((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",fS);return a&&n.attr("xmlns:xlink",a),n.append("g"),e},"appendDivSvgG");function Ds(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Ds,"sandboxedIframe");var AS=p((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"),ES=p(async function(e,t,r){var H,q,$,F,L,E;Fa();const i=Ao(t);t=i.code;const a=St();z.debug(a),t.length>((a==null?void 0:a.maxTextSize)??dS)&&(t=uS);const s=`#${e}`,n="i"+e,o="#"+n,l="d"+e,h="#"+l,c=p(()=>{const R=ct(g?o:h).node();R&&"remove"in R&&R.remove()},"removeTempElements");let d=ct(document.body);const g=a.securityLevel===gS,u=a.securityLevel===pS,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const M=Ds(ct(r),n);d=ct(M.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct(r);Yn(d,e,l,`font-family: ${m}`,mS)}else{if(AS(document,e,l,n),g){const M=Ds(ct(document.body),n);d=ct(M.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct("body");Yn(d,e,l)}let f,y;try{f=await Is.fromText(t,{title:i.title})}catch(M){if(a.suppressErrorRendering)throw c(),M;f=await Is.fromText("error"),y=M}const C=d.select(h).node(),k=f.type,b=C.firstChild,w=b.firstChild,S=(q=(H=f.renderer).getClasses)==null?void 0:q.call(H,t,f),T=LS(a,k,S,s),B=document.createElement("style");B.innerHTML=T,b.insertBefore(B,w);try{await f.renderer.draw(t,e,"11.16.0",f)}catch(M){throw a.suppressErrorRendering?c():R2.draw(t,e,"11.16.0"),M}const _=d.select(`${h} svg`),W=(F=($=f.db).getAccTitle)==null?void 0:F.call($),P=(E=(L=f.db).getAccDescription)==null?void 0:E.call(L);Vg(k,_,W,P),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",yS);let A=d.select(h).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),A=FS(A,g,ge(a.arrowMarkerAbsolute)),g){const M=d.select(h+" svg").node();A=MS(A,M)}else u||(A=xr.sanitize(A,{ADD_TAGS:TS,ADD_ATTR:BS,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oS(),y)throw y;return c(),{diagramType:k,svg:A,bindFunctions:f.db.bindFunctions}},"render");function Ug(e={}){var i;const t=Lt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Jp(t),t!=null&&t.theme&&t.theme in ke?t.themeVariables=ke[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ke.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Kp(t):dl();Os(r.logLevel),Fa()}p(Ug,"initialize");var jg=p((e,t={})=>{const{code:r}=Mo(e);return Is.fromText(r,t)},"getDiagramFromText");function Vg(e,t,r,i){zg(t,e),Ng(t,r,i,t.attr("id"))}p(Vg,"addA11yInfo");var Ve=Object.freeze({render:ES,parse:Xg,getDiagramFromText:jg,initialize:Ug,getConfig:St,setConfig:ul,getSiteConfig:dl,updateSiteConfig:tf,reset:p(()=>{Ni()},"reset"),globalReset:p(()=>{Ni(kr)},"globalReset"),defaultConfig:kr});Os(St().logLevel);Ni(St());var $S=p((e,t,r)=>{z.warn(e),co(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"),Gg=p(async function(e={querySelector:".mermaid"}){try{await IS(e)}catch(t){if(co(t)&&z.error(t.str),Ut.parseError&&Ut.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),IS=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ve.getConfig();z.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");z.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ve.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new Jt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(a)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;n=l.innerHTML,n=sd(Jt.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Jt.detectInit(n);c&&z.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:g}=await Jg(h,n,l);l.innerHTML=d,e&&await e(h),g&&g(l)}catch(d){$S(d,o,Ut.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Zg=p(function(e){Ve.initialize(e)},"initialize"),DS=p(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&Zg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Gg(i)},"init"),OS=p(async(e,{lazyLoad:t=!0}={})=>{Fa(),Ua(...e),t===!1&&await aS()},"registerExternalDiagrams"),Qg=p(function(){if(Ut.startOnLoad){const{startOnLoad:e}=Ve.getConfig();e&&Ut.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Qg,!1);var PS=p(function(e){Ut.parseError=e},"setParseErrorHandler"),ua=[],Na=!1,Kg=p(async()=>{if(!Na){for(Na=!0;ua.length>0;){const e=ua.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}Na=!1}},"executeQueue"),RS=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((s,n)=>{Ve.parse(e,t).then(o=>{s(o),r(o)},o=>{var l;z.error("Error parsing",o),(l=Ut.parseError)==null||l.call(Ut,o),n(o),i(o)})}),"performCall");ua.push(a),Kg().catch(i)}),"parse"),Jg=p((e,t,r)=>new Promise((i,a)=>{const s=p(()=>new Promise((n,o)=>{Ve.render(e,t,r).then(l=>{n(l),i(l)},l=>{var h;z.error("Error parsing",l),(h=Ut.parseError)==null||h.call(Ut,l),o(l),a(l)})}),"performCall");ua.push(s),Kg().catch(a)}),"render"),qS=p(()=>Object.keys(He).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ut={startOnLoad:!0,mermaidAPI:Ve,parse:RS,render:Jg,init:DS,run:Gg,registerExternalDiagrams:OS,registerLayoutLoaders:Gu,initialize:Zg,parseError:void 0,contentLoaded:Qg,setParseErrorHandler:PS,detectType:Ps,registerIconPacks:qx,getRegisteredDiagramsMetadata:qS},Ri=Ut;/*! Check if previously processed *//*!
|
|
311
|
-
* Wait for document loaded before starting the execution
|
|
312
|
-
*/const tp={light:{background:"#ffffff",primaryColor:"#e0e7ff",secondaryColor:"#ddd6fe",tertiaryColor:"#fce7f3",primaryTextColor:"#111827",secondaryTextColor:"#4b5563",primaryBorderColor:"#6366f1",lineColor:"#111827",pie1:"#3b82f6",pie2:"#8b5cf6",pie3:"#ec4899",pie4:"#f59e0b",pie5:"#10b981",pie6:"#06b6d4",pie7:"#6366f1",pie8:"#ef4444",pieStrokeColor:"#ffffff",pieStrokeWidth:"2px",pieTitleTextColor:"#111827",pieLegendTextColor:"#374151"},dark:{background:"#000000",primaryColor:"#3b82f6",secondaryColor:"#8b5cf6",tertiaryColor:"#6366f1",primaryTextColor:"#f1f5f9",secondaryTextColor:"#cbd5e1",primaryBorderColor:"#60a5fa",lineColor:"#f1f5f9",pie1:"#60a5fa",pie2:"#a78bfa",pie3:"#f472b6",pie4:"#fbbf24",pie5:"#34d399",pie6:"#22d3ee",pie7:"#818cf8",pie8:"#f87171",pieStrokeColor:"#000000",pieStrokeWidth:"2px",pieTitleTextColor:"#f1f5f9",pieLegendTextColor:"#e2e8f0"}};let Xn=!1;const WS=()=>{if(!(typeof window>"u"||Xn))try{Ri.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",themeVariables:tp.light}),Xn=!0}catch(e){console.warn("Failed to initialize Mermaid:",e)}},zS=e=>{let t="Failed to render Mermaid diagram";if(e instanceof Error){const r=e.message||"";if(r.includes("Syntax error")){const i=r.match(/line\s+(\d+)/i),a=r.match(/token\s+['"]([^'"]+)['"]/i),s=[];i&&s.push(`Line ${i[1]}`),a&&s.push(`Unexpected token: ${a[1]}`),t=`Syntax error${s.length?` (${s.join(", ")})`:""}`}else r&&(t=r.length>160?`${r.substring(0,157)}...`:r)}else typeof e=="string"&&(t=e);return t},se=(e,t)=>{if(typeof window>"u"||!e)return;const r=window.getComputedStyle(e).getPropertyValue(t);if(!r)return;const i=r.trim();return i.length?i:void 0},NS=(e,t)=>{const r=tp[e];if(typeof window>"u"||!t)return r;const i={background:e==="dark"?se(t,"--md-chart-bg")??se(t,"--md-bg-primary"):se(t,"--md-bg-primary"),primaryColor:se(t,"--md-bg-secondary"),secondaryColor:se(t,"--md-bg-tertiary"),tertiaryColor:se(t,"--md-bg-primary"),primaryTextColor:se(t,"--md-text-primary"),secondaryTextColor:se(t,"--md-text-secondary"),primaryBorderColor:se(t,"--md-border-color"),lineColor:se(t,"--md-text-primary")},a=Object.entries(i).filter(([,s])=>typeof s=="string"&&s.length);return a.length?{...r,...Object.fromEntries(a)}:r},Un=e=>{if(!e)return null;const t=e.getAttribute("data-theme");return t==="dark"?"dark":t==="light"?"light":e.classList.contains("dark")?"dark":e.classList.contains("light")?"light":null},HS=({code:e})=>{const t=Vt.useRef(null),r=Vt.useRef(null),i=Vt.useRef(0),[a,s]=Vt.useState(null),[n,o]=Vt.useState(null),[l,h]=Vt.useState(null),[c,d]=Vt.useState(!1),[g,u]=Vt.useState("light"),m=Vt.useRef("light");Vt.useEffect(()=>{var W;if(typeof window>"u")return;const C=t.current;if(!C)return;const k=C.closest(".markdown-content")??C,b=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-color-scheme: dark)"),w=()=>{const P=!!(b!=null&&b.matches);return Un(k)??Un(document.documentElement)??(P?"dark":"light")},S=()=>{const P=w();P!==m.current&&(m.current=P,u(P))};S();const T=new MutationObserver(S);T.observe(k,{attributes:!0,attributeFilter:["class","data-theme"]});let B=null;k!==document.documentElement&&(B=new MutationObserver(S),B.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}));const _=()=>S();return b==null||b.addEventListener("change",_),()=>{T.disconnect(),B==null||B.disconnect(),b==null||b.removeEventListener("change",_)}},[]),Vt.useEffect(()=>{if(!e.trim()){o(null),s(null),h(null);return}return(async()=>{var b;const k=++i.current;try{WS();const w=`mermaid-${Math.random().toString(36).substring(2,11)}`;await Ri.parse(e);const S=((b=t.current)==null?void 0:b.closest(".markdown-content"))??t.current,T=NS(g,S);Ri.initialize({startOnLoad:!1,theme:g==="dark"?"dark":"default",securityLevel:"loose",themeVariables:T,flowchart:{useMaxWidth:!0,htmlLabels:!0,curve:"basis",padding:15,nodeSpacing:50,rankSpacing:50},sequence:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:15,actorMargin:50,width:120,height:40,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:35,mirrorActors:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12,wrap:!0,wrapPadding:10},gantt:{useMaxWidth:!0,barHeight:24,barGap:4,topPadding:40,leftPadding:80,gridLineStartPadding:40,fontSize:12,sectionFontSize:13,numberSectionStyles:4},er:{useMaxWidth:!0,fontSize:12,entityPadding:15},pie:{useMaxWidth:!0,textPosition:.75},journey:{useMaxWidth:!0,diagramMarginX:30,diagramMarginY:20,leftMargin:100,width:120,height:50,boxMargin:8,boxTextMargin:4,noteMargin:10,messageMargin:30},gitGraph:{useMaxWidth:!0,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0}},class:{useMaxWidth:!0,padding:10},state:{useMaxWidth:!0,padding:8,dividerMargin:10},mindmap:{useMaxWidth:!0,padding:10},timeline:{useMaxWidth:!0,padding:10},quadrantChart:{useMaxWidth:!0},sankey:{useMaxWidth:!0}});const B=await Ri.render(w,e);if(i.current!==k)return;o(B.svg),h(()=>B.bindFunctions?B.bindFunctions:null),s(null)}catch(w){if(i.current!==k)return;s(zS(w)),o(null),h(null),d(!1)}})(),()=>{i.current+=1}},[e,g]),Vt.useEffect(()=>{if(!(!n||!l||!r.current))try{l(r.current)}catch(C){console.warn("Failed to bind Mermaid interactions:",C)}},[n,l]);const f=()=>Mt.jsxs("div",{className:"graph-error",children:[Mt.jsxs("div",{className:"graph-error-header",children:[Mt.jsx("div",{className:"graph-error-icon",children:"⚠️"}),Mt.jsxs("div",{className:"graph-error-content",children:[Mt.jsx("div",{className:"graph-error-title",children:"Mermaid Diagram Error"}),Mt.jsx("div",{className:"graph-error-message",children:a})]})]}),Mt.jsxs("button",{className:"graph-error-toggle",onClick:()=>d(!c),type:"button",children:[c?"Hide":"Show"," Details"]}),c&&Mt.jsxs("details",{className:"graph-error-details",open:!0,children:[Mt.jsx("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:500},children:"Mermaid Code"}),Mt.jsx("pre",{style:{marginTop:"8px",fontSize:"0.8em",opacity:.8,padding:"8px",background:"rgba(0, 0, 0, 0.05)",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},children:Mt.jsx("code",{children:e})})]})]}),y=()=>a?f():n?Mt.jsx("div",{ref:r,className:"mermaid-svg-container",style:{display:"flex",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",overflowX:"auto",overflowY:"visible"},dangerouslySetInnerHTML:{__html:n}}):Mt.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"30px 20px",color:"var(--md-text-secondary, #6b7280)",minHeight:"120px"},children:[Mt.jsx("svg",{style:{animation:"spin 1s linear infinite",marginBottom:"10px",width:"28px",height:"28px"},viewBox:"0 0 24 24",fill:"none",children:Mt.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"32",strokeLinecap:"round"})}),Mt.jsx("span",{style:{fontWeight:500,fontSize:"14px"},children:"Rendering diagram..."}),Mt.jsx("style",{children:`
|
|
313
|
-
@keyframes spin {
|
|
314
|
-
from { transform: rotate(0deg); }
|
|
315
|
-
to { transform: rotate(360deg); }
|
|
316
|
-
}
|
|
317
|
-
`})]});return Mt.jsx("div",{className:"graph-container mermaid-container",ref:t,style:{padding:"16px",minHeight:"100px"},children:y()})},gT=Object.freeze(Object.defineProperty({__proto__:null,MermaidRenderer:HS},Symbol.toStringTag,{value:"Module"}));export{Xu as $,uo as A,hl as B,cx as C,PC as D,Ep as E,Tk as F,KS as G,Y0 as H,Zr as I,H0 as J,QS as K,ka as L,uf as M,wl as N,zo as O,hx as P,si as Q,ie as R,D as S,O as T,kf as U,Tl as V,lt as W,he as X,Zk as Y,ex as Z,p as _,vf as a,hT as a0,ci as a1,qx as a2,ho as a3,V as a4,t1 as a5,lT as a6,cT as a7,oT as a8,Q as a9,nT as aa,go as ab,Fb as ac,Sb as ad,wb as ae,da as af,It as ag,Ot as ah,yb as ai,zt as aj,fe as ak,Dr as al,Wc as am,Ue as an,Yc as ao,ol as ap,ZS as aq,Rx as ar,JS as as,xp as at,G as au,Ic as av,mb as aw,gT as ax,Bf as b,mt as c,ct as d,Sl as e,Lt as f,Lf as g,Se as h,re as i,Z0 as j,oi as k,z as l,Nc as m,Ff as n,Mf as o,Tf as p,tT as q,Le as r,_f as s,fp as t,uT as u,dT as v,gx as w,Jt as x,St as y,Ef as z};
|