@marimo-team/frontend 0.12.1-dev10 → 0.12.1-dev12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ConnectedDataExplorerComponent-CJruiifD.js → ConnectedDataExplorerComponent-D6VN1rB5.js} +3 -3
- package/dist/assets/{VegaLite-BE8iaI6d.js → VegaLite-Br8GnIhH.js} +1 -1
- package/dist/assets/{_baseEach-CHGr95h3.js → _baseEach-DUe4qkf_.js} +1 -1
- package/dist/assets/_baseMap-CNffvYYr.js +1 -0
- package/dist/assets/{_baseUniq-DBsNFMLI.js → _baseUniq-Cf3x3qQM.js} +1 -1
- package/dist/assets/{any-language-editor-C44KD8Jd.js → any-language-editor-xgDUcqnn.js} +1 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-NgBIyJFc.js +1 -0
- package/dist/assets/{blockDiagram-ZHA2E4KO-9FMsNisX.js → blockDiagram-JOT3LUYC-1fjtgAXw.js} +1 -1
- package/dist/assets/{c4Diagram-6F5ED5ID-Bbqvpa8H.js → c4Diagram-VJAJSXHY-Dgr2MzdZ.js} +1 -1
- package/dist/assets/channel-DFcskha_.js +1 -0
- package/dist/assets/{chunk-TMUBEWPD-D_YLueZ5.js → chunk-4BMEZGHF-BtH65nsN.js} +1 -1
- package/dist/assets/chunk-A2AXSNBT-DtZt8jUo.js +1 -0
- package/dist/assets/chunk-AEK57VVT-zbOe-QWI.js +1 -0
- package/dist/assets/{chunk-ASOPGD6M-DewGTxkr.js → chunk-D6G4REZN-BAou75V7.js} +1 -1
- package/dist/assets/{chunk-5HRBRIJM-X4M2qmib.js → chunk-RZ5BOZE2-CvJ3Zsed.js} +1 -1
- package/dist/assets/{chunk-KFBOBJHC-DOfnAPal.js → chunk-XZIHB7SX-CM4E-Rqg.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-CdAdDNJy.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-CdAdDNJy.js +1 -0
- package/dist/assets/clone-DFRxidCI.js +1 -0
- package/dist/assets/compile-BcP6k8CN.js +1 -0
- package/dist/assets/{dagre-4EVJKHTY-DiF_5n5x.js → dagre-OKDRZEBW-BcqnCtr9.js} +1 -1
- package/dist/assets/{data-editor-CGJ9_7_q.js → data-editor-Bp6UkAHk.js} +1 -1
- package/dist/assets/diagram-SSKATNLV-CpKTq4z_.js +1 -0
- package/dist/assets/diagram-VNBRO52H-DozQmTtF.js +1 -0
- package/dist/assets/edit-page-BQVm-bZZ.js +8 -0
- package/dist/assets/erDiagram-Q7BY3M3F-BNpG_DK6.js +1 -0
- package/dist/assets/flowDiagram-4HSFHLVR-Bt58NPg9.js +1 -0
- package/dist/assets/ganttDiagram-APWFNJXF-DB6QQCBi.js +1 -0
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-23oq73su.js +1 -0
- package/dist/assets/{graph-4-Vg1Aiz.js → graph-CUSKfdOg.js} +1 -1
- package/dist/assets/home-page-Cbo_xK1q.js +7 -0
- package/dist/assets/{index-CYjr_k0H.js → index-6yKeYODa.js} +1 -1
- package/dist/assets/index-BPgaidtO.js +80 -0
- package/dist/assets/{index-BH9A8KuI.js → index-BsUTdRcp.js} +1 -1
- package/dist/assets/{index-CHAfPpeC.js → index-BwaxCk2p.js} +1 -1
- package/dist/assets/{index-DuktNpRm.js → index-BzqSKRPR.js} +1 -1
- package/dist/assets/{index-DRtvMp6Z.js → index-C-DALRS2.js} +1 -1
- package/dist/assets/{index-CkAdNdK9.js → index-C-rx6K_1.js} +1 -1
- package/dist/assets/{index-CWohOS_e.js → index-CS7gdXcc.js} +1 -1
- package/dist/assets/{index-DwShl_Rl.js → index-ChmfbV9g.js} +1 -1
- package/dist/assets/{index-DoaFBt3g.js → index-DAxC1inM.js} +1 -1
- package/dist/assets/{index-CO1xz3xH.js → index-DNY9EKov.js} +1 -1
- package/dist/assets/{index-DKriXlXA.js → index-DT5oqH6y.js} +1 -1
- package/dist/assets/{index-Ddv63gQw.js → index-DmHFmtCH.js} +1 -1
- package/dist/assets/{index-CZQNf_us.js → index-GXNkgebt.js} +1 -1
- package/dist/assets/{index-BEGeiwsG.js → index-PmLtNvLA.js} +1 -1
- package/dist/assets/{index-DxHC9_BU.js → index-YI9IKBm5.js} +1 -1
- package/dist/assets/{index-BiPdUed2.js → index-YoG6Q2Io.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-DyWeQa-u.js +1 -0
- package/dist/assets/journeyDiagram-U35MCT3I-jU_bP6ei.js +1 -0
- package/dist/assets/{kanban-definition-QRCXZQQD-ELngktM2.js → kanban-definition-NDS4AKOZ-CcU-x9dx.js} +1 -1
- package/dist/assets/{layout-CGBTZO_E.js → layout-eQ6bjmE5.js} +1 -1
- package/dist/assets/{linear-BbegsqX1.js → linear-BqAWw135.js} +1 -1
- package/dist/assets/mermaid-C_yJbkM5.js +7 -0
- package/dist/assets/{min-CABlFD1H.js → min-s4lj77Rd.js} +1 -1
- package/dist/assets/{mindmap-definition-GWI6TPTV-DLlhxG7q.js → mindmap-definition-ALO5MXBD-CpAMfMiw.js} +1 -1
- package/dist/assets/pieDiagram-IB7DONF6-D5Lc-QDc.js +1 -0
- package/dist/assets/{quadrantDiagram-OS5C2QUG-DNcT7n4n.js → quadrantDiagram-7GDLP6J5-8DGbt3Sr.js} +1 -1
- package/dist/assets/radar-MK3ICKWK-CN1eBpMj.js +1 -0
- package/dist/assets/{react-plotly-D49PuaDp.js → react-plotly-CViG1i3C.js} +1 -1
- package/dist/assets/requirementDiagram-KVF5MWMF-CRQKdCfw.js +1 -0
- package/dist/assets/{run-page-_t2pqoib.js → run-page-CwA1e70B.js} +1 -1
- package/dist/assets/sankeyDiagram-QLVOVGJD-DySshT3S.js +1 -0
- package/dist/assets/{save-worker-0eT1yQHS.js → save-worker-B6ZkLmYM.js} +1 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-DsbCJPYn.js +1 -0
- package/dist/assets/slides-component-BTnw-BLL.js +1 -0
- package/dist/assets/{sortBy-DeAoOjrt.js → sortBy-DSWKDNn5.js} +1 -1
- package/dist/assets/stateDiagram-DGXRK772-B7WaIyIx.js +1 -0
- package/dist/assets/stateDiagram-v2-YXO3MK2T-DGfx8GSa.js +1 -0
- package/dist/assets/{terminal-B5M_jESV.js → terminal-B1YrV-fb.js} +1 -1
- package/dist/assets/{time-Cg9ECQUX.js → time-QFGOkA6W.js} +1 -1
- package/dist/assets/{timeline-definition-U7ZMHBDA-bNrrM9Xd.js → timeline-definition-BDJGKUSR-KfFJFJgX.js} +1 -1
- package/dist/assets/tree-C9lNIFyJ.js +8 -0
- package/dist/assets/useMarimoWebSocket-f77EFm7W.js +15 -0
- package/dist/assets/{vega-component-DBMPlOJo.js → vega-component-CqNrf71y.js} +1 -1
- package/dist/assets/{worker-BRIXAPM-.js → worker-7jWLhkbK.js} +1 -1
- package/dist/assets/{worker-DDT5omi0.js → worker-BIkRtffW.js} +1 -1
- package/dist/assets/{xychartDiagram-6QU3TZC5-vQAUXteB.js → xychartDiagram-VJFVF3MP-9dlKoXzZ.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +23 -23
- package/dist/assets/_baseMap-CJD4EB23.js +0 -1
- package/dist/assets/architectureDiagram-UYN6MBPD-BgbOosfX.js +0 -1
- package/dist/assets/channel-Cr4w4fr-.js +0 -1
- package/dist/assets/chunk-7U56Z5CX-C5qQ_O2_.js +0 -1
- package/dist/assets/chunk-T2TOU4HS-DrSTkPX7.js +0 -1
- package/dist/assets/classDiagram-LNE6IOMH-D--jW1ZB.js +0 -1
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-D--jW1ZB.js +0 -1
- package/dist/assets/clone-D6AulMZy.js +0 -1
- package/dist/assets/compile-Cb-2V0aD.js +0 -1
- package/dist/assets/diagram-QW4FP2JN-fVKWzjDQ.js +0 -1
- package/dist/assets/edit-page-DX4QoMwC.js +0 -8
- package/dist/assets/erDiagram-6RL3IURR-tkYxbOwJ.js +0 -1
- package/dist/assets/flowDiagram-7ASYPVHJ-wCWrRB02.js +0 -1
- package/dist/assets/ganttDiagram-NTVNEXSI-CipIDMvM.js +0 -1
- package/dist/assets/gitGraph-YCYPL57B-B2gBFbEc.js +0 -1
- package/dist/assets/gitGraphDiagram-NRZ2UAAF-CzfIrjrb.js +0 -1
- package/dist/assets/home-page-DHrqvZ5M.js +0 -7
- package/dist/assets/index-M-fa6gqH.js +0 -80
- package/dist/assets/infoDiagram-A4XQUW5V-Cq17uMjs.js +0 -1
- package/dist/assets/journeyDiagram-G5WM74LC-CTXVfGIj.js +0 -1
- package/dist/assets/mermaid-NCa4Btby.js +0 -13
- package/dist/assets/pieDiagram-YF2LJOPJ-BPY4ab3U.js +0 -1
- package/dist/assets/requirementDiagram-MIRIMTAZ-BiwgQpI6.js +0 -1
- package/dist/assets/sankeyDiagram-Y46BX6SQ-Yek58mqV.js +0 -1
- package/dist/assets/sequenceDiagram-G6AWOVSC-CS1ohKZS.js +0 -1
- package/dist/assets/slides-component-BhUqdm2K.js +0 -1
- package/dist/assets/stateDiagram-MAYHULR4-C25IIyJY.js +0 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-Du1ne-Iw.js +0 -1
- package/dist/assets/tree-DXPs25GO.js +0 -8
- package/dist/assets/useMarimoWebSocket-UUW24I6P.js +0 -15
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-4EVJKHTY-DiF_5n5x.js","./graph-4-Vg1Aiz.js","./index-M-fa6gqH.js","./index-CuNK5XUR.css","./_baseUniq-DBsNFMLI.js","./_baseEach-CHGr95h3.js","./layout-CGBTZO_E.js","./min-CABlFD1H.js","./_baseMap-CJD4EB23.js","./sortBy-DeAoOjrt.js","./clone-D6AulMZy.js","./transform-CdY8z5kT.js","./step-xJWGRC3d.js","./c4Diagram-6F5ED5ID-Bbqvpa8H.js","./chunk-ASOPGD6M-DewGTxkr.js","./flowDiagram-7ASYPVHJ-wCWrRB02.js","./chunk-5HRBRIJM-X4M2qmib.js","./channel-Cr4w4fr-.js","./erDiagram-6RL3IURR-tkYxbOwJ.js","./gitGraphDiagram-NRZ2UAAF-CzfIrjrb.js","./chunk-TMUBEWPD-D_YLueZ5.js","./chunk-KFBOBJHC-DOfnAPal.js","./gitGraph-YCYPL57B-B2gBFbEc.js","./ganttDiagram-NTVNEXSI-CipIDMvM.js","./time-Cg9ECQUX.js","./linear-BbegsqX1.js","./init-DLRA0X12.js","./infoDiagram-A4XQUW5V-Cq17uMjs.js","./pieDiagram-YF2LJOPJ-BPY4ab3U.js","./arc-B5qYPUYs.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-OS5C2QUG-DNcT7n4n.js","./xychartDiagram-6QU3TZC5-vQAUXteB.js","./range-CtcPcB_L.js","./requirementDiagram-MIRIMTAZ-BiwgQpI6.js","./sequenceDiagram-G6AWOVSC-CS1ohKZS.js","./classDiagram-LNE6IOMH-D--jW1ZB.js","./chunk-T2TOU4HS-DrSTkPX7.js","./classDiagram-v2-MQ7JQ4JX-D--jW1ZB.js","./stateDiagram-MAYHULR4-C25IIyJY.js","./chunk-7U56Z5CX-C5qQ_O2_.js","./stateDiagram-v2-4JROLMXI-Du1ne-Iw.js","./journeyDiagram-G5WM74LC-CTXVfGIj.js","./timeline-definition-U7ZMHBDA-bNrrM9Xd.js","./mindmap-definition-GWI6TPTV-DLlhxG7q.js","./cytoscape.esm-bH-fs5wT.js","./kanban-definition-QRCXZQQD-ELngktM2.js","./sankeyDiagram-Y46BX6SQ-Yek58mqV.js","./colors-bszWmPJw.js","./diagram-QW4FP2JN-fVKWzjDQ.js","./blockDiagram-ZHA2E4KO-9FMsNisX.js","./architectureDiagram-UYN6MBPD-BgbOosfX.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var t,e,r,i,a,n,o,s,l,h,c,d,u,p=Object.defineProperty,g=t=>{throw TypeError(t)},f=(t,e,r)=>((t,e,r)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),m=(t,e,r)=>(((t,e,r)=>{e.has(t)||g("Cannot "+r)})(t,e,"access private method"),r);import{m as y,af as x,cK as b,c$ as k,d0 as C,cH as w,d1 as S,d2 as T,q as v,d3 as B,d4 as L,c_ as M,G as _,J as A,aa as F,ap as $,av as E,O as D}from"./index-M-fa6gqH.js";import{s as I}from"./transform-CdY8z5kT.js";import{D as O,E as R,F as P,G as z,H as q,I as N,J as W,K as j,L as H,M as U,N as Y,O as V,P as G,Q as X,S as Z,T as Q,U as J,k as K,l as tt}from"./step-xJWGRC3d.js";var et=Object.prototype.hasOwnProperty;function rt(t){if(null==t)return!0;if(y(t)&&(x(t)||"string"==typeof t||"function"==typeof t.splice||b(t)||k(t)||C(t)))return!t.length;var e=w(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(S(t))return!T(t).length;for(var r in t)if(et.call(t,r))return!1;return!0}class it{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}var at,nt={exports:{}};const ot=v((at||(at=1,nt.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",a="second",n="minute",o="hour",s="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+y(i,2,"0")+":"+y(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(i,h),n=r-a<0,o=e.clone().add(i+(n?-1:1),h);return+(-(i+(r-a)/(n?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:s,D:u,h:o,m:n,s:a,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",k={};k[b]=m;var C="$isDayjsObject",w=function(t){return t instanceof B||!(!t||!t[C])},S=function t(e,r,i){var a;if(!e)return b;if("string"==typeof e){var n=e.toLowerCase();k[n]&&(a=n),r&&(k[n]=r,a=n);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var s=e.name;k[s]=e,a=s}return!i&&a&&(b=a),a||!i&&b},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new B(r)},v=x;v.l=S,v.i=w,v.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var B=function(){function m(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return v},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return T(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<T(t)},y.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var r=this,i=!!v.u(e)||e,c=v.p(t),p=function(t,e){var a=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?a:a.endOf(s)},g=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,m=this.$M,y=this.$D,x="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,m):p(0,m+1);case l:var b=this.$locale().weekStart||0,k=(f<b?f+7:f)-b;return p(i?y-k:y+(6-k),m);case s:case u:return g(x+"Hours",0);case o:return g(x+"Minutes",1);case n:return g(x+"Seconds",2);case a:return g(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var r,l=v.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[s]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[o]=c+"Hours",r[n]=c+"Minutes",r[a]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===s?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[v.p(t)]()},y.add=function(i,c){var u,p=this;i=Number(i);var g=v.p(c),f=function(t){var e=T(p);return v.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return f(1);if(g===l)return f(7);var m=(u={},u[n]=e,u[o]=r,u[a]=t,u)[g]||1,y=this.$d.getTime()+i*m;return v.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=v.z(this),n=this.$H,o=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,a,n){return t&&(t[r]||t(e,i))||a[r].slice(0,n)},u=function(t){return v.s(n%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,(function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,h,3);case"MMMM":return d(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return v.s(n,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(n,o,!0);case"A":return g(n,o,!1);case"m":return String(o);case"mm":return v.s(o,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,u,p){var g,f=this,m=v.p(u),y=T(i),x=(y.utcOffset()-this.utcOffset())*e,b=this-y,k=function(){return v.m(f,y)};switch(m){case d:g=k()/12;break;case h:g=k();break;case c:g=k()/3;break;case l:g=(b-x)/6048e5;break;case s:g=(b-x)/864e5;break;case o:g=b/r;break;case n:g=b/e;break;case a:g=b/t;break;default:g=b}return p?g:v.a(g)},y.daysInMonth=function(){return this.endOf(h).$D},y.$locale=function(){return k[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},y.clone=function(){return v.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),L=B.prototype;return T.prototype=L,[["$ms",i],["$s",a],["$m",n],["$H",o],["$W",s],["$M",h],["$y",d],["$D",u]].forEach((function(t){L[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,B,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=k[b],T.Ls=k,T.p={},T}()),nt.exports)),st={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return 255*st.hue2rgb(n,a,t+1/3);case"g":return 255*st.hue2rgb(n,a,t);case"b":return 255*st.hue2rgb(n,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const a=Math.max(t,e,r),n=Math.min(t,e,r),o=(a+n)/2;if("l"===i)return 100*o;if(a===n)return 0;const s=a-n;if("s"===i)return 100*(o>.5?s/(2-a-n):s/(a+n));switch(a){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},lt={channel:st,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},ht={};for(let Gf=0;Gf<=255;Gf++)ht[Gf]=lt.unit.dec2hex(Gf);const ct=0,dt=1,ut=2;class pt{constructor(){this.type=ct}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=ct}is(t){return this.type===t}}const gt=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new pt}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=ct,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=lt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=lt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=lt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=lt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(ut)||void 0===e?(this._ensureHSL(),lt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(ut)||void 0===e?(this._ensureHSL(),lt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(ut)||void 0===e?(this._ensureHSL(),lt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(dt)||void 0===e?(this._ensureRGB(),lt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(dt)||void 0===e?(this._ensureRGB(),lt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(dt)||void 0===e?(this._ensureRGB(),lt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(dt),this.changed=!0,this.data.r=t}set g(t){this.type.set(dt),this.changed=!0,this.data.g=t}set b(t){this.type.set(dt),this.changed=!0,this.data.b=t}set h(t){this.type.set(ut),this.changed=!0,this.data.h=t}set s(t){this.type.set(ut),this.changed=!0,this.data.s=t}set l(t){this.type.set(ut),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),ft={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(ft.re);if(!e)return;const r=e[1],i=parseInt(r,16),a=r.length,n=a%4==0,o=a>4,s=o?1:17,l=o?8:4,h=n?0:-1,c=o?255:15;return gt.set({r:(i>>l*(h+3)&c)*s,g:(i>>l*(h+2)&c)*s,b:(i>>l*(h+1)&c)*s,a:n?(i&c)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${ht[Math.round(e)]}${ht[Math.round(r)]}${ht[Math.round(i)]}${ht[Math.round(255*a)]}`:`#${ht[Math.round(e)]}${ht[Math.round(r)]}${ht[Math.round(i)]}`}},mt={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(mt.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return lt.channel.clamp.h(.9*parseFloat(t));case"rad":return lt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return lt.channel.clamp.h(360*parseFloat(t))}}return lt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(mt.re);if(!r)return;const[,i,a,n,o,s]=r;return gt.set({h:mt._hue2deg(i),s:lt.channel.clamp.s(parseFloat(a)),l:lt.channel.clamp.l(parseFloat(n)),a:o?lt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:a}=t;return a<1?`hsla(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${a})`:`hsl(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`}},yt={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=yt.colors[t];if(e)return ft.parse(e)},stringify:t=>{const e=ft.stringify(t);for(const r in yt.colors)if(yt.colors[r]===e)return r}},xt={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(xt.re);if(!r)return;const[,i,a,n,o,s,l,h,c]=r;return gt.set({r:lt.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:lt.channel.clamp.g(o?2.55*parseFloat(n):parseFloat(n)),b:lt.channel.clamp.b(l?2.55*parseFloat(s):parseFloat(s)),a:h?lt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`rgba(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(a)})`:`rgb(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`}},bt={format:{keyword:yt,hex:ft,rgb:xt,rgba:xt,hsl:mt,hsla:mt},parse:t=>{if("string"!=typeof t)return t;const e=ft.parse(t)||xt.parse(t)||mt.parse(t)||yt.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ut)||void 0===t.data.r?mt.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?xt.stringify(t):ft.stringify(t)},kt=(t,e)=>{const r=bt.parse(t);for(const i in e)r[i]=lt.channel.clamp[i](e[i]);return bt.stringify(r)},Ct=(t,e,r=0,i=1)=>{if("number"!=typeof t)return kt(t,{a:e});const a=gt.set({r:lt.channel.clamp.r(t),g:lt.channel.clamp.g(e),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return bt.stringify(a)},wt=t=>(t=>{const{r:e,g:r,b:i}=bt.parse(t),a=.2126*lt.channel.toLinear(e)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(a)})(t)>=.5,St=t=>!wt(t),Tt=(t,e,r)=>{const i=bt.parse(t),a=i[e],n=lt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),bt.stringify(i)},vt=(t,e)=>Tt(t,"l",e),Bt=(t,e)=>Tt(t,"l",-e),Lt=(t,e)=>{const r=bt.parse(t),i={};for(const a in e)e[a]&&(i[a]=r[a]+e[a]);return kt(t,i)},Mt=(t,e=100)=>{const r=bt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:a,b:n,a:o}=bt.parse(t),{r:s,g:l,b:h,a:c}=bt.parse(e),d=r/100,u=2*d-1,p=o-c,g=((u*p==-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return Ct(i*g+s*f,a*g+l*f,n*g+h*f,o*d+c*(1-d))})(r,t,e)},{entries:_t,setPrototypeOf:At,isFrozen:Ft,getPrototypeOf:$t,getOwnPropertyDescriptor:Et}=Object;let{freeze:Dt,seal:It,create:Ot}=Object,{apply:Rt,construct:Pt}="undefined"!=typeof Reflect&&Reflect;Dt||(Dt=function(t){return t}),It||(It=function(t){return t}),Rt||(Rt=function(t,e,r){return t.apply(e,r)}),Pt||(Pt=function(t,e){return new t(...e)});const zt=te(Array.prototype.forEach),qt=te(Array.prototype.lastIndexOf),Nt=te(Array.prototype.pop),Wt=te(Array.prototype.push),jt=te(Array.prototype.splice),Ht=te(String.prototype.toLowerCase),Ut=te(String.prototype.toString),Yt=te(String.prototype.match),Vt=te(String.prototype.replace),Gt=te(String.prototype.indexOf),Xt=te(String.prototype.trim),Zt=te(Object.prototype.hasOwnProperty),Qt=te(RegExp.prototype.test),Jt=(Kt=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Pt(Kt,e)});var Kt;function te(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Rt(t,e,i)}}function ee(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ht;At&&At(t,null);let i=e.length;for(;i--;){let a=e[i];if("string"==typeof a){const t=r(a);t!==a&&(Ft(e)||(e[i]=t),a=t)}t[a]=!0}return t}function re(t){for(let e=0;e<t.length;e++){Zt(t,e)||(t[e]=null)}return t}function ie(t){const e=Ot(null);for(const[r,i]of _t(t)){Zt(t,r)&&(Array.isArray(i)?e[r]=re(i):i&&"object"==typeof i&&i.constructor===Object?e[r]=ie(i):e[r]=i)}return e}function ae(t,e){for(;null!==t;){const r=Et(t,e);if(r){if(r.get)return te(r.get);if("function"==typeof r.value)return te(r.value)}t=$t(t)}return function(){return null}}const ne=Dt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oe=Dt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),se=Dt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),le=Dt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),he=Dt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ce=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),de=Dt(["#text"]),ue=Dt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),pe=Dt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ge=Dt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fe=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),me=It(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ye=It(/<%[\w\W]*|[\w\W]*%>/gm),xe=It(/\$\{[\w\W]*/gm),be=It(/^data-[\-\w.\u00B7-\uFFFF]+$/),ke=It(/^aria-[\-\w]+$/),Ce=It(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),we=It(/^(?:\w+script|data):/i),Se=It(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Te=It(/^html$/i),ve=It(/^[a-z][.\w]*(-[.\w]+)+$/i);var Be=Object.freeze({__proto__:null,ARIA_ATTR:ke,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:ve,DATA_ATTR:be,DOCTYPE_NAME:Te,ERB_EXPR:ye,IS_ALLOWED_URI:Ce,IS_SCRIPT_OR_DATA:we,MUSTACHE_EXPR:me,TMPLIT_EXPR:xe});const Le=1,Me=3,_e=7,Ae=8,Fe=9;var $e,Ee=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.2.4",r.removed=[],!e||!e.document||e.document.nodeType!==Fe||!e.Element)return r.isSupported=!1,r;let{document:i}=e;const a=i,n=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:g}=e,f=h.prototype,m=ae(f,"cloneNode"),y=ae(f,"remove"),x=ae(f,"nextSibling"),b=ae(f,"childNodes"),k=ae(f,"parentNode");if("function"==typeof s){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let C,w="";const{implementation:S,createNodeIterator:T,createDocumentFragment:v,getElementsByTagName:B}=i,{importNode:L}=a;let M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof _t&&"function"==typeof k&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:_,ERB_EXPR:A,TMPLIT_EXPR:F,DATA_ATTR:$,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:O}=Be;let{IS_ALLOWED_URI:R}=Be,P=null;const z=ee({},[...ne,...oe,...se,...he,...de]);let q=null;const N=ee({},[...ue,...pe,...ge,...fe]);let W=Object.seal(Ot(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,H=null,U=!0,Y=!0,V=!1,G=!0,X=!1,Z=!0,Q=!1,J=!1,K=!1,tt=!1,et=!1,rt=!1,it=!0,at=!1,nt=!0,ot=!1,st={},lt=null;const ht=ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const dt=ee({},["audio","video","img","source","image","track"]);let ut=null;const pt=ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gt="http://www.w3.org/1998/Math/MathML",ft="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let yt=mt,xt=!1,bt=null;const kt=ee({},[gt,ft,mt],Ut);let Ct=ee({},["mi","mo","mn","ms","mtext"]),wt=ee({},["annotation-xml"]);const St=ee({},["title","style","font","a","script"]);let Tt=null;const vt=["application/xhtml+xml","text/html"];let Bt=null,Lt=null;const Mt=i.createElement("form"),At=function(t){return t instanceof RegExp||t instanceof Function},Ft=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Lt||Lt!==t){if(t&&"object"==typeof t||(t={}),t=ie(t),Tt=-1===vt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Bt="application/xhtml+xml"===Tt?Ut:Ht,P=Zt(t,"ALLOWED_TAGS")?ee({},t.ALLOWED_TAGS,Bt):z,q=Zt(t,"ALLOWED_ATTR")?ee({},t.ALLOWED_ATTR,Bt):N,bt=Zt(t,"ALLOWED_NAMESPACES")?ee({},t.ALLOWED_NAMESPACES,Ut):kt,ut=Zt(t,"ADD_URI_SAFE_ATTR")?ee(ie(pt),t.ADD_URI_SAFE_ATTR,Bt):pt,ct=Zt(t,"ADD_DATA_URI_TAGS")?ee(ie(dt),t.ADD_DATA_URI_TAGS,Bt):dt,lt=Zt(t,"FORBID_CONTENTS")?ee({},t.FORBID_CONTENTS,Bt):ht,j=Zt(t,"FORBID_TAGS")?ee({},t.FORBID_TAGS,Bt):{},H=Zt(t,"FORBID_ATTR")?ee({},t.FORBID_ATTR,Bt):{},st=!!Zt(t,"USE_PROFILES")&&t.USE_PROFILES,U=!1!==t.ALLOW_ARIA_ATTR,Y=!1!==t.ALLOW_DATA_ATTR,V=t.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,X=t.SAFE_FOR_TEMPLATES||!1,Z=!1!==t.SAFE_FOR_XML,Q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,rt=t.RETURN_TRUSTED_TYPE||!1,K=t.FORCE_BODY||!1,it=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,nt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,R=t.ALLOWED_URI_REGEXP||Ce,yt=t.NAMESPACE||mt,Ct=t.MATHML_TEXT_INTEGRATION_POINTS||Ct,wt=t.HTML_INTEGRATION_POINTS||wt,W=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&At(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&At(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Y=!1),et&&(tt=!0),st&&(P=ee({},de),q=[],!0===st.html&&(ee(P,ne),ee(q,ue)),!0===st.svg&&(ee(P,oe),ee(q,pe),ee(q,fe)),!0===st.svgFilters&&(ee(P,se),ee(q,pe),ee(q,fe)),!0===st.mathMl&&(ee(P,he),ee(q,ge),ee(q,fe))),t.ADD_TAGS&&(P===z&&(P=ie(P)),ee(P,t.ADD_TAGS,Bt)),t.ADD_ATTR&&(q===N&&(q=ie(q)),ee(q,t.ADD_ATTR,Bt)),t.ADD_URI_SAFE_ATTR&&ee(ut,t.ADD_URI_SAFE_ATTR,Bt),t.FORBID_CONTENTS&&(lt===ht&&(lt=ie(lt)),ee(lt,t.FORBID_CONTENTS,Bt)),nt&&(P["#text"]=!0),Q&&ee(P,["html","head","body"]),P.table&&(ee(P,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw Jt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw Jt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=t.TRUSTED_TYPES_POLICY,w=C.createHTML("")}else void 0===C&&(C=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:t=>t,createScriptURL:t=>t})}catch(n){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(g,n)),null!==C&&"string"==typeof w&&(w=C.createHTML(""));Dt&&Dt(t),Lt=t}},$t=ee({},[...oe,...se,...le]),Et=ee({},[...he,...ce]),It=function(t){Wt(r.removed,{element:t});try{k(t).removeChild(t)}catch(e){y(t)}},Rt=function(t,e){try{Wt(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){Wt(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||et)try{It(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},Pt=function(t){let e=null,r=null;if(K)t="<remove></remove>"+t;else{const e=Yt(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Tt&&yt===mt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=C?C.createHTML(t):t;if(yt===mt)try{e=(new p).parseFromString(a,Tt)}catch(o){}if(!e||!e.documentElement){e=S.createDocument(yt,"template",null);try{e.documentElement.innerHTML=xt?w:a}catch(o){}}const n=e.body||e.documentElement;return t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),yt===mt?B.call(e,Q?"html":"body")[0]:Q?e.documentElement:n},Kt=function(t){return T.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},te=function(t){return t instanceof u&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},re=function(t){return"function"==typeof l&&t instanceof l};function me(t,e,i){zt(t,(t=>{t.call(r,e,i,Lt)}))}const ye=function(t){let e=null;if(me(M.beforeSanitizeElements,t,null),te(t))return It(t),!0;const i=Bt(t.nodeName);if(me(M.uponSanitizeElement,t,{tagName:i,allowedTags:P}),t.hasChildNodes()&&!re(t.firstElementChild)&&Qt(/<[/\w]/g,t.innerHTML)&&Qt(/<[/\w]/g,t.textContent))return It(t),!0;if(t.nodeType===_e)return It(t),!0;if(Z&&t.nodeType===Ae&&Qt(/<[/\w]/g,t.data))return It(t),!0;if(!P[i]||j[i]){if(!j[i]&&be(i)){if(W.tagNameCheck instanceof RegExp&&Qt(W.tagNameCheck,i))return!1;if(W.tagNameCheck instanceof Function&&W.tagNameCheck(i))return!1}if(nt&&!lt[i]){const e=k(t)||t.parentNode,r=b(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const a=m(r[i],!0);a.__removalCount=(t.__removalCount||0)+1,e.insertBefore(a,x(t))}}}return It(t),!0}return t instanceof h&&!function(t){let e=k(t);e&&e.tagName||(e={namespaceURI:yt,tagName:"template"});const r=Ht(t.tagName),i=Ht(e.tagName);return!!bt[t.namespaceURI]&&(t.namespaceURI===ft?e.namespaceURI===mt?"svg"===r:e.namespaceURI===gt?"svg"===r&&("annotation-xml"===i||Ct[i]):Boolean($t[r]):t.namespaceURI===gt?e.namespaceURI===mt?"math"===r:e.namespaceURI===ft?"math"===r&&wt[i]:Boolean(Et[r]):t.namespaceURI===mt?!(e.namespaceURI===ft&&!wt[i])&&!(e.namespaceURI===gt&&!Ct[i])&&!Et[r]&&(St[r]||!$t[r]):!("application/xhtml+xml"!==Tt||!bt[t.namespaceURI]))}(t)?(It(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Qt(/<\/no(script|embed|frames)/i,t.innerHTML)?(X&&t.nodeType===Me&&(e=t.textContent,zt([_,A,F],(t=>{e=Vt(e,t," ")})),t.textContent!==e&&(Wt(r.removed,{element:t.cloneNode()}),t.textContent=e)),me(M.afterSanitizeElements,t,null),!1):(It(t),!0)},xe=function(t,e,r){if(it&&("id"===e||"name"===e)&&(r in i||r in Mt))return!1;if(Y&&!H[e]&&Qt($,e));else if(U&&Qt(E,e));else if(!q[e]||H[e]){if(!(be(t)&&(W.tagNameCheck instanceof RegExp&&Qt(W.tagNameCheck,t)||W.tagNameCheck instanceof Function&&W.tagNameCheck(t))&&(W.attributeNameCheck instanceof RegExp&&Qt(W.attributeNameCheck,e)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(e))||"is"===e&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Qt(W.tagNameCheck,r)||W.tagNameCheck instanceof Function&&W.tagNameCheck(r))))return!1}else if(ut[e]);else if(Qt(R,Vt(r,I,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Gt(r,"data:")||!ct[t]){if(V&&!Qt(D,Vt(r,I,"")));else if(r)return!1}else;return!0},be=function(t){return"annotation-xml"!==t&&Yt(t,O)},ke=function(t){me(M.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||te(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let a=e.length;for(;a--;){const o=e[a],{name:s,namespaceURI:l,value:h}=o,c=Bt(s);let d="value"===s?h:Xt(h);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,me(M.uponSanitizeAttribute,t,i),d=i.attrValue,!at||"id"!==c&&"name"!==c||(Rt(s,t),d="user-content-"+d),Z&&Qt(/((--!?|])>)|<\/(style|title)/i,d)){Rt(s,t);continue}if(i.forceKeepAttr)continue;if(Rt(s,t),!i.keepAttr)continue;if(!G&&Qt(/\/>/i,d)){Rt(s,t);continue}X&&zt([_,A,F],(t=>{d=Vt(d,t," ")}));const u=Bt(t.nodeName);if(xe(u,c,d)){if(C&&"object"==typeof g&&"function"==typeof g.getAttributeType)if(l);else switch(g.getAttributeType(u,c)){case"TrustedHTML":d=C.createHTML(d);break;case"TrustedScriptURL":d=C.createScriptURL(d)}try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),te(t)?It(t):Nt(r.removed)}catch(n){}}}me(M.afterSanitizeAttributes,t,null)},we=function t(e){let r=null;const i=Kt(e);for(me(M.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)me(M.uponSanitizeShadowNode,r,null),ye(r),ke(r),r.content instanceof o&&t(r.content);me(M.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,s=null,h=null;if(xt=!t,xt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!re(t)){if("function"!=typeof t.toString)throw Jt("toString is not a function");if("string"!=typeof(t=t.toString()))throw Jt("dirty is not a string, aborting")}if(!r.isSupported)return t;if(J||Ft(e),r.removed=[],"string"==typeof t&&(ot=!1),ot){if(t.nodeName){const e=Bt(t.nodeName);if(!P[e]||j[e])throw Jt("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)i=Pt("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===Le&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!tt&&!X&&!Q&&-1===t.indexOf("<"))return C&&rt?C.createHTML(t):t;if(i=Pt(t),!i)return tt?null:rt?w:""}i&&K&&It(i.firstChild);const c=Kt(ot?t:i);for(;s=c.nextNode();)ye(s),ke(s),s.content instanceof o&&we(s.content);if(ot)return t;if(tt){if(et)for(h=v.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return(q.shadowroot||q.shadowrootmode)&&(h=L.call(a,h,!0)),h}let d=Q?i.outerHTML:i.innerHTML;return Q&&P["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Qt(Te,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),X&&zt([_,A,F],(t=>{d=Vt(d,t," ")})),C&&rt?C.createHTML(d):d},r.setConfig=function(){Ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},r.clearConfig=function(){Lt=null,J=!1},r.isValidAttribute=function(t,e,r){Lt||Ft({});const i=Bt(t),a=Bt(e);return xe(i,a,r)},r.addHook=function(t,e){"function"==typeof e&&Wt(M[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=qt(M[t],e);return-1===r?void 0:jt(M[t],r,1)[0]}return Nt(M[t])},r.removeHooks=function(t){M[t]=[]},r.removeAllHooks=function(){M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),De=Object.defineProperty,Ie=(t,e)=>De(t,"name",{value:e,configurable:!0}),Oe=(t,e)=>{for(var r in e)De(t,r,{get:e[r],enumerable:!0})},Re={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Pe={trace:Ie(((...t)=>{}),"trace"),debug:Ie(((...t)=>{}),"debug"),info:Ie(((...t)=>{}),"info"),warn:Ie(((...t)=>{}),"warn"),error:Ie(((...t)=>{}),"error"),fatal:Ie(((...t)=>{}),"fatal")},ze=Ie((function(t="fatal"){let e=Re.fatal;"string"==typeof t?t.toLowerCase()in Re&&(e=Re[t]):"number"==typeof t&&(e=t),Pe.trace=()=>{},Pe.debug=()=>{},Pe.info=()=>{},Pe.warn=()=>{},Pe.error=()=>{},Pe.fatal=()=>{},e<=Re.fatal&&(Pe.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"[35m",qe("FATAL"))),e<=Re.error&&(Pe.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"[31m",qe("ERROR"))),e<=Re.warn&&(Pe.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"[33m",qe("WARN"))),e<=Re.info&&(Pe.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"[34m",qe("INFO"))),e<=Re.debug&&(Pe.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",qe("DEBUG"))),e<=Re.trace&&(Pe.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",qe("TRACE")))}),"setLogLevel"),qe=Ie((t=>`%c${ot().format("ss.SSS")} : ${t} : `),"format"),Ne=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,We=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,je=/\s*%%.*\n/gm,He=(t=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},Ie(t,"UnknownDiagramError"),t),Ue={},Ye=Ie((function(t,e){t=t.replace(Ne,"").replace(We,"").replace(je,"\n");for(const[r,{detector:i}]of Object.entries(Ue)){if(i(t,e))return r}throw new He(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),Ve=Ie(((...t)=>{for(const{id:e,detector:r,loader:i}of t)Ge(e,r,i)}),"registerLazyLoadedDiagrams"),Ge=Ie(((t,e,r)=>{Ue[t]&&Pe.warn(`Detector with key ${t} already exists. Overwriting.`),Ue[t]={detector:e,loader:r},Pe.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),Xe=Ie((t=>Ue[t].loader),"getDiagramLoader"),Ze=Ie(((t,e,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Ze(t,e,a))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((a=>{"object"!=typeof e[a]||void 0!==t[a]&&"object"!=typeof t[a]?(i||"object"!=typeof t[a]&&"object"!=typeof e[a])&&(t[a]=e[a]):(void 0===t[a]&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=Ze(t[a],e[a],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),Qe=Ze,Je="#ffffff",Ke="#f2f2f2",tr=Ie(((t,e)=>Lt(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),er=(Ie(e=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Lt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Lt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Mt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Mt(this.tertiaryColor),this.lineColor=this.lineColor||Mt(this.background),this.arrowheadColor=this.arrowheadColor||Mt(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?Bt(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||Bt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Mt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||vt(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.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||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||Lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Lt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Lt(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=Bt(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=Bt(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||Mt(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||vt(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||Bt(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 d=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||Lt(this.mainBkg,{h:180,s:-15,l:d*(5+3*u)}),this["surfacePeer"+u]=this["surfacePeer"+u]||Lt(this.mainBkg,{h:180,s:-15,l:d*(8+3*u)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Lt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Lt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Lt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Lt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Lt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Lt(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||Lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||Lt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Lt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Lt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Lt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Lt(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.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||Lt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Lt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Lt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Lt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Lt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Lt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||St(this.quadrant1Fill)?vt(this.quadrant1Fill):Bt(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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?Bt(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||Lt(this.primaryColor,{h:-30}),this.git4=this.git4||Lt(this.primaryColor,{h:-60}),this.git5=this.git5||Lt(this.primaryColor,{h:-90}),this.git6=this.git6||Lt(this.primaryColor,{h:60}),this.git7=this.git7||Lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=vt(this.git0,25),this.git1=vt(this.git1,25),this.git2=vt(this.git2,25),this.git3=vt(this.git3,25),this.git4=vt(this.git4,25),this.git5=vt(this.git5,25),this.git6=vt(this.git6,25),this.git7=vt(this.git7,25)):(this.git0=Bt(this.git0,25),this.git1=Bt(this.git1,25),this.git2=Bt(this.git2,25),this.git3=Bt(this.git3,25),this.git4=Bt(this.git4,25),this.git5=Bt(this.git5,25),this.git6=Bt(this.git6,25),this.git7=Bt(this.git7,25)),this.gitInv0=this.gitInv0||Mt(this.git0),this.gitInv1=this.gitInv1||Mt(this.git1),this.gitInv2=this.gitInv2||Mt(this.git2),this.gitInv3=this.gitInv3||Mt(this.git3),this.gitInv4=this.gitInv4||Mt(this.git4),this.gitInv5=this.gitInv5||Mt(this.git5),this.gitInv6=this.gitInv6||Mt(this.git6),this.gitInv7=this.gitInv7||Mt(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||Je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),e),rr=Ie((t=>{const e=new er;return e.calculate(t),e}),"getThemeVariables"),ir=(Ie(r=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=vt(this.primaryColor,16),this.tertiaryColor=Lt(this.primaryColor,{h:-160}),this.primaryBorderColor=Mt(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Mt(this.primaryColor),this.secondaryTextColor=Mt(this.secondaryColor),this.tertiaryTextColor=Mt(this.tertiaryColor),this.lineColor=Mt(this.background),this.textColor=Mt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=vt(Mt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ct(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.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.sectionBkgColor=Bt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Bt(this.sectionBkgColor,10),this.taskBorderColor=Ct(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ct(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=vt(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=vt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=vt(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=this.darkTextColor,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=Lt(this.primaryColor,{h:64}),this.fillType3=Lt(this.secondaryColor,{h:64}),this.fillType4=Lt(this.primaryColor,{h:-64}),this.fillType5=Lt(this.secondaryColor,{h:-64}),this.fillType6=Lt(this.primaryColor,{h:128}),this.fillType7=Lt(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||Lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Lt(this.primaryColor,{h:330});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||Mt(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScalePeer"+d]=this["cScalePeer"+d]||vt(this["cScale"+d],10);for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||Lt(this.mainBkg,{h:30,s:-30,l:-(4*d-10)}),this["surfacePeer"+d]=this["surfacePeer"+d]||Lt(this.mainBkg,{h:30,s:-30,l:-(4*d-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Lt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Lt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Lt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Lt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Lt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Lt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||St(this.quadrant1Fill)?vt(this.quadrant1Fill):Bt(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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.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?Bt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=vt(this.secondaryColor,20),this.git1=vt(this.pie2||this.secondaryColor,20),this.git2=vt(this.pie3||this.tertiaryColor,20),this.git3=vt(this.pie4||Lt(this.primaryColor,{h:-30}),20),this.git4=vt(this.pie5||Lt(this.primaryColor,{h:-60}),20),this.git5=vt(this.pie6||Lt(this.primaryColor,{h:-90}),10),this.git6=vt(this.pie7||Lt(this.primaryColor,{h:60}),10),this.git7=vt(this.pie8||Lt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Mt(this.git0),this.gitInv1=this.gitInv1||Mt(this.git1),this.gitInv2=this.gitInv2||Mt(this.git2),this.gitInv3=this.gitInv3||Mt(this.git3),this.gitInv4=this.gitInv4||Mt(this.git4),this.gitInv5=this.gitInv5||Mt(this.git5),this.gitInv6=this.gitInv6||Mt(this.git6),this.gitInv7=this.gitInv7||Mt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Mt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Mt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||vt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),r),ar=Ie((t=>{const e=new ir;return e.calculate(t),e}),"getThemeVariables"),nr=(Ie(i=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Lt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Lt(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Mt(this.primaryColor),this.secondaryTextColor=Mt(this.secondaryColor),this.tertiaryTextColor=Mt(this.tertiaryColor),this.lineColor=Mt(this.background),this.textColor=Mt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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.sectionBkgColor=Ct(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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Lt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Bt(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=Bt(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||Bt(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||Lt(this["cScale"+d],{h:180});for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||Lt(this.mainBkg,{h:30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||Lt(this.mainBkg,{h:30,l:-(7+5*d)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||Mt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Mt(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=vt(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.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=Lt(this.primaryColor,{h:64}),this.fillType3=Lt(this.secondaryColor,{h:64}),this.fillType4=Lt(this.primaryColor,{h:-64}),this.fillType5=Lt(this.secondaryColor,{h:-64}),this.fillType6=Lt(this.primaryColor,{h:128}),this.fillType7=Lt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Lt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Lt(this.primaryColor,{l:-10}),this.pie5=this.pie5||Lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Lt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Lt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Lt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Lt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Lt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Lt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Lt(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Lt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Lt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Lt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Lt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Lt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Lt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||St(this.quadrant1Fill)?vt(this.quadrant1Fill):Bt(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||Lt(this.primaryColor,{h:-30}),this.git4=this.git4||Lt(this.primaryColor,{h:-60}),this.git5=this.git5||Lt(this.primaryColor,{h:-90}),this.git6=this.git6||Lt(this.primaryColor,{h:60}),this.git7=this.git7||Lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=vt(this.git0,25),this.git1=vt(this.git1,25),this.git2=vt(this.git2,25),this.git3=vt(this.git3,25),this.git4=vt(this.git4,25),this.git5=vt(this.git5,25),this.git6=vt(this.git6,25),this.git7=vt(this.git7,25)):(this.git0=Bt(this.git0,25),this.git1=Bt(this.git1,25),this.git2=Bt(this.git2,25),this.git3=Bt(this.git3,25),this.git4=Bt(this.git4,25),this.git5=Bt(this.git5,25),this.git6=Bt(this.git6,25),this.git7=Bt(this.git7,25)),this.gitInv0=this.gitInv0||Bt(Mt(this.git0),25),this.gitInv1=this.gitInv1||Mt(this.git1),this.gitInv2=this.gitInv2||Mt(this.git2),this.gitInv3=this.gitInv3||Mt(this.git3),this.gitInv4=this.gitInv4||Mt(this.git4),this.gitInv5=this.gitInv5||Mt(this.git5),this.gitInv6=this.gitInv6||Mt(this.git6),this.gitInv7=this.gitInv7||Mt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Mt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Mt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),i),or=Ie((t=>{const e=new nr;return e.calculate(t),e}),"getThemeVariables"),sr=(Ie(a=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=vt("#cde498",10),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Mt(this.primaryColor),this.secondaryTextColor=Mt(this.secondaryColor),this.tertiaryTextColor=Mt(this.primaryColor),this.lineColor=Mt(this.background),this.textColor=Mt(this.background),this.THEME_COLOR_LIMIT=12,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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.actorBorder=Bt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Lt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Lt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Lt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Lt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Lt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Lt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Lt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Lt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Lt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Bt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Bt(this.tertiaryColor,40);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=Bt(this["cScale"+d],10),this["cScalePeer"+d]=this["cScalePeer"+d]||Bt(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||Lt(this["cScale"+d],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||Lt(this.mainBkg,{h:30,s:-30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||Lt(this.mainBkg,{h:30,s:-30,l:-(8+5*d)});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.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=Lt(this.primaryColor,{h:64}),this.fillType3=Lt(this.secondaryColor,{h:64}),this.fillType4=Lt(this.primaryColor,{h:-64}),this.fillType5=Lt(this.secondaryColor,{h:-64}),this.fillType6=Lt(this.primaryColor,{h:128}),this.fillType7=Lt(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||Lt(this.primaryColor,{l:-30}),this.pie5=this.pie5||Lt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Lt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Lt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Lt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Lt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Lt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Lt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Lt(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Lt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Lt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Lt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Lt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Lt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Lt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||St(this.quadrant1Fill)?vt(this.quadrant1Fill):Bt(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.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.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||Lt(this.primaryColor,{h:-30}),this.git4=this.git4||Lt(this.primaryColor,{h:-60}),this.git5=this.git5||Lt(this.primaryColor,{h:-90}),this.git6=this.git6||Lt(this.primaryColor,{h:60}),this.git7=this.git7||Lt(this.primaryColor,{h:120}),this.darkMode?(this.git0=vt(this.git0,25),this.git1=vt(this.git1,25),this.git2=vt(this.git2,25),this.git3=vt(this.git3,25),this.git4=vt(this.git4,25),this.git5=vt(this.git5,25),this.git6=vt(this.git6,25),this.git7=vt(this.git7,25)):(this.git0=Bt(this.git0,25),this.git1=Bt(this.git1,25),this.git2=Bt(this.git2,25),this.git3=Bt(this.git3,25),this.git4=Bt(this.git4,25),this.git5=Bt(this.git5,25),this.git6=Bt(this.git6,25),this.git7=Bt(this.git7,25)),this.gitInv0=this.gitInv0||Mt(this.git0),this.gitInv1=this.gitInv1||Mt(this.git1),this.gitInv2=this.gitInv2||Mt(this.git2),this.gitInv3=this.gitInv3||Mt(this.git3),this.gitInv4=this.gitInv4||Mt(this.git4),this.gitInv5=this.gitInv5||Mt(this.git5),this.gitInv6=this.gitInv6||Mt(this.git6),this.gitInv7=this.gitInv7||Mt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Mt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Mt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),a),lr=Ie((t=>{const e=new sr;return e.calculate(t),e}),"getThemeVariables"),hr=(Ie(n=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=vt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Lt(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Mt(this.primaryColor),this.secondaryTextColor=Mt(this.secondaryColor),this.tertiaryTextColor=Mt(this.tertiaryColor),this.lineColor=Mt(this.background),this.textColor=Mt(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.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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,r,i,a,n,o,s,l,h,c;this.secondBkg=vt(this.contrast,55),this.border2=this.contrast,this.actorBorder=vt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||Mt(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||vt(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||Bt(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||Lt(this.mainBkg,{l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||Lt(this.mainBkg,{l:-(8+5*d)});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=vt(this.contrast,30),this.sectionBkgColor2=vt(this.contrast,30),this.taskBorderColor=Bt(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=vt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Bt(this.critBkgColor,10),this.todayLineColor=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=Lt(this.primaryColor,{h:64}),this.fillType3=Lt(this.secondaryColor,{h:64}),this.fillType4=Lt(this.primaryColor,{h:-64}),this.fillType5=Lt(this.secondaryColor,{h:-64}),this.fillType6=Lt(this.primaryColor,{h:128}),this.fillType7=Lt(this.secondaryColor,{h:128});for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["pie"+d]=this["cScale"+d];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",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Lt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Lt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Lt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Lt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Lt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Lt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||St(this.quadrant1Fill)?vt(this.quadrant1Fill):Bt(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:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(r=this.xyChart)?void 0:r.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(i=this.xyChart)?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(a=this.xyChart)?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(n=this.xyChart)?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(o=this.xyChart)?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(h=this.xyChart)?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(c=this.xyChart)?void 0:c.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},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=Bt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Lt(this.primaryColor,{h:-30}),this.git4=this.pie5||Lt(this.primaryColor,{h:-60}),this.git5=this.pie6||Lt(this.primaryColor,{h:-90}),this.git6=this.pie7||Lt(this.primaryColor,{h:60}),this.git7=this.pie8||Lt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Mt(this.git0),this.gitInv1=this.gitInv1||Mt(this.git1),this.gitInv2=this.gitInv2||Mt(this.git2),this.gitInv3=this.gitInv3||Mt(this.git3),this.gitInv4=this.gitInv4||Mt(this.git4),this.gitInv5=this.gitInv5||Mt(this.git5),this.gitInv6=this.gitInv6||Mt(this.git6),this.gitInv7=this.gitInv7||Mt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},"Theme"),n),cr={base:{getThemeVariables:rr},dark:{getThemeVariables:ar},default:{getThemeVariables:or},forest:{getThemeVariables:lr},neutral:{getThemeVariables:Ie((t=>{const e=new hr;return e.calculate(t),e}),"getThemeVariables")}},dr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},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,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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},ur={...dr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:cr.default.getThemeVariables(),sequence:{...dr.sequence,messageFont:Ie((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:Ie((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:Ie((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...dr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...dr.c4,useWidth:void 0,personFont:Ie((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:Ie((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:Ie((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:Ie((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:Ie((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:Ie((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:Ie((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:Ie((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:Ie((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:Ie((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:Ie((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:Ie((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:Ie((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:Ie((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:Ie((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:Ie((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:Ie((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:Ie((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:Ie((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:Ie((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:Ie((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:Ie((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...dr.pie,useWidth:984},xyChart:{...dr.xyChart,useWidth:void 0},requirement:{...dr.requirement,useWidth:void 0},packet:{...dr.packet}},pr=Ie(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...pr(t[i],"")]:[...r,e+i]),[])),"keyify"),gr=new Set(pr(ur,"")),fr=ur,mr=Ie((t=>{if(Pe.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>mr(t)));else{for(const e of Object.keys(t)){if(Pe.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!gr.has(e)||null==t[e]){Pe.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){Pe.debug("sanitizing object",e),mr(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(Pe.debug("sanitizing css option",e),t[e]=yr(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];(null==r?void 0:r.match)&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Pe.debug("After sanitization",t)}}),"sanitizeDirective"),yr=Ie((t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t}),"sanitizeCss"),xr=Object.freeze(fr),br=Qe({},xr),kr=[],Cr=Qe({},xr),wr=Ie(((t,e)=>{let r=Qe({},t),i={};for(const a of e)_r(a),i=Qe(i,a);if(r=Qe(r,i),i.theme&&i.theme in cr){const t=Qe({},$e),e=Qe(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in cr&&(r.themeVariables=cr[r.theme].getThemeVariables(e))}return Ir(Cr=r),Cr}),"updateCurrentConfig"),Sr=Ie((t=>(br=Qe({},xr),br=Qe(br,t),t.theme&&cr[t.theme]&&(br.themeVariables=cr[t.theme].getThemeVariables(t.themeVariables)),wr(br,kr),br)),"setSiteConfig"),Tr=Ie((t=>{$e=Qe({},t)}),"saveConfigFromInitialize"),vr=Ie((t=>(br=Qe(br,t),wr(br,kr),br)),"updateSiteConfig"),Br=Ie((()=>Qe({},br)),"getSiteConfig"),Lr=Ie((t=>(Ir(t),Qe(Cr,t),Mr())),"setConfig"),Mr=Ie((()=>Qe({},Cr)),"getConfig"),_r=Ie((t=>{t&&(["secure",...br.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(Pe.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&_r(t[e])})))}),"sanitize"),Ar=Ie((t=>{var e;mr(t),t.fontFamily&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),kr.push(t),wr(br,kr)}),"addDirective"),Fr=Ie(((t=br)=>{wr(t,kr=[])}),"reset"),$r={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Er={},Dr=Ie((t=>{Er[t]||(Pe.warn($r[t]),Er[t]=!0)}),"issueWarning"),Ir=Ie((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Dr("LAZY_LOAD_DEPRECATED")}),"checkConfig"),Or=/<br\s*\/?>/gi,Rr=Ie((t=>{if(!t)return[""];return Vr(t).replace(/\\n/g,"#br#").split("#br#")}),"getRows"),Pr=(()=>{let t=!1;return()=>{t||(zr(),t=!0)}})();function zr(){const t="data-temp-href-target";Ee.addHook("beforeSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),Ee.addHook("afterSanitizeAttributes",(e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}Ie(zr,"setupDompurifyHooks");var qr=Ie((t=>{Pr();return Ee.sanitize(t)}),"removeScript"),Nr=Ie(((t,e)=>{var r;if(!1!==(null==(r=e.flowchart)?void 0:r.htmlLabels)){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=qr(t):"loose"!==r&&(t=(t=(t=Vr(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=Yr(t))}return t}),"sanitizeMore"),Wr=Ie(((t,e)=>t?t=e.dompurifyConfig?Ee.sanitize(Nr(t,e),e.dompurifyConfig).toString():Ee.sanitize(Nr(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),jr=Ie(((t,e)=>"string"==typeof t?Wr(t,e):t.flat().map((t=>Wr(t,e)))),"sanitizeTextOrArray"),Hr=Ie((t=>Or.test(t)),"hasBreaks"),Ur=Ie((t=>t.split(Or)),"splitBreaks"),Yr=Ie((t=>t.replace(/#br#/g,"<br/>")),"placeholderToBreak"),Vr=Ie((t=>t.replace(Or,"#br#")),"breakToPlaceholder"),Gr=Ie((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Xr=Ie((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Zr=Ie((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Qr=Ie((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Jr=Ie((function(t){const e=t.split(/(,)/),r=[];for(let i=0;i<e.length;i++){let t=e[i];if(","===t&&i>0&&i+1<e.length){const a=e[i-1],n=e[i+1];ti(a,n)&&(t=a+","+n,i++,r.pop())}r.push(ei(t))}return r.join("")}),"parseGenericTypes"),Kr=Ie(((t,e)=>Math.max(0,t.split(e).length-1)),"countOccurrence"),ti=Ie(((t,e)=>{const r=Kr(t,"~"),i=Kr(e,"~");return 1===r&&1===i}),"shouldCombineSets"),ei=Ie((t=>{const e=Kr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let a=i.indexOf("~"),n=i.lastIndexOf("~");for(;-1!==a&&-1!==n&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),ri=Ie((()=>void 0!==window.MathMLElement),"isMathMLSupported"),ii=/\$\$(.*)\$\$/g,ai=Ie((t=>{var e;return((null==(e=t.match(ii))?void 0:e.length)??0)>0}),"hasKatex"),ni=Ie((async(t,e)=>{t=await oi(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");null==i||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a}),"calculateMathMLDimensions"),oi=Ie((async(t,e)=>{if(!ai(t))return t;if(!(ri()||e.legacyMathML||e.forceLegacyMathML))return t.replace(ii,"MathML is unsupported in this environment.");const{default:r}=await B((async()=>{const{default:t}=await import("./katex-DEYOxkAH.js");return{default:t}}),[],import.meta.url),i=e.forceLegacyMathML||!ri()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Or).map((t=>ai(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`)).join("").replace(ii,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))}),"renderKatex"),si={getRows:Rr,sanitizeText:Wr,sanitizeTextOrArray:jr,hasBreaks:Hr,splitBreaks:Ur,lineBreakRegex:Or,removeScript:qr,getUrl:Gr,evaluate:Xr,getMax:Zr,getMin:Qr},li=Ie((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),hi=Ie((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),ci=Ie((function(t,e,r,i){const a=hi(e,r,i);li(t,a)}),"configureSvgSize"),di=Ie((function(t,e,r,i){const a=e.node().getBBox(),n=a.width,o=a.height;Pe.info(`SVG bounds: ${n}x${o}`,a);let s=0,l=0;Pe.info(`Graph bounds: ${s}x${l}`,t),s=n+2*r,l=o+2*r,Pe.info(`Calculated bounds: ${s}x${l}`),ci(e,l,s,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),ui={},pi=Ie(((t,e,r)=>{let i="";return t in ui&&ui[t]?i=ui[t](r):Pe.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),gi=Ie(((t,e)=>{void 0!==e&&(ui[t]=e)}),"addStylesForDiagram"),fi=pi,mi={};Oe(mi,{clear:()=>Ci,getAccDescription:()=>vi,getAccTitle:()=>Si,getDiagramTitle:()=>Li,setAccDescription:()=>Ti,setAccTitle:()=>wi,setDiagramTitle:()=>Bi});var yi="",xi="",bi="",ki=Ie((t=>Wr(t,Mr())),"sanitizeText"),Ci=Ie((()=>{yi="",bi="",xi=""}),"clear"),wi=Ie((t=>{yi=ki(t).replace(/^\s+/g,"")}),"setAccTitle"),Si=Ie((()=>yi),"getAccTitle"),Ti=Ie((t=>{bi=ki(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),vi=Ie((()=>bi),"getAccDescription"),Bi=Ie((t=>{xi=ki(t)}),"setDiagramTitle"),Li=Ie((()=>xi),"getDiagramTitle"),Mi=Pe,_i=ze,Ai=Mr,Fi=Lr,$i=xr,Ei=Ie((t=>Wr(t,Ai())),"sanitizeText"),Di=di,Ii=Ie((()=>mi),"getCommonDb"),Oi={},Ri=Ie(((t,e,r)=>{var i;Oi[t]&&Mi.warn(`Diagram with id ${t} already registered. Overwriting.`),Oi[t]=e,r&&Ge(t,r),gi(t,e.styles),null==(i=e.injectUtils)||i.call(e,Mi,_i,Ai,Ei,Di,Ii(),(()=>{}))}),"registerDiagram"),Pi=Ie((t=>{if(t in Oi)return Oi[t];throw new zi(t)}),"getDiagram"),zi=(o=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},Ie(o,"DiagramNotFoundError"),o);function qi(t){return null==t}function Ni(t){return"object"==typeof t&&null!==t}function Wi(t){return Array.isArray(t)?t:qi(t)?[]:[t]}function ji(t,e){var r,i,a,n;if(e)for(r=0,i=(n=Object.keys(e)).length;r<i;r+=1)t[a=n[r]]=e[a];return t}function Hi(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function Ui(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Ie(qi,"isNothing"),Ie(Ni,"isObject"),Ie(Wi,"toArray"),Ie(ji,"extend"),Ie(Hi,"repeat"),Ie(Ui,"isNegativeZero");var Yi={isNothing:qi,isObject:Ni,toArray:Wi,repeat:Hi,isNegativeZero:Ui,extend:ji};function Vi(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function Gi(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Vi(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Ie(Vi,"formatError"),Ie(Gi,"YAMLException$1"),Gi.prototype=Object.create(Error.prototype),Gi.prototype.constructor=Gi,Gi.prototype.toString=Ie((function(t){return this.name+": "+Vi(this,t)}),"toString");var Xi=Gi;function Zi(t,e,r,i,a){var n="",o="",s=Math.floor(a/2)-1;return i-e>s&&(e=i-s+(n=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:n+t.slice(e,r).replace(/\t/g,"→")+o,pos:i-e+n.length}}function Qi(t,e){return Yi.repeat(" ",e-t.length)+t}function Ji(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],n=[],o=-1;r=i.exec(t.buffer);)n.push(r.index),a.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=a.length-2);o<0&&(o=a.length-1);var s,l,h="",c=Math.min(t.line+e.linesAfter,n.length).toString().length,d=e.maxLength-(e.indent+c+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=Zi(t.buffer,a[o-s],n[o-s],t.position-(a[o]-a[o-s]),d),h=Yi.repeat(" ",e.indent)+Qi((t.line-s+1).toString(),c)+" | "+l.str+"\n"+h;for(l=Zi(t.buffer,a[o],n[o],t.position,d),h+=Yi.repeat(" ",e.indent)+Qi((t.line+1).toString(),c)+" | "+l.str+"\n",h+=Yi.repeat("-",e.indent+c+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=n.length);s++)l=Zi(t.buffer,a[o+s],n[o+s],t.position-(a[o]-a[o+s]),d),h+=Yi.repeat(" ",e.indent)+Qi((t.line+s+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}Ie(Zi,"getLine"),Ie(Qi,"padStart"),Ie(Ji,"makeSnippet");var Ki=Ji,ta=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ea=["scalar","sequence","mapping"];function ra(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function ia(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===ta.indexOf(e))throw new Xi('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=ra(e.styleAliases||null),-1===ea.indexOf(this.kind))throw new Xi('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Ie(ra,"compileStyleAliases"),Ie(ia,"Type$1");var aa=ia;function na(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function oa(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Ie(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function sa(t){return this.extend(t)}Ie(na,"compileList"),Ie(oa,"compileMap"),Ie(sa,"Schema$1"),sa.prototype.extend=Ie((function(t){var e=[],r=[];if(t instanceof aa)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Xi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof aa))throw new Xi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Xi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Xi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(t){if(!(t instanceof aa))throw new Xi("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(sa.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=na(i,"implicit"),i.compiledExplicit=na(i,"explicit"),i.compiledTypeMap=oa(i.compiledImplicit,i.compiledExplicit),i}),"extend");var la=new sa({explicit:[new aa("tag:yaml.org,2002:str",{kind:"scalar",construct:Ie((function(t){return null!==t?t:""}),"construct")}),new aa("tag:yaml.org,2002:seq",{kind:"sequence",construct:Ie((function(t){return null!==t?t:[]}),"construct")}),new aa("tag:yaml.org,2002:map",{kind:"mapping",construct:Ie((function(t){return null!==t?t:{}}),"construct")})]});function ha(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function ca(){return null}function da(t){return null===t}Ie(ha,"resolveYamlNull"),Ie(ca,"constructYamlNull"),Ie(da,"isNull");var ua=new aa("tag:yaml.org,2002:null",{kind:"scalar",resolve:ha,construct:ca,predicate:da,represent:{canonical:Ie((function(){return"~"}),"canonical"),lowercase:Ie((function(){return"null"}),"lowercase"),uppercase:Ie((function(){return"NULL"}),"uppercase"),camelcase:Ie((function(){return"Null"}),"camelcase"),empty:Ie((function(){return""}),"empty")},defaultStyle:"lowercase"});function pa(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function ga(t){return"true"===t||"True"===t||"TRUE"===t}function fa(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Ie(pa,"resolveYamlBoolean"),Ie(ga,"constructYamlBoolean"),Ie(fa,"isBoolean");var ma=new aa("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pa,construct:ga,predicate:fa,represent:{lowercase:Ie((function(t){return t?"true":"false"}),"lowercase"),uppercase:Ie((function(t){return t?"TRUE":"FALSE"}),"uppercase"),camelcase:Ie((function(t){return t?"True":"False"}),"camelcase")},defaultStyle:"lowercase"});function ya(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function xa(t){return 48<=t&&t<=55}function ba(t){return 48<=t&&t<=57}function ka(t){if(null===t)return!1;var e,r=t.length,i=0,a=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;a=!0}return a&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!ya(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!xa(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!ba(t.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===e)}function Ca(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function wa(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!Yi.isNegativeZero(t)}Ie(ya,"isHexCode"),Ie(xa,"isOctCode"),Ie(ba,"isDecCode"),Ie(ka,"resolveYamlInteger"),Ie(Ca,"constructYamlInteger"),Ie(wa,"isInteger");var Sa=new aa("tag:yaml.org,2002:int",{kind:"scalar",resolve:ka,construct:Ca,predicate:wa,represent:{binary:Ie((function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:Ie((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:Ie((function(t){return t.toString(10)}),"decimal"),hexadecimal:Ie((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ta=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function va(t){return null!==t&&!(!Ta.test(t)||"_"===t[t.length-1])}function Ba(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}Ie(va,"resolveYamlFloat"),Ie(Ba,"constructYamlFloat");var La=/^[-+]?[0-9]+e/;function Ma(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Yi.isNegativeZero(t))return"-0.0";return r=t.toString(10),La.test(r)?r.replace("e",".e"):r}function _a(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Yi.isNegativeZero(t))}Ie(Ma,"representYamlFloat"),Ie(_a,"isFloat");var Aa=new aa("tag:yaml.org,2002:float",{kind:"scalar",resolve:va,construct:Ba,predicate:_a,represent:Ma,defaultStyle:"lowercase"}),Fa=la.extend({implicit:[ua,ma,Sa,Aa]}),$a=Fa,Ea=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Da=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 Ia(t){return null!==t&&(null!==Ea.exec(t)||null!==Da.exec(t))}function Oa(t){var e,r,i,a,n,o,s,l,h=0,c=null;if(null===(e=Ea.exec(t))&&(e=Da.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,a,n,o,s,h)),c&&l.setTime(l.getTime()-c),l}function Ra(t){return t.toISOString()}Ie(Ia,"resolveYamlTimestamp"),Ie(Oa,"constructYamlTimestamp"),Ie(Ra,"representYamlTimestamp");var Pa=new aa("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ia,construct:Oa,instanceOf:Date,represent:Ra});function za(t){return"<<"===t||null===t}Ie(za,"resolveYamlMerge");var qa=new aa("tag:yaml.org,2002:merge",{kind:"scalar",resolve:za}),Na="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Wa(t){if(null===t)return!1;var e,r,i=0,a=t.length,n=Na;for(r=0;r<a;r++)if(!((e=n.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function ja(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=Na,o=0,s=[];for(e=0;e<a;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|n.indexOf(i.charAt(e));return 0===(r=a%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function Ha(t){var e,r,i="",a=0,n=t.length,o=Na;for(e=0;e<n;e++)e%3==0&&e&&(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]),a=(a<<8)+t[e];return 0===(r=n%3)?(i+=o[a>>18&63],i+=o[a>>12&63],i+=o[a>>6&63],i+=o[63&a]):2===r?(i+=o[a>>10&63],i+=o[a>>4&63],i+=o[a<<2&63],i+=o[64]):1===r&&(i+=o[a>>2&63],i+=o[a<<4&63],i+=o[64],i+=o[64]),i}function Ua(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Ie(Wa,"resolveYamlBinary"),Ie(ja,"constructYamlBinary"),Ie(Ha,"representYamlBinary"),Ie(Ua,"isBinary");var Ya=new aa("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Wa,construct:ja,predicate:Ua,represent:Ha}),Va=Object.prototype.hasOwnProperty,Ga=Object.prototype.toString;function Xa(t){if(null===t)return!0;var e,r,i,a,n,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(i=s[e],n=!1,"[object Object]"!==Ga.call(i))return!1;for(a in i)if(Va.call(i,a)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==o.indexOf(a))return!1;o.push(a)}return!0}function Za(t){return null!==t?t:[]}Ie(Xa,"resolveYamlOmap"),Ie(Za,"constructYamlOmap");var Qa=new aa("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Xa,construct:Za}),Ja=Object.prototype.toString;function Ka(t){if(null===t)return!0;var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],"[object Object]"!==Ja.call(i))return!1;if(1!==(a=Object.keys(i)).length)return!1;n[e]=[a[0],i[a[0]]]}return!0}function tn(t){if(null===t)return[];var e,r,i,a,n,o=t;for(n=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],a=Object.keys(i),n[e]=[a[0],i[a[0]]];return n}Ie(Ka,"resolveYamlPairs"),Ie(tn,"constructYamlPairs");var en=new aa("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ka,construct:tn}),rn=Object.prototype.hasOwnProperty;function an(t){if(null===t)return!0;var e,r=t;for(e in r)if(rn.call(r,e)&&null!==r[e])return!1;return!0}function nn(t){return null!==t?t:{}}Ie(an,"resolveYamlSet"),Ie(nn,"constructYamlSet");var on=new aa("tag:yaml.org,2002:set",{kind:"mapping",resolve:an,construct:nn}),sn=$a.extend({implicit:[Pa,qa],explicit:[Ya,Qa,en,on]}),ln=Object.prototype.hasOwnProperty,hn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cn=/[\x85\u2028\u2029]/,dn=/[,\[\]\{\}]/,un=/^(?:!|!!|![a-z\-]+!)$/i,pn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function gn(t){return Object.prototype.toString.call(t)}function fn(t){return 10===t||13===t}function mn(t){return 9===t||32===t}function yn(t){return 9===t||32===t||10===t||13===t}function xn(t){return 44===t||91===t||93===t||123===t||125===t}function bn(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function kn(t){return 120===t?2:117===t?4:85===t?8:0}function Cn(t){return 48<=t&&t<=57?t-48:-1}function wn(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Sn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}Ie(gn,"_class"),Ie(fn,"is_EOL"),Ie(mn,"is_WHITE_SPACE"),Ie(yn,"is_WS_OR_EOL"),Ie(xn,"is_FLOW_INDICATOR"),Ie(bn,"fromHexCode"),Ie(kn,"escapedHexLen"),Ie(Cn,"fromDecimalCode"),Ie(wn,"simpleEscapeSequence"),Ie(Sn,"charFromCodepoint");var Tn,vn=new Array(256),Bn=new Array(256);for(Tn=0;Tn<256;Tn++)vn[Tn]=wn(Tn)?1:0,Bn[Tn]=wn(Tn);function Ln(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||sn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Mn(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=Ki(r),new Xi(e,r)}function _n(t,e){throw Mn(t,e)}function An(t,e){t.onWarning&&t.onWarning.call(null,Mn(t,e))}Ie(Ln,"State$1"),Ie(Mn,"generateError"),Ie(_n,"throwError"),Ie(An,"throwWarning");var Fn={YAML:Ie((function(t,e,r){var i,a,n;null!==t.version&&_n(t,"duplication of %YAML directive"),1!==r.length&&_n(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&_n(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),1!==a&&_n(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,1!==n&&2!==n&&An(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:Ie((function(t,e,r){var i,a;2!==r.length&&_n(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],un.test(i)||_n(t,"ill-formed tag handle (first argument) of the TAG directive"),ln.call(t.tagMap,i)&&_n(t,'there is a previously declared suffix for "'+i+'" tag handle'),pn.test(a)||_n(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch(n){_n(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}),"handleTagDirective")};function $n(t,e,r,i){var a,n,o,s;if(e<r){if(s=t.input.slice(e,r),i)for(a=0,n=s.length;a<n;a+=1)9===(o=s.charCodeAt(a))||32<=o&&o<=1114111||_n(t,"expected valid JSON character");else hn.test(s)&&_n(t,"the stream contains non-printable characters");t.result+=s}}function En(t,e,r,i){var a,n,o,s;for(Yi.isObject(r)||_n(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(a=Object.keys(r)).length;o<s;o+=1)n=a[o],ln.call(e,n)||(e[n]=r[n],i[n]=!0)}function Dn(t,e,r,i,a,n,o,s,l){var h,c;if(Array.isArray(a))for(h=0,c=(a=Array.prototype.slice.call(a)).length;h<c;h+=1)Array.isArray(a[h])&&_n(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===gn(a[h])&&(a[h]="[object Object]");if("object"==typeof a&&"[object Object]"===gn(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(n))for(h=0,c=n.length;h<c;h+=1)En(t,e,n[h],r);else En(t,e,n,r);else t.json||ln.call(r,a)||!ln.call(e,a)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,_n(t,"duplicated mapping key")),"__proto__"===a?Object.defineProperty(e,a,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[a]=n,delete r[a];return e}function In(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):_n(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function On(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);0!==a;){for(;mn(a);)9===a&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&35===a)do{a=t.input.charCodeAt(++t.position)}while(10!==a&&13!==a&&0!==a);if(!fn(a))break;for(In(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&An(t,"deficient indentation"),i}function Rn(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!yn(e)))}function Pn(t,e){1===e?t.result+=" ":e>1&&(t.result+=Yi.repeat("\n",e-1))}function zn(t,e,r){var i,a,n,o,s,l,h,c,d=t.kind,u=t.result;if(yn(c=t.input.charCodeAt(t.position))||xn(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(yn(i=t.input.charCodeAt(t.position+1))||r&&xn(i)))return!1;for(t.kind="scalar",t.result="",a=n=t.position,o=!1;0!==c;){if(58===c){if(yn(i=t.input.charCodeAt(t.position+1))||r&&xn(i))break}else if(35===c){if(yn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Rn(t)||r&&xn(c))break;if(fn(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,On(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=n,t.line=s,t.lineStart=l,t.lineIndent=h;break}}o&&($n(t,a,n,!1),Pn(t,t.line-s),a=n=t.position,o=!1),mn(c)||(n=t.position+1),c=t.input.charCodeAt(++t.position)}return $n(t,a,n,!1),!!t.result||(t.kind=d,t.result=u,!1)}function qn(t,e){var r,i,a;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if($n(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,a=t.position}else fn(r)?($n(t,i,a,!0),Pn(t,On(t,!1,e)),i=a=t.position):t.position===t.lineStart&&Rn(t)?_n(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);_n(t,"unexpected end of the stream within a single quoted scalar")}function Nn(t,e){var r,i,a,n,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return $n(t,r,t.position,!0),t.position++,!0;if(92===s){if($n(t,r,t.position,!0),fn(s=t.input.charCodeAt(++t.position)))On(t,!1,e);else if(s<256&&vn[s])t.result+=Bn[s],t.position++;else if((o=kn(s))>0){for(a=o,n=0;a>0;a--)(o=bn(s=t.input.charCodeAt(++t.position)))>=0?n=(n<<4)+o:_n(t,"expected hexadecimal character");t.result+=Sn(n),t.position++}else _n(t,"unknown escape sequence");r=i=t.position}else fn(s)?($n(t,r,i,!0),Pn(t,On(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Rn(t)?_n(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}_n(t,"unexpected end of the stream within a double quoted scalar")}function Wn(t,e){var r,i,a,n,o,s,l,h,c,d,u,p,g=!0,f=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,n=[];else{if(123!==p)return!1;o=125,h=!0,n={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(++t.position);0!==p;){if(On(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=f,t.anchor=m,t.kind=h?"mapping":"sequence",t.result=n,!0;g?44===p&&_n(t,"expected the node content, but found ','"):_n(t,"missed comma between flow collection entries"),u=null,s=l=!1,63===p&&yn(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,On(t,!0,e)),r=t.line,i=t.lineStart,a=t.position,Xn(t,e,1,!1,!0),d=t.tag,c=t.result,On(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),On(t,!0,e),Xn(t,e,1,!1,!0),u=t.result),h?Dn(t,n,y,d,c,u,r,i,a):s?n.push(Dn(t,null,y,d,c,u,r,i,a)):n.push(c),On(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}_n(t,"unexpected end of the stream within a flow collection")}function jn(t,e){var r,i,a,n,o=1,s=!1,l=!1,h=e,c=0,d=!1;if(124===(n=t.input.charCodeAt(t.position)))i=!1;else{if(62!==n)return!1;i=!0}for(t.kind="scalar",t.result="";0!==n;)if(43===(n=t.input.charCodeAt(++t.position))||45===n)1===o?o=43===n?3:2:_n(t,"repeat of a chomping mode identifier");else{if(!((a=Cn(n))>=0))break;0===a?_n(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?_n(t,"repeat of an indentation width identifier"):(h=e+a-1,l=!0)}if(mn(n)){do{n=t.input.charCodeAt(++t.position)}while(mn(n));if(35===n)do{n=t.input.charCodeAt(++t.position)}while(!fn(n)&&0!==n)}for(;0!==n;){for(In(t),t.lineIndent=0,n=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),fn(n))c++;else{if(t.lineIndent<h){3===o?t.result+=Yi.repeat("\n",s?1+c:c):1===o&&s&&(t.result+="\n");break}for(i?mn(n)?(d=!0,t.result+=Yi.repeat("\n",s?1+c:c)):d?(d=!1,t.result+=Yi.repeat("\n",c+1)):0===c?s&&(t.result+=" "):t.result+=Yi.repeat("\n",c):t.result+=Yi.repeat("\n",s?1+c:c),s=!0,l=!0,c=0,r=t.position;!fn(n)&&0!==n;)n=t.input.charCodeAt(++t.position);$n(t,r,t.position,!1)}}return!0}function Hn(t,e){var r,i,a=t.tag,n=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,_n(t,"tab characters must not be used in indentation")),45===i)&&yn(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,On(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Xn(t,e,3,!1,!0),o.push(t.result),On(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)_n(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=a,t.anchor=n,t.kind="sequence",t.result=o,!0)}function Un(t,e,r){var i,a,n,o,s,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,m=null,y=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,_n(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),n=t.line,63!==h&&58!==h||!yn(i)){if(o=t.line,s=t.lineStart,l=t.position,!Xn(t,r,2,!1,!0))break;if(t.line===n){for(h=t.input.charCodeAt(t.position);mn(h);)h=t.input.charCodeAt(++t.position);if(58===h)yn(h=t.input.charCodeAt(++t.position))||_n(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Dn(t,u,p,g,f,null,o,s,l),g=f=m=null),x=!0,y=!1,a=!1,g=t.tag,f=t.result;else{if(!x)return t.tag=c,t.anchor=d,!0;_n(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=c,t.anchor=d,!0;_n(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(y&&(Dn(t,u,p,g,f,null,o,s,l),g=f=m=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):_n(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===n||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),Xn(t,e,4,!0,a)&&(y?f=t.result:m=t.result),y||(Dn(t,u,p,g,f,m,o,s,l),g=f=m=null),On(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&0!==h)_n(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Dn(t,u,p,g,f,null,o,s,l),x&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),x}function Yn(t){var e,r,i,a,n=!1,o=!1;if(33!==(a=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&_n(t,"duplication of a tag property"),60===(a=t.input.charCodeAt(++t.position))?(n=!0,a=t.input.charCodeAt(++t.position)):33===a?(o=!0,r="!!",a=t.input.charCodeAt(++t.position)):r="!",e=t.position,n){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&62!==a);t.position<t.length?(i=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):_n(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!yn(a);)33===a&&(o?_n(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),un.test(r)||_n(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),dn.test(i)&&_n(t,"tag suffix cannot contain flow indicator characters")}i&&!pn.test(i)&&_n(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(s){_n(t,"tag name is malformed: "+i)}return n?t.tag=i:ln.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:_n(t,'undeclared tag handle "'+r+'"'),!0}function Vn(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&_n(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!yn(r)&&!xn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&_n(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Gn(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!yn(i)&&!xn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&_n(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),ln.call(t.anchorMap,r)||_n(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],On(t,!0,-1),!0}function Xn(t,e,r,i,a){var n,o,s,l,h,c,d,u,p,g=1,f=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=o=s=4===r||3===r,i&&On(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;Yn(t)||Vn(t);)On(t,!0,-1)?(f=!0,s=n,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):s=!1;if(s&&(s=f||a),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?s&&(Hn(t,p)||Un(t,p,u))||Wn(t,u)?m=!0:(o&&jn(t,u)||qn(t,u)||Nn(t,u)?m=!0:Gn(t)?(m=!0,null===t.tag&&null===t.anchor||_n(t,"alias node should not have any properties")):zn(t,u,1===r)&&(m=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(m=s&&Hn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&_n(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(ln.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||_n(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&_n(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):_n(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function Zn(t){var e,r,i,a,n=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(a=t.input.charCodeAt(t.position))&&(On(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==a));){for(o=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!yn(a);)a=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&_n(t,"directive name must not be less than one character in length");0!==a;){for(;mn(a);)a=t.input.charCodeAt(++t.position);if(35===a){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&!fn(a));break}if(fn(a))break;for(e=t.position;0!==a&&!yn(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==a&&In(t),ln.call(Fn,r)?Fn[r](t,r,i):An(t,'unknown document directive "'+r+'"')}On(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,On(t,!0,-1)):o&&_n(t,"directives end mark is expected"),Xn(t,t.lineIndent-1,4,!1,!0),On(t,!0,-1),t.checkLineBreaks&&cn.test(t.input.slice(n,t.position))&&An(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Rn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,On(t,!0,-1)):t.position<t.length-1&&_n(t,"end of the stream or a document separator is expected")}function Qn(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Ln(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,_n(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Zn(r);return r.documents}function Jn(t,e){var r=Qn(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new Xi("expected a single document in the stream, but found more")}}Ie($n,"captureSegment"),Ie(En,"mergeMappings"),Ie(Dn,"storeMappingPair"),Ie(In,"readLineBreak"),Ie(On,"skipSeparationSpace"),Ie(Rn,"testDocumentSeparator"),Ie(Pn,"writeFoldedLines"),Ie(zn,"readPlainScalar"),Ie(qn,"readSingleQuotedScalar"),Ie(Nn,"readDoubleQuotedScalar"),Ie(Wn,"readFlowCollection"),Ie(jn,"readBlockScalar"),Ie(Hn,"readBlockSequence"),Ie(Un,"readBlockMapping"),Ie(Yn,"readTagProperty"),Ie(Vn,"readAnchorProperty"),Ie(Gn,"readAlias"),Ie(Xn,"composeNode"),Ie(Zn,"readDocument"),Ie(Qn,"loadDocuments"),Ie((function(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=Qn(t,r);if("function"!=typeof e)return i;for(var a=0,n=i.length;a<n;a+=1)e(i[a])}),"loadAll$1"),Ie(Jn,"load$1");var Kn={load:Jn},to=Object.prototype.toString,eo=Object.prototype.hasOwnProperty,ro=65279,io={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ao=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],no=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function oo(t,e){var r,i,a,n,o,s,l;if(null===e)return{};for(r={},a=0,n=(i=Object.keys(e)).length;a<n;a+=1)o=i[a],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&eo.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function so(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new Xi("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+Yi.repeat("0",i-e.length)+e}Ie(oo,"compileStyleMap"),Ie(so,"encodeHex");function lo(t){this.schema=t.schema||sn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Yi.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=oo(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ho(t,e){for(var r,i=Yi.repeat(" ",e),a=0,n=-1,o="",s=t.length;a<s;)-1===(n=t.indexOf("\n",a))?(r=t.slice(a),a=s):(r=t.slice(a,n+1),a=n+1),r.length&&"\n"!==r&&(o+=i),o+=r;return o}function co(t,e){return"\n"+Yi.repeat(" ",t.indent*e)}function uo(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function po(t){return 32===t||9===t}function go(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==ro||65536<=t&&t<=1114111}function fo(t){return go(t)&&t!==ro&&13!==t&&10!==t}function mo(t,e,r){var i=fo(t),a=i&&!po(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!a)||fo(e)&&!po(e)&&35===t||58===e&&a}function yo(t){return go(t)&&t!==ro&&!po(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function xo(t){return!po(t)&&58!==t}function bo(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function ko(t){return/^\n* /.test(t)}Ie(lo,"State"),Ie(ho,"indentString"),Ie(co,"generateNextLine"),Ie(uo,"testImplicitResolving"),Ie(po,"isWhitespace"),Ie(go,"isPrintable"),Ie(fo,"isNsCharOrWhitespace"),Ie(mo,"isPlainSafe"),Ie(yo,"isPlainSafeFirst"),Ie(xo,"isPlainSafeLast"),Ie(bo,"codePointAt"),Ie(ko,"needIndentIndicator");function Co(t,e,r,i,a,n,o,s){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=yo(bo(t,0))&&xo(bo(t,t.length-1));if(e||o)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!go(h=bo(t,l)))return 5;f=f&&mo(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=bo(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!go(h))return 5;f=f&&mo(h,c,s),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&ko(t)?5:o?2===n?5:2:u?4:3:!f||o||a(t)?2===n?5:2:1}function wo(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==ao.indexOf(e)||no.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return uo(t,e)}switch(Ie(l,"testAmbiguity"),Co(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+So(e,t.indent)+To(ho(e,n));case 4:return">"+So(e,t.indent)+To(ho(vo(e,o),n));case 5:return'"'+Lo(e)+'"';default:throw new Xi("impossible error: invalid scalar style")}}()}function So(t,e){var r=ko(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function To(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function vo(t,e){for(var r,i,a,n=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,n.lastIndex=r,Bo(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];a=n.exec(t);){var l=a[1],h=a[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+Bo(h,e),s=i}return o}function Bo(t,e){if(""===t||" "===t[0])return t;for(var r,i,a=/ [^ ]/g,n=0,o=0,s=0,l="";r=a.exec(t);)(s=r.index)-n>e&&(i=o>n?o:s,l+="\n"+t.slice(n,i),n=i+1),o=s;return l+="\n",t.length-n>e&&o>n?l+=t.slice(n,o)+"\n"+t.slice(o+1):l+=t.slice(n),l.slice(1)}function Lo(t){for(var e,r="",i=0,a=0;a<t.length;i>=65536?a+=2:a++)i=bo(t,a),!(e=io[i])&&go(i)?(r+=t[a],i>=65536&&(r+=t[a+1])):r+=e||so(i);return r}function Mo(t,e,r){var i,a,n,o="",s=t.tag;for(i=0,a=r.length;i<a;i+=1)n=r[i],t.replacer&&(n=t.replacer.call(r,String(i),n)),(Eo(t,e,n,!1,!1)||void 0===n&&Eo(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function _o(t,e,r,i){var a,n,o,s="",l=t.tag;for(a=0,n=r.length;a<n;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(Eo(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Eo(t,e+1,null,!0,!0,!1,!0))&&(i&&""===s||(s+=co(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ao(t,e,r){var i,a,n,o,s,l="",h=t.tag,c=Object.keys(r);for(i=0,a=c.length;i<a;i+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[n=c[i]],t.replacer&&(o=t.replacer.call(r,n,o)),Eo(t,e,n,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Eo(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Fo(t,e,r,i){var a,n,o,s,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new Xi("sortKeys must be a boolean or a function");for(a=0,n=u.length;a<n;a+=1)h="",i&&""===c||(h+=co(t,e)),s=r[o=u[a]],t.replacer&&(s=t.replacer.call(r,o,s)),Eo(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=co(t,e)),Eo(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function $o(t,e,r){var i,a,n,o,s,l;for(n=0,o=(a=r?t.explicitTypes:t.implicitTypes).length;n<o;n+=1)if(((s=a[n]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===to.call(s.represent))i=s.represent(e,l);else{if(!eo.call(s.represent,l))throw new Xi("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Eo(t,e,r,i,a,n,o){t.tag=null,t.dump=r,$o(t,r,!1)||$o(t,r,!0);var s,l=to.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(a=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Fo(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(Ao(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?_o(t,e-1,t.dump,a):_o(t,e,t.dump,a),d&&(t.dump="&ref_"+c+t.dump)):(Mo(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new Xi("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&wo(t,t.dump,e,n,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Do(t,e){var r,i,a=[],n=[];for(Io(t,a,n),r=0,i=n.length;r<i;r+=1)e.duplicates.push(a[n[r]]);e.usedDuplicates=new Array(i)}function Io(t,e,r){var i,a,n;if(null!==t&&"object"==typeof t)if(-1!==(a=e.indexOf(t)))-1===r.indexOf(a)&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)Io(t[a],e,r);else for(a=0,n=(i=Object.keys(t)).length;a<n;a+=1)Io(t[i[a]],e,r)}Ie(Co,"chooseScalarStyle"),Ie(wo,"writeScalar"),Ie(So,"blockHeader"),Ie(To,"dropEndingNewline"),Ie(vo,"foldString"),Ie(Bo,"foldLine"),Ie(Lo,"escapeString"),Ie(Mo,"writeFlowSequence"),Ie(_o,"writeBlockSequence"),Ie(Ao,"writeFlowMapping"),Ie(Fo,"writeBlockMapping"),Ie($o,"detectType"),Ie(Eo,"writeNode"),Ie(Do,"getDuplicateReferences"),Ie(Io,"inspectNode"),Ie((function(t,e){var r=new lo(e=e||{});r.noRefs||Do(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Eo(r,0,i,!0,!0)?r.dump+"\n":""}),"dump$1"),Ie((function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}),"renamed");var Oo=Fa,Ro=Kn.load;
|
|
3
|
-
/*! Bundled license information:
|
|
4
|
-
|
|
5
|
-
js-yaml/dist/js-yaml.mjs:
|
|
6
|
-
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
7
|
-
*/
|
|
8
|
-
const Po=Object.freeze({left:0,top:0,width:16,height:16}),zo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),qo=Object.freeze({...Po,...zo}),No=Object.freeze({...qo,body:"",hidden:!1}),Wo=Object.freeze({width:null,height:null}),jo=Object.freeze({...Wo,...zo}),Ho=/^[a-z0-9]+(-[a-z0-9]+)*$/,Uo=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(Ho)||!(e&&""===t.prefix||t.prefix.match(Ho))||!t.name.match(Ho));function Yo(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in No)i in zo?i in t&&!(i in r)&&(r[i]=zo[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Vo(t,e,r){const i=t.icons,a=t.aliases||Object.create(null);let n={};function o(t){n=Yo(i[t]||a[t],n)}return o(e),r.forEach(o),Yo(t,n)}function Go(t,e){if(t.icons[e])return Vo(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach((function t(e){if(r[e])return a[e]=[];if(!(e in a)){a[e]=null;const r=i[e]&&i[e].parent,n=r&&t(r);n&&(a[e]=[r].concat(n))}return a[e]})),a}(t,[e])[e];return r?Vo(t,e,r):null}const Xo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Zo=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Qo(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(Xo);if(null===i||!i.length)return t;const a=[];let n=i.shift(),o=Zo.test(n);for(;;){if(o){const t=parseFloat(n);isNaN(t)?a.push(n):a.push(Math.ceil(t*e*r)/r)}else a.push(n);if(n=i.shift(),void 0===n)return a.join("");o=!o}}const Jo=/\sid="(\S+)"/g,Ko="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let ts=0;var es,rs,is={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},as=new Map,ns=new Map,os=Ie((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Pe.debug("Registering icon pack:",e.name),"loader"in e)ns.set(e.name,e.loader);else{if(!("icons"in e))throw Pe.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');as.set(e.name,e.icons)}}}),"registerIconPacks"),ss=Ie((async(t,e)=>{const r=((t,e,r,i="")=>{const a=t.split(":");if("@"===t.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 t=a.pop(),e=a.pop(),r={provider:a.length>0?a[0]:i,prefix:e,name:t};return Uo(r)?r:null}const n=a[0],o=n.split("-");if(o.length>1){const t={provider:i,prefix:o.shift(),name:o.join("-")};return Uo(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:n};return Uo(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=as.get(i);if(!a){const t=ns.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},as.set(i,a)}catch(o){throw Pe.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=Go(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n}),"getRegisteredIconData"),ls=Ie((async(t,e)=>{let r;try{r=await ss(t,null==e?void 0:e.fallbackPrefix)}catch(a){Pe.error(a),r=is}const i=function(t,e){const r={...qo,...t},i={...jo,...e},a={left:r.left,top:r.top,width:r.width,height:r.height};let n=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),e.push("scale(-1 1)"),a.top=a.left=0):i&&(e.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),e.push("scale(1 -1)"),a.top=a.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=a.height/2+a.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:o=a.width/2+a.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(a.left!==a.top&&(o=a.left,a.left=a.top,a.top=o),a.width!==a.height&&(o=a.width,a.width=a.height,a.height=o)),e.length&&(n=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const a=t.indexOf(">",i),n=t.indexOf("</"+e);if(-1===a||-1===n)break;const o=t.indexOf(">",n);if(-1===o)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return a=i.defs,n=e+i.content+r,a?"<defs>"+a+"</defs>"+n:n;var a,n}(n,'<g transform="'+e.join(" ")+'">',"</g>"))}));const o=i.width,s=i.height,l=a.width,h=a.height;let c,d;null===o?(d=null===s?"1em":"auto"===s?h:s,c=Qo(d,l/h)):(c="auto"===o?l:o,d=null===s?Qo(c,h/l):"auto"===s?h:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[a.left,a.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:n}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t,e=Ko){const r=[];let i;for(;i=Jo.exec(t);)r.push(i[1]);if(!r.length)return t;const a="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const i="function"==typeof e?e(r):e+(ts++).toString(),n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+i+a+"$3")})),t=t.replace(new RegExp(a,"g"),"")}(i.body),i.attributes)}),"getIconSVG"),hs=Ie((({flowchart:t})=>{var e,r;const i=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,a=(null==(r=null==t?void 0:t.subGraphTitleMargin)?void 0:r.bottom)??0;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:i+a}}),"getSubGraphTitleMargins"),cs={},ds={};var us=function(){if(rs)return cs;rs=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.sanitizeUrl=void 0;var t=(es||(es=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.BLANK_URL=ds.relativeFirstCharacters=ds.whitespaceEscapeCharsRegex=ds.urlSchemeRegex=ds.ctrlCharactersRegex=ds.htmlCtrlEntityRegex=ds.htmlEntitiesRegex=ds.invalidProtocolRegex=void 0,ds.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ds.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ds.htmlCtrlEntityRegex=/&(newline|tab);/gi,ds.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ds.urlSchemeRegex=/^.+(:|:)/gim,ds.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ds.relativeFirstCharacters=[".","/"],ds.BLANK_URL="about:blank"),ds);function e(t){try{return decodeURIComponent(t)}catch(e){return t}}return cs.sanitizeUrl=function(r){if(!r)return t.BLANK_URL;var i,a,n=e(r.trim());do{i=(n=e(n=(a=n,a.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim())).match(t.ctrlCharactersRegex)||n.match(t.htmlEntitiesRegex)||n.match(t.htmlCtrlEntityRegex)||n.match(t.whitespaceEscapeCharsRegex)}while(i&&i.length>0);var o=n;if(!o)return t.BLANK_URL;if(function(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(t.urlSchemeRegex);if(!l)return o;var h=l[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(h))return t.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return t.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c},cs}(),ps="",gs={curveBasis:K,curveBasisClosed:J,curveBasisOpen:Q,curveBumpX:function(t){return new it(t,!0)},curveBumpY:function(t){return new it(t,!1)},curveBundle:Z,curveCardinalClosed:X,curveCardinalOpen:G,curveCardinal:V,curveCatmullRomClosed:Y,curveCatmullRomOpen:U,curveCatmullRom:H,curveLinear:j,curveLinearClosed:W,curveMonotoneX:N,curveMonotoneY:q,curveNatural:z,curveStep:P,curveStepAfter:R,curveStepBefore:O},fs=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ms=Ie((function(t,e){const r=ys(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map((t=>t.args));mr(t),i=Qe(i,[...t])}else i=r.args;if(!i)return;let a=Ye(t,e);const n="config";return void 0!==i[n]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[n],delete i[n]),i}),"detectInit"),ys=Ie((function(t,e=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${fs.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(a,"").replace(/'/gm,'"'),Pe.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=We.exec(t));)if(n.index===We.lastIndex&&We.lastIndex++,n&&!e||e&&(null==(r=n[1])?void 0:r.match(e))||e&&(null==(i=n[2])?void 0:i.match(e))){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(a){return Pe.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),xs=Ie((function(t){return t.replace(We,"")}),"removeDirectives"),bs=Ie((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function ks(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return gs[r]??e}function Cs(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?us.sanitizeUrl(r):r}Ie(ks,"interpolateToCurve"),Ie(Cs,"formatUrl");var ws=Ie(((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let n=window;for(let o=0;o<i;o++)if(n=n[r[o]],!n)return void Pe.error(`Function name: ${t} not found in window`);n[a](...e)}),"runFunc");function Ss(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Ts(t){let e,r=0;t.forEach((t=>{r+=Ss(t,e),e=t}));return Ls(t,r/2)}function vs(t){return 1===t.length?t[0]:Ts(t)}Ie(Ss,"distance"),Ie(Ts,"traverseEdge"),Ie(vs,"calcLabelPosition");var Bs=Ie(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),Ls=Ie(((t,e)=>{let r,i=e;for(const a of t){if(r){const t=Ss(a,r);if(t<i)i-=t;else{const e=i/t;if(e<=0)return r;if(e>=1)return{x:a.x,y:a.y};if(e>0&&e<1)return{x:Bs((1-e)*r.x+e*a.x,5),y:Bs((1-e)*r.y+e*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),Ms=Ie(((t,e,r)=>{Pe.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Ls(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(e[0].x+i.x)/2,o.y=-Math.cos(n)*a+(e[0].y+i.y)/2,o}),"calcCardinalityPosition");function _s(t,e,r){const i=structuredClone(r);Pe.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=Ls(i,25+t),n=10+.5*t,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):"end_right"===e?(s.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):"end_left"===e?(s.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(s.x=Math.sin(o)*n+(i[0].x+a.x)/2,s.y=-Math.cos(o)*n+(i[0].y+a.y)/2),s}function As(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}Ie(_s,"calcTerminalLabelPosition"),Ie(As,"getStylesFromArray");var Fs=0,$s=Ie((()=>(Fs++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Fs)),"generateId");function Es(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}Ie(Es,"makeRandomHex");var Ds=Ie((t=>Es(t.length)),"random"),Is=Ie((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"),Os=Ie((function(t,e){const r=e.text.replace(si.lineBreakRegex," "),[,i]=Vs(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const n=a.append("tspan");return n.attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),a}),"drawSimpleText"),Rs=L(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),si.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let n="";return i.forEach(((t,o)=>{const s=qs(`${t} `,r),l=qs(n,r);if(s>e){const{hyphenatedStrings:i,remainingWord:o}=Ps(t,e,"-",r);a.push(n,...i),n=o}else l+s>=e?(a.push(n),n=t):n=[n,t].filter(Boolean).join(" ");o+1===i.length&&a.push(n)})),a.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),Ps=L(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...t],n=[];let o="";return a.forEach(((t,s)=>{const l=`${o}${t}`;if(qs(l,i)>=e){const t=s+1,e=a.length===t,i=`${l}${r}`;n.push(e?l:i),o=""}else o=l})),{hyphenatedStrings:n,remainingWord:o}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function zs(t,e){return Ws(t,e).height}function qs(t,e){return Ws(t,e).width}Ie(zs,"calculateTextHeight"),Ie(qs,"calculateTextWidth");var Ns,Ws=L(((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,n]=Vs(r),o=["sans-serif",i],s=t.split(si.lineBreakRegex),l=[],h=I("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const d of o){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of s){const i=Is();i.text=r||"";const o=Os(c,i).style("font-size",n).style("font-weight",a).style("font-family",d),s=(o._groups||o)[0][0].getBBox();if(0===s.width&&0===s.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,s.width)),t=Math.round(s.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}c.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),js=(Ie(s=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}},"InitIDGenerator"),s),Hs=Ie((function(t){return Ns=Ns||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ns.innerHTML=t,unescape(Ns.textContent)}),"entityDecode");function Us(t){return"str"in t}Ie(Us,"isDetailedError");var Ys=Ie(((t,e,r,i)=>{var a;if(!i)return;const n=null==(a=t.node())?void 0:a.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Vs=Ie((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function Gs(t,e){return M({},t,e)}Ie(Gs,"cleanAndMerge");var Xs={assignWithDepth:Qe,wrapLabel:Rs,calculateTextHeight:zs,calculateTextWidth:qs,calculateTextDimensions:Ws,cleanAndMerge:Gs,detectInit:ms,detectDirective:ys,isSubstringInArray:bs,interpolateToCurve:ks,calcLabelPosition:vs,calcCardinalityPosition:Ms,calcTerminalLabelPosition:_s,formatUrl:Cs,getStylesFromArray:As,generateId:$s,random:Ds,runFunc:ws,entityDecode:Hs,insertTitle:Ys,parseFontSize:Vs,InitIDGenerator:js},Zs=Ie((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),Qs=Ie((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Js=Ie(((t,e,{counter:r=0,prefix:i,suffix:a})=>`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`),"getEdgeId");function Ks(t){return t??null}function tl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}Ie(Ks,"handleUndefinedAttr");let el={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function rl(t){el=t}const il=/[&<>"']/,al=new RegExp(il.source,"g"),nl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ol=new RegExp(nl.source,"g"),sl={"&":"&","<":"<",">":">",'"':""","'":"'"},ll=t=>sl[t];function hl(t,e){if(e){if(il.test(t))return t.replace(al,ll)}else if(nl.test(t))return t.replace(ol,ll);return t}const cl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const dl=/(^|[^\[])\^/g;function ul(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let a="string"==typeof e?e:e.source;return a=a.replace(dl,"$1"),r=r.replace(t,a),i},getRegex:()=>new RegExp(r,e)};return i}function pl(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const gl={exec:()=>null};function fl(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,a=e;for(;--a>=0&&"\\"===r[a];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function ml(t,e,r){const i=t.length;if(0===i)return"";let a=0;for(;a<i;){if(t.charAt(i-a-1)!==e)break;a++}return t.slice(0,i-a)}function yl(t,e,r,i){const a=e.href,n=e.title?hl(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){i.state.inLink=!0;const t={type:"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,t}return{type:"image",raw:r,href:a,title:n,text:hl(o)}}class xl{constructor(t){f(this,"options"),f(this,"rules"),f(this,"lexer"),this.options=t||el}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ml(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=ml(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ml(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=ml(e[0],"\n").split("\n"),r="",i="";const a=[];for(;t.length>0;){let e=!1;const n=[];let o;for(o=0;o<t.length;o++)if(/^ {0,3}>/.test(t[o]))n.push(t[o]),e=!0;else{if(e)break;n.push(t[o])}t=t.slice(o);const s=n.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,a,!0),this.lexer.state.top=h,0===t.length)break;const c=a[a.length-1];if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){const e=c,n=e.raw+"\n"+t.join("\n"),o=this.blockquote(n);a[a.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,i=i.substring(0,i.length-e.text.length)+o.text;break}if("list"!==(null==c?void 0:c.type));else{const e=c,n=e.raw+"\n"+t.join("\n"),o=this.list(n);a[a.length-1]=o,r=r.substring(0,r.length-c.raw.length)+o.raw,i=i.substring(0,i.length-e.raw.length)+o.raw,t=n.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const n=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;t;){let r=!1,i="",s="";if(!(e=n.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(/[^ ]/),d=d>4?1:d,s=l.slice(d),d+=e[1].length),c&&/^ *$/.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),a=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),n=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;t;){const o=t.split("\n",1)[0];if(h=o,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),a.test(h))break;if(n.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=d||!h.trim())s+="\n"+h.slice(d);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(a.test(l))break;if(n.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),i+=o+"\n",t=t.substring(o.length+1),l=h.slice(d)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(i)&&(o=!0));let u,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(u="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:s,tokens:[]}),a.raw+=i}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let t=0;t<a.items.length;t++)if(this.lexer.state.top=!1,a.items[t].tokens=this.lexer.blockTokens(a.items[t].text,[]),!a.loose){const e=a.items[t].tokens.filter((t=>"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));a.loose=r}if(a.loose)for(let t=0;t<a.items.length;t++)a.items[t].loose=!0;return a}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," "),r=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=fl(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),a=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],n={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?n.align.push("right"):/^ *:-+: *$/.test(t)?n.align.push("center"):/^ *:-+ *$/.test(t)?n.align.push("left"):n.align.push(null);for(let t=0;t<r.length;t++)n.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:n.align[t]});for(const t of a)n.rows.push(fl(t,n.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]}))));return n}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:hl(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=ml(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}(e[2],"()");if(t>-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(t)?r.slice(1):r.slice(1,-1)),yl(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return yl(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i)return;if(i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...i[0]].length-1;let a,n,o=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(n=[...a].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&r%3&&!((r+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+n);if(Math.min(r,n)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=hl(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=hl(e[1]),r="mailto:"+t):(t=hl(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var e;let r;if(r=this.rules.inline.url.exec(t)){let t,i;if("@"===r[2])t=hl(r[0]),i="mailto:"+t;else{let a;do{a=r[0],r[0]=(null==(e=this.rules.inline._backpedal.exec(r[0]))?void 0:e[0])??""}while(a!==r[0]);t=hl(r[0]),i="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:hl(e[0]),{type:"text",raw:e[0],text:t}}}}const bl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kl=/(?:[*+-]|\d{1,9}[.)])/,Cl=ul(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,kl).replace(/blockCode/g,/ {4}/).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/).getRegex(),wl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Sl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Tl=ul(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Sl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vl=ul(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kl).getRegex(),Bl="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",Ll=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ml=ul("^ {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",Ll).replace("tag",Bl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_l=ul(wl).replace("hr",bl).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",Bl).getRegex(),Al={blockquote:ul(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_l).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Tl,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:bl,html:Ml,lheading:Cl,list:vl,newline:/^(?: *(?:\n|$))+/,paragraph:_l,table:gl,text:/^[^\n]+/},Fl=ul("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",bl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",Bl).getRegex(),$l={...Al,table:Fl,paragraph:ul(wl).replace("hr",bl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fl).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",Bl).getRegex()},El={...Al,html:ul("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ll).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:gl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ul(wl).replace("hr",bl).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Cl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Il=/^( {2,}|\\)\n(?!\s*$)/,Ol="\\p{P}\\p{S}",Rl=ul(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ol).getRegex(),Pl=ul(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ol).getRegex(),zl=ul("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ol).getRegex(),ql=ul("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ol).getRegex(),Nl=ul(/\\([punct])/,"gu").replace(/punct/g,Ol).getRegex(),Wl=ul(/^<(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(),jl=ul(Ll).replace("(?:--\x3e|$)","--\x3e").getRegex(),Hl=ul("^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",jl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ul=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yl=ul(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ul).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vl=ul(/^!?\[(label)\]\[(ref)\]/).replace("label",Ul).replace("ref",Sl).getRegex(),Gl=ul(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sl).getRegex(),Xl={_backpedal:gl,anyPunctuation:Nl,autolink:Wl,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Il,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:gl,emStrongLDelim:Pl,emStrongRDelimAst:zl,emStrongRDelimUnd:ql,escape:Dl,link:Yl,nolink:Gl,punctuation:Rl,reflink:Vl,reflinkSearch:ul("reflink|nolink(?!\\()","g").replace("reflink",Vl).replace("nolink",Gl).getRegex(),tag:Hl,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:gl},Zl={...Xl,link:ul(/^!?\[(label)\]\((.*?)\)/).replace("label",Ul).getRegex(),reflink:ul(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ul).getRegex()},Ql={...Xl,escape:ul(Dl).replace("])","~|])").getRegex(),url:ul(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Jl={...Ql,br:ul(Il).replace("{2,}","*").getRegex(),text:ul(Ql.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kl={normal:Al,gfm:$l,pedantic:El},th={normal:Xl,gfm:Ql,breaks:Jl,pedantic:Zl};class eh{constructor(t){f(this,"tokens"),f(this,"options"),f(this,"state"),f(this,"tokenizer"),f(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||el,this.options.tokenizer=this.options.tokenizer||new xl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Kl.normal,inline:th.normal};this.options.pedantic?(e.block=Kl.pedantic,e.inline=th.pedantic):this.options.gfm&&(e.block=Kl.gfm,this.options.breaks?e.inline=th.breaks:e.inline=th.gfm),this.tokenizer.rules=e}static get rules(){return{block:Kl,inline:th}}static lex(t,e){return new eh(e).lex(t)}static lexInline(t,e){return new eh(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){let i,a,n;for(t=this.options.pedantic?t.replace(/\t/g," ").replace(/^ +$/gm,""):t.replace(/^( *)(\t+)/gm,((t,e,r)=>e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?e.push(i):(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),a=e[e.length-1],!a||"paragraph"!==a.type&&"text"!==a.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(a.raw+="\n"+i.raw,a.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(n=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n)))a=e[e.length-1],r&&"paragraph"===(null==a?void 0:a.type)?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),a=e[e.length-1],a&&"text"===a.type?(a.raw+="\n"+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,a,n,o,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,n.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(a=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(a=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(a))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class rh{constructor(t){f(this,"options"),f(this,"parser"),this.options=t||el}space(t){return""}code({text:t,lang:e,escaped:r}){var i;const a=null==(i=(e||"").match(/^\S*/))?void 0:i[0],n=t.replace(/\n$/,"")+"\n";return a?'<pre><code class="language-'+hl(a)+'">'+(r?n:hl(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:hl(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,r=t.start;let i="";for(let n=0;n<t.items.length;n++){const e=t.items[n];i+=this.listitem(e)}const a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+a+">\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);e+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){const e=t.rows[a];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),a=pl(t);if(null===a)return i;let n='<a href="'+(t=a)+'"';return e&&(n+=' title="'+e+'"'),n+=">"+i+"</a>",n}image({href:t,title:e,text:r}){const i=pl(t);if(null===i)return r;let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${e}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class ih{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""}}class ah{constructor(t){f(this,"options"),f(this,"renderer"),f(this,"textRenderer"),this.options=t||el,this.options.renderer=this.options.renderer||new rh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ih}static parse(t,e){return new ah(e).parse(t)}static parseInline(t,e){return new ah(e).parseInline(t)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=a,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){r+=e||"";continue}}const n=a;switch(n.type){case"space":r+=this.renderer.space(n);continue;case"hr":r+=this.renderer.hr(n);continue;case"heading":r+=this.renderer.heading(n);continue;case"code":r+=this.renderer.code(n);continue;case"table":r+=this.renderer.table(n);continue;case"blockquote":r+=this.renderer.blockquote(n);continue;case"list":r+=this.renderer.list(n);continue;case"html":r+=this.renderer.html(n);continue;case"paragraph":r+=this.renderer.paragraph(n);continue;case"text":{let a=n,o=this.renderer.text(a);for(;i+1<t.length&&"text"===t[i+1].type;)a=t[++i],o+="\n"+this.renderer.text(a);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o}]}):o;continue}default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let i=0;i<t.length;i++){const a=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){const t=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=t||"";continue}}const n=a;switch(n.type){case"escape":case"text":r+=e.text(n);break;case"html":r+=e.html(n);break;case"link":r+=e.link(n);break;case"image":r+=e.image(n);break;case"strong":r+=e.strong(n);break;case"em":r+=e.em(n);break;case"codespan":r+=e.codespan(n);break;case"br":r+=e.br(n);break;case"del":r+=e.del(n);break;default:{const t='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}}class nh{constructor(t){f(this,"options"),this.options=t||el}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}f(nh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));l=new WeakSet,h=function(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,r.parser.parseInline(i.tokens,r.parser.textRenderer).replace(cl,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",a="";for(let t=0;t<r.header.length;t++)a+=this.tablecell({text:r.header[t].text,tokens:r.header[t].tokens,header:!0,align:r.align[t]});i+=this.tablerow({text:a});let n="";for(let t=0;t<r.rows.length;t++){const e=r.rows[t];a="";for(let t=0;t<e.length;t++)a+=this.tablecell({text:e[t].text,tokens:e[t].tokens,header:!1,align:r.align[t]});n+=this.tablerow({text:a})}return t.call(this,i,n)};case"blockquote":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=this.parser.parse(r.tokens);return t.call(this,i)};case"list":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);const i=r.ordered,a=r.start,n=r.loose;let o="";for(let t=0;t<r.items.length;t++){const e=r.items[t],i=e.checked,a=e.task;let s="";if(e.task){const t=this.checkbox({checked:!!i});n?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,n),o+=this.listitem({type:"list_item",raw:s,text:s,task:a,checked:!!i,loose:n,tokens:e.tokens})}return t.call(this,o,i,a)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t},c=function(t,e){return(r,i)=>{const a={...i},n={...this.defaults,...a};!0===this.defaults.async&&!1===a.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0);const o=m(this,l,d).call(this,!!n.silent,!!n.async);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(n.hooks&&(n.hooks.options=n),n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then((e=>t(e,n))).then((t=>n.hooks?n.hooks.processAllTokens(t):t)).then((t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then((()=>t)):t)).then((t=>e(t,n))).then((t=>n.hooks?n.hooks.postprocess(t):t)).catch(o);try{n.hooks&&(r=n.hooks.preprocess(r));let i=t(r,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let a=e(i,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(s){return o(s)}}},d=function(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+hl(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}};const oh=new class{constructor(...t){var e,r,i;e=this,(r=l).has(e)?g("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,i),f(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),f(this,"options",this.setOptions),f(this,"parse",m(this,l,c).call(this,eh.lex,ah.parse)),f(this,"parseInline",m(this,l,c).call(this,eh.lexInline,ah.parseInline)),f(this,"Parser",ah),f(this,"Renderer",rh),f(this,"TextRenderer",ih),f(this,"Lexer",eh),f(this,"Tokenizer",xl),f(this,"Hooks",nh),this.use(...t)}walkTokens(t,e){var r,i;let a=[];for(const n of t)switch(a=a.concat(e.call(this,n)),n.type){case"table":{const t=n;for(const r of t.header)a=a.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)a=a.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=n;a=a.concat(this.walkTokens(t.items,e));break}default:{const t=n;(null==(i=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:i[t.type])?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);a=a.concat(this.walkTokens(i,e))})):t.tokens&&(a=a.concat(this.walkTokens(t.tokens,e)))}}return a}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new rh(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let a=t.renderer[i];t.useNewRenderer||(a=m(this,l,h).call(this,a,i,e));const n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new xl(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,a=t.tokenizer[i],n=e[i];e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new nh;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,a=t.hooks[i],n=e[i];nh.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>n.call(e,t)));const r=a.call(e,t);return n.call(e,r)}:e[i]=(...t)=>{let r=a.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return eh.lex(t,e??this.defaults)}parser(t,e){return ah.parse(t,e??this.defaults)}};function sh(t,e){return oh.parse(t,e)}function lh(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce((function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map((function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0}))):t}),[]);if(a.length){var n=new RegExp("\n[\t ]{"+Math.min.apply(Math,a)+"}","g");i=i.map((function(t){return t.replace(n,"\n")}))}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return e.forEach((function(t,e){var r=o.match(/(?:^|\n)( *)$/),a=r?r[1]:"",n=t;"string"==typeof t&&t.includes("\n")&&(n=String(t).split("\n").map((function(t,e){return 0===e?t:""+a+t})).join("\n")),o+=n+i[e+1]})),o}function hh(t,{markdownAutoWrap:e}){const r=lh(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"));return!1===e?r.replace(/ /g," "):r}function ch(t,e={}){const r=hh(t,e),i=sh.lexer(r),a=[[]];let n=0;function o(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach(((t,r)=>{0!==r&&(n++,a.push([])),t.split(" ").forEach((t=>{(t=t.replace(/'/g,"'"))&&a[n].push({content:t,type:e})}))}))}else"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{o(e,t.type)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})}return Ie(o,"processNode"),i.forEach((t=>{var e;"paragraph"===t.type?null==(e=t.tokens)||e.forEach((t=>{o(t)})):"html"===t.type&&a[n].push({content:t.text,type:"normal"})})),a}function dh(t,{markdownAutoWrap:e}={}){const r=sh.lexer(t);function i(t){var r,a,n;return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${null==(r=t.tokens)?void 0:r.map(i).join("")}</strong>`:"em"===t.type?`<em>${null==(a=t.tokens)?void 0:a.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${null==(n=t.tokens)?void 0:n.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:`Unsupported markdown: ${t.type}`}return Ie(i,"output"),r.map(i).join("")}function uh(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function ph(t,e){return gh(t,[],uh(e.content),e.type)}function gh(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[a,...n]=r,o=[...e,a];return t([{content:o.join(""),type:i}])?gh(t,o,n,i):(0===e.length&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function fh(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return mh(t,e)}function mh(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let a="";" "===t[0].content&&(a=" ",t.shift());const n=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==a&&o.push({content:a,type:"normal"}),o.push(n),e(o))return mh(t,e,r,o);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){const[i,a]=ph(e,n);r.push([i]),a.content&&t.unshift(a)}return mh(t,e,r)}function yh(t,e){e&&t.attr("style",e)}async function xh(t,e,r,i,a=!1){const n=t.append("foreignObject");n.attr("width",10*r+"px"),n.attr("height",10*r+"px");const o=n.append("xhtml:div");let s=e.label;e.label&&ai(e.label)&&(s=await oi(e.label.replace(si.lineBreakRegex,"\n"),Ai()));const l=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(s),yh(h,e.labelStyle),h.attr("class",`${l} ${i}`),yh(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),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 c=o.node().getBoundingClientRect();return c.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),c=o.node().getBoundingClientRect()),n.node()}function bh(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function kh(t,e,r){const i=t.append("text"),a=bh(i,1,e);Sh(a,r);const n=a.node().getComputedTextLength();return i.remove(),n}function Ch(t,e,r){var i;const a=t.append("text"),n=bh(a,1,e);Sh(n,[{content:r,type:"normal"}]);const o=null==(i=n.node())?void 0:i.getBoundingClientRect();return o&&a.remove(),o}function wh(t,e,r,i=!1){const a=e.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let s=0;for(const l of r){const e=Ie((e=>kh(a,1.1,e)<=t),"checkWidth"),r=e(l)?[l]:fh(l,e);for(const t of r){Sh(bh(o,s,1.1),t),s++}}if(i){const t=o.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return o.node()}function Sh(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function Th(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`))}sh.options=sh.setOptions=function(t){return oh.setOptions(t),sh.defaults=oh.defaults,rl(sh.defaults),sh},sh.getDefaults=tl,sh.defaults=el,sh.use=function(...t){return oh.use(...t),sh.defaults=oh.defaults,rl(sh.defaults),sh},sh.walkTokens=function(t,e){return oh.walkTokens(t,e)},sh.parseInline=oh.parseInline,sh.Parser=ah,sh.parser=ah.parse,sh.Renderer=rh,sh.TextRenderer=ih,sh.Lexer=eh,sh.lexer=eh.lex,sh.Tokenizer=xl,sh.Hooks=nh,sh.parse=sh,sh.options,sh.setOptions,sh.use,sh.walkTokens,sh.parseInline,ah.parse,eh.lex,Ie(hh,"preprocessMarkdown"),Ie(ch,"markdownToLines"),Ie(dh,"markdownToHTML"),Ie(uh,"splitTextToChars"),Ie(ph,"splitWordToFitWidth"),Ie(gh,"splitWordToFitWidthRecursion"),Ie(fh,"splitLineToFitWidth"),Ie(mh,"splitLineToFitWidthRecursion"),Ie(yh,"applyStyle"),Ie(xh,"addHtmlSpan"),Ie(bh,"createTspan"),Ie(kh,"computeWidthOfText"),Ie(Ch,"computeDimensionOfText"),Ie(wh,"createFormattedText"),Ie(Sh,"updateTextContentAndStyles"),Ie(Th,"replaceIconSubstring");var vh=Ie((async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},h)=>{if(Pe.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",l),n){const i=dh(e,h),n=Th(Qs(i)),c=e.replace(/\\\\/g,"\\"),d={isNode:o,label:ai(e)?c:n,labelStyle:r.replace("fill:","color:")};return await xh(t,d,s,a,l)}{const i=wh(s,t,ch(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),h),!!e&&l);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");I(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");I(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");I(i).select("text").attr("style",e)}return i}}),"createText");function Bh(t,e,r){if(t&&t.length){const[i,a]=e,n=Math.PI/180*r,o=Math.cos(n),s=Math.sin(n);for(const e of t){const[t,r]=e;e[0]=(t-i)*o-(r-a)*s+i,e[1]=(t-i)*s+(r-a)*o+a}}}function Lh(t,e){return t[0]===e[0]&&t[1]===e[1]}function Mh(t,e){var r;const i=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(n=a),function(t,e,r,i=1){const a=r,n=Math.max(e,.1),o=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(a)for(const h of o)Bh(h,s,a);const l=function(t,e,r){const i=[];for(const h of t){const t=[...h];Lh(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const n=[];for(const h of i)for(let t=0;t<h.length-1;t++){const e=h[t],r=h[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);n.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(n.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!n.length)return a;let o=[],s=n[0].ymin,l=0;for(;o.length||n.length;){if(n.length){let t=-1;for(let e=0;e<n.length&&!(n[e].ymin>s);e++)t=e;n.splice(0,t+1).forEach((t=>{o.push({s:s,edge:t})}))}if(o=o.filter((t=>!(t.edge.ymax<=s))),o.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&o.length>1)for(let t=0;t<o.length;t+=2){const e=t+1;if(e>=o.length)break;const r=o[t].edge,i=o[e].edge;a.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,o.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return a}(o,n,i);if(a){for(const t of o)Bh(t,s,-a);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),Bh(i,e,r)}(l,s,-a)}return l}(t,a,i,n||1)}class _h{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=Mh(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function Ah(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Fh extends _h{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=Mh(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,n=[],o=.5*r*Math.cos(a),s=.5*r*Math.sin(a);for(const[l,h]of i)Ah([l,h])&&n.push([[l[0]-o,l[1]+s],[...h]],[[l[0]+o,l[1]-s],[...h]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class $h extends _h{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),a=this._fillPolygons(t,i);return r.ops=r.ops.concat(a.ops),r}}class Eh{constructor(t){this.helper=t}fillPolygons(t,e){const r=Mh(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let a=e.fillWeight;a<0&&(a=e.strokeWidth/2);const n=i/4;for(const o of t){const t=Ah(o),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o<l;o++){const t=d+h+o*i,s=c-n+2*Math.random()*n,l=t-n+2*Math.random()*n,u=this.helper.ellipse(s,l,a,a,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class Dh{constructor(t){this.helper=t}fillPolygons(t,e){const r=Mh(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,a=[];return t.forEach((t=>{const n=Ah(t),o=Math.floor(n/(r+i)),s=(n+i-o*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<o;d++){const t=d*(r+i),n=t+r,o=[l[0]+t*Math.cos(c)+s*Math.cos(c),l[1]+t*Math.sin(c)+s*Math.sin(c)],h=[l[0]+n*Math.cos(c)+s*Math.cos(c),l[1]+n*Math.sin(c)+s*Math.sin(c)];a.push(...this.helper.doubleLineOps(o[0],o[1],h[0],h[1],e))}})),a}}class Ih{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,a=Mh(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach((t=>{const a=Ah(t),n=Math.round(a/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let h=0;h<n;h++){const t=2*h*e,a=2*(h+1)*e,n=Math.sqrt(2*Math.pow(e,2)),s=[o[0]+t*Math.cos(l),o[1]+t*Math.sin(l)],c=[o[0]+a*Math.cos(l),o[1]+a*Math.sin(l)],d=[s[0]+n*Math.cos(l+Math.PI/4),s[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(s[0],s[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}})),i}}const Oh={};class Rh{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Ph={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 zh(t,e){return t.type===e}function qh(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",a=0,n=r[a];for(;!zh(n,2);){let o=0;const s=[];if("BOD"===i){if("M"!==n.text&&"m"!==n.text)return qh("M0,0"+t);a++,o=Ph[n.text],i=n.text}else zh(n,1)?o=Ph[i]:(a++,o=Ph[n.text],i=n.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let t=a;t<a+o;t++){const e=r[t];if(!zh(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof Ph[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),a+=o,n=r[a],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function Nh(t){let e=0,r=0,i=0,a=0;const n=[];for(const{key:o,data:s}of t)switch(o){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,a]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,a=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}function Wh(t){const e=[];let r="",i=0,a=0,n=0,o=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,a]=c,[n,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],a=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,a]});break;case"V":a=c[0],e.push({key:"L",data:[i,a]});break;case"S":{let t=0,n=0;"C"===r||"S"===r?(t=i+(i-s),n=a+(a-l)):(t=i,n=a),e.push({key:"C",data:[t,n,...c]}),s=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[t,n]=c;let o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=a+(a-l)):(o=i,h=a);const d=i+2*(o-i)/3,u=a+2*(h-a)/3,p=t+2*(o-t)/3,g=n+2*(h-n)/3;e.push({key:"C",data:[d,u,p,g,t,n]}),s=o,l=h,i=t,a=n;break}case"Q":{const[t,r,n,o]=c,h=i+2*(t-i)/3,d=a+2*(r-a)/3,u=n+2*(t-n)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,d,u,p,n,o]}),s=t,l=r,i=n,a=o;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),n=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,a,l,h,l,h]}),i=l,a=h):i===l&&a===h||(Hh(i,a,l,h,t,r,n,o,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,a=h);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=o}r=h}return e}function jh(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Hh(t,e,r,i,a,n,o,s,l,h){const c=(d=o,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,m=0;if(h)[p,g,f,m]=h;else{[t,e]=jh(t,e,-c),[r,i]=jh(r,i,-c);const o=(t-r)/2,h=(e-i)/2;let d=o*o/(a*a)+h*h/(n*n);d>1&&(d=Math.sqrt(d),a*=d,n*=d);const u=a*a,y=n*n,x=u*y-u*h*h-y*o*o,b=u*h*h+y*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));f=k*a*h/n+(t+r)/2,m=k*-n*o/a+(e+i)/2,p=Math.asin(parseFloat(((e-m)/n).toFixed(9))),g=Math.asin(parseFloat(((i-m)/n).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){const t=g,e=r,s=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=Hh(r=f+a*Math.cos(g),i=m+n*Math.sin(g),e,s,a,n,o,0,l,[g,t,f,m])}y=g-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(g),C=Math.sin(g),w=Math.tan(y/4),S=4/3*a*w,T=4/3*n*w,v=[t,e],B=[t+S*b,e-T*x],L=[r+S*C,i-T*k],M=[r,i];if(B[0]=2*v[0]-B[0],B[1]=2*v[1]-B[1],h)return[B,L,M].concat(u);{u=[B,L,M].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=jh(u[e][0],u[e][1],c),i=jh(u[e+1][0],u[e+1][1],c),a=jh(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],a[0],a[1]])}return t}}const Uh={randOffset:function(t,e){return ac(t,e)},randOffsetWithRange:function(t,e,r){return ic(t,e,r)},ellipse:function(t,e,r,i,a){return Zh(t,e,a,Xh(r,i,a)).opset},doubleLineOps:function(t,e,r,i,a){return nc(t,e,r,i,a,!0)}};function Yh(t,e,r,i,a){return{type:"path",ops:nc(t,e,r,i,a)}}function Vh(t,e,r){const i=(t||[]).length;if(i>2){const a=[];for(let e=0;e<i-1;e++)a.push(...nc(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&a.push(...nc(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return 2===i?Yh(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Gh(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=sc(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:sc(r[0],1.5*(1+.22*e.roughness),ec(e));for(let t=1;t<r.length;t++){const n=r[t];if(n.length){const t=sc(n,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:sc(n,1.5*(1+.22*e.roughness),ec(e));for(const e of t)"move"!==e.op&&i.push(e);for(const e of r)"move"!==e.op&&a.push(e)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Xh(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),n=2*Math.PI/a;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=ac(o*l,r),s+=ac(s*l,r),{increment:n,rx:o,ry:s}}function Zh(t,e,r,i){const[a,n]=hc(i.increment,t,e,i.rx,i.ry,1,i.increment*ic(.1,ic(.4,1,r),r),r);let o=lc(a,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[a]=hc(i.increment,t,e,i.rx,i.ry,1.5,0,r),n=lc(a,null,r);o=o.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:o}}}function Qh(t,e,r,i,a,n,o,s,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=ac(.01*d,l),u+=ac(.01*u,l);let p=a,g=n;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(g-p)/2),y=cc(m,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=cc(m,h,c,d,u,p,g,1.5,l);y.push(...t)}return o&&(s?y.push(...nc(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...nc(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):y.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:y}}function Jh(t,e){const r=Wh(Nh(qh(t))),i=[];let a=[0,0],n=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":n=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...nc(n[0],n[1],s[0],s[1],e)),n=[s[0],s[1]];break;case"C":{const[t,r,a,o,l,h]=s;i.push(...dc(t,r,a,o,l,h,n,e)),n=[l,h];break}case"Z":i.push(...nc(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}function Kh(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+ac(t,e),i[0][1]+ac(t,e)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+ac(t,e),i[n][1]+ac(t,e)]})}}return{type:"fillPath",ops:r}}function tc(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!Oh[r])switch(r){case"zigzag":Oh[r]||(Oh[r]=new Fh(e));break;case"cross-hatch":Oh[r]||(Oh[r]=new $h(e));break;case"dots":Oh[r]||(Oh[r]=new Eh(e));break;case"dashed":Oh[r]||(Oh[r]=new Dh(e));break;case"zigzag-line":Oh[r]||(Oh[r]=new Ih(e));break;default:r="hachure",Oh[r]||(Oh[r]=new _h(e))}return Oh[r]}(e,Uh).fillPolygons(t,e)}function ec(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function rc(t){return t.randomizer||(t.randomizer=new Rh(t.seed||0)),t.randomizer.next()}function ic(t,e,r,i=1){return r.roughness*i*(rc(r)*(e-t)+t)}function ac(t,e,r=1){return ic(-t,t,e,r)}function nc(t,e,r,i,a,n=!1){const o=n?a.disableMultiStrokeFill:a.disableMultiStroke,s=oc(t,e,r,i,a,!0,!1);if(o)return s;const l=oc(t,e,r,i,a,!0,!0);return s.concat(l)}function oc(t,e,r,i,a,n,o){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*rc(a);let p=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;p=ac(p,a,h),g=ac(g,a,h);const f=[],m=()=>ac(d,a,h),y=()=>ac(c,a,h),x=a.preserveVertices;return o?f.push({op:"move",data:[t+(x?0:m()),e+(x?0:m())]}):f.push({op:"move",data:[t+(x?0:ac(c,a,h)),e+(x?0:ac(c,a,h))]}),o?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(x?0:m()),i+(x?0:m())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(x?0:y()),i+(x?0:y())]}),f}function sc(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+ac(e,r),t[0][1]+ac(e,r)]),i.push([t[0][0]+ac(e,r),t[0][1]+ac(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+ac(e,r),t[a][1]+ac(e,r)]),a===t.length-1&&i.push([t[a][0]+ac(e,r),t[a][1]+ac(e,r)]);return lc(i,null,r)}function lc(t,e,r){const i=t.length,a=[];if(i>3){const e=[],n=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(n*t[r+1][0]-n*t[r-1][0])/6,i[1]+(n*t[r+1][1]-n*t[r-1][1])/6],e[2]=[t[r+1][0]+(n*t[r][0]-n*t[r+2][0])/6,t[r+1][1]+(n*t[r][1]-n*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&a.push(...oc(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return a}function hc(t,e,r,i,a,n,o,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){const t=[e+i*Math.cos(n),r+a*Math.sin(n)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{const c=ac(.5,s)-Math.PI/2;h.push([ac(n,s)+e+.9*i*Math.cos(c-t),ac(n,s)+r+.9*a*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let o=c;o<d;o+=t){const t=[ac(n,s)+e+i*Math.cos(o),ac(n,s)+r+a*Math.sin(o)];l.push(t),h.push(t)}h.push([ac(n,s)+e+i*Math.cos(c+2*Math.PI+.5*o),ac(n,s)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([ac(n,s)+e+.98*i*Math.cos(c+o),ac(n,s)+r+.98*a*Math.sin(c+o)]),h.push([ac(n,s)+e+.9*i*Math.cos(c+.5*o),ac(n,s)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function cc(t,e,r,i,a,n,o,s,l){const h=n+ac(.1,l),c=[];c.push([ac(s,l)+e+.9*i*Math.cos(h-t),ac(s,l)+r+.9*a*Math.sin(h-t)]);for(let d=h;d<=o;d+=t)c.push([ac(s,l)+e+i*Math.cos(d),ac(s,l)+r+a*Math.sin(d)]);return c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),c.push([e+i*Math.cos(o),r+a*Math.sin(o)]),lc(c,0,l)}function dc(t,e,r,i,a,n,o,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(u?0:ac(h[0],s)),o[1]+(u?0:ac(h[0],s))]}),c=u?[a,n]:[a+ac(h[p],s),n+ac(h[p],s)],l.push({op:"bcurveTo",data:[t+ac(h[p],s),e+ac(h[p],s),r+ac(h[p],s),i+ac(h[p],s),c[0],c[1]]});return l}function uc(t){return[...t]}function pc(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(uc(t[0]),uc(t[1]),uc(t[2]),uc(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const a=[],n=1-e;i.push(uc(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];a[0]=[e[0],e[1]],a[1]=[e[0]+(n*r[t+1][0]-n*r[t-1][0])/6,e[1]+(n*r[t+1][1]-n*r[t-1][1])/6],a[2]=[r[t+1][0]+(n*r[t][0]-n*r[t+2][0])/6,r[t+1][1]+(n*r[t][1]-n*r[t+2][1])/6],a[3]=[r[t+1][0],r[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function gc(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function fc(t,e,r){const i=gc(e,r);if(0===i)return gc(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return a=Math.max(0,Math.min(1,a)),gc(t,mc(e,r,a))}function mc(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function yc(t,e,r,i){const a=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],a=t[e+2],n=t[e+3];let o=3*i[0]-2*r[0]-n[0];o*=o;let s=3*i[1]-2*r[1]-n[1];s*=s;let l=3*a[0]-2*n[0]-r[0];l*=l;let h=3*a[1]-2*n[1]-r[1];return h*=h,o<l&&(o=l),s<h&&(s=h),o+s}(t,e)<r){const r=t[e+0];a.length?(n=a[a.length-1],o=r,Math.sqrt(gc(n,o))>1&&a.push(r)):a.push(r),a.push(t[e+3])}else{const i=.5,n=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],h=mc(n,o,i),c=mc(o,s,i),d=mc(s,l,i),u=mc(h,c,i),p=mc(c,d,i),g=mc(u,p,i);yc([n,h,u,g],0,r,a),yc([g,p,d,l],0,r,a)}var n,o;return a}function xc(t,e){return bc(t,0,t.length,e)}function bc(t,e,r,i,a){const n=a||[],o=t[e],s=t[r-1];let l=0,h=1;for(let c=e+1;c<r-1;++c){const e=fc(t[c],o,s);e>l&&(l=e,h=c)}return Math.sqrt(l)>i?(bc(t,e,h+1,i,n),bc(t,h,r,i,n)):(n.length||n.push(o),n.push(s)),n}function kc(t,e=.15,r){const i=[],a=(t.length-1)/3;for(let n=0;n<a;n++)yc(t,3*n,e,i);return r&&r>0?bc(i,0,i.length,r):i}const Cc="none";class wc{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,a){const n=this._o(a);return this._d("line",[Yh(t,e,r,i,n)],n)}rectangle(t,e,r,i,a){const n=this._o(a),o=[],s=function(t,e,r,i,a){return Vh([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a)}(t,e,r,i,n);if(n.fill){const a=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===n.fillStyle?o.push(Kh([a],n)):o.push(tc([a],n))}return n.stroke!==Cc&&o.push(s),this._d("rectangle",o,n)}ellipse(t,e,r,i,a){const n=this._o(a),o=[],s=Xh(r,i,n),l=Zh(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){const r=Zh(t,e,n,s).opset;r.type="fillPath",o.push(r)}else o.push(tc([l.estimatedPoints],n));return n.stroke!==Cc&&o.push(l.opset),this._d("ellipse",o,n)}circle(t,e,r,i){const a=this.ellipse(t,e,r,r,i);return a.shape="circle",a}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Vh(t,!1,r)],r)}arc(t,e,r,i,a,n,o=!1,s){const l=this._o(s),h=[],c=Qh(t,e,r,i,a,n,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=Qh(t,e,r,i,a,n,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,a,n,o){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=ac(.01*h,o),c+=ac(.01*c,o);let d=a,u=n;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/o.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([s+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([s+h*Math.cos(u),l+c*Math.sin(u)]),g.push([s,l]),tc([g],o)}(t,e,r,i,a,n,l));return l.stroke!==Cc&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],a=Gh(t,r);if(r.fill&&r.fill!==Cc)if("solid"===r.fillStyle){const e=Gh(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],a=t;if(a.length){const t="number"==typeof a[0][0]?[a]:a;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...kc(pc([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...kc(pc(i),10,(1+r.roughness)/2))}e.length&&i.push(tc([e],r))}return r.stroke!==Cc&&i.push(a),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],a=Vh(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Kh([t],r)):i.push(tc([t],r))),r.stroke!==Cc&&i.push(a),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=r.fill&&"transparent"!==r.fill&&r.fill!==Cc,n=r.stroke!==Cc,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=Wh(Nh(qh(t))),a=[];let n=[],o=[0,0],s=[];const l=()=>{s.length>=4&&n.push(...kc(s,1)),s=[]},h=()=>{l(),n.length&&(a.push(n),n=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),o=[u[0],u[1]],n.push(o);break;case"L":l(),n.push([u[0],u[1]]);break;case"C":if(!s.length){const t=n.length?n[n.length-1]:o;s.push([t[0],t[1]])}s.push([u[0],u[1]]),s.push([u[2],u[3]]),s.push([u[4],u[5]]);break;case"Z":l(),n.push([o[0],o[1]])}if(h(),!r)return a;const c=[];for(const d of a){const t=xc(d,r);t.length&&c.push(t)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=Jh(t,r);if(a)if("solid"===r.fillStyle)if(1===s.length){const e=Jh(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Kh(s,r));else i.push(tc(s,r));return n&&(o?s.forEach((t=>{i.push(Vh(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const a of e){let t=null;switch(a.type){case"path":t={d:this.opsToPath(a),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Cc};break;case"fillPath":t={d:this.opsToPath(a),stroke:Cc,strokeWidth:0,fill:r.fill||Cc};break;case"fillSketch":t=this.fillSketch(a,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||Cc,strokeWidth:r,fill:Cc}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const Sc="http://www.w3.org/2000/svg";class Tc{constructor(t,e){this.svg=t,this.gen=new wc(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(Sc,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(Sc,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(Sc,"path"),e.setAttribute("d",this.opsToPath(o,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&a.appendChild(e)}return a}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const a=t.createElementNS(Sc,"path");return a.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),a.setAttribute("stroke",r.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),r.fillLineDash&&a.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,a){const n=this.gen.line(t,e,r,i,a);return this.draw(n)}rectangle(t,e,r,i,a){const n=this.gen.rectangle(t,e,r,i,a);return this.draw(n)}ellipse(t,e,r,i,a){const n=this.gen.ellipse(t,e,r,i,a);return this.draw(n)}circle(t,e,r,i){const a=this.gen.circle(t,e,r,i);return this.draw(a)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,a,n,o=!1,s){const l=this.gen.arc(t,e,r,i,a,n,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var vc=(t,e)=>new Tc(t,e),Bc=Ie((async(t,e,r)=>{var i,a;let n;const o=e.useHtmlLabels||Xr(null==(i=Ai())?void 0:i.htmlLabels);n=r||"node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),l=s.insert("g").attr("class","label").attr("style",Ks(e.labelStyle));let h;h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const c=await vh(l,Wr(Qs(h),Ai()),{useHtmlLabels:o,width:e.width||(null==(a=Ai().flowchart)?void 0:a.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let d=c.getBBox();const u=((null==e?void 0:e.padding)??0)/2;if(o){const t=c.children[0],e=I(c),r=t.getElementsByTagName("img");if(r){const t=""===h.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=Ai().fontSize?Ai().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=fr.fontSize]=Vs(t),a=i*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}Ie(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return o?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:s,bbox:d,halfPadding:u,label:l}}),"labelHelper"),Lc=Ie((async(t,e,r)=>{var i,a,n,o,s,l;const h=r.useHtmlLabels||Xr(null==(a=null==(i=Ai())?void 0:i.flowchart)?void 0:a.htmlLabels),c=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),d=await vh(c,Wr(Qs(e),Ai()),{useHtmlLabels:h,width:r.width||(null==(o=null==(n=Ai())?void 0:n.flowchart)?void 0:o.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let u=d.getBBox();const p=r.padding/2;if(Xr(null==(l=null==(s=Ai())?void 0:s.flowchart)?void 0:l.htmlLabels)){const t=d.children[0],e=I(d);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return h?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),r.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:t,bbox:u,halfPadding:p,label:c}}),"insertLabel"),Mc=Ie(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),_c=Ie(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function Ac(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function Fc(t,e,r,i,a,n){const o=[],s=r-t,l=i-e,h=s/n,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*s,r=d+a*Math.sin(c*(e-t));o.push({x:e,y:r})}return o}function $c(t,e,r,i,a,n){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}Ie(Ac,"createPathFromPoints"),Ie(Fc,"generateFullSineWavePoints"),Ie($c,"generateCirclePoints");var Ec=Ie(((t,e)=>{var r,i,a=t.x,n=t.y,o=e.x-a,s=e.y-n,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:a+r,y:n+i}}),"intersectRect");function Dc(t,e){e&&t.attr("style",e)}async function Ic(t){const e=I(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&ai(t.label)&&(i=await oi(t.label.replace(si.lineBreakRegex,"\n"),Ai()));const a=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+a+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),Dc(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}Ie(Dc,"applyStyle"),Ie(Ic,"addHtmlLabel");var Oc=Ie((async(t,e,r,i)=>{let a=t||"";if("object"==typeof a&&(a=a[0]),Xr(Ai().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),Pe.info("vertexText"+a);const t={isNode:i,label:Qs(a).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e?e.replace("fill:","color:"):e};return await Ic(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof a?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),Rc=Ie(((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" ")),"createRoundedRectPathD"),Pc=Ie((t=>{const{handDrawnSeed:e}=Ai();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),zc=Ie((t=>{const e=qc([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),qc=Ie((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),null==i?void 0:i.trim())})),e}),"styles2Map"),Nc=Ie((t=>{const{stylesArray:e}=zc(t),r=[],i=[],a=[],n=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&a.push(t.join(":")+" !important"),"fill"===e&&n.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}}),"styles2String"),Wc=Ie(((t,e)=>{var r;const{themeVariables:i,handDrawnSeed:a}=Ai(),{nodeBorder:n,mainBkg:o}=i,{stylesMap:s}=zc(t);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:a,strokeWidth:(null==(r=s.get("stroke-width"))?void 0:r.replace("px",""))||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),jc=Ie((async(t,e)=>{Pe.info("Creating subgraph rect for ",e.id,e);const r=Ai(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Nc(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),u=Xr(r.flowchart.htmlLabels),p=d.insert("g").attr("class","cluster-label "),g=await vh(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0});let f=g.getBBox();if(Xr(r.flowchart.htmlLabels)){const t=g.children[0],e=I(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,x=e.x-m/2,b=e.y-y/2;let k;if(Pe.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=vc(d),r=Wc(e,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),i=t.path(Rc(x,b,m,y,0),r);k=d.insert((()=>(Pe.debug("Rough node insert CXC",i),i)),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=hs(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+C})`),s){const t=p.select("span");t&&t.attr("style",s)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Ec(e,t)},{cluster:d,labelBBox:f}}),"rect"),Hc=Ie(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ec(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),Uc=Ie((async(t,e)=>{const r=Ai(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=d.node().appendChild(await Oc(e.label,e.labelStyle,void 0,!0));let g=p.getBBox();if(Xr(r.flowchart.htmlLabels)){const t=p.children[0],e=I(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,m=f/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const x=e.height+f,b=e.height+f-g.height-6,k=e.x-y/2,C=e.y-x/2;e.width=y;const w=e.y-e.height/2-m+g.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=vc(h),i=e.rx||e.ry?r.path(Rc(k,C,y,x,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:a}):r.rectangle(k,C,y,x,{seed:a});S=h.insert((()=>i),":first-child");const c=r.rectangle(k,w,y,b,{fill:t?n:o,fillStyle:t?"hachure":"solid",stroke:l,seed:a});S=h.insert((()=>i),":first-child"),u=h.insert((()=>c))}else{S=c.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",k).attr("y",C).attr("width",y).attr("height",x).attr("data-look",e.look),u.attr("class","inner").attr("x",k).attr("y",w).attr("width",y).attr("height",b)}d.attr("transform",`translate(${e.x-g.width/2}, ${C+1-(Xr(r.flowchart.htmlLabels)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return Ec(e,t)},{cluster:h,labelBBox:g}}),"roundedWithTitle"),Yc=Ie((async(t,e)=>{Pe.info("Creating subgraph rect for ",e.id,e);const r=Ai(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Nc(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),u=Xr(r.flowchart.htmlLabels),p=d.insert("g").attr("class","cluster-label "),g=await vh(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width});let f=g.getBBox();if(Xr(r.flowchart.htmlLabels)){const t=g.children[0],e=I(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const m=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,x=e.x-m/2,b=e.y-y/2;let k;if(Pe.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=vc(d),r=Wc(e,{roughness:.7,fill:n,stroke:o,fillWeight:4,seed:a}),i=t.path(Rc(x,b,m,y,e.rx),r);k=d.insert((()=>(Pe.debug("Rough node insert CXC",i),i)),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",b).attr("width",m).attr("height",y);const{subGraphTitleTopMargin:C}=hs(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+C})`),s){const t=p.select("span");t&&t.attr("style",s)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return Ec(e,t)},{cluster:d,labelBBox:f}}),"kanbanSection"),Vc={rect:jc,squareRect:jc,roundedWithTitle:Uc,noteGroup:Hc,divider:Ie(((t,e)=>{const r=Ai(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),s=o.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=vc(o).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});p=o.insert((()=>t),":first-child")}else{p=s.insert("rect",":first-child");const t="divider";p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return Ec(e,t)},{cluster:o,labelBBox:{}}}),"divider"),kanbanSection:Yc},Gc=new Map,Xc=Ie((async(t,e)=>{const r=e.shape||"rect",i=await Vc[r](t,e);return Gc.set(e.id,i),i}),"insertCluster"),Zc=Ie((()=>{Gc=new Map}),"clear");function Qc(t,e){return t.intersect(e)}Ie(Qc,"intersectNode");var Jc=Qc;function Kc(t,e,r,i){var a=t.x,n=t.y,o=a-i.x,s=n-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x<a&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<n&&(c=-c),{x:a+h,y:n+c}}Ie(Kc,"intersectEllipse");var td=Kc;function ed(t,e,r){return td(t,e,e,r)}Ie(ed,"intersectCircle");var rd=ed;function id(t,e,r,i){var a,n,o,s,l,h,c,d,u,p,g,f,m;if(a=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,u=a*r.x+o*r.y+l,p=a*i.x+o*i.y+l,!(0!==u&&0!==p&&ad(u,p)||(n=i.y-r.y,s=r.x-i.x,h=i.x*r.y-r.x*i.y,c=n*t.x+s*t.y+h,d=n*e.x+s*e.y+h,0!==c&&0!==d&&ad(c,d)||0==(g=a*s-n*o))))return f=Math.abs(g/2),{x:(m=o*h-s*l)<0?(m-f)/g:(m+f)/g,y:(m=n*l-a*h)<0?(m-f)/g:(m+f)/g}}function ad(t,e){return t*e>0}Ie(id,"intersectLine"),Ie(ad,"sameSign");var nd=id;function od(t,e,r){let i=t.x,a=t.y,n=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=a-t.height/2-s;for(let c=0;c<e.length;c++){let i=e[c],a=e[c<e.length-1?c+1:0],o=nd(t,r,{x:l+i.x,y:h+i.y},{x:l+a.x,y:h+a.y});o&&n.push(o)}return n.length?(n.length>1&&n.sort((function(t,e){let i=t.x-r.x,a=t.y-r.y,n=Math.sqrt(i*i+a*a),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return n<l?-1:n===l?0:1})),n[0]):t}Ie(od,"intersectPolygon");var sd={node:Jc,circle:rd,ellipse:td,polygon:od,rect:Ec};function ld(t,e){const{labelStyles:r}=Nc(e);e.labelStyle=r;const i=_c(e);let a=i;i||(a="anchor");const n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:o}=e,s=vc(n),l=Wc(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=s.circle(0,0,2,l),c=n.insert((()=>h),":first-child");return c.attr("class","anchor").attr("style",Ks(o)),Mc(e,c),e.intersect=function(t){return Pe.info("Circle intersect",e,1,t),sd.circle(e,1,t)},n}function hd(t,e,r,i,a,n,o){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/a,d=(i-e)/2/n,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=s+p*n*Math.sin(h)*(o?-1:1),f=l-p*a*Math.cos(h)*(o?-1:1),m=Math.atan2((e-f)/n,(t-g)/a);let y=Math.atan2((i-f)/n,(r-g)/a)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=m+b/19*y,e=g+a*Math.cos(t),r=f+n*Math.sin(t);x.push({x:e,y:r})}return x}async function cd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.width+e.padding+20,s=n.height+e.padding,l=s/2,h=l/(2.5+s/50),{cssStyles:c}=e,d=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...hd(-o/2,-s/2,-o/2,s/2,h,l,!1),{x:o/2,y:s/2},...hd(o/2,s/2,o/2,-s/2,h,l,!0)],u=vc(a),p=Wc(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=Ac(d),f=u.path(g,p),m=a.insert((()=>f),":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${h/2}, 0)`),Mc(e,m),e.intersect=function(t){return sd.polygon(e,d,t)},a}function dd(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function ud(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.height+e.padding,s=n.width+e.padding+12,l=-o,h=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Ac(h),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),d&&c.attr("style",d)}else c=dd(a,s,o,h);return i&&c.attr("style",i),Mc(e,c),e.intersect=function(t){return sd.polygon(e,h,t)},a}function pd(t,e){const{nodeStyles:r}=Nc(e);e.label="";const i=t.insert("g").attr("class",_c(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),o=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],s=vc(i),l=Wc(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=Ac(o),c=s.path(h,l),d=i.insert((()=>c),":first-child");return a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return sd.polygon(e,o,t)},i}async function gd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:o}=await Bc(t,e,_c(e)),s=n.width/2+o;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=t.circle(0,0,2*s,r);l=a.insert((()=>i),":first-child"),l.attr("class","basic label-container").attr("style",Ks(h))}else l=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return Mc(e,l),e.intersect=function(t){return Pe.info("Circle intersect",e,s,t),sd.circle(e,s,t)},a}function fd(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function md(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",_c(e)).attr("id",e.domId??e.id),n=Math.max(30,(null==e?void 0:e.width)??0),{cssStyles:o}=e,s=vc(a),l=Wc(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=s.circle(0,0,2*n,l),c=fd(n),d=s.path(c,l),u=a.insert((()=>h),":first-child");return u.insert((()=>d)),o&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Mc(e,u),e.intersect=function(t){Pe.info("crossedCircle intersect",e,{radius:n,point:t});return sd.circle(e,n,t)},a}function yd(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}async function xd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...yd(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...yd(s/2+2*h,-h,h,20,-180,-270),...yd(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...yd(s/2,l/2,h,20,0,90)],u=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...yd(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...yd(s/2+.1*s,-h,h,20,-180,-270),...yd(s/2+.1*s,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...yd(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2,y:l/2+h}],p=vc(a),g=Wc(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=Ac(d).replace("Z",""),m=p.path(f,g),y=Ac(u),x=p.path(y,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>m),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${h}, 0)`),o.attr("transform",`translate(${-s/2+h-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Mc(e,b),e.intersect=function(t){return sd.polygon(e,u,t)},a}function bd(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:a,y:n})}return o}async function kd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...bd(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...bd(s/2+2*h,-h,h,20,-180,-270),...bd(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...bd(s/2,l/2,h,20,0,90)],u=[{x:-s/2,y:-l/2-h},{x:s/2,y:-l/2-h},...bd(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...bd(s/2+2*h,-h,h,20,-180,-270),...bd(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...bd(s/2,l/2,h,20,0,90),{x:s/2,y:l/2+h},{x:-s/2,y:l/2+h}],p=vc(a),g=Wc(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=Ac(d).replace("Z",""),m=p.path(f,g),y=Ac(u),x=p.path(y,{...g}),b=a.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>m),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-h}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Mc(e,b),e.intersect=function(t){return sd.polygon(e,u,t)},a}function Cd(t,e,r,i=100,a=0,n=180){const o=[],s=a*Math.PI/180,l=(n*Math.PI/180-s)/(i-1);for(let h=0;h<i;h++){const i=s+h*l,a=t+r*Math.cos(i),n=e+r*Math.sin(i);o.push({x:-a,y:-n})}return o}async function wd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=n.width+(e.padding??0),l=n.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,d=[...Cd(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Cd(s/2+2*h,-h,h,20,-180,-270),...Cd(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Cd(s/2,l/2,h,20,0,90)],u=[...Cd(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Cd(-s/2-h/2,-h,h,20,0,90),...Cd(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Cd(-s/2+h+h/2,l/2,h,30,-180,-270)],p=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Cd(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Cd(s/2+2*h,-h,h,20,-180,-270),...Cd(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Cd(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2-h-h/2,y:l/2+h},...Cd(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Cd(-s/2-h/2,-h,h,20,0,90),...Cd(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Cd(-s/2+h+h/2,l/2,h,30,-180,-270)],g=vc(a),f=Wc(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=Ac(d).replace("Z",""),y=g.path(m,f),x=Ac(u).replace("Z",""),b=g.path(x,f),k=Ac(p),C=g.path(k,{...f}),w=a.insert("g",":first-child");return w.insert((()=>C),":first-child").attr("stroke-opacity",0),w.insert((()=>y),":first-child"),w.insert((()=>b),":first-child"),w.attr("class","text"),c&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${h-h/4}, 0)`),o.attr("transform",`translate(${-s/2+(e.padding??0)/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)/2-(n.y-(n.top??0))})`),Mc(e,w),e.intersect=function(t){return sd.polygon(e,p,t)},a}async function Sd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(80,1.25*(n.width+2*(e.padding??0)),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=vc(a),d=Wc(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=o-l,p=s/4,g=[{x:u,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:u,y:s},...$c(-u,-s/2,l,50,270,90)],f=Ac(g),m=c.path(f,d),y=a.insert((()=>m),":first-child");return y.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-o/2}, ${-s/2})`),Mc(e,y),e.intersect=function(t){return sd.polygon(e,g,t)},a}Ie(ld,"anchor"),Ie(hd,"generateArcPoints"),Ie(cd,"bowTieRect"),Ie(dd,"insertPolygonShape"),Ie(ud,"card"),Ie(pd,"choice"),Ie(gd,"circle"),Ie(fd,"createLine"),Ie(md,"crossedCircle"),Ie(yd,"generateCirclePoints"),Ie(xd,"curlyBraceLeft"),Ie(bd,"generateCirclePoints"),Ie(kd,"curlyBraceRight"),Ie(Cd,"generateCirclePoints"),Ie(wd,"curlyBraces"),Ie(Sd,"curvedTrapezoid");var Td=Ie(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),vd=Ie(((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Bd=Ie(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function Ld(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+e.padding,e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+e.padding,e.height??0);let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=vc(a),r=vd(0,0,s,c,l,h),i=Bd(0,h,s,c,l,h),n=t.path(r,Wc(e,{})),o=t.path(i,Wc(e,{fill:"none"}));d=a.insert((()=>o),":first-child"),d=a.insert((()=>n),":first-child"),d.attr("class","basic label-container"),u&&d.attr("style",u)}else{const t=Td(0,0,s,c,l,h);d=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",Ks(u)).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Mc(e,d),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(t){const r=sd.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}async function Md(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=n.width+e.padding,l=n.height+e.padding,h=.2*l,c=-s/2,d=-l/2-h/2,{cssStyles:u}=e,p=vc(a),g=Wc(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d+h},{x:-c,y:d+h},{x:-c,y:-d},{x:c,y:-d},{x:c,y:d},{x:-c,y:d},{x:-c,y:d+h}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=a.insert((()=>m),":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${c+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),Mc(e,y),e.intersect=function(t){return sd.rect(e,t)},a}async function _d(t,e){var r,i;const{labelStyles:a,nodeStyles:n}=Nc(e);e.labelStyle=a;const{shapeSvg:o,bbox:s,halfPadding:l}=await Bc(t,e,_c(e)),h=s.width/2+l+5,c=s.width/2+l;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=vc(o),a=Wc(e,{roughness:.2,strokeWidth:2.5}),n=Wc(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*h,a),l=t.circle(0,0,2*c,n);d=o.insert("g",":first-child"),d.attr("class",Ks(e.cssClasses)).attr("style",Ks(u)),null==(r=d.node())||r.appendChild(s),null==(i=d.node())||i.appendChild(l)}else{d=o.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Mc(e,d),e.intersect=function(t){return Pe.info("DoubleCircle intersect",e,h,t),sd.circle(e,h,t)},o}function Ad(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Nc(e);e.label="",e.labelStyle=i;const n=t.insert("g").attr("class",_c(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=vc(n),{nodeBorder:l}=r,h=Wc(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=s.circle(0,0,14,h),d=n.insert((()=>c),":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),o&&o.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Mc(e,d),e.intersect=function(t){Pe.info("filledCircle intersect",e,{radius:7,point:t});return sd.circle(e,7,t)},n}async function Fd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=n.width+(e.padding??0),l=s+n.height,h=s+n.height,c=[{x:0,y:-l},{x:h,y:-l},{x:h/2,y:0}],{cssStyles:d}=e,u=vc(a),p=Wc(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=Ac(c),f=u.path(g,p),m=a.insert((()=>f),":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=s,e.height=l,Mc(e,m),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return Pe.info("Triangle intersect",e,c,t),sd.polygon(e,c,t)},a}function $d(t,e,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:n}=Nc(e);e.label="";const o=t.insert("g").attr("class",_c(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,(null==e?void 0:e.width)??0),h=Math.max(10,(null==e?void 0:e.height)??0);"LR"===r&&(l=Math.max(10,(null==e?void 0:e.width)??0),h=Math.max(70,(null==e?void 0:e.height)??0));const c=-1*l/2,d=-1*h/2,u=vc(o),p=Wc(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=o.insert((()=>g),":first-child");s&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),Mc(e,f);const m=(null==i?void 0:i.padding)??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(t){return sd.rect(e,t)},o}async function Ed(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(80,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(50,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=s/2,{cssStyles:h}=e,c=vc(a),d=Wc(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-o/2,y:-s/2},{x:o/2-l,y:-s/2},...$c(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},{x:-o/2,y:s/2}],p=Ac(u),g=c.path(p,d),f=a.insert((()=>g),":first-child");return f.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),Mc(e,f),e.intersect=function(t){Pe.info("Pill intersect",e,{radius:l,point:t});return sd.polygon(e,u,t)},a}Ie(Ld,"cylinder"),Ie(Md,"dividedRectangle"),Ie(_d,"doublecircle"),Ie(Ad,"filledCircle"),Ie(Fd,"flippedTriangle"),Ie($d,"forkJoin"),Ie(Ed,"halfRoundedRectangle");var Dd=Ie(((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD");async function Id(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.height+e.padding,s=o/4,l=n.width+2*s+e.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Dd(0,0,l,o,s),n=t.path(i,r);c=a.insert((()=>n),":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),d&&c.attr("style",d)}else c=dd(a,l,o,h);return i&&c.attr("style",i),e.width=l,e.height=o,Mc(e,c),e.intersect=function(t){return sd.polygon(e,h,t)},a}async function Od(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await Bc(t,e,_c(e)),n=Math.max(30,(null==e?void 0:e.width)??0),o=Math.max(30,(null==e?void 0:e.height)??0),{cssStyles:s}=e,l=vc(a),h=Wc(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:n,y:0},{x:0,y:o},{x:n,y:o}],d=Ac(c),u=l.path(d,h),p=a.insert((()=>u),":first-child");return p.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-n/2}, ${-o/2})`),Mc(e,p),e.intersect=function(t){Pe.info("Pill intersect",e,{points:c});return sd.polygon(e,c,t)},a}async function Rd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Nc(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Bc(t,e,"icon-shape default"),u="t"===e.pos,p=s,g=s,{nodeBorder:f}=r,{stylesMap:m}=zc(e),y=-g/2,x=-p/2,b=e.label?8:0,k=vc(h),C=Wc(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const w=k.rectangle(y,x,g,p,C),S=Math.max(g,c.width),T=p+c.height+b,v=k.rectangle(-S/2,-T/2,S,T,{...C,fill:"transparent",stroke:"none"}),B=h.insert((()=>w),":first-child"),L=h.insert((()=>v));if(e.icon){const t=h.append("g");t.html(`<g>${await ls(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${u?c.height/2+b/2-a/2-o:-c.height/2-b/2-a/2-o})`),t.attr("style",`color: ${m.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-T/2:T/2-c.height})`),B.attr("transform",`translate(0,${u?c.height/2+b/2:-c.height/2-b/2})`),Mc(e,L),e.intersect=function(t){if(Pe.info("iconSquare intersect",e,t),!e.label)return sd.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=u?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+b},{x:r+g/2,y:i-a/2+c.height+b},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+c.height+b},{x:r-c.width/2,y:i-a/2+c.height+b}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+p},{x:r+c.width/2,y:i-a/2+p},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+p},{x:r-g/2,y:i-a/2+p}];return sd.polygon(e,n,t)},h}async function Pd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Nc(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,label:d}=await Bc(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:m}=zc(e),y=vc(h),x=Wc(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=m.get("fill");x.stroke=b??f;const k=h.append("g");e.icon&&k.html(`<g>${await ls(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const C=k.node().getBBox(),w=C.width,S=C.height,T=C.x,v=C.y,B=Math.max(w,S)*Math.SQRT2+40,L=y.circle(0,0,B,x),M=Math.max(B,c.width),_=B+c.height+u,A=y.rectangle(-M/2,-_/2,M,_,{...x,fill:"transparent",stroke:"none"}),F=h.insert((()=>L),":first-child"),$=h.insert((()=>A));return k.attr("transform",`translate(${-w/2-T},${p?c.height/2+u/2-S/2-v:-c.height/2-u/2-S/2-v})`),k.attr("style",`color: ${m.get("stroke")??g};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),F.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),Mc(e,$),e.intersect=function(t){Pe.info("iconSquare intersect",e,t);return sd.rect(e,t)},h}async function zd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Nc(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Bc(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=zc(e),b=-f/2,k=-g/2,C=e.label?8:0,w=vc(h),S=Wc(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=x.get("fill");S.stroke=T??y;const v=w.path(Rc(b,k,f,g,5),S),B=Math.max(f,c.width),L=g+c.height+C,M=w.rectangle(-B/2,-L/2,B,L,{...S,fill:"transparent",stroke:"none"}),_=h.insert((()=>v),":first-child").attr("class","icon-shape2"),A=h.insert((()=>M));if(e.icon){const t=h.append("g");t.html(`<g>${await ls(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+C/2-a/2-o:-c.height/2-C/2-a/2-o})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),_.attr("transform",`translate(0,${p?c.height/2+C/2:-c.height/2-C/2})`),Mc(e,A),e.intersect=function(t){if(Pe.info("iconSquare intersect",e,t),!e.label)return sd.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+C},{x:r+f/2,y:i-a/2+c.height+C},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+C},{x:r-c.width/2,y:i-a/2+c.height+C}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return sd.polygon(e,n,t)},h}async function qd(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Nc(e);e.labelStyle=a;const n=e.assetHeight??48,o=e.assetWidth??48,s=Math.max(n,o),l=null==i?void 0:i.wrappingWidth;e.width=Math.max(s,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await Bc(t,e,"icon-shape default"),p="t"===e.pos,g=s+2*d,f=s+2*d,{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=zc(e),b=-f/2,k=-g/2,C=e.label?8:0,w=vc(h),S=Wc(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=x.get("fill");S.stroke=T??y;const v=w.path(Rc(b,k,f,g,.1),S),B=Math.max(f,c.width),L=g+c.height+C,M=w.rectangle(-B/2,-L/2,B,L,{...S,fill:"transparent",stroke:"none"}),_=h.insert((()=>v),":first-child"),A=h.insert((()=>M));if(e.icon){const t=h.append("g");t.html(`<g>${await ls(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,a=r.height,n=r.x,o=r.y;t.attr("transform",`translate(${-i/2-n},${p?c.height/2+C/2-a/2-o:-c.height/2-C/2-a/2-o})`),t.attr("style",`color: ${x.get("stroke")??m};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),_.attr("transform",`translate(0,${p?c.height/2+C/2:-c.height/2-C/2})`),Mc(e,A),e.intersect=function(t){if(Pe.info("iconSquare intersect",e,t),!e.label)return sd.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=p?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+C},{x:r+f/2,y:i-a/2+c.height+C},{x:r+f/2,y:i+a/2},{x:r-f/2,y:i+a/2},{x:r-f/2,y:i-a/2+c.height+C},{x:r-c.width/2,y:i-a/2+c.height+C}]:[{x:r-f/2,y:i-a/2},{x:r+f/2,y:i-a/2},{x:r+f/2,y:i-a/2+g},{x:r+c.width/2,y:i-a/2+g},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+g},{x:r-f/2,y:i-a/2+g}];return sd.polygon(e,n,t)},h}async function Nd(t,e,{config:{flowchart:r}}){const i=new Image;i.src=(null==e?void 0:e.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;const{labelStyles:o}=Nc(e);e.labelStyle=o;const s=null==r?void 0:r.wrappingWidth;e.defaultWidth=null==r?void 0:r.wrappingWidth;const l=Math.max(e.label?s??0:0,(null==e?void 0:e.assetWidth)??a),h="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:(null==e?void 0:e.assetHeight)??n;e.width=Math.max(h,s??0);const{shapeSvg:d,bbox:u,label:p}=await Bc(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,m=-c/2,y=e.label?8:0,x=vc(d),b=Wc(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=x.rectangle(f,m,h,c,b),C=Math.max(h,u.width),w=c+u.height+y,S=x.rectangle(-C/2,-w/2,C,w,{...b,fill:"none",stroke:"none"}),T=d.insert((()=>k),":first-child"),v=d.insert((()=>S));if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-y/2:c/2-u.height/2+y/2})`),T.attr("transform",`translate(0,${g?u.height/2+y/2:-u.height/2-y/2})`),Mc(e,v),e.intersect=function(t){if(Pe.info("iconSquare intersect",e,t),!e.label)return sd.rect(e,t);const r=e.x??0,i=e.y??0,a=e.height??0;let n=[];n=g?[{x:r-u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2},{x:r+u.width/2,y:i-a/2+u.height+y},{x:r+h/2,y:i-a/2+u.height+y},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+u.height+y},{x:r-u.width/2,y:i-a/2+u.height+y}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+c},{x:r+u.width/2,y:i-a/2+c},{x:r+u.width/2/2,y:i+a/2},{x:r-u.width/2,y:i+a/2},{x:r-u.width/2,y:i-a/2+c},{x:r-h/2,y:i-a/2+c}];return sd.polygon(e,n,t)},d}async function Wd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Ac(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=dd(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Mc(e,h),e.intersect=function(t){return sd.polygon(e,l,t)},a}async function jd(t,e,r){const{labelStyles:i,nodeStyles:a}=Nc(e);e.labelStyle=i;const{shapeSvg:n,bbox:o}=await Bc(t,e,_c(e)),s=Math.max(o.width+2*r.labelPaddingX,(null==e?void 0:e.width)||0),l=Math.max(o.height+2*r.labelPaddingY,(null==e?void 0:e.height)||0),h=-s/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if((null==r?void 0:r.rx)&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=vc(n),r=Wc(e,{}),i=u||p?t.path(Rc(h,c,s,l,u||0),r):t.rectangle(h,c,s,l,r);d=n.insert((()=>i),":first-child"),d.attr("class","basic label-container").attr("style",Ks(g))}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Ks(u)).attr("ry",Ks(p)).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return Mc(e,d),e.intersect=function(t){return sd.rect(e,t)},n}async function Hd(t,e){const{shapeSvg:r,bbox:i,label:a}=await Bc(t,e,"label"),n=r.insert("rect",":first-child");return n.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))})`),Mc(e,n),e.intersect=function(t){return sd.rect(e,t)},r}async function Ud(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Ac(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=dd(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Mc(e,h),e.intersect=function(t){return sd.polygon(e,l,t)},a}async function Yd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Ac(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=dd(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Mc(e,h),e.intersect=function(t){return sd.polygon(e,l,t)},a}function Vd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",_c(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,o=Math.max(35,(null==e?void 0:e.width)??0),s=Math.max(35,(null==e?void 0:e.height)??0),l=[{x:o,y:0},{x:0,y:s+3.5},{x:o-14,y:s+3.5},{x:0,y:2*s},{x:o,y:s-3.5},{x:14,y:s-3.5}],h=vc(a),c=Wc(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=Ac(l),u=h.path(d,c),p=a.insert((()=>u),":first-child");return n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${o/2},${-s})`),Mc(e,p),e.intersect=function(t){Pe.info("lightningBolt intersect",e,t);return sd.polygon(e,l,t)},a}Ie(Id,"hexagon"),Ie(Od,"hourglass"),Ie(Rd,"icon"),Ie(Pd,"iconCircle"),Ie(zd,"iconRounded"),Ie(qd,"iconSquare"),Ie(Nd,"imageSquare"),Ie(Wd,"inv_trapezoid"),Ie(jd,"drawRect"),Ie(Hd,"labelRect"),Ie(Ud,"lean_left"),Ie(Yd,"lean_right"),Ie(Vd,"lightningBolt");var Gd=Ie(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),Xd=Ie(((t,e,r,i,a,n,o)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+n+o}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),Zd=Ie(((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function Qd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+(e.padding??0),e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(n.height+h+(e.padding??0),e.height??0),d=.1*c;let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=vc(a),r=Xd(0,0,s,c,l,h,d),i=Zd(0,h,s,c,l,h),n=Wc(e,{}),o=t.path(r,n),g=t.path(i,n);a.insert((()=>g),":first-child").attr("class","line"),u=a.insert((()=>o),":first-child"),u.attr("class","basic label-container"),p&&u.attr("style",p)}else{const t=Gd(0,0,s,c,l,h,d);u=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",Ks(p)).attr("style",i)}return u.attr("label-offset-y",h),u.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),Mc(e,u),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),e.intersect=function(t){const r=sd.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let a=h*h*(1-i*i/(l*l));a>0&&(a=Math.sqrt(a)),a=h-a,t.y-(e.y??0)>0&&(a=-a),r.y+=a}return r},a}async function Jd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,{cssStyles:d}=e,u=vc(a),p=Wc(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...Fc(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,h,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],f=u.polygon(g.map((t=>[t.x,t.y])),p),m=a.insert((()=>f),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Mc(e,m),e.intersect=function(t){return sd.polygon(e,g,t)},a}async function Kd(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=vc(a),p=Wc(e,{}),g=[{x:h-5,y:c+5},{x:h-5,y:c+l+5},{x:h+s-5,y:c+l+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c+l-5},{x:h+s+5,y:c+l-5},{x:h+s+5,y:c-5},{x:h+5,y:c-5},{x:h+5,y:c},{x:h,y:c},{x:h,y:c+5}],f=[{x:h,y:c+5},{x:h+s-5,y:c+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c},{x:h,y:c}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=Ac(g),y=u.path(m,p),x=Ac(f),b=u.path(x,{...p,fill:"none"}),k=a.insert((()=>b),":first-child");return k.insert((()=>y),":first-child"),k.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),Mc(e,k),e.intersect=function(t){return sd.polygon(e,g,t)},a}async function tu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=l+h,d=-s/2,u=-c/2,{cssStyles:p}=e,g=Fc(d-5,u+c+5,d+s-5,u+c+5,h,.8),f=null==g?void 0:g[g.length-1],m=[{x:d-5,y:u+5},{x:d-5,y:u+c+5},...g,{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:f.y-10},{x:d+s+5,y:f.y-10},{x:d+s+5,y:u-5},{x:d+5,y:u-5},{x:d+5,y:u},{x:d,y:u},{x:d,y:u+5}],y=[{x:d,y:u+5},{x:d+s-5,y:u+5},{x:d+s-5,y:f.y-5},{x:d+s,y:f.y-5},{x:d+s,y:u},{x:d,y:u}],x=vc(a),b=Wc(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=Ac(m),C=x.path(k,b),w=Ac(y),S=x.path(w,b),T=a.insert((()=>C),":first-child");return T.insert((()=>S)),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n.width/2-5-(n.x-(n.left??0))}, ${-n.height/2+5-h/2-(n.y-(n.top??0))})`),Mc(e,T),e.intersect=function(t){return sd.polygon(e,m,t)},a}async function eu(t,e,{config:{themeVariables:r}}){var i;const{labelStyles:a,nodeStyles:n}=Nc(e);e.labelStyle=a;e.useHtmlLabels||!1!==(null==(i=Mr().flowchart)?void 0:i.htmlLabels)||(e.centerLabel=!0);const{shapeSvg:o,bbox:s}=await Bc(t,e,_c(e)),l=Math.max(s.width+2*(e.padding??0),(null==e?void 0:e.width)??0),h=Math.max(s.height+2*(e.padding??0),(null==e?void 0:e.height)??0),c=-l/2,d=-h/2,{cssStyles:u}=e,p=vc(o),g=Wc(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,l,h,g),m=o.insert((()=>f),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),Mc(e,m),e.intersect=function(t){return sd.rect(e,t)},o}Ie(Qd,"linedCylinder"),Ie(Jd,"linedWaveEdgedRect"),Ie(Kd,"multiRect"),Ie(tu,"multiWaveEdgedRectangle"),Ie(eu,"note");var ru=Ie(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD");async function iu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.width+e.padding+(n.height+e.padding),s=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=ru(0,0,o),n=t.path(i,r);l=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${o/2})`),h&&l.attr("style",h)}else l=dd(a,o,o,s);return i&&l.attr("style",i),Mc(e,l),e.intersect=function(t){return Pe.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",sd.polygon(e,s,t)),sd.polygon(e,s,t)},a}async function au(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=-Math.max(n.width+(e.padding??0),(null==e?void 0:e.width)??0)/2,l=-Math.max(n.height+(e.padding??0),(null==e?void 0:e.height)??0)/2,h=l/2,c=[{x:s+h,y:l},{x:s,y:0},{x:s+h,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:d}=e,u=vc(a),p=Wc(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=Ac(c),f=u.path(g,p),m=a.insert((()=>f),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${-h/2},0)`),o.attr("transform",`translate(${-h/2-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Mc(e,m),e.intersect=function(t){return sd.polygon(e,c,t)},a}async function nu(t,e){var r,i;const{labelStyles:a,nodeStyles:n}=Nc(e);let o;e.labelStyle=a,o=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",o).attr("id",e.domId||e.id),l=s.insert("g"),h=s.insert("g").attr("class","label").attr("style",n),c=e.description,d=e.label,u=h.node().appendChild(await Oc(d,e.labelStyle,!0,!0));let p={width:0,height:0};if(Xr(null==(i=null==(r=Ai())?void 0:r.flowchart)?void 0:i.htmlLabels)){const t=u.children[0],e=I(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}Pe.info("Text 2",c);const g=c||[],f=u.getBBox(),m=h.node().appendChild(await Oc(g.join?g.join("<br/>"):g,e.labelStyle,!0,!0)),y=m.children[0],x=I(m);p=y.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;I(m).attr("transform","translate( "+(p.width>f.width?0:(f.width-p.width)/2)+", "+(f.height+b+5)+")"),I(u).attr("transform","translate( "+(p.width<f.width?0:-(f.width-p.width)/2)+", 0)"),p=h.node().getBBox(),h.attr("transform","translate("+-p.width/2+", "+(-p.height/2-b+3)+")");const k=p.width+(e.padding||0),C=p.height+(e.padding||0),w=-p.width/2-b,S=-p.height/2-b;let T,v;if("handDrawn"===e.look){const t=vc(s),r=Wc(e,{}),i=t.path(Rc(w,S,k,C,e.rx||0),r),a=t.line(-p.width/2-b,-p.height/2-b+f.height+b,p.width/2+b,-p.height/2-b+f.height+b,r);v=s.insert((()=>(Pe.debug("Rough node insert CXC",i),a)),":first-child"),T=s.insert((()=>(Pe.debug("Rough node insert CXC",i),i)),":first-child")}else T=l.insert("rect",":first-child"),v=l.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),v.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+f.height+b).attr("y2",-p.height/2-b+f.height+b);return Mc(e,T),e.intersect=function(t){return sd.rect(e,t)},s}async function ou(t,e){return jd(t,e,{rx:5,ry:5,labelPaddingX:1*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)})}async function su(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=(null==e?void 0:e.padding)??0,l=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),h=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),c=-n.width/2-s,d=-n.height/2-s,{cssStyles:u}=e,p=vc(a),g=Wc(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:c,y:d},{x:c+l+8,y:d},{x:c+l+8,y:d+h},{x:c-8,y:d+h},{x:c-8,y:d},{x:c,y:d},{x:c,y:d+h}],m=p.polygon(f.map((t=>[t.x,t.y])),g),y=a.insert((()=>m),":first-child");return y.attr("class","basic label-container").attr("style",Ks(u)),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),Mc(e,y),e.intersect=function(t){return sd.rect(e,t)},a}async function lu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=vc(a),p=Wc(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:h,y:c},{x:h,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-l/2}],f=Ac(g),m=u.path(f,p),y=a.insert((()=>m),":first-child");return y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))}, ${-l/4+(e.padding??0)-(n.y-(n.top??0))})`),Mc(e,y),e.intersect=function(t){return sd.polygon(e,g,t)},a}async function hu(t,e){return jd(t,e,{rx:0,ry:0,labelPaddingX:2*((null==e?void 0:e.padding)||0),labelPaddingY:1*((null==e?void 0:e.padding)||0)})}async function cu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.height+e.padding,s=n.width+o/4+e.padding;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Rc(-s/2,-o/2,s,o,o/2),n=t.path(i,r);l=a.insert((()=>n),":first-child"),l.attr("class","basic label-container").attr("style",Ks(h))}else l=a.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return Mc(e,l),e.intersect=function(t){return sd.rect(e,t)},a}async function du(t,e){return jd(t,e,{rx:5,ry:5})}function uu(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Nc(e);e.labelStyle=i;const{cssStyles:n}=e,{lineColor:o,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=vc(h),d=Wc(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=c.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),p=s??l,g=c.circle(0,0,5,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),f=h.insert((()=>u),":first-child");return f.insert((()=>g)),n&&f.selectAll("path").attr("style",n),a&&f.selectAll("path").attr("style",a),Mc(e,f),e.intersect=function(t){return sd.circle(e,7,t)},h}function pu(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=vc(a).circle(0,0,14,Pc(i));n=a.insert((()=>t)),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Mc(e,n),e.intersect=function(t){return sd.circle(e,7,t)},a}async function gu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=((null==e?void 0:e.padding)||0)/2,s=n.width+e.padding,l=n.height+e.padding,h=-n.width/2-o,c=-n.height/2-o,d=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=t.rectangle(h-8,c,s+16,l,r),n=t.line(h,c,h,c+l,r),o=t.line(h+s,c,h+s,c+l,r);a.insert((()=>n),":first-child"),a.insert((()=>o),":first-child");const d=a.insert((()=>i),":first-child"),{cssStyles:u}=e;d.attr("class","basic label-container").attr("style",Ks(u)),Mc(e,d)}else{const t=dd(a,s,l,d);i&&t.attr("style",i),Mc(e,t)}return e.intersect=function(t){return sd.polygon(e,d,t)},a}async function fu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=-o/2,h=-s/2,c=.2*s,d=.2*s,{cssStyles:u}=e,p=vc(a),g=Wc(e,{}),f=[{x:l-c/2,y:h},{x:l+o+c/2,y:h},{x:l+o+c/2,y:h+s},{x:l-c/2,y:h+s}],m=[{x:l+o-c/2,y:h+s},{x:l+o+c/2,y:h+s},{x:l+o+c/2,y:h+s-d}];"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=Ac(f),x=p.path(y,g),b=Ac(m),k=p.path(b,{...g,fillStyle:"solid"}),C=a.insert((()=>k),":first-child");return C.insert((()=>x),":first-child"),C.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),Mc(e,C),e.intersect=function(t){return sd.polygon(e,f,t)},a}async function mu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/4,c=.2*s,d=.2*l,u=l+h,{cssStyles:p}=e,g=vc(a),f=Wc(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-s/2*.1,y:u/2},...Fc(-s/2-s/2*.1,u/2,s/2+s/2*.1,u/2,h,.8),{x:s/2+s/2*.1,y:-u/2},{x:-s/2-s/2*.1,y:-u/2}],y=-s/2+s/2*.1,x=-u/2-.4*d,b=[{x:y+s-c,y:1.4*(x+l)},{x:y+s,y:x+l-d},{x:y+s,y:.9*(x+l)},...Fc(y+s,1.3*(x+l),y+s-c,1.5*(x+l),.03*-l,.5)],k=Ac(m),C=g.path(k,f),w=Ac(b),S=g.path(w,{...f,fillStyle:"solid"}),T=a.insert((()=>S),":first-child");return T.insert((()=>C),":first-child"),T.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),Mc(e,T),e.intersect=function(t){return sd.polygon(e,m,t)},a}async function yu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+e.padding,(null==e?void 0:e.width)||0),s=Math.max(n.height+e.padding,(null==e?void 0:e.height)||0),l=-o/2,h=-s/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",o).attr("height",s),Mc(e,c),e.intersect=function(t){return sd.rect(e,t)},a}Ie(iu,"question"),Ie(au,"rect_left_inv_arrow"),Ie(nu,"rectWithTitle"),Ie(ou,"roundedRect"),Ie(su,"shadedProcess"),Ie(lu,"slopedRect"),Ie(hu,"squareRect"),Ie(cu,"stadium"),Ie(du,"state"),Ie(uu,"stateEnd"),Ie(pu,"stateStart"),Ie(gu,"subroutine"),Ie(fu,"taggedRect"),Ie(mu,"taggedWaveEdgedRectangle"),Ie(yu,"text");var xu=Ie(((t,e,r,i,a,n)=>`M${t},${e}\n a${a},${n} 0,0,1 0,${-i}\n l${r},0\n a${a},${n} 0,0,1 0,${i}\n M${r},${-i}\n a${a},${n} 0,0,0 0,${i}\n l${-r},0`),"createCylinderPathD"),bu=Ie(((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),ku=Ie(((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" ")),"createInnerCylinderPathD");async function Cu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o,halfPadding:s}=await Bc(t,e,_c(e)),l="neo"===e.look?2*s:s,h=n.height+l,c=h/2,d=c/(2.5+h/50),u=n.width+d+l,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=vc(a),r=bu(0,0,u,h,d,c),i=ku(0,0,u,h,d,c),n=t.path(r,Wc(e,{})),o=t.path(i,Wc(e,{fill:"none"}));g=a.insert((()=>o),":first-child"),g=a.insert((()=>n),":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=xu(0,0,u,h,d,c);g=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",Ks(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),o.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Mc(e,g),e.intersect=function(t){const r=sd.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let a=d*d*(1-i*i/(c*c));0!=a&&(a=Math.sqrt(Math.abs(a))),a=d-a,t.x-(e.x??0)>0&&(a=-a),r.x+=a}return r},a}async function wu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=n.width+e.padding,s=n.height+e.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=vc(a),r=Wc(e,{}),i=Ac(l),n=t.path(i,r);h=a.insert((()=>n),":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),c&&h.attr("style",c)}else h=dd(a,o,s,l);return i&&h.attr("style",i),e.width=o,e.height=s,Mc(e,h),e.intersect=function(t){return sd.polygon(e,l,t)},a}async function Su(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(60,n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(20,n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),{cssStyles:l}=e,h=vc(a),c=Wc(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=[{x:-o/2*.8,y:-s/2},{x:o/2*.8,y:-s/2},{x:o/2,y:-s/2*.6},{x:o/2,y:s/2},{x:-o/2,y:s/2},{x:-o/2,y:-s/2*.6}],u=Ac(d),p=h.path(u,c),g=a.insert((()=>p),":first-child");return g.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&g.selectChildren("path").attr("style",i),Mc(e,g),e.intersect=function(t){return sd.polygon(e,d,t)},a}async function Tu(t,e){var r;const{labelStyles:i,nodeStyles:a}=Nc(e);e.labelStyle=i;const{shapeSvg:n,bbox:o,label:s}=await Bc(t,e,_c(e)),l=Xr(null==(r=Ai().flowchart)?void 0:r.htmlLabels),h=o.width+(e.padding??0),c=h+o.height,d=h+o.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-c}],{cssStyles:p}=e,g=vc(n),f=Wc(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=Ac(u),y=g.path(m,f),x=n.insert((()=>y),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return p&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",p),a&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",a),e.width=h,e.height=c,Mc(e,x),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${c/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return Pe.info("Triangle intersect",e,u,t),sd.polygon(e,u,t)},n}async function vu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=l/8,c=l+h,{cssStyles:d}=e,u=70-s,p=u>0?u/2:0,g=vc(a),f=Wc(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-s/2-p,y:c/2},...Fc(-s/2-p,c/2,s/2+p,c/2,h,.8),{x:s/2+p,y:-c/2},{x:-s/2-p,y:-c/2}],y=Ac(m),x=g.path(y,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-s/2+(e.padding??0)-(n.x-(n.left??0))},${-l/2+(e.padding??0)-h-(n.y-(n.top??0))})`),Mc(e,b),e.intersect=function(t){return sd.polygon(e,m,t)},a}async function Bu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n}=await Bc(t,e,_c(e)),o=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),s=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),l=o/s;let h=o,c=s;h>c*l?c=h/l:h=c*l,h=Math.max(h,100),c=Math.max(c,50);const d=Math.min(.2*c,c/4),u=c+2*d,{cssStyles:p}=e,g=vc(a),f=Wc(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2,y:u/2},...Fc(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...Fc(h/2,-u/2,-h/2,-u/2,d,-1)],y=Ac(m),x=g.path(y,f),b=a.insert((()=>x),":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),Mc(e,b),e.intersect=function(t){return sd.polygon(e,m,t)},a}async function Lu(t,e){const{labelStyles:r,nodeStyles:i}=Nc(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,label:o}=await Bc(t,e,_c(e)),s=Math.max(n.width+2*(e.padding??0),(null==e?void 0:e.width)??0),l=Math.max(n.height+2*(e.padding??0),(null==e?void 0:e.height)??0),h=-s/2,c=-l/2,{cssStyles:d}=e,u=vc(a),p=Wc(e,{}),g=[{x:h-5,y:c-5},{x:h-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-5}],f=`M${h-5},${c-5} L${h+s},${c-5} L${h+s},${c+l} L${h-5},${c+l} L${h-5},${c-5}\n M${h-5},${c} L${h+s},${c}\n M${h},${c-5} L${h},${c+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const m=u.path(f,p),y=a.insert((()=>m),":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${-n.width/2+2.5-(n.x-(n.left??0))}, ${-n.height/2+2.5-(n.y-(n.top??0))})`),Mc(e,y),e.intersect=function(t){return sd.polygon(e,g,t)},a}async function Mu(t,e,r,i,a=r.class.padding??12){const n=i?0:3,o=t.insert("g").attr("class",_c(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,d=0,u=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await _u(s,{text:`«${t}»`},0);d=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await _u(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=o.insert("g").attr("class","members-group text");let f=0;for(const x of e.members){f+=await _u(h,x,f,[x.parseClassifier()])+n}p=h.node().getBBox().height,p<=0&&(p=a/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const x of e.methods){m+=await _u(c,x,m,[x.parseClassifier()])+n}let y=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),y=o.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*a})`),y=o.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*a:2*a)})`),y=o.node().getBBox(),{shapeSvg:o,bbox:y}}async function _u(t,e,r,i=[]){const a=t.insert("g").attr("class","label").attr("style",i.join("; ")),n=Mr();let o="useHtmlLabels"in e?e.useHtmlLabels:Xr(n.htmlLabels)??!0,s="";s="text"in e?e.text:e.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),ai(s)&&(o=!0);const l=await vh(a,Ei(Qs(s)),{width:qs(s,n)+50,classes:"markdown-node-label",useHtmlLabels:o},n);let h,c=1;if(o){const t=l.children[0],e=I(l);c=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(c+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===s.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){var i;if(e.style.display="flex",e.style.flexDirection="column",t){const t=(null==(i=n.fontSize)?void 0:i.toString())??window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}Ie(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{i.includes("font-weight: bolder")&&I(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const t=l.children[0];if(""===l.textContent||l.textContent.includes(">")){t.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===s[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}async function Au(t,e){var r,i;const a=Ai(),n=a.class.padding??12,o=n,s=e.useHtmlLabels??Xr(a.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Mu(t,e,a,s,o),{labelStyles:d,nodeStyles:u}=Nc(e);e.labelStyle=d,e.cssStyles=l.styles||"";const p=(null==(r=l.styles)?void 0:r.join(";"))||u||"";e.cssStyles||(e.cssStyles=p.replaceAll("!important","").split(";"));const g=0===l.members.length&&0===l.methods.length&&!(null==(i=a.class)?void 0:i.hideEmptyMembersBox),f=vc(h),m=Wc(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=c.width;let x=c.height;0===l.members.length&&0===l.methods.length?x+=o:l.members.length>0&&0===l.methods.length&&(x+=2*o);const b=-y/2,k=-x/2,C=f.rectangle(b-n,k-n-(g?n:0===l.members.length&&0===l.methods.length?-n/2:0),y+2*n,x+2*n+(g?2*n:0===l.members.length&&0===l.methods.length?-n:0),m),w=h.insert((()=>C),":first-child");w.attr("class","basic label-container");const S=w.node().getBBox();h.selectAll(".text").each(((t,e,r)=>{var i;const a=I(r[e]),o=a.attr("transform");let c=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(c=parseFloat(t[2]))}let d=c+k+n-(g?n:0===l.members.length&&0===l.methods.length?-n/2:0);s||(d-=4);let u=b;(a.attr("class").includes("label-group")||a.attr("class").includes("annotation-group"))&&(u=-(null==(i=a.node())?void 0:i.getBBox().width)/2||0,h.selectAll("text").each((function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(u=0)}))),a.attr("transform",`translate(${u}, ${d})`)}));const T=h.select(".annotation-group").node().getBBox().height-(g?n/2:0)||0,v=h.select(".label-group").node().getBBox().height-(g?n/2:0)||0,B=h.select(".members-group").node().getBBox().height-(g?n/2:0)||0;if(l.members.length>0||l.methods.length>0||g){const t=f.line(S.x,T+v+k+n,S.x+S.width,T+v+k+n,m);h.insert((()=>t)).attr("class","divider").attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const t=f.line(S.x,T+v+B+k+2*o+n,S.x+S.width,T+v+B+k+n+2*o,m);h.insert((()=>t)).attr("class","divider").attr("style",p)}if("handDrawn"!==l.look&&h.selectAll("path").attr("style",p),w.select(":nth-child(2)").attr("style",p),h.selectAll(".divider").select("path").attr("style",p),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",p),!s){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(p);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(d){const e=t.exec(d);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return Mc(e,w),e.intersect=function(t){return sd.rect(e,t)},h}Ie(Cu,"tiltedCylinder"),Ie(wu,"trapezoid"),Ie(Su,"trapezoidalPentagon"),Ie(Tu,"triangle"),Ie(vu,"waveEdgedRectangle"),Ie(Bu,"waveRectangle"),Ie(Lu,"windowPane"),Ie(Mu,"textHelper"),Ie(_u,"addText"),Ie(Au,"classBox");var Fu=Ie((t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}}),"colorFromPriority");async function $u(t,e,{config:r}){var i,a;const{labelStyles:n,nodeStyles:o}=Nc(e);e.labelStyle=n||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:l,bbox:h,label:c}=await Bc(t,e,_c(e)),d=e.padding||10;let u,p="";"ticket"in e&&e.ticket&&(null==(i=null==r?void 0:r.kanban)?void 0:i.ticketBaseUrl)&&(p=null==(a=null==r?void 0:r.kanban)?void 0:a.ticketBaseUrl.replace("#TICKET#",e.ticket),u=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const g={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let f,m;({label:f,bbox:m}=u?await Lc(u,"ticket"in e&&e.ticket||"",g):await Lc(l,"ticket"in e&&e.ticket||"",g));const{label:y,bbox:x}=await Lc(l,"assigned"in e&&e.assigned||"",g);e.width=s;const b=(null==e?void 0:e.width)||0,k=Math.max(m.height,x.height)/2,C=Math.max(h.height+20,(null==e?void 0:e.height)||0)+k,w=-b/2,S=-C/2;let T;c.attr("transform","translate("+(d-b/2)+", "+(-k-h.height/2)+")"),f.attr("transform","translate("+(d-b/2)+", "+(-k+h.height/2)+")"),y.attr("transform","translate("+(d+b/2-x.width-20)+", "+(-k+h.height/2)+")");const{rx:v,ry:B}=e,{cssStyles:L}=e;if("handDrawn"===e.look){const t=vc(l),r=Wc(e,{}),i=v||B?t.path(Rc(w,S,b,C,v||0),r):t.rectangle(w,S,b,C,r);T=l.insert((()=>i),":first-child"),T.attr("class","basic label-container").attr("style",L||null)}else{T=l.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",o).attr("rx",v??5).attr("ry",B??5).attr("x",w).attr("y",S).attr("width",b).attr("height",C);const t="priority"in e&&e.priority;if(t){const e=l.append("line"),r=w+2,i=S+Math.floor((v??0)/2),a=S+C-Math.floor((v??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",a).attr("stroke-width","4").attr("stroke",Fu(t))}}return Mc(e,T),e.height=C,e.intersect=function(t){return sd.rect(e,t)},l}Ie($u,"kanbanItem");var Eu=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:hu},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ou},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:cu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:gu},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ld},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:iu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Id},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Yd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ud},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:wu},{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:Wd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_d},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:yu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ud},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:su},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:pu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:uu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:$d},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Od},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:kd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:wd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Vd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:vu},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ed},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Cu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Qd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Sd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Md},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Tu},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Lu},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Ad},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Su},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:lu},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tu},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Kd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:cd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:md},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:mu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:fu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Bu},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:au},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Jd}],Du=Ie((()=>{const t={state:du,choice:pd,note:eu,rectWithTitle:nu,labelRect:Hd,iconSquare:qd,iconCircle:Pd,icon:Rd,iconRounded:zd,imageSquare:Nd,anchor:ld,kanbanItem:$u,classBox:Au},e=[...Object.entries(t),...Eu.flatMap((t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map((e=>[e,t.handler]))))];return Object.fromEntries(e)}),"generateShapeMap")();function Iu(t){return t in Du}Ie(Iu,"isValidShape");var Ou=new Map;async function Ru(t,e,r){let i,a;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const n=e.shape?Du[e.shape]:void 0;if(!n)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),a=await n(i,e,r)}else a=await n(t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Ou.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}Ie(Ru,"insertNode");var Pu=Ie(((t,e)=>{Ou.set(e.id,t)}),"setNodeElem"),zu=Ie((()=>{Ou.clear()}),"clear"),qu=Ie((t=>{const e=Ou.get(t.id);Pe.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),Nu={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Wu(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=ju(t),e=ju(e);const[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],o=a-r,s=n-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}Ie(Wu,"calculateDeltaAndAngle");var ju=Ie((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),Hu=Ie((t=>({x:Ie((function(e,r,i){let a=0;const n=ju(i[0]).x<ju(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(Nu,t.arrowTypeStart)){const{angle:e,deltaX:r}=Wu(i[0],i[1]);a=Nu[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Nu,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Wu(i[i.length-1],i[i.length-2]);a=Nu[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const o=Math.abs(ju(e).x-ju(i[i.length-1]).x),s=Math.abs(ju(e).y-ju(i[i.length-1]).y),l=Math.abs(ju(e).x-ju(i[0]).x),h=Math.abs(ju(e).y-ju(i[0]).y),c=Nu[t.arrowTypeStart],d=Nu[t.arrowTypeEnd];if(o<d&&o>0&&s<d){let t=d+1-o;t*="right"===n?-1:1,a-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===n?-1:1,a+=t}return ju(e).x+a}),"x"),y:Ie((function(e,r,i){let a=0;const n=ju(i[0]).y<ju(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(Nu,t.arrowTypeStart)){const{angle:e,deltaY:r}=Wu(i[0],i[1]);a=Nu[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Nu,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Wu(i[i.length-1],i[i.length-2]);a=Nu[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const o=Math.abs(ju(e).y-ju(i[i.length-1]).y),s=Math.abs(ju(e).x-ju(i[i.length-1]).x),l=Math.abs(ju(e).y-ju(i[0]).y),h=Math.abs(ju(e).x-ju(i[0]).x),c=Nu[t.arrowTypeStart],d=Nu[t.arrowTypeEnd];if(o<d&&o>0&&s<d){let t=d+1-o;t*="up"===n?-1:1,a-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===n?-1:1,a+=t}return ju(e).y+a}),"y")})),"getLineFunctionsWithOffset"),Uu=Ie(((t,e,r,i,a)=>{e.arrowTypeStart&&Vu(t,"start",e.arrowTypeStart,r,i,a),e.arrowTypeEnd&&Vu(t,"end",e.arrowTypeEnd,r,i,a)}),"addEdgeMarkers"),Yu={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Vu=Ie(((t,e,r,i,a,n)=>{const o=Yu[r];if(!o)return void Pe.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${a}_${n}-${o}${s})`)}),"addEdgeMarker"),Gu=new Map,Xu=new Map,Zu=Ie((()=>{Gu.clear(),Xu.clear()}),"clear"),Qu=Ie((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Ju=Ie((async(t,e)=>{let r=Xr(Ai().flowchart.htmlLabels);const i=await vh(t,e.label,{style:Qu(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});Pe.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label");n.node().appendChild(i);let o,s=i.getBBox();if(r){const t=i.children[0],e=I(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}if(n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Gu.set(e.id,a),e.width=s.width,e.height=s.height,e.startLabelLeft){const r=await Oc(e.startLabelLeft,Qu(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Xu.get(e.id)||Xu.set(e.id,{}),Xu.get(e.id).startLeft=i,Ku(o,e.startLabelLeft)}if(e.startLabelRight){const r=await Oc(e.startLabelRight,Qu(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=i.node().appendChild(r),a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Xu.get(e.id)||Xu.set(e.id,{}),Xu.get(e.id).startRight=i,Ku(o,e.startLabelRight)}if(e.endLabelLeft){const r=await Oc(e.endLabelLeft,Qu(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Xu.get(e.id)||Xu.set(e.id,{}),Xu.get(e.id).endLeft=i,Ku(o,e.endLabelLeft)}if(e.endLabelRight){const r=await Oc(e.endLabelRight,Qu(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");o=a.node().appendChild(r);const n=r.getBBox();a.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),Xu.get(e.id)||Xu.set(e.id,{}),Xu.get(e.id).endRight=i,Ku(o,e.endLabelRight)}return i}),"insertEdgeLabel");function Ku(t,e){Ai().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}Ie(Ku,"setTerminalWidth");var tp=Ie(((t,e)=>{Pe.debug("Moving label abc88 ",t.id,t.label,Gu.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=Ai(),{subGraphTitleTotalMargin:a}=hs(i);if(t.label){const i=Gu.get(t.id);let n=t.x,o=t.y;if(r){const i=Xs.calcLabelPosition(r);Pe.debug("Moving label "+t.label+" from (",n,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,o=i.y)}i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){const e=Xu.get(t.id).startLeft;let i=t.x,a=t.y;if(r){const e=Xs.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const e=Xu.get(t.id).startRight;let i=t.x,a=t.y;if(r){const e=Xs.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const e=Xu.get(t.id).endLeft;let i=t.x,a=t.y;if(r){const e=Xs.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const e=Xu.get(t.id).endRight;let i=t.x,a=t.y;if(r){const e=Xs.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,a=e.y}e.attr("transform",`translate(${i}, ${a})`)}}),"positionEdgeLabel"),ep=Ie(((t,e)=>{const r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return a>=o||n>=s}),"outsideNode"),rp=Ie(((t,e,r)=>{Pe.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,a=t.y,n=Math.abs(i-r.x),o=t.width/2;let s=r.x<e.x?o-n:o+n;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*o>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-a:a-l-e.y;s=c*t/h;const i={x:r.x<e.x?r.x+s:r.x-c+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),Pe.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${s}`,i),i}{s=r.x<e.x?e.x-o-i:i-o-e.x;let t=h*s/c,a=r.x<e.x?r.x+c-s:r.x-c+s,n=r.y<e.y?r.y+t:r.y-t;return Pe.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${s}`,{_x:a,_y:n}),0===s&&(a=e.x,n=e.y),0===c&&(a=e.x),0===h&&(n=e.y),{x:a,y:n}}}),"intersection"),ip=Ie(((t,e)=>{Pe.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach((t=>{if(Pe.info("abc88 checking point",t,e),ep(e,t)||a)Pe.warn("abc88 outside",t,i),i=t,a||r.push(t);else{const n=rp(e,i,t);Pe.debug("abc88 inside",t,i,n),Pe.debug("abc88 intersection",n,e);let o=!1;r.forEach((t=>{o=o||t.x===n.x&&t.y===n.y})),r.some((t=>t.x===n.x&&t.y===n.y))?Pe.warn("abc88 no intersect",n,r):r.push(n),a=!0}})),Pe.debug("returning points",r),r}),"cutPathAtIntersect");function ap(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const a=t[i-1],n=t[i],o=t[i+1];(a.x===n.x&&n.y===o.y&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===o.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-o.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}Ie(ap,"extractCornerPoints");var np=Ie((function(t,e,r){const i=e.x-t.x,a=e.y-t.y,n=r/Math.sqrt(i*i+a*a);return{x:e.x-n*i,y:e.y-n*a}}),"findAdjacentPoint"),op=Ie((function(t){const{cornerPointPositions:e}=ap(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],a=t[i+1],n=t[i],o=np(e,n,5),s=np(a,n,5),l=s.x-o.x,h=s.y-o.y;r.push(o);const c=2*Math.sqrt(2);let d={x:n.x,y:n.y};if(Math.abs(a.x-e.x)>10&&Math.abs(a.y-e.y)>=10){Pe.debug("Corner point fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));const t=5;d=n.x===o.x?{x:l<0?o.x-t+c:o.x+t-c,y:h<0?o.y-c:o.y+c}:{x:l<0?o.x-c:o.x+c,y:h<0?o.y-t+c:o.y+t-c}}else Pe.debug("Corner point skipping fixing",Math.abs(a.x-e.x),Math.abs(a.y-e.y));r.push(d,s)}else r.push(t[i]);return r}),"fixCorners"),sp=Ie((function(t,e,r,i,a,n,o){const{handDrawnSeed:s}=Ai();let l=e.points,h=!1;const c=a;var d=n;d.intersect&&c.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(c.intersect(l[0])),Pe.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],d,d.intersect(l[l.length-1])),l.push(d.intersect(l[l.length-1]))),e.toCluster&&(Pe.info("to cluster abc88",r.get(e.toCluster)),l=ip(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(Pe.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=ip(l.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let u=l.filter((t=>!Number.isNaN(t.y)));u=op(u);let p=K;e.curve&&(p=e.curve);const{x:g,y:f}=Hu(e),m=tt().x(g).y(f).curve(p);let y,x;switch(e.thickness){case"normal":default:y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-invisible"}switch(e.pattern){case"solid":default:y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed"}let b=m(u);const k=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=vc(t);Object.assign([],u);const i=r.path(b,{roughness:.3,seed:s});y+=" transition",x=I(i).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let a=x.attr("d");x.attr("d",a),t.node().appendChild(x.node())}else x=t.append("path").attr("d",b).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce(((t,e)=>t+";"+e),""):"");let C="";(Ai().flowchart.arrowMarkerAbsolute||Ai().state.arrowMarkerAbsolute)&&(C=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,C=C.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Pe.info("arrowTypeStart",e.arrowTypeStart),Pe.info("arrowTypeEnd",e.arrowTypeEnd),Uu(x,e,C,o,i);let w={};return h&&(w.updatedPath=l),w.originalPath=e.points,w}),"insertEdge"),lp=Ie(((t,e,r,i)=>{e.forEach((e=>{hp[e](t,r,i)}))}),"insertMarkers"),hp={extension:Ie(((t,e,r)=>{Pe.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:Ie(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:Ie(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:Ie(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),lollipop:Ie(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:Ie(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:Ie(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:Ie(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:Ie(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},cp=lp,dp={common:si,getConfig:Mr,insertCluster:Xc,insertEdge:sp,insertEdgeLabel:Ju,insertMarkers:cp,insertNode:Ru,interpolateToCurve:ks,labelHelper:Bc,log:Pe,positionEdgeLabel:tp},up={},pp=Ie((t=>{for(const e of t)up[e.name]=e}),"registerLayoutLoaders");Ie((()=>{pp([{name:"dagre",loader:Ie((async()=>await B((()=>import("./dagre-4EVJKHTY-DiF_5n5x.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url)),"loader")}])}),"registerDefaultLayoutLoaders")();var gp=Ie((async(t,e)=>{if(!(t.layoutAlgorithm in up))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=up[t.layoutAlgorithm];return(await r.loader()).render(t,e,dp,{algorithm:r.algorithm})}),"render"),fp=Ie(((t="",{fallback:e="dagre"}={})=>{if(t in up)return t;if(e in up)return Pe.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm"),mp="11.4.1",yp=Ie((t=>{var e;const{securityLevel:r}=Ai();let i=I("body");if("sandbox"===r){const r=(null==(e=I(`#i${t}`).node())?void 0:e.contentDocument)??document;i=I(r.body)}return i.select(`#${t}`)}),"selectSvgElement"),xp="comm",bp="rule",kp="decl",Cp=Math.abs,wp=String.fromCharCode;function Sp(t){return t.trim()}function Tp(t,e,r){return t.replace(e,r)}function vp(t,e,r){return t.indexOf(e,r)}function Bp(t,e){return 0|t.charCodeAt(e)}function Lp(t,e,r){return t.slice(e,r)}function Mp(t){return t.length}function _p(t,e){return e.push(t),t}var Ap=1,Fp=1,$p=0,Ep=0,Dp=0,Ip="";function Op(t,e,r,i,a,n,o,s){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:Ap,column:Fp,length:o,return:"",siblings:s}}function Rp(){return Dp=Ep<$p?Bp(Ip,Ep++):0,Fp++,10===Dp&&(Fp=1,Ap++),Dp}function Pp(){return Bp(Ip,Ep)}function zp(){return Ep}function qp(t,e){return Lp(Ip,t,e)}function Np(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Wp(t){return Sp(qp(Ep-1,Up(91===t?t+2:40===t?t+1:t)))}function jp(t){for(;(Dp=Pp())&&Dp<33;)Rp();return Np(t)>2||Np(Dp)>3?"":" "}function Hp(t,e){for(;--e&&Rp()&&!(Dp<48||Dp>102||Dp>57&&Dp<65||Dp>70&&Dp<97););return qp(t,zp()+(e<6&&32==Pp()&&32==Rp()))}function Up(t){for(;Rp();)switch(Dp){case t:return Ep;case 34:case 39:34!==t&&39!==t&&Up(Dp);break;case 40:41===t&&Up(t);break;case 92:Rp()}return Ep}function Yp(t,e){for(;Rp()&&t+Dp!==57&&(t+Dp!==84||47!==Pp()););return"/*"+qp(e,Ep-1)+"*"+wp(47===t?t:Rp())}function Vp(t){for(;!Np(Pp());)Rp();return qp(t,Ep)}function Gp(t){return function(t){return Ip="",t}(Xp("",null,null,null,[""],t=function(t){return Ap=Fp=1,$p=Mp(Ip=t),Ep=0,[]}(t),0,[0],t))}function Xp(t,e,r,i,a,n,o,s,l){for(var h=0,c=0,d=o,u=0,p=0,g=0,f=1,m=1,y=1,x=0,b="",k=a,C=n,w=i,S=b;m;)switch(g=x,x=Rp()){case 40:if(108!=g&&58==Bp(S,d-1)){-1!=vp(S+=Tp(Wp(x),"&","&\f"),"&\f",Cp(h?s[h-1]:0))&&(y=-1);break}case 34:case 39:case 91:S+=Wp(x);break;case 9:case 10:case 13:case 32:S+=jp(g);break;case 92:S+=Hp(zp()-1,7);continue;case 47:switch(Pp()){case 42:case 47:_p(Qp(Yp(Rp(),zp()),e,r,l),l),5!=Np(g||1)&&5!=Np(Pp()||1)||!Mp(S)||" "===Lp(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*f:s[h++]=Mp(S)*y;case 125*f:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+c:-1==y&&(S=Tp(S,/\f/g,"")),p>0&&(Mp(S)-d||0===f&&47===g)&&_p(p>32?Jp(S+";",i,r,d-1,l):Jp(Tp(S," ","")+";",i,r,d-2,l),l);break;case 59:S+=";";default:if(_p(w=Zp(S,e,r,h,c,a,s,b,k=[],C=[],d,n),n),123===x)if(0===c)Xp(S,e,w,w,k,n,d,s,C);else switch(99===u&&110===Bp(S,3)?100:u){case 100:case 108:case 109:case 115:Xp(t,w,w,i&&_p(Zp(t,w,w,0,0,a,s,b,a,k=[],d,C),C),a,C,d,s,i?k:C);break;default:Xp(S,w,w,w,[""],C,0,s,C)}}h=c=p=0,f=y=1,b=S="",d=o;break;case 58:d=1+Mp(S),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==(Dp=Ep>0?Bp(Ip,--Ep):0,Fp--,10===Dp&&(Fp=1,Ap--),Dp))continue;switch(S+=wp(x),x*f){case 38:y=c>0?1:(S+="\f",-1);break;case 44:s[h++]=(Mp(S)-1)*y,y=1;break;case 64:45===Pp()&&(S+=Wp(Rp())),u=Pp(),c=d=Mp(b=S+=Vp(zp())),x++;break;case 45:45===g&&2==Mp(S)&&(f=0)}}return n}function Zp(t,e,r,i,a,n,o,s,l,h,c,d){for(var u=a-1,p=0===a?n:[""],g=function(t){return t.length}(p),f=0,m=0,y=0;f<i;++f)for(var x=0,b=Lp(t,u+1,u=Cp(m=o[f])),k=t;x<g;++x)(k=Sp(m>0?p[x]+" "+b:Tp(b,/&\f/g,p[x])))&&(l[y++]=k);return Op(t,e,r,0===a?bp:s,l,h,c,d)}function Qp(t,e,r,i){return Op(t,e,r,xp,wp(Dp),Lp(t,2,-2),0,i)}function Jp(t,e,r,i,a){return Op(t,e,r,kp,Lp(t,0,i),Lp(t,i+1,-1),i,a)}function Kp(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function tg(t,e,r,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case kp:return t.return=t.return||t.value;case xp:return"";case"@keyframes":return t.return=t.value+"{"+Kp(t.children,i)+"}";case bp:if(!Mp(t.value=t.props.join(",")))return""}return Mp(r=Kp(t.children,i))?t.return=t.value+"{"+r+"}":""}var eg={id:"c4",detector:Ie((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./c4Diagram-6F5ED5ID-Bbqvpa8H.js");return{diagram:t}}),__vite__mapDeps([13,14,11,12,2,3]),import.meta.url);return{id:"c4",diagram:t}}),"loader")},rg="flowchart",ig={id:rg,detector:Ie(((t,e)=>{var r,i;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&"elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&/^\s*graph/.test(t)}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./flowDiagram-7ASYPVHJ-wCWrRB02.js");return{diagram:t}}),__vite__mapDeps([15,16,11,12,17,2,3]),import.meta.url);return{id:rg,diagram:t}}),"loader")},ag="flowchart-v2",ng={id:ag,detector:Ie(((t,e)=>{var r,i,a;return"dagre-d3"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&("elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(a=null==e?void 0:e.flowchart)?void 0:a.defaultRenderer))||/^\s*flowchart/.test(t))}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./flowDiagram-7ASYPVHJ-wCWrRB02.js");return{diagram:t}}),__vite__mapDeps([15,16,11,12,17,2,3]),import.meta.url);return{id:ag,diagram:t}}),"loader")},og={id:"er",detector:Ie((t=>/^\s*erDiagram/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./erDiagram-6RL3IURR-tkYxbOwJ.js");return{diagram:t}}),__vite__mapDeps([18,1,2,3,4,5,11,12,6,7,8,9]),import.meta.url);return{id:"er",diagram:t}}),"loader")},sg="gitGraph",lg={id:sg,detector:Ie((t=>/^\s*gitGraph/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./gitGraphDiagram-NRZ2UAAF-CzfIrjrb.js");return{diagram:t}}),__vite__mapDeps([19,20,21,22,2,3,5,4,7,8,10,11,12]),import.meta.url);return{id:sg,diagram:t}}),"loader")},hg="gantt",cg={id:hg,detector:Ie((t=>/^\s*gantt/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./ganttDiagram-NTVNEXSI-CipIDMvM.js");return{diagram:t}}),__vite__mapDeps([23,2,3,11,12,24,25,26]),import.meta.url);return{id:hg,diagram:t}}),"loader")},dg="info",ug={id:dg,detector:Ie((t=>/^\s*info/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./infoDiagram-A4XQUW5V-Cq17uMjs.js");return{diagram:t}}),__vite__mapDeps([27,22,2,3,5,4,7,8,10,11,12]),import.meta.url);return{id:dg,diagram:t}}),"loader")},pg={id:"pie",detector:Ie((t=>/^\s*pie/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./pieDiagram-YF2LJOPJ-BPY4ab3U.js");return{diagram:t}}),__vite__mapDeps([28,20,22,2,3,5,4,7,8,10,11,12,29,30,26]),import.meta.url);return{id:"pie",diagram:t}}),"loader")},gg="quadrantChart",fg={id:gg,detector:Ie((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./quadrantDiagram-OS5C2QUG-DNcT7n4n.js");return{diagram:t}}),__vite__mapDeps([31,11,12,25,2,3,26]),import.meta.url);return{id:gg,diagram:t}}),"loader")},mg="xychart",yg={id:mg,detector:Ie((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./xychartDiagram-6QU3TZC5-vQAUXteB.js");return{diagram:t}}),__vite__mapDeps([32,11,12,26,30,33,25,2,3]),import.meta.url);return{id:mg,diagram:t}}),"loader")},xg="requirement",bg={id:xg,detector:Ie((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./requirementDiagram-MIRIMTAZ-BiwgQpI6.js");return{diagram:t}}),__vite__mapDeps([34,11,12,1,2,3,4,5,6,7,8,9]),import.meta.url);return{id:xg,diagram:t}}),"loader")},kg="sequence",Cg={id:kg,detector:Ie((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./sequenceDiagram-G6AWOVSC-CS1ohKZS.js");return{diagram:t}}),__vite__mapDeps([35,14,21,11,12,2,3]),import.meta.url);return{id:kg,diagram:t}}),"loader")},wg="class",Sg={id:wg,detector:Ie(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer)&&/^\s*classDiagram/.test(t)}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./classDiagram-LNE6IOMH-D--jW1ZB.js");return{diagram:t}}),__vite__mapDeps([36,37,16,11,12,2,3]),import.meta.url);return{id:wg,diagram:t}}),"loader")},Tg="classDiagram",vg={id:Tg,detector:Ie(((t,e)=>{var r;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.class)?void 0:r.defaultRenderer))||/^\s*classDiagram-v2/.test(t)}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./classDiagram-v2-MQ7JQ4JX-D--jW1ZB.js");return{diagram:t}}),__vite__mapDeps([38,37,16,11,12,2,3]),import.meta.url);return{id:Tg,diagram:t}}),"loader")},Bg="state",Lg={id:Bg,detector:Ie(((t,e)=>{var r;return"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer)&&/^\s*stateDiagram/.test(t)}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./stateDiagram-MAYHULR4-C25IIyJY.js");return{diagram:t}}),__vite__mapDeps([39,40,16,11,12,1,2,3,4,5,6,7,8,9]),import.meta.url);return{id:Bg,diagram:t}}),"loader")},Mg="stateDiagram",_g={id:Mg,detector:Ie(((t,e)=>{var r;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(r=null==e?void 0:e.state)?void 0:r.defaultRenderer))}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./stateDiagram-v2-4JROLMXI-Du1ne-Iw.js");return{diagram:t}}),__vite__mapDeps([41,40,16,11,12,2,3]),import.meta.url);return{id:Mg,diagram:t}}),"loader")},Ag="journey",Fg={id:Ag,detector:Ie((t=>/^\s*journey/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./journeyDiagram-G5WM74LC-CTXVfGIj.js");return{diagram:t}}),__vite__mapDeps([42,14,11,12,29,2,3]),import.meta.url);return{id:Ag,diagram:t}}),"loader")},$g={draw:Ie(((t,e,r)=>{Pe.debug("rendering svg for syntax error\n");const i=yp(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),ci(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")},Eg=$g,Dg={db:{},renderer:$g,parser:{parse:Ie((()=>{}),"parse")}},Ig="flowchart-elk",Og={id:Ig,detector:Ie(((t,e={})=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer))&&(e.layout="elk",!0)}),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./flowDiagram-7ASYPVHJ-wCWrRB02.js");return{diagram:t}}),__vite__mapDeps([15,16,11,12,17,2,3]),import.meta.url);return{id:Ig,diagram:t}}),"loader")},Rg="timeline",Pg={id:Rg,detector:Ie((t=>/^\s*timeline/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./timeline-definition-U7ZMHBDA-bNrrM9Xd.js");return{diagram:t}}),__vite__mapDeps([43,11,12,29,2,3]),import.meta.url);return{id:Rg,diagram:t}}),"loader")},zg="mindmap",qg={id:zg,detector:Ie((t=>/^\s*mindmap/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./mindmap-definition-GWI6TPTV-DLlhxG7q.js");return{diagram:t}}),__vite__mapDeps([44,45,2,3,11,12]),import.meta.url);return{id:zg,diagram:t}}),"loader")},Ng="kanban",Wg={id:Ng,detector:Ie((t=>/^\s*kanban/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./kanban-definition-QRCXZQQD-ELngktM2.js");return{diagram:t}}),__vite__mapDeps([46,2,3,11,12]),import.meta.url);return{id:Ng,diagram:t}}),"loader")},jg="sankey",Hg={id:jg,detector:Ie((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./sankeyDiagram-Y46BX6SQ-Yek58mqV.js");return{diagram:t}}),__vite__mapDeps([47,11,12,30,26,48,2,3]),import.meta.url);return{id:jg,diagram:t}}),"loader")},Ug="packet",Yg={id:Ug,detector:Ie((t=>/^\s*packet-beta/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./diagram-QW4FP2JN-fVKWzjDQ.js");return{diagram:t}}),__vite__mapDeps([49,20,22,2,3,5,4,7,8,10,11,12]),import.meta.url);return{id:Ug,diagram:t}}),"loader")},Vg="block",Gg={id:Vg,detector:Ie((t=>/^\s*block-beta/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./blockDiagram-ZHA2E4KO-9FMsNisX.js");return{diagram:t}}),__vite__mapDeps([50,10,4,2,3,5,11,12,1,17]),import.meta.url);return{id:Vg,diagram:t}}),"loader")},Xg="architecture",Zg={id:Xg,detector:Ie((t=>/^\s*architecture/.test(t)),"detector"),loader:Ie((async()=>{const{diagram:t}=await B((async()=>{const{diagram:t}=await import("./architectureDiagram-UYN6MBPD-BgbOosfX.js");return{diagram:t}}),__vite__mapDeps([51,20,21,22,2,3,5,4,7,8,10,45,11,12]),import.meta.url);return{id:Xg,diagram:t}}),"loader")},Qg=!1,Jg=Ie((()=>{Qg||(Qg=!0,Ri("error",Dg,(t=>"error"===t.toLowerCase().trim())),Ri("---",{db:{clear:Ie((()=>{}),"clear")},styles:{},renderer:{draw:Ie((()=>{}),"draw")},parser:{parse:Ie((()=>{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:Ie((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),Ve(eg,Wg,vg,Sg,og,cg,ug,pg,bg,Cg,Og,ng,ig,qg,Pg,lg,_g,Lg,Fg,fg,Hg,Yg,yg,Gg,Zg))}),"addDiagrams"),Kg=Ie((async()=>{Pe.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ue).map((async([t,{detector:e,loader:r}])=>{if(r)try{Pi(t)}catch{try{const{diagram:t,id:i}=await r();Ri(i,t,e)}catch(i){throw Pe.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Ue[t],i}}})))).filter((t=>"rejected"===t.status));if(t.length>0){Pe.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Pe.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams");function tf(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ef(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}Ie(tf,"setA11yDiagramInfo"),Ie(ef,"addSVGa11yTitleDescription");var rf=(Ie(u=class{constructor(t,e,r,i,a){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=a}static async fromText(t,e={}){var r,i;const a=Mr(),n=Ye(t,a);t=Zs(t)+"\n";try{Pi(n)}catch{const t=Xe(n);if(!t)throw new He(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();Ri(e,r)}const{db:o,parser:s,renderer:l,init:h}=Pi(n);return s.parser&&(s.parser.yy=o),null==(r=o.clear)||r.call(o),null==h||h(a),e.title&&(null==(i=o.setDiagramTitle)||i.call(o,e.title)),await s.parse(t),new u(n,t,o,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},"Diagram"),u),af=[],nf=Ie((()=>{af.forEach((t=>{t()})),af=[]}),"attachFunctions"),of=Ie((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function sf(t){const e=t.match(Ne);if(!e)return{text:t,metadata:{}};let r=Ro(e[1],{schema:Oo})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}Ie(sf,"extractFrontMatter");var lf=Ie((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),hf=Ie((t=>{const{text:e,metadata:r}=sf(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}}),"processFrontmatter"),cf=Ie((t=>{const e=Xs.detectInit(t)??{},r=Xs.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===(null==r?void 0:r.type)&&(e.wrap=!0),{text:xs(t),directive:e}}),"processDirectives");function df(t){const e=lf(t),r=hf(e),i=cf(r.text),a=Gs(r.config,i.directive);return{code:t=of(i.text),title:r.title,config:a}}function uf(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}Ie(df,"preprocessDiagram"),Ie(uf,"toBase64");var pf=["foreignobject"],gf=["dominant-baseline"];function ff(t){const e=df(t);return Fr(),Ar(e.config??{}),e}async function mf(t,e){Jg();try{const{code:e,config:r}=ff(t);return{diagramType:(await Lf(e)).type,config:r}}catch(r){if(null==e?void 0:e.suppressErrors)return!1;throw r}}Ie(ff,"processAndSetConfigs"),Ie(mf,"parse");var yf=Ie(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),xf=Ie(((t,e=new Map)=>{var r;let i="";if(void 0!==t.themeCSS&&(i+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(i+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const a=t.htmlLabels??(null==(r=t.flowchart)?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{rt(t.styles)||a.forEach((e=>{i+=yf(t.id,e,t.styles)})),rt(t.textStyles)||(i+=yf(t.id,"tspan",((null==t?void 0:t.textStyles)||[]).map((t=>t.replace("color","fill")))))}))}return i}),"createCssStyles"),bf=Ie(((t,e,r,i)=>{const a=xf(t,r);return Kp(Gp(`${i}{${fi(e,a,t.themeVariables)}}`),tg)}),"createUserStyles"),kf=Ie(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Qs(i),i=i.replace(/<br>/g,"<br/>"),i}),"cleanUpSvgCode"),Cf=Ie(((t="",e)=>{var r,i;return`<iframe style="width:100%;height:${(null==(i=null==(r=null==e?void 0:e.viewBox)?void 0:r.baseVal)?void 0:i.height)?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${uf(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`}),"putIntoIFrame"),wf=Ie(((t,e,r,i,a)=>{const n=t.append("div");n.attr("id",r),i&&n.attr("style",i);const o=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&o.attr("xmlns:xlink",a),o.append("g"),t}),"appendDivSvgG");function Sf(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ie(Sf,"sandboxedIframe");var Tf=Ie(((t,e,r,i)=>{var a,n,o;null==(a=t.getElementById(e))||a.remove(),null==(n=t.getElementById(r))||n.remove(),null==(o=t.getElementById(i))||o.remove()}),"removeExistingElements"),vf=Ie((async function(t,e,r){var i,a,n,o,s,l;Jg();const h=ff(e);e=h.code;const c=Mr();Pe.debug(c),e.length>((null==c?void 0:c.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const d="#"+t,u="i"+t,p="#"+u,g="d"+t,f="#"+g,m=Ie((()=>{const t=I(x?p:f).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let y=I("body");const x="sandbox"===c.securityLevel,b="loose"===c.securityLevel,k=c.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=Sf(I(r),u);y=I(t.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=I(r);wf(y,t,g,`font-family: ${k}`,"http://www.w3.org/1999/xlink")}else{if(Tf(document,t,g,u),x){const t=Sf(I("body"),u);y=I(t.nodes()[0].contentDocument.body),y.node().style.margin=0}else y=I("body");wf(y,t,g)}let C,w;try{C=await rf.fromText(e,{title:h.title})}catch(F){if(c.suppressErrorRendering)throw m(),F;C=await rf.fromText("error"),w=F}const S=y.select(f).node(),T=C.type,v=S.firstChild,B=v.firstChild,L=null==(a=(i=C.renderer).getClasses)?void 0:a.call(i,e,C),M=bf(c,T,L,d),_=document.createElement("style");_.innerHTML=M,v.insertBefore(_,B);try{await C.renderer.draw(e,t,mp,C)}catch($){throw c.suppressErrorRendering?m():Eg.draw(e,t,mp),$}Mf(T,y.select(`${f} svg`),null==(o=(n=C.db).getAccTitle)?void 0:o.call(n),null==(l=(s=C.db).getAccDescription)?void 0:l.call(s)),y.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let A=y.select(f).node().innerHTML;if(Pe.debug("config.arrowMarkerAbsolute",c.arrowMarkerAbsolute),A=kf(A,x,Xr(c.arrowMarkerAbsolute)),x){const t=y.select(f+" svg").node();A=Cf(A,t)}else b||(A=Ee.sanitize(A,{ADD_TAGS:pf,ADD_ATTR:gf,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(nf(),w)throw w;return m(),{diagramType:T,svg:A,bindFunctions:C.db.bindFunctions}}),"render");function Bf(t={}){var e;const r=Qe({},t);(null==r?void 0:r.fontFamily)&&!(null==(e=r.themeVariables)?void 0:e.fontFamily)&&(r.themeVariables||(r.themeVariables={}),r.themeVariables.fontFamily=r.fontFamily),Tr(r),(null==r?void 0:r.theme)&&r.theme in cr?r.themeVariables=cr[r.theme].getThemeVariables(r.themeVariables):r&&(r.themeVariables=cr.default.getThemeVariables(r.themeVariables));const i="object"==typeof r?Sr(r):Br();ze(i.logLevel),Jg()}Ie(Bf,"initialize");var Lf=Ie(((t,e={})=>{const{code:r}=df(t);return rf.fromText(r,e)}),"getDiagramFromText");function Mf(t,e,r,i){tf(e,t),ef(e,r,i,e.attr("id"))}Ie(Mf,"addA11yInfo");var _f=Object.freeze({render:vf,parse:mf,getDiagramFromText:Lf,initialize:Bf,getConfig:Mr,setConfig:Lr,getSiteConfig:Br,updateSiteConfig:vr,reset:Ie((()=>{Fr()}),"reset"),globalReset:Ie((()=>{Fr(xr)}),"globalReset"),defaultConfig:xr});ze(Mr().logLevel),Fr(Mr());var Af=Ie(((t,e,r)=>{Pe.warn(t),Us(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),Ff=Ie((async function(t={querySelector:".mermaid"}){try{await $f(t)}catch(e){if(Us(e)&&Pe.error(e.str),jf.parseError&&jf.parseError(e),!t.suppressErrors)throw Pe.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),$f=Ie((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=_f.getConfig();let a;if(Pe.debug((t?"":"No ")+"Callback function found"),r)a=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(e)}Pe.debug(`Found ${a.length} diagrams`),void 0!==(null==i?void 0:i.startOnLoad)&&(Pe.debug("Start On Load: "+(null==i?void 0:i.startOnLoad)),_f.updateSiteConfig({startOnLoad:null==i?void 0:i.startOnLoad}));const n=new Xs.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const h of Array.from(a)){if(Pe.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${n.next()}`;o=h.innerHTML,o=lh(Xs.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=Xs.detectInit(o);r&&Pe.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await Wf(e,o,h);h.innerHTML=r,t&&await t(e),i&&i(h)}catch(l){Af(l,s,jf.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),Ef=Ie((function(t){_f.initialize(t)}),"initialize"),Df=Ie((async function(t,e,r){Pe.warn("mermaid.init is deprecated. Please use run instead."),t&&Ef(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Ff(i)}),"init"),If=Ie((async(t,{lazyLoad:e=!0}={})=>{Jg(),Ve(...t),!1===e&&await Kg()}),"registerExternalDiagrams"),Of=Ie((function(){if(jf.startOnLoad){const{startOnLoad:t}=_f.getConfig();t&&jf.run().catch((t=>Pe.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Of,!1);var Rf=Ie((function(t){jf.parseError=t}),"setParseErrorHandler"),Pf=[],zf=!1,qf=Ie((async()=>{if(!zf){for(zf=!0;Pf.length>0;){const e=Pf.shift();if(e)try{await e()}catch(t){Pe.error("Error executing queue",t)}}zf=!1}}),"executeQueue"),Nf=Ie((async(t,e)=>new Promise(((r,i)=>{const a=Ie((()=>new Promise(((a,n)=>{_f.parse(t,e).then((t=>{a(t),r(t)}),(t=>{var e;Pe.error("Error parsing",t),null==(e=jf.parseError)||e.call(jf,t),n(t),i(t)}))}))),"performCall");Pf.push(a),qf().catch(i)}))),"parse"),Wf=Ie(((t,e,r)=>new Promise(((i,a)=>{const n=Ie((()=>new Promise(((n,o)=>{_f.render(t,e,r).then((t=>{n(t),i(t)}),(t=>{var e;Pe.error("Error parsing",t),null==(e=jf.parseError)||e.call(jf,t),o(t),a(t)}))}))),"performCall");Pf.push(n),qf().catch(a)}))),"render"),jf={startOnLoad:!0,mermaidAPI:_f,parse:Nf,render:Wf,init:Df,run:Ff,registerExternalDiagrams:If,registerLayoutLoaders:pp,initialize:Ef,parseError:void 0,contentLoaded:Of,setParseErrorHandler:Rf,detectType:Ye,registerIconPacks:os},Hf=jf;
|
|
9
|
-
/*! Check if previously processed */
|
|
10
|
-
/*!
|
|
11
|
-
* Wait for document loaded before starting the execution
|
|
12
|
-
*/
|
|
13
|
-
const Uf={startOnLoad:!0,theme:"forest",logLevel:"fatal",securityLevel:"strict",fontFamily:"var(--text-font)",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};function Yf(){return function(){const t="abcdefghijklmnopqrstuvwxyz";return Array.from({length:6},(()=>t[Math.floor(26*Math.random())])).join("")}()}const Vf=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const e=_.c(9),{diagram:r}=t,[i]=A.useState(Yf),a="dark"===F().theme;let n,o;Hf.initialize({...Uf,theme:a?"dark":"forest",darkMode:a}),e[0]!==r||e[1]!==i?(n=async()=>(await Hf.render(i,r,void 0).catch((t=>{var e;throw null==(e=document.getElementById(i))||e.remove(),E.warn("Failed to render mermaid diagram",t),t}))).svg,e[0]=r,e[1]=i,e[2]=n):n=e[2],e[3]!==a||e[4]!==r||e[5]!==i?(o=[r,i,a],e[3]=a,e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:s}=$(n,o);if(!s)return null;let l;return e[7]!==s?(l=D.jsx("div",{dangerouslySetInnerHTML:{__html:s}}),e[7]=s,e[8]=l):l=e[8],l}},Symbol.toStringTag,{value:"Module"}));export{Ru as $,Ct as A,Di as B,bt as C,Gs as D,Mr as E,fr as F,Ds as G,yp as H,mp as I,Oo as J,or as K,ai as L,ni as M,Vs as N,oi as O,Jr as P,$s as Q,di as R,St as S,vt as T,lt as U,Bt as V,Oe as W,mi as X,Xc as Y,ps as Z,Ie as _,Si as a,qu as a0,Hu as a1,Xr as a2,vh as a3,hs as a4,Th as a5,Qs as a6,As as a7,rt as a8,Ch as a9,cp as aa,zu as ab,Zu as ac,Zc as ad,Mc as ae,Pu as af,sp as ag,tp as ah,Ju as ai,ls as aj,os as ak,is as al,ot as am,Vf as an,wi as b,Ai as c,ci as d,Qe as e,qs as f,vi as g,Wr as h,us as i,si as j,zs as k,Pe as l,Or as m,Li as n,Bi as o,Fi as p,fp as q,gp as r,Ti as s,$i as t,Xs as u,Ci as v,Rs as w,Ro as x,Iu as y,Js as z};
|